waibu-db 2.1.6 → 2.1.7
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/index.js +2 -2
- package/lib/crud/helper/build-params.js +1 -1
- package/package.json +1 -1
- package/wiki/CHANGES.md +4 -0
package/index.js
CHANGED
|
@@ -96,7 +96,7 @@ async function factory (pkgName) {
|
|
|
96
96
|
adminMenu = async (locals, req) => {
|
|
97
97
|
const { getPluginPrefix } = this.app.waibu
|
|
98
98
|
const { pascalCase } = this.app.lib.aneka
|
|
99
|
-
const {
|
|
99
|
+
const { getPluginTitle } = this.app.waibuMpa
|
|
100
100
|
const { camelCase, map, groupBy, keys, kebabCase, filter, get, isArray } = this.app.lib._
|
|
101
101
|
|
|
102
102
|
const prefix = getPluginPrefix(this.ns)
|
|
@@ -112,7 +112,7 @@ async function factory (pkgName) {
|
|
|
112
112
|
})
|
|
113
113
|
const omenu = groupBy(map(models, s => {
|
|
114
114
|
const item = { name: s.name, ns: s.plugin.ns }
|
|
115
|
-
item.nsTitle =
|
|
115
|
+
item.nsTitle = getPluginTitle(s.plugin.ns)
|
|
116
116
|
return item
|
|
117
117
|
}), 'nsTitle')
|
|
118
118
|
const menu = []
|
|
@@ -2,7 +2,7 @@ function buildParams ({ model, req, reply, action, options = {} }) {
|
|
|
2
2
|
const { camelCase, kebabCase, map, upperFirst, get } = this.app.lib._
|
|
3
3
|
const [, ...names] = map(kebabCase(model).split('-'), n => upperFirst(n))
|
|
4
4
|
const mdl = this.app.dobo.getModel(model)
|
|
5
|
-
const prefix = this.app.waibuMpa ? this.app.waibuMpa.
|
|
5
|
+
const prefix = this.app.waibuMpa ? this.app.waibuMpa.getPluginTitle(mdl.plugin.ns) : mdl.plugin.ns
|
|
6
6
|
const modelTitle = req.t(prefix) + ': ' + req.t(camelCase(names.join(' ')))
|
|
7
7
|
const page = {
|
|
8
8
|
title: req.t(get(req, 'routeOptions.config.title', this.app[mdl.plugin.ns].title)),
|
package/package.json
CHANGED