Skip to content

Commit ef9c74c

Browse files
committed
feat(settings): 个性化设置
1 parent 6280e3e commit ef9c74c

16 files changed

Lines changed: 1070 additions & 65 deletions

lib/l10n/app_en.arb

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,41 @@
8080
"settingsColorGreen": "Green",
8181
"settingsColorPurple": "Purple",
8282
"settingsColorOrange": "Orange",
83+
"settingsColorCustom": "Custom",
84+
85+
"settingsCardOpacityTitle": "Card Opacity",
86+
"settingsCardOpacityDesc": "Adjust the opacity of card backgrounds",
87+
88+
"settingsWindowOpacityTitle": "Window Transparency",
89+
"settingsWindowOpacityDesc": "Adjust the transparency of the application window (desktop only)",
90+
91+
"settingsBackgroundImageTitle": "Background Image",
92+
"settingsBackgroundImageDesc": "Select the application background image",
93+
"settingsBackgroundImageSelect": "Select Background Image",
94+
"settingsBackgroundImageClear": "Clear Background Image",
95+
"settingsBackgroundImageGenColor": "Generate Theme from Background",
96+
"settingsBackgroundImageGenColorDesc": "Extract dominant color from background as theme color",
97+
"settingsBackgroundImageSelectSuccess": "Background image selected",
98+
"settingsBackgroundImageClearSuccess": "Background image cleared",
99+
"settingsBackgroundImageGenColorSuccess": "Theme colors extracted from background",
100+
"settingsBackgroundImageGenColorError": "Failed to extract colors: {error}",
101+
"@settingsBackgroundImageGenColorError": {
102+
"placeholders": {
103+
"error": {"type": "String"}
104+
}
105+
},
106+
107+
"settingsCustomThemeTitle": "Custom Theme Colors",
108+
"settingsCustomThemeDesc": "Customize various theme colors of the application",
109+
"settingsCustomThemeSeedColor": "Seed Color",
110+
"settingsCustomThemePrimary": "Primary Color",
111+
"settingsCustomThemeSecondary": "Secondary Color",
112+
"settingsCustomThemeTertiary": "Tertiary Color",
113+
"settingsCustomThemeSurface": "Surface Color",
114+
"settingsCustomThemeBackground": "Background Color",
115+
"settingsCustomThemeError": "Error Color",
116+
"settingsCustomThemeReset": "Reset Custom Colors",
117+
"settingsCustomThemeResetConfirm": "Are you sure you want to reset all custom colors?",
83118

84119
"settingsFontFamilyTitle": "Font",
85120
"settingsFontFamilyDesc": "Application font family",
@@ -255,6 +290,8 @@
255290
"chatLeaveRoomConfirm": "Are you sure you want to leave this chat?",
256291
"chatRoomLeft": "Left chat room",
257292
"cancel": "Cancel",
293+
"confirm": "Confirm",
294+
"clear": "Clear",
258295
"save": "Save",
259296
"leave": "Leave",
260297

lib/l10n/app_localizations.dart

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,162 @@ abstract class AppLocalizations {
470470
/// **'Orange'**
471471
String get settingsColorOrange;
472472

473+
/// No description provided for @settingsColorCustom.
474+
///
475+
/// In en, this message translates to:
476+
/// **'Custom'**
477+
String get settingsColorCustom;
478+
479+
/// No description provided for @settingsCardOpacityTitle.
480+
///
481+
/// In en, this message translates to:
482+
/// **'Card Opacity'**
483+
String get settingsCardOpacityTitle;
484+
485+
/// No description provided for @settingsCardOpacityDesc.
486+
///
487+
/// In en, this message translates to:
488+
/// **'Adjust the opacity of card backgrounds'**
489+
String get settingsCardOpacityDesc;
490+
491+
/// No description provided for @settingsWindowOpacityTitle.
492+
///
493+
/// In en, this message translates to:
494+
/// **'Window Transparency'**
495+
String get settingsWindowOpacityTitle;
496+
497+
/// No description provided for @settingsWindowOpacityDesc.
498+
///
499+
/// In en, this message translates to:
500+
/// **'Adjust the transparency of the application window (desktop only)'**
501+
String get settingsWindowOpacityDesc;
502+
503+
/// No description provided for @settingsBackgroundImageTitle.
504+
///
505+
/// In en, this message translates to:
506+
/// **'Background Image'**
507+
String get settingsBackgroundImageTitle;
508+
509+
/// No description provided for @settingsBackgroundImageDesc.
510+
///
511+
/// In en, this message translates to:
512+
/// **'Select the application background image'**
513+
String get settingsBackgroundImageDesc;
514+
515+
/// No description provided for @settingsBackgroundImageSelect.
516+
///
517+
/// In en, this message translates to:
518+
/// **'Select Background Image'**
519+
String get settingsBackgroundImageSelect;
520+
521+
/// No description provided for @settingsBackgroundImageClear.
522+
///
523+
/// In en, this message translates to:
524+
/// **'Clear Background Image'**
525+
String get settingsBackgroundImageClear;
526+
527+
/// No description provided for @settingsBackgroundImageGenColor.
528+
///
529+
/// In en, this message translates to:
530+
/// **'Generate Theme from Background'**
531+
String get settingsBackgroundImageGenColor;
532+
533+
/// No description provided for @settingsBackgroundImageGenColorDesc.
534+
///
535+
/// In en, this message translates to:
536+
/// **'Extract dominant color from background as theme color'**
537+
String get settingsBackgroundImageGenColorDesc;
538+
539+
/// No description provided for @settingsBackgroundImageSelectSuccess.
540+
///
541+
/// In en, this message translates to:
542+
/// **'Background image selected'**
543+
String get settingsBackgroundImageSelectSuccess;
544+
545+
/// No description provided for @settingsBackgroundImageClearSuccess.
546+
///
547+
/// In en, this message translates to:
548+
/// **'Background image cleared'**
549+
String get settingsBackgroundImageClearSuccess;
550+
551+
/// No description provided for @settingsBackgroundImageGenColorSuccess.
552+
///
553+
/// In en, this message translates to:
554+
/// **'Theme colors extracted from background'**
555+
String get settingsBackgroundImageGenColorSuccess;
556+
557+
/// No description provided for @settingsBackgroundImageGenColorError.
558+
///
559+
/// In en, this message translates to:
560+
/// **'Failed to extract colors: {error}'**
561+
String settingsBackgroundImageGenColorError(String error);
562+
563+
/// No description provided for @settingsCustomThemeTitle.
564+
///
565+
/// In en, this message translates to:
566+
/// **'Custom Theme Colors'**
567+
String get settingsCustomThemeTitle;
568+
569+
/// No description provided for @settingsCustomThemeDesc.
570+
///
571+
/// In en, this message translates to:
572+
/// **'Customize various theme colors of the application'**
573+
String get settingsCustomThemeDesc;
574+
575+
/// No description provided for @settingsCustomThemeSeedColor.
576+
///
577+
/// In en, this message translates to:
578+
/// **'Seed Color'**
579+
String get settingsCustomThemeSeedColor;
580+
581+
/// No description provided for @settingsCustomThemePrimary.
582+
///
583+
/// In en, this message translates to:
584+
/// **'Primary Color'**
585+
String get settingsCustomThemePrimary;
586+
587+
/// No description provided for @settingsCustomThemeSecondary.
588+
///
589+
/// In en, this message translates to:
590+
/// **'Secondary Color'**
591+
String get settingsCustomThemeSecondary;
592+
593+
/// No description provided for @settingsCustomThemeTertiary.
594+
///
595+
/// In en, this message translates to:
596+
/// **'Tertiary Color'**
597+
String get settingsCustomThemeTertiary;
598+
599+
/// No description provided for @settingsCustomThemeSurface.
600+
///
601+
/// In en, this message translates to:
602+
/// **'Surface Color'**
603+
String get settingsCustomThemeSurface;
604+
605+
/// No description provided for @settingsCustomThemeBackground.
606+
///
607+
/// In en, this message translates to:
608+
/// **'Background Color'**
609+
String get settingsCustomThemeBackground;
610+
611+
/// No description provided for @settingsCustomThemeError.
612+
///
613+
/// In en, this message translates to:
614+
/// **'Error Color'**
615+
String get settingsCustomThemeError;
616+
617+
/// No description provided for @settingsCustomThemeReset.
618+
///
619+
/// In en, this message translates to:
620+
/// **'Reset Custom Colors'**
621+
String get settingsCustomThemeReset;
622+
623+
/// No description provided for @settingsCustomThemeResetConfirm.
624+
///
625+
/// In en, this message translates to:
626+
/// **'Are you sure you want to reset all custom colors?'**
627+
String get settingsCustomThemeResetConfirm;
628+
473629
/// No description provided for @settingsFontFamilyTitle.
474630
///
475631
/// In en, this message translates to:
@@ -1412,6 +1568,18 @@ abstract class AppLocalizations {
14121568
/// **'Cancel'**
14131569
String get cancel;
14141570

1571+
/// No description provided for @confirm.
1572+
///
1573+
/// In en, this message translates to:
1574+
/// **'Confirm'**
1575+
String get confirm;
1576+
1577+
/// No description provided for @clear.
1578+
///
1579+
/// In en, this message translates to:
1580+
/// **'Clear'**
1581+
String get clear;
1582+
14151583
/// No description provided for @save.
14161584
///
14171585
/// In en, this message translates to:

lib/l10n/app_localizations_en.dart

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,95 @@ class AppLocalizationsEn extends AppLocalizations {
202202
@override
203203
String get settingsColorOrange => 'Orange';
204204

205+
@override
206+
String get settingsColorCustom => 'Custom';
207+
208+
@override
209+
String get settingsCardOpacityTitle => 'Card Opacity';
210+
211+
@override
212+
String get settingsCardOpacityDesc =>
213+
'Adjust the opacity of card backgrounds';
214+
215+
@override
216+
String get settingsWindowOpacityTitle => 'Window Transparency';
217+
218+
@override
219+
String get settingsWindowOpacityDesc =>
220+
'Adjust the transparency of the application window (desktop only)';
221+
222+
@override
223+
String get settingsBackgroundImageTitle => 'Background Image';
224+
225+
@override
226+
String get settingsBackgroundImageDesc =>
227+
'Select the application background image';
228+
229+
@override
230+
String get settingsBackgroundImageSelect => 'Select Background Image';
231+
232+
@override
233+
String get settingsBackgroundImageClear => 'Clear Background Image';
234+
235+
@override
236+
String get settingsBackgroundImageGenColor =>
237+
'Generate Theme from Background';
238+
239+
@override
240+
String get settingsBackgroundImageGenColorDesc =>
241+
'Extract dominant color from background as theme color';
242+
243+
@override
244+
String get settingsBackgroundImageSelectSuccess =>
245+
'Background image selected';
246+
247+
@override
248+
String get settingsBackgroundImageClearSuccess => 'Background image cleared';
249+
250+
@override
251+
String get settingsBackgroundImageGenColorSuccess =>
252+
'Theme colors extracted from background';
253+
254+
@override
255+
String settingsBackgroundImageGenColorError(String error) {
256+
return 'Failed to extract colors: $error';
257+
}
258+
259+
@override
260+
String get settingsCustomThemeTitle => 'Custom Theme Colors';
261+
262+
@override
263+
String get settingsCustomThemeDesc =>
264+
'Customize various theme colors of the application';
265+
266+
@override
267+
String get settingsCustomThemeSeedColor => 'Seed Color';
268+
269+
@override
270+
String get settingsCustomThemePrimary => 'Primary Color';
271+
272+
@override
273+
String get settingsCustomThemeSecondary => 'Secondary Color';
274+
275+
@override
276+
String get settingsCustomThemeTertiary => 'Tertiary Color';
277+
278+
@override
279+
String get settingsCustomThemeSurface => 'Surface Color';
280+
281+
@override
282+
String get settingsCustomThemeBackground => 'Background Color';
283+
284+
@override
285+
String get settingsCustomThemeError => 'Error Color';
286+
287+
@override
288+
String get settingsCustomThemeReset => 'Reset Custom Colors';
289+
290+
@override
291+
String get settingsCustomThemeResetConfirm =>
292+
'Are you sure you want to reset all custom colors?';
293+
205294
@override
206295
String get settingsFontFamilyTitle => 'Font';
207296

@@ -692,6 +781,12 @@ class AppLocalizationsEn extends AppLocalizations {
692781
@override
693782
String get cancel => 'Cancel';
694783

784+
@override
785+
String get confirm => 'Confirm';
786+
787+
@override
788+
String get clear => 'Clear';
789+
695790
@override
696791
String get save => 'Save';
697792

0 commit comments

Comments
 (0)