Skip to content

Commit f969d18

Browse files
committed
settings: Add settings page with vanilla Flutter widgets
This does not aim to implement the wip design for the settings page. We offer it mainly to test settings. Signed-off-by: Zixuan James Li <[email protected]>
1 parent 5c33240 commit f969d18

18 files changed

+335
-11
lines changed

assets/icons/ZulipIcons.ttf

868 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."
@@ -784,6 +788,22 @@
784788
"voterNames": {"type": "String", "example": "Alice, Bob, Chad"}
785789
}
786790
},
791+
"themeSettingTitle": "THEME",
792+
"@themeSettingTitle": {
793+
"description": "Title for theme setting. (Use ALL CAPS for cased alphabets: Latin, Greek, Cyrillic, etc.)"
794+
},
795+
"themeSettingDark": "Dark",
796+
"@themeSettingDark": {
797+
"description": "Label for dark theme setting."
798+
},
799+
"themeSettingLight": "Light",
800+
"@themeSettingLight": {
801+
"description": "Label for light theme setting."
802+
},
803+
"themeSettingSystem": "System",
804+
"@themeSettingSystem": {
805+
"description": "Label for following system theme setting."
806+
},
787807
"pollWidgetQuestionMissing": "No question.",
788808
"@pollWidgetQuestionMissing": {
789809
"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 following 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)