change condition of display banner

This commit is contained in:
2026-06-21 14:42:27 +02:00
parent 7545b77a25
commit 6dd2cc7d96
6 changed files with 18 additions and 3 deletions
+9
View File
@@ -24,6 +24,14 @@ export const useSettingsStore = defineStore('settings', () => {
return item?.value ?? null
}
function isSettingTruthy(key: string) {
const value = getSettingByKey(key)
if (value == null) {
return false
}
return value === true || String(value).toLowerCase() === 'true'
}
function mergeSettings(items?: AppSetting[] | null) {
if (!items?.length) {
return
@@ -73,6 +81,7 @@ export const useSettingsStore = defineStore('settings', () => {
fetchSettings,
mergeSettings,
getSettingByKey,
isSettingTruthy,
metalTypeSettingValue,
metalTypeLabel,
meltedGoldLabel,