Add Khanegi uiVariant modular/newTheme with get_user payload split.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -43,19 +43,23 @@ export class GetUserService {
|
||||
? registryMode
|
||||
: 'dynamicMode'
|
||||
|
||||
const isKhanegi = tenant.product === 'khanegi';
|
||||
const uiVariant =
|
||||
isKhanegi && tenant.uiVariant === 'newTheme' ? 'newTheme' : 'modular';
|
||||
|
||||
const color =
|
||||
hamkarBrand?.primaryColor ||
|
||||
khanegiColors?.primary ||
|
||||
(uiVariant === 'newTheme' ? khanegiColors?.primary : null) ||
|
||||
tenant.primaryColor ||
|
||||
null
|
||||
const secondary =
|
||||
hamkarBrand?.secondaryColor ||
|
||||
khanegiColors?.secondary ||
|
||||
(uiVariant === 'newTheme' ? khanegiColors?.secondary : null) ||
|
||||
tenant.secondaryColor ||
|
||||
null
|
||||
const background =
|
||||
hamkarBrand?.backgroundColor ||
|
||||
khanegiColors?.background ||
|
||||
(uiVariant === 'newTheme' ? khanegiColors?.background : null) ||
|
||||
tenant.backgroundColor ||
|
||||
null
|
||||
|
||||
@@ -75,8 +79,12 @@ export class GetUserService {
|
||||
product: tenant.product,
|
||||
theme: themeMode,
|
||||
mode: themeMode,
|
||||
/** Khanegi front-end family for consumers */
|
||||
ui_variant: isKhanegi ? uiVariant : undefined,
|
||||
app_ui_config:
|
||||
tenant.product === 'khanegi' ? this.stripKhanegiSaMeta(ui) : undefined,
|
||||
isKhanegi && uiVariant === 'newTheme'
|
||||
? this.stripKhanegiSaMeta(ui)
|
||||
: undefined,
|
||||
/** Laravel-compatible overlay; Hamkar merges only when present */
|
||||
ui_settings: uiSettings.length ? uiSettings : undefined,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user