improved UI

This commit is contained in:
Myzel394 2022-08-18 13:23:39 +02:00
parent 72c3e356ae
commit 4630c6d983
4 changed files with 39 additions and 12 deletions

View File

@ -29,6 +29,7 @@
"loginScreenFormEmailLabel": "E-Mail", "loginScreenFormEmailLabel": "E-Mail",
"loginScreenFormPasswordLabel": "Passwort", "loginScreenFormPasswordLabel": "Passwort",
"loginScreenFormSubmitButton": "Anmelden", "loginScreenFormSubmitButton": "Anmelden",
"loginScreenLoginFailed": "E-Mail oder Passwort inkorrekt",
"grantPermissionScreenTitle": "Berechtigungen erteilen", "grantPermissionScreenTitle": "Berechtigungen erteilen",
@ -59,5 +60,16 @@
"emptyScreenSubtitle": "Der Benutzer hat noch keine Erinnerungen erstellt!", "emptyScreenSubtitle": "Der Benutzer hat noch keine Erinnerungen erstellt!",
"emptyScreenDescription": "Um deinen Zeitstrahl sehen zu können musst du zuerst ein paar Erinnerungen erstellen! :)", "emptyScreenDescription": "Um deinen Zeitstrahl sehen zu können musst du zuerst ein paar Erinnerungen erstellen! :)",
"emptyScreenCreateMemory": "Erinnerung erstellen", "emptyScreenCreateMemory": "Erinnerung erstellen",
"memorySheetCreatedAtDataKey": "Erstellt am: {creationTimeFormatted}" "memorySheetCreatedAtDataKey": "Erstellt am: {creationTimeFormatted}",
"settingsScreenLoading": "Einstellungen werden geladen...",
"settingsScreenTitle": "Einstellungen",
"settingsScreenAccountSectionTitle": "Dein Account",
"settingsScreenAccountSectionCreationDateLabel": "Account-Erstellung",
"settingsScreenAccountSectionLogoutLabel": "Abmelden",
"settingsScreenDangerSectionTitle": "Gefahrbereich",
"settingsScreenDangerSectionDeleteAccountLabel": "Account löschen",
"settingsScreenDeleteAccountDescription": "Bist du dir sicher, dass du deinen Account löschen möchtest? Diese Aktion kann nicht rückgangig gemacht werden! Deine Erfahrungen werden ebenfalls gelöscht.",
"settingsScreenDeleteAccountConfirmLabel": "Account jetzt löschen"
} }

View File

@ -30,6 +30,7 @@
"loginScreenFormEmailLabel": "Email", "loginScreenFormEmailLabel": "Email",
"loginScreenFormPasswordLabel": "Password", "loginScreenFormPasswordLabel": "Password",
"loginScreenFormSubmitButton": "Login", "loginScreenFormSubmitButton": "Login",
"loginScreenLoginFailed": "Email or password incorrect",
"grantPermissionScreenTitle": "Grant Permissions", "grantPermissionScreenTitle": "Grant Permissions",
@ -75,11 +76,10 @@
"settingsScreenLoading": "Loading Settings...", "settingsScreenLoading": "Loading Settings...",
"settingsScreenTitle": "Settings", "settingsScreenTitle": "Settings",
"settingsScreenAccountSectionTitle": "Your Account", "settingsScreenAccountSectionTitle": "Your Account",
"settingsScreenAccountSectionCreationDateLabel": "Created at", "settingsScreenAccountSectionCreationDateLabel": "Account creation",
"settingsScreenAccountSectionLogoutLabel": "Log out", "settingsScreenAccountSectionLogoutLabel": "Log out",
"settingsScreenDangerSectionTitle": "Danger Zone", "settingsScreenDangerSectionTitle": "Danger Zone",
"settingsScreenDangerSectionDeleteAccountLabel": "Delete Account", "settingsScreenDangerSectionDeleteAccountLabel": "Delete Account",
"settingsScreenDeleteAccountTitle": "Delete Account",
"settingsScreenDeleteAccountDescription": "Are you sure you want to delete your account? This action cannot be undone! All your memories will be deleted as well.", "settingsScreenDeleteAccountDescription": "Are you sure you want to delete your account? This action cannot be undone! All your memories will be deleted as well.",
"settingsScreenDeleteAccountConfirmLabel": "Delete Account now" "settingsScreenDeleteAccountConfirmLabel": "Delete Account now"
} }

View File

@ -63,14 +63,14 @@ class _LoginScreenState extends AuthState<LoginScreen> with Loadable {
final localizations = AppLocalizations.of(context)!; final localizations = AppLocalizations.of(context)!;
try { try {
await _signUp(); await _signIn();
} catch (error) { } catch (error) {
try { try {
await _signIn(); await _signUp();
} catch (error) { } catch (error) {
if (mounted) { if (mounted) {
context.showLongErrorSnackBar( context.showLongErrorSnackBar(
message: localizations.generalError, message: localizations.loginScreenLoginFailed,
); );
emailController.clear(); emailController.clear();

View File

@ -92,11 +92,25 @@ class _SettingsScreenState extends AuthRequiredState<SettingsScreen>
title: Text(user!.email!), title: Text(user!.email!),
), ),
SettingsTile( SettingsTile(
leading: Text(localizations leading: Icon(context.platformIcons.time),
.settingsScreenAccountSectionCreationDateLabel), title: Column(
title: Text( crossAxisAlignment: CrossAxisAlignment.end,
DateFormat('d. MMMM y, HH:mm:ss') children: [
.format(DateTime.parse(user!.createdAt)), Text(
DateFormat('d. MMMM y, HH:mm:ss')
.format(DateTime.parse(user!.createdAt)),
),
const SizedBox(height: SMALL_SPACE),
Text(
localizations
.settingsScreenAccountSectionCreationDateLabel,
style: platformThemeData(
context,
material: (data) => data.textTheme.bodySmall,
cupertino: (data) => data.textTheme.textStyle,
),
)
],
), ),
), ),
SettingsTile( SettingsTile(
@ -130,7 +144,8 @@ class _SettingsScreenState extends AuthRequiredState<SettingsScreen>
context: context, context: context,
builder: (platformContext) => PlatformAlertDialog( builder: (platformContext) => PlatformAlertDialog(
title: Text( title: Text(
localizations.settingsScreenDeleteAccountTitle, localizations
.settingsScreenDangerSectionDeleteAccountLabel,
), ),
content: Text( content: Text(
localizations localizations