mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-18 23:35:25 +02:00
improvements & bugfixes
This commit is contained in:
parent
4f54e54bba
commit
b9e4d29fa1
@ -6,6 +6,7 @@
|
||||
"generalContinueButtonLabel": "Weiter",
|
||||
"generalUnderstoodButtonLabel": "OK",
|
||||
"generalLoadingLabel": "Wird geladen...",
|
||||
"generalSwipeForMore": "Wische hoch für mehr",
|
||||
|
||||
"welcomeScreenDescription": "Finde heraus was du den ganzen Tag gemacht hast und erlebe Erinnerungen wieder, die du komplett vergessen hast!",
|
||||
"welcomeScreenSubtitle": "Was hab ich heute gemacht?",
|
||||
@ -41,6 +42,9 @@
|
||||
"loginScreenFormPasswordLabel": "Passwort",
|
||||
"loginScreenFormSubmitButton": "Anmelden",
|
||||
"loginScreenLoginFailed": "E-Mail oder Passwort inkorrekt",
|
||||
"loginScreenSignUpDialogTitle": "Registrieren",
|
||||
"loginScreenSignUpDialogExplanation": "Wir haben deinen Account nicht gefunden. Möchtest du dich jetzt registrieren?",
|
||||
"loginScreenSignUpDialogAffirmationLabel": "Jetzt registrieren",
|
||||
|
||||
|
||||
"grantPermissionScreenTitle": "Berechtigungen erteilen",
|
||||
@ -71,7 +75,6 @@
|
||||
|
||||
|
||||
"memoryMapScreenTitle": "Standort",
|
||||
"memoryMapScreenExpandForMoreDescription": "Erweitere für mehr Details",
|
||||
"memoryMapScreenOpenNavigation": "Navigation öffnen",
|
||||
"memoryMapScreenValuesAddressLabel": "Geschätzte Adresse",
|
||||
"memoryMapScreenValuesAddressIsUnavailable": "Address nicht verfügbar",
|
||||
|
@ -7,6 +7,7 @@
|
||||
"generalSaveButtonLabel": "Save",
|
||||
"generalUnderstoodButtonLabel": "OK",
|
||||
"generalLoadingLabel": "Loading...",
|
||||
"generalSwipeForMore": "Swipe up for more",
|
||||
|
||||
"welcomeScreenDescription": "Find out what you did all the days and unlock moments you completely forgot!",
|
||||
"welcomeScreenSubtitle": "What did I do today?",
|
||||
@ -66,6 +67,9 @@
|
||||
"loginScreenFormPasswordLabel": "Password",
|
||||
"loginScreenFormSubmitButton": "Login",
|
||||
"loginScreenLoginFailed": "Email or password incorrect",
|
||||
"loginScreenSignUpDialogTitle": "Sign up",
|
||||
"loginScreenSignUpDialogExplanation": "We didn't find your account. Do you want to sign up now?",
|
||||
"loginScreenSignUpDialogAffirmationLabel": "Sign me up now",
|
||||
|
||||
|
||||
"grantPermissionScreenTitle": "Grant Permissions",
|
||||
@ -105,7 +109,6 @@
|
||||
|
||||
|
||||
"memoryMapScreenTitle": "Location",
|
||||
"memoryMapScreenExpandForMoreDescription": "Expand for more details",
|
||||
"memoryMapScreenOpenNavigation": "Open Navigation",
|
||||
"memoryMapScreenValuesAddressLabel": "Estimated Address",
|
||||
"memoryMapScreenValuesAddressIsUnavailable": "Address not available",
|
||||
|
@ -72,23 +72,47 @@ class _LoginScreenState extends AuthState<LoginScreen> with Loadable {
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> _askWhetherToSignUp() {
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
|
||||
return showPlatformDialog(
|
||||
context: context,
|
||||
builder: (_) => PlatformAlertDialog(
|
||||
title: Text(localizations.loginScreenSignUpDialogTitle),
|
||||
content: Text(localizations.loginScreenSignUpDialogExplanation),
|
||||
actions: <Widget>[
|
||||
PlatformDialogAction(
|
||||
child: Text(localizations.generalCancelButtonLabel),
|
||||
onPressed: () => Navigator.pop(context, false),
|
||||
),
|
||||
PlatformDialogAction(
|
||||
child: Text(localizations.loginScreenSignUpDialogAffirmationLabel),
|
||||
onPressed: () => Navigator.pop(context, true),
|
||||
),
|
||||
],
|
||||
),
|
||||
) as Future<bool>;
|
||||
}
|
||||
|
||||
Future<void> signIn() async {
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
|
||||
try {
|
||||
await _signIn();
|
||||
} catch (error) {
|
||||
try {
|
||||
await _signUp();
|
||||
} catch (error) {
|
||||
if (mounted) {
|
||||
context.showLongErrorSnackBar(
|
||||
message: localizations.loginScreenLoginFailed,
|
||||
);
|
||||
if (await _askWhetherToSignUp()) {
|
||||
try {
|
||||
await _signUp();
|
||||
} catch (error) {
|
||||
if (mounted) {
|
||||
context.showLongErrorSnackBar(
|
||||
message: localizations.loginScreenLoginFailed,
|
||||
);
|
||||
|
||||
passwordController.clear();
|
||||
passwordController.clear();
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,10 @@ class _MainScreenState extends AuthRequiredState<MainScreen> with Loadable {
|
||||
settings.resolution,
|
||||
imageFormatGroup: ImageFormatGroup.jpeg,
|
||||
);
|
||||
cameraController.setFlashMode(FlashMode.off);
|
||||
|
||||
try {
|
||||
cameraController.setFlashMode(FlashMode.off);
|
||||
} catch (error) {}
|
||||
|
||||
await previousCameraController?.dispose();
|
||||
|
||||
|
@ -98,7 +98,7 @@ class _MemoryMapScreenState extends State<MemoryMapScreen> with Loadable {
|
||||
const SheetIndicator(),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
Text(
|
||||
localizations.memoryMapScreenExpandForMoreDescription,
|
||||
localizations.generalSwipeForMore,
|
||||
style: getBodyTextTextStyle(context),
|
||||
),
|
||||
],
|
||||
|
@ -237,6 +237,13 @@ class _MemorySheetState extends State<MemorySheet> with Loadable {
|
||||
),
|
||||
],
|
||||
),
|
||||
if (widget.memory.location != null) ...[
|
||||
const SizedBox(height: SMALL_SPACE),
|
||||
Text(
|
||||
localizations.generalSwipeForMore,
|
||||
style: getBodyTextTextStyle(context),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -67,9 +67,7 @@ class _PhotoSwitchingState extends State<PhotoSwitching> {
|
||||
final nextImage = NetworkImage(nextPhotoURL);
|
||||
precacheImage(nextImage, context);
|
||||
|
||||
setState(() {
|
||||
images.add(nextImage);
|
||||
});
|
||||
images.add(nextImage);
|
||||
}
|
||||
|
||||
Future<void> getNextPhoto() async {
|
||||
|
@ -108,7 +108,7 @@ class _HelpSheetState extends State<HelpSheet> {
|
||||
});
|
||||
}
|
||||
|
||||
if (dontShowSheetAgain) {
|
||||
if (dontShowSheetAgain == true) {
|
||||
await UserHelpSheetsManager.setAsShown(widget.helpID);
|
||||
}
|
||||
});
|
||||
|
@ -27,47 +27,45 @@ class _HelpSheetFormState extends State<HelpSheetForm> {
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
|
||||
return ModalSheet(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: getTitleTextStyle(context),
|
||||
),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
widget.helpContent,
|
||||
const SizedBox(height: LARGE_SPACE),
|
||||
PlatformElevatedButton(
|
||||
child: Text(localizations.generalUnderstoodButtonLabel),
|
||||
onPressed: () => Navigator.pop(context, dontShowSheetAgain),
|
||||
),
|
||||
const SizedBox(height: SMALL_SPACE),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
PlatformSwitch(
|
||||
value: dontShowSheetAgain,
|
||||
activeColor: platformThemeData(
|
||||
context,
|
||||
material: (data) => data.colorScheme.primary,
|
||||
cupertino: (data) => data.primaryColor,
|
||||
),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
dontShowSheetAgain = value;
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: getTitleTextStyle(context),
|
||||
),
|
||||
const SizedBox(height: MEDIUM_SPACE),
|
||||
widget.helpContent,
|
||||
const SizedBox(height: LARGE_SPACE),
|
||||
PlatformElevatedButton(
|
||||
child: Text(localizations.generalUnderstoodButtonLabel),
|
||||
onPressed: () => Navigator.pop(context, dontShowSheetAgain),
|
||||
),
|
||||
const SizedBox(height: SMALL_SPACE),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
PlatformSwitch(
|
||||
value: dontShowSheetAgain,
|
||||
activeColor: platformThemeData(
|
||||
context,
|
||||
material: (data) => data.colorScheme.primary,
|
||||
cupertino: (data) => data.primaryColor,
|
||||
),
|
||||
const SizedBox(width: SMALL_SPACE),
|
||||
Text(
|
||||
localizations.helpSheetDontShowAgain,
|
||||
style: getBodyTextTextStyle(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
dontShowSheetAgain = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(width: SMALL_SPACE),
|
||||
Text(
|
||||
localizations.helpSheetDontShowAgain,
|
||||
style: getBodyTextTextStyle(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -14,38 +14,36 @@ class ModalSheet extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final innerChild = Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: MEDIUM_SPACE),
|
||||
child: child,
|
||||
);
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
PlatformWidget(
|
||||
material: (_, __) => Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(LARGE_SPACE),
|
||||
topRight: Radius.circular(LARGE_SPACE),
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(vertical: MEDIUM_SPACE),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
PlatformWidget(
|
||||
material: (_, __) => Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(LARGE_SPACE),
|
||||
topRight: Radius.circular(LARGE_SPACE),
|
||||
),
|
||||
color: getSheetColor(context),
|
||||
),
|
||||
color: getSheetColor(context),
|
||||
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
||||
child: child,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
||||
child: innerChild,
|
||||
),
|
||||
cupertino: (_, __) => CupertinoPopupSurface(
|
||||
isSurfacePainted: false,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
||||
child: innerChild,
|
||||
cupertino: (_, __) => CupertinoPopupSurface(
|
||||
isSurfacePainted: false,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: LARGE_SPACE),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user