Skip to content

Commit ce62085

Browse files
committed
settings: Add settings page with vanilla Flutter widgets
This does not aim to fully implement the wip design for the settings page. We offer it mainly to test settings, so the implementation is kept as simple as possible. WIP design: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=446-21372&t=BZKpTQPSiBDNxwvB-0 Fixes: #1216 Signed-off-by: Zixuan James Li <[email protected]>
1 parent 6943e7c commit ce62085

17 files changed

+339
-11
lines changed

assets/icons/ZulipIcons.ttf

864 Bytes
Binary file not shown.

assets/icons/settings.svg

Lines changed: 4 additions & 0 deletions
Loading

assets/l10n/app_en.arb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"@chooseAccountPageTitle": {
2020
"description": "Title for the page to choose between Zulip accounts."
2121
},
22+
"settingsPageTitle": "Settings",
23+
"@settingsPageTitle": {
24+
"description": "Title for the settings page."
25+
},
2226
"switchAccountButton": "Switch account",
2327
"@switchAccountButton": {
2428
"description": "Label for main-menu button leading to the choose-account page."
@@ -783,6 +787,22 @@
783787
"voterNames": {"type": "String", "example": "Alice, Bob, Chad"}
784788
}
785789
},
790+
"themeSettingTitle": "THEME",
791+
"@themeSettingTitle": {
792+
"description": "Title for theme setting. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)"
793+
},
794+
"themeSettingDark": "Dark",
795+
"@themeSettingDark": {
796+
"description": "Label for dark theme setting."
797+
},
798+
"themeSettingLight": "Light",
799+
"@themeSettingLight": {
800+
"description": "Label for light theme setting."
801+
},
802+
"themeSettingSystem": "System",
803+
"@themeSettingSystem": {
804+
"description": "Label for system theme setting."
805+
},
786806
"pollWidgetQuestionMissing": "No question.",
787807
"@pollWidgetQuestionMissing": {
788808
"description": "Text to display for a poll when the question is missing"

lib/generated/l10n/zulip_localizations.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ abstract class ZulipLocalizations {
135135
/// **'Choose account'**
136136
String get chooseAccountPageTitle;
137137

138+
/// Title for the settings page.
139+
///
140+
/// In en, this message translates to:
141+
/// **'Settings'**
142+
String get settingsPageTitle;
143+
138144
/// Label for main-menu button leading to the choose-account page.
139145
///
140146
/// In en, this message translates to:
@@ -1143,6 +1149,30 @@ abstract class ZulipLocalizations {
11431149
/// **'({voterNames})'**
11441150
String pollVoterNames(String voterNames);
11451151

1152+
/// Title for theme setting. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)
1153+
///
1154+
/// In en, this message translates to:
1155+
/// **'THEME'**
1156+
String get themeSettingTitle;
1157+
1158+
/// Label for dark theme setting.
1159+
///
1160+
/// In en, this message translates to:
1161+
/// **'Dark'**
1162+
String get themeSettingDark;
1163+
1164+
/// Label for light theme setting.
1165+
///
1166+
/// In en, this message translates to:
1167+
/// **'Light'**
1168+
String get themeSettingLight;
1169+
1170+
/// Label for system theme setting.
1171+
///
1172+
/// In en, this message translates to:
1173+
/// **'System'**
1174+
String get themeSettingSystem;
1175+
11461176
/// Text to display for a poll when the question is missing
11471177
///
11481178
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get settingsPageTitle => 'Settings';
28+
2629
@override
2730
String get switchAccountButton => 'Switch account';
2831

@@ -613,6 +616,18 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
613616
return '($voterNames)';
614617
}
615618

619+
@override
620+
String get themeSettingTitle => 'THEME';
621+
622+
@override
623+
String get themeSettingDark => 'Dark';
624+
625+
@override
626+
String get themeSettingLight => 'Light';
627+
628+
@override
629+
String get themeSettingSystem => 'System';
630+
616631
@override
617632
String get pollWidgetQuestionMissing => 'No question.';
618633

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get settingsPageTitle => 'Settings';
28+
2629
@override
2730
String get switchAccountButton => 'Switch account';
2831

@@ -613,6 +616,18 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
613616
return '($voterNames)';
614617
}
615618

619+
@override
620+
String get themeSettingTitle => 'THEME';
621+
622+
@override
623+
String get themeSettingDark => 'Dark';
624+
625+
@override
626+
String get themeSettingLight => 'Light';
627+
628+
@override
629+
String get themeSettingSystem => 'System';
630+
616631
@override
617632
String get pollWidgetQuestionMissing => 'No question.';
618633

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'アカウントを選択';
2525

26+
@override
27+
String get settingsPageTitle => 'Settings';
28+
2629
@override
2730
String get switchAccountButton => 'Switch account';
2831

@@ -613,6 +616,18 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
613616
return '($voterNames)';
614617
}
615618

619+
@override
620+
String get themeSettingTitle => 'THEME';
621+
622+
@override
623+
String get themeSettingDark => 'Dark';
624+
625+
@override
626+
String get themeSettingLight => 'Light';
627+
628+
@override
629+
String get themeSettingSystem => 'System';
630+
616631
@override
617632
String get pollWidgetQuestionMissing => 'No question.';
618633

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get settingsPageTitle => 'Settings';
28+
2629
@override
2730
String get switchAccountButton => 'Switch account';
2831

@@ -613,6 +616,18 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
613616
return '($voterNames)';
614617
}
615618

619+
@override
620+
String get themeSettingTitle => 'THEME';
621+
622+
@override
623+
String get themeSettingDark => 'Dark';
624+
625+
@override
626+
String get themeSettingLight => 'Light';
627+
628+
@override
629+
String get themeSettingSystem => 'System';
630+
616631
@override
617632
String get pollWidgetQuestionMissing => 'No question.';
618633

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Wybierz konto';
2525

26+
@override
27+
String get settingsPageTitle => 'Settings';
28+
2629
@override
2730
String get switchAccountButton => 'Przełącz konto';
2831

@@ -613,6 +616,18 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
613616
return '($voterNames)';
614617
}
615618

619+
@override
620+
String get themeSettingTitle => 'THEME';
621+
622+
@override
623+
String get themeSettingDark => 'Dark';
624+
625+
@override
626+
String get themeSettingLight => 'Light';
627+
628+
@override
629+
String get themeSettingSystem => 'System';
630+
616631
@override
617632
String get pollWidgetQuestionMissing => 'Brak pytania.';
618633

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Выберите учетную запись';
2525

26+
@override
27+
String get settingsPageTitle => 'Settings';
28+
2629
@override
2730
String get switchAccountButton => 'Сменить учетную запись';
2831

@@ -613,6 +616,18 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
613616
return '($voterNames)';
614617
}
615618

619+
@override
620+
String get themeSettingTitle => 'THEME';
621+
622+
@override
623+
String get themeSettingDark => 'Dark';
624+
625+
@override
626+
String get themeSettingLight => 'Light';
627+
628+
@override
629+
String get themeSettingSystem => 'System';
630+
616631
@override
617632
String get pollWidgetQuestionMissing => 'Нет вопроса.';
618633

0 commit comments

Comments
 (0)