From b7e83d10dca0d7c1df95404fcf43cb7287b0a900 Mon Sep 17 00:00:00 2001 From: Kima Date: Wed, 22 May 2024 18:09:40 +0200 Subject: [PATCH] toggle to change new popups and fix in plus --- .../settings/settings_screen.i18n.dart | 3 ++ .../settings/submenu/personalize_screen.dart | 47 +++++++++++++++++++ refilc_plus | 2 +- 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/refilc_mobile_ui/lib/screens/settings/settings_screen.i18n.dart b/refilc_mobile_ui/lib/screens/settings/settings_screen.i18n.dart index 264b7d6..01dbb09 100644 --- a/refilc_mobile_ui/lib/screens/settings/settings_screen.i18n.dart +++ b/refilc_mobile_ui/lib/screens/settings/settings_screen.i18n.dart @@ -121,6 +121,7 @@ extension SettingsLocalization on String { "grade_streak_subtitle": "So many 5s in a row?!", // other "only_ch_title_font": "Font Only for Titles", + "new_popups": "New Popups", }, "hu_hu": { "personal_details": "Személyes információk", @@ -240,6 +241,7 @@ extension SettingsLocalization on String { "grade_streak_subtitle": "Egymás után ennyi 5-ös?!", // other "only_ch_title_font": "Betűtípus csak címekre", + "new_popups": "Új felugró ablakok", }, "de_de": { "personal_details": "Persönliche Angaben", @@ -359,6 +361,7 @@ extension SettingsLocalization on String { "grade_streak_subtitle": "So viele 5er in Folge?!", // other "only_ch_title_font": "Schriftart nur für Titel", + "new_popups": "Neue Popups", }, }; diff --git a/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart b/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart index f6d804d..696fa33 100644 --- a/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/submenu/personalize_screen.dart @@ -461,6 +461,49 @@ class PersonalizeSettingsScreenState extends State ), ], ), + // new popup toggle + SplittedPanel( + padding: const EdgeInsets.only(top: 9.0), + cardPadding: const EdgeInsets.all(4.0), + isSeparated: true, + children: [ + PanelButton( + padding: const EdgeInsets.only(left: 14.0, right: 6.0), + onPressed: () async { + settingsProvider.update( + newPopups: !settingsProvider.newPopups); + + setState(() {}); + }, + title: Text( + "new_popups".i18n, + style: TextStyle( + color: AppColors.of(context).text.withOpacity( + settingsProvider.newPopups ? .95 : .25), + ), + ), + leading: Icon( + FeatherIcons.alertOctagon, + size: 22.0, + color: AppColors.of(context).text.withOpacity( + settingsProvider.newPopups ? .95 : .25), + ), + trailing: Switch( + onChanged: (v) async { + settingsProvider.update(newPopups: v); + + setState(() {}); + }, + value: settingsProvider.newPopups, + activeColor: Theme.of(context).colorScheme.secondary, + ), + borderRadius: const BorderRadius.vertical( + top: Radius.circular(12.0), + bottom: Radius.circular(12.0), + ), + ), + ], + ), // change subject icons // SplittedPanel( // padding: const EdgeInsets.only(top: 9.0), @@ -980,6 +1023,10 @@ class PersonalizeSettingsScreenState extends State ), ], ), + // bottom padding + const SizedBox( + height: 20.0, + ), ], ), ), diff --git a/refilc_plus b/refilc_plus index 6a2f729..b470466 160000 --- a/refilc_plus +++ b/refilc_plus @@ -1 +1 @@ -Subproject commit 6a2f729e179f3435b0c9d350326708a67bdb0364 +Subproject commit b470466b79ef1ed7b18701c157a8bd37488c947d