mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 13:18:27 +02:00
Support suggesting boolean settings
This commit is contained in:
@@ -2,6 +2,7 @@ import type { PrefKey } from "@/enums/pref-keys";
|
||||
import type { NumberStepperParams, SettingDefinitions } from "@/types/setting-definition";
|
||||
import { BxEvent } from "../bx-event";
|
||||
import { SettingElementType } from "../setting-element";
|
||||
import { t } from "../translation";
|
||||
|
||||
export class BaseSettingsStore {
|
||||
private storage: Storage;
|
||||
@@ -145,6 +146,8 @@ export class BaseSettingsStore {
|
||||
if (value in options) {
|
||||
return options[value];
|
||||
}
|
||||
} else if (typeof value === 'boolean') {
|
||||
return value ? t('on') : t('off')
|
||||
}
|
||||
|
||||
return value.toString();
|
||||
|
Reference in New Issue
Block a user