import { styled } from '@/styles'; import { Modal, ModalWrapper, ModalCloseButton } from '@/ui/modal'; import { Button } from '@/ui/button'; import { Check, UnCheck } from './icon'; import { useState } from 'react'; import { useTranslation } from '@affine/i18n'; import { useAppState } from '@/providers/app-state-provider'; interface LoginModalProps { open: boolean; onClose: (wait: boolean) => void; } export const LogoutModal = ({ open, onClose }: LoginModalProps) => { const [localCache, setLocalCache] = useState(true); const { blobDataSynced } = useAppState(); const { t } = useTranslation(); return (
{ onClose(true); }} />
{t('Sign out')}? {blobDataSynced ? t('Set up an AFFiNE account to sync data') : 'All data has been stored in the cloud'} {localCache ? ( { setLocalCache(false); }} > ) : ( { setLocalCache(true); }} > )} {t('Retain local cached data')}
); }; const Header = styled('div')({ position: 'relative', height: '44px', }); const Content = styled('div')({ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '16px', }); const ContentTitle = styled('h1')({ fontSize: '20px', lineHeight: '28px', fontWeight: 600, textAlign: 'center', paddingBottom: '16px', }); const SignDes = styled('div')(({ theme }) => { return { fontWeight: 400, color: theme.colors.textColor, fontSize: '16px', }; }); const StyleCheck = styled('span')(() => { return { display: 'inline-block', cursor: 'pointer', svg: { verticalAlign: 'sub', marginRight: '8px', }, }; }); const StyleTips = styled('span')(() => { return { userSelect: 'none', }; });