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": "{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": {
|
"@settingsHostInvalidDetailed": {
|
||||||
"description": "Text displayed when the host is invalid",
|
"description": "Text displayed when the host is invalid",
|
||||||
|
@ -232,6 +242,11 @@
|
||||||
"description": "Text displayed as description for show tips toggle",
|
"description": "Text displayed as description for show tips toggle",
|
||||||
"context": "Visible in the settings view"
|
"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": "System",
|
||||||
"@settingsBrightnessSystem": {
|
"@settingsBrightnessSystem": {
|
||||||
"description": "Text displayed as description for system brightness option",
|
"description": "Text displayed as description for system brightness option",
|
||||||
|
|
|
@ -242,6 +242,11 @@
|
||||||
"description": "Text displayed as description for show tips toggle",
|
"description": "Text displayed as description for show tips toggle",
|
||||||
"context": "Visible in the settings view"
|
"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": "System",
|
||||||
"@settingsBrightnessSystem": {
|
"@settingsBrightnessSystem": {
|
||||||
"description": "Text displayed as description for system brightness option",
|
"description": "Text displayed as description for system brightness option",
|
||||||
|
|
|
@ -429,6 +429,12 @@ class _ScreenSettingsState extends State<ScreenSettings> {
|
||||||
prefs!.setBool("tips", value);
|
prefs!.setBool("tips", value);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}),
|
}),
|
||||||
|
toggle(AppLocalizations.of(context)!.settingsShowModelTags,
|
||||||
|
(prefs!.getBool("modelTags") ?? false), (value) {
|
||||||
|
HapticFeedback.selectionClick();
|
||||||
|
prefs!.setBool("modelTags", value);
|
||||||
|
setState(() {});
|
||||||
|
}),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
SegmentedButton(
|
SegmentedButton(
|
||||||
segments: [
|
segments: [
|
||||||
|
|
|
@ -37,6 +37,8 @@ void setModel(BuildContext context, Function setState) {
|
||||||
addIndex = models.length;
|
addIndex = models.length;
|
||||||
// ignore: use_build_context_synchronously
|
// ignore: use_build_context_synchronously
|
||||||
models.add(AppLocalizations.of(context)!.modelDialogAddModel);
|
models.add(AppLocalizations.of(context)!.modelDialogAddModel);
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
modelsReal.add(AppLocalizations.of(context)!.modelDialogAddModel);
|
||||||
modal.add(false);
|
modal.add(false);
|
||||||
for (var i = 0; i < modelsReal.length; i++) {
|
for (var i = 0; i < modelsReal.length; i++) {
|
||||||
if (modelsReal[i] == model) {
|
if (modelsReal[i] == model) {
|
||||||
|
@ -116,7 +118,11 @@ void setModel(BuildContext context, Function setState) {
|
||||||
models.length,
|
models.length,
|
||||||
(int index) {
|
(int index) {
|
||||||
return ChoiceChip(
|
return ChoiceChip(
|
||||||
label: Text(models[index]),
|
label: Text(
|
||||||
|
(prefs!.getBool("modelTags") ??
|
||||||
|
false)
|
||||||
|
? modelsReal[index]
|
||||||
|
: models[index]),
|
||||||
selected: usedIndex == index,
|
selected: usedIndex == index,
|
||||||
avatar: (usedIndex == index)
|
avatar: (usedIndex == index)
|
||||||
? null
|
? null
|
||||||
|
|
Loading…
Reference in New Issue