Added toggle to show model tags
This commit is contained in:
parent
2735357852
commit
545525ab55
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -429,6 +429,12 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
|||
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: [
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue