Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

793 B
Raw Blame
import { Alert } from 'react-native';
import type { TFunction } from 'i18next';

/**
 * Every sign-out entry (settings, home drawer, partner home and drawer) asks
 * first: signing out clears this phone's saved accounts and local mirror, and
 * running tasks stop reporting here. Switching accounts already warns; the
 * heavier action must not be quieter.
 */
export function confirmLogout(t: TFunction, hasRunningTasks: boolean, onConfirm: () => void): void {
  Alert.alert(
    t('settings.account.logoutConfirmTitle'),
    hasRunningTasks ? t('settings.account.logoutConfirmRunning') : t('settings.account.logoutHint'),
    [
      { text: t('devices.common.cancel'), style: 'cancel' },
      { text: t('settings.account.logout'), style: 'destructive', onPress: onConfirm },
    ],
  );
}