import { Button } from '@/components/Button'; import { ConfirmSignoutContainer } from '@/components/ConfirmSignoutModal'; import { OtherSessionsLogoutContainer } from '@/components/OtherSessionsLogout'; import { PreferencesGroup, PreferencesSegment, Subtitle, Text, Title, } from '@/preferences/components'; import { WebApplication } from '@/ui_models/application'; import { AppState } from '@/ui_models/app_state'; import { observer } from 'mobx-react-lite'; import { FunctionComponent } from 'preact'; const LogOutView: FunctionComponent<{ application: WebApplication; appState: AppState; }> = observer(({ application, appState }) => { return ( <> Log out Other devices Want to log out on all devices except this one? { appState.accountMenu.setOtherSessionsLogout(true); }} /> appState.openSessionsModal()} /> This device This will delete all local items and preferences. { appState.accountMenu.setSigningOut(true); }} /> > ); }); const ClearSessionDataView: FunctionComponent<{ application: WebApplication; appState: AppState; }> = observer(({ application, appState }) => { return ( <> Clear session data This will delete all local items and preferences. { appState.accountMenu.setSigningOut(true); }} /> >); }); export const LogOutWrapper: FunctionComponent<{ application: WebApplication; appState: AppState; }> = observer(({ application, appState }) => { const isLoggedIn = application.getUser() != undefined; if (!isLoggedIn) return ; return ; });