import { PreferencesGroup, PreferencesSegment, Text, Title } from '@/preferences/components'; import { Button } from '@/components/Button'; import { WebApplication } from '@/ui_models/application'; import { observer } from '@node_modules/mobx-react-lite'; import { HorizontalSeparator } from '@/components/shared/HorizontalSeparator'; import { dateToLocalizedString } from '@/utils'; import { useState } from 'preact/hooks'; import { ChangeEmail } from '@/preferences/panes/account/changeEmail'; import { ChangePassword } from '@/preferences/panes/account/changePassword'; type Props = { application: WebApplication; }; export const Credentials = observer(({ application }: Props) => { const [isChangePasswordDialogOpen, setIsChangePasswordDialogOpen] = useState(false); const [isChangeEmailDialogOpen, setIsChangeEmailDialogOpen] = useState(false); const user = application.getUser(); const passwordCreatedAtTimestamp = application.getUserPasswordCreationDate() as Date; const passwordCreatedOn = dateToLocalizedString(passwordCreatedAtTimestamp); return ( Credentials
Email
You're signed in as {user?.email}