sumba 2.1.0 → 2.1.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.
@@ -1,5 +1,5 @@
1
1
  async function navDropdownUser () {
2
- return class NavDropdownUser extends this.baseFactory {
2
+ return class NavDropdownUser extends this.app.baseClass.MpaWidget {
3
3
  build = async () => {
4
4
  const { has, omit, find, filter } = this.app.lib._
5
5
  const { routePath } = this.app.waibu
@@ -1,10 +1,12 @@
1
1
  async function checkIconset (req, reply) {
2
- const { get } = this.app.lib._
2
+ const { get, isString } = this.app.lib._
3
3
  const mpa = this.app.waibuMpa
4
4
 
5
5
  if (!req.site) return
6
6
  const siteIconset = get(req, 'site.setting.waibuMpa.iconset')
7
7
  req.iconset = get(mpa, 'config.iconset.set', siteIconset)
8
+ const hiconset = req.headers['x-iconset']
9
+ if (isString(hiconset) && mpa.getIconset(hiconset)) req.iconset = hiconset
8
10
  req.iconset = req.iconset ?? 'default'
9
11
  }
10
12
 
@@ -1,10 +1,12 @@
1
1
  async function checkTheme (req, reply) {
2
- const { get } = this.app.lib._
2
+ const { get, isString } = this.app.lib._
3
3
  const mpa = this.app.waibuMpa
4
4
 
5
5
  if (!req.site) return
6
6
  const siteTheme = get(req, 'site.setting.waibuMpa.theme')
7
7
  req.theme = get(mpa, 'config.theme.set', siteTheme)
8
+ const htheme = req.headers['x-theme']
9
+ if (isString(htheme) && mpa.getTheme(htheme)) req.theme = htheme
8
10
  req.theme = req.theme ?? 'default'
9
11
  }
10
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-01-17
4
+
5
+ - [2.1.2] Add theme & iconset check from ```req.headers['x-theme']``` & ```req.headers['x-iconset']```
6
+
7
+ ## 2026-01-13
8
+
9
+ - [2.1.1] Bug fix on waibuMpa's widgeting system
10
+
3
11
  ## 2026-01-01
4
12
 
5
13
  - [2.1.0] Ported to match ```bajo@2.2.x``` & ```dobo@2.2.x``` specs