dynamic banners of khanegi_theme
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user