waibu 1.1.8 → 1.1.10

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.
@@ -15,7 +15,7 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
15
15
  const { set, merge, pick, get, isEmpty, find } = this.lib._
16
16
  const { req, reply } = opts
17
17
 
18
- const appTitle = this.app.waibuMpa ? this.app.waibuMpa.getAppTitle(req.ns) : undefined
18
+ const appTitle = this.app.waibuMpa ? req.t(this.app.waibuMpa.getAppTitle(req.ns)) : ''
19
19
  params.page = merge(params.page ?? {}, { ns: req.ns, appTitle })
20
20
  set(params, 'menu.homes', buildHomesMenu.call(this))
21
21
 
@@ -5,10 +5,11 @@ function santizeMethods (methods = '*') {
5
5
  }
6
6
 
7
7
  async function isRouteDisabled (url, method, matchers = []) {
8
- const { outmatch } = this.app.bajo
9
- const { intersection, cloneDeep } = this.lib._
8
+ const { outmatch } = this.lib
9
+ const { isString, intersection, cloneDeep } = this.lib._
10
10
  const items = []
11
- for (const m of cloneDeep(matchers)) {
11
+ for (let m of cloneDeep(matchers)) {
12
+ if (isString(m)) m = { path: m }
12
13
  m.path = this.app.waibu.routePath(m.path)
13
14
  m.methods = santizeMethods(m.methods)
14
15
  items.push(m)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {