@okjavis/nodebb-theme-javis 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/theme.js +6 -2
package/package.json
CHANGED
package/theme.js
CHANGED
|
@@ -44,11 +44,15 @@ theme.init = async function (params) {
|
|
|
44
44
|
* Uses JAVIS defaults (with openSidebars: 'on')
|
|
45
45
|
*/
|
|
46
46
|
async function loadThemeConfig(uid) {
|
|
47
|
-
const [
|
|
48
|
-
meta.settings.get('
|
|
47
|
+
const [harmonyConfig, javisConfig, userConfig] = await Promise.all([
|
|
48
|
+
meta.settings.get('harmony'), // Read from Harmony's settings (parent theme)
|
|
49
|
+
meta.settings.get('javis'), // Read from JAVIS-specific settings
|
|
49
50
|
user.getSettings(uid),
|
|
50
51
|
]);
|
|
51
52
|
|
|
53
|
+
// Merge: Harmony settings first, then JAVIS overrides
|
|
54
|
+
const themeConfig = { ...harmonyConfig, ...javisConfig };
|
|
55
|
+
|
|
52
56
|
// 3-tier cascade: JAVIS defaults -> theme settings -> user settings
|
|
53
57
|
const config = { ...defaults, ...themeConfig, ...(_.pick(userConfig, Object.keys(defaults))) };
|
|
54
58
|
|