diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 47e7b0e..1c3db36 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -181,6 +181,16 @@ } } }, + "settingsHostHeaderTitle": "Host-Header festlegen", + "@settingsHostHeader": { + "description": "Text displayed as description for host header input", + "context": "Visible in the settings view" + }, + "settingsHostHeaderInvalid": "Der eingegebene Text ist kein gültiges Header-JSON-Objekt", + "@settingsHostHeaderInvalid": { + "description": "Text displayed when the host header is invalid", + "context": "Visible in the settings view" + }, "settingsHostInvalidDetailed": "{type, select, url{Die eingegebene URL ist ungültig. Es handelt sich nicht um ein standardisiertes URL-Format.} other{Der eingegebene Host ist ungültig. Er kann nicht erreicht werden. Bitte überprüfe den Host und versuche es erneut.}}", "@settingsHostInvalidDetailed": { "description": "Text displayed when the host is invalid", @@ -232,6 +242,11 @@ "description": "Text displayed as description for show tips toggle", "context": "Visible in the settings view" }, + "settingsShowModelTags": "Model-Tags anzeigen", + "@settingsShowModelTags": { + "description": "Text displayed as description for show model tags toggle", + "context": "Visible in the settings view" + }, "settingsBrightnessSystem": "System", "@settingsBrightnessSystem": { "description": "Text displayed as description for system brightness option", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index fec669f..3e5c259 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -242,6 +242,11 @@ "description": "Text displayed as description for show tips toggle", "context": "Visible in the settings view" }, + "settingsShowModelTags": "Show model tags", + "@settingsShowModelTags": { + "description": "Text displayed as description for show model tags toggle", + "context": "Visible in the settings view" + }, "settingsBrightnessSystem": "System", "@settingsBrightnessSystem": { "description": "Text displayed as description for system brightness option", diff --git a/lib/screen_settings.dart b/lib/screen_settings.dart index 63d2aaa..5f245d3 100644 --- a/lib/screen_settings.dart +++ b/lib/screen_settings.dart @@ -429,6 +429,12 @@ class _ScreenSettingsState extends State { prefs!.setBool("tips", value); setState(() {}); }), + toggle(AppLocalizations.of(context)!.settingsShowModelTags, + (prefs!.getBool("modelTags") ?? false), (value) { + HapticFeedback.selectionClick(); + prefs!.setBool("modelTags", value); + setState(() {}); + }), const SizedBox(height: 16), SegmentedButton( segments: [ diff --git a/lib/worker_setter.dart b/lib/worker_setter.dart index 2f5ba33..b418ae8 100644 --- a/lib/worker_setter.dart +++ b/lib/worker_setter.dart @@ -37,6 +37,8 @@ void setModel(BuildContext context, Function setState) { addIndex = models.length; // ignore: use_build_context_synchronously models.add(AppLocalizations.of(context)!.modelDialogAddModel); + // ignore: use_build_context_synchronously + modelsReal.add(AppLocalizations.of(context)!.modelDialogAddModel); modal.add(false); for (var i = 0; i < modelsReal.length; i++) { if (modelsReal[i] == model) { @@ -116,7 +118,11 @@ void setModel(BuildContext context, Function setState) { models.length, (int index) { return ChoiceChip( - label: Text(models[index]), + label: Text( + (prefs!.getBool("modelTags") ?? + false) + ? modelsReal[index] + : models[index]), selected: usedIndex == index, avatar: (usedIndex == index) ? null