fix pargar mande

This commit is contained in:
2026-07-25 12:13:30 +03:30
parent 9319906737
commit 7cd3fac28b
20 changed files with 608 additions and 41 deletions
+13
View File
@@ -24,6 +24,18 @@ export const useSettingsStore = defineStore('settings', () => {
return item?.value ?? null
}
function isSettingTruthy(key: string) {
const value = getSettingByKey(key)
if (value == null) {
return false
}
if (value === true) {
return true
}
const normalized = String(value).trim().toLowerCase()
return normalized === 'true' || normalized === '1' || normalized === 'yes'
}
function mergeSettings(items?: AppSetting[] | null) {
if (!items?.length) {
return
@@ -80,6 +92,7 @@ export const useSettingsStore = defineStore('settings', () => {
fetchSettings,
mergeSettings,
getSettingByKey,
isSettingTruthy,
metalTypeSettingValue,
metalTypeLabel,
meltedGoldLabel,