dynamic banners of khanegi_theme

This commit is contained in:
2026-07-18 09:55:51 +02:00
parent 7cf11cd62e
commit 3b34249a67
10 changed files with 895 additions and 194 deletions
+10
View File
@@ -12,6 +12,16 @@ export function getConfigApp(key: string) {
return null
}
/** true اگر ui_config یا app_ui_config در get_user مقدار داشته باشد */
export function hasAppUiConfig(): boolean {
const cfg = getConfigApp('ui_config') ?? getConfigApp('app_ui_config')
if (cfg == null) return false
if (typeof cfg === 'string') return cfg.trim().length > 0
if (Array.isArray(cfg)) return cfg.length > 0
if (typeof cfg === 'object') return Object.keys(cfg as object).length > 0
return Boolean(cfg)
}
let storeModeFromSettings: boolean | null = null
let settingsBootstrapped = false