sumba 1.2.11 → 1.2.13
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/bajo/intl/en-US.json +1 -1
- package/bajo/intl/id.json +1 -1
- package/index.js +6 -2
- package/package.json +1 -1
- package/waibuDb/schema/user.json +1 -0
- package/waibuMpa/extend/waibuAdmin/route/session/@action.js +11 -0
- package/bajo/hook/waibu-mpa.sumba@after-build-pages-menu.js +0 -12
- package/waibuMpa/route/info/license.js +0 -10
package/bajo/intl/en-US.json
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"currentApiKey": "Current API Key",
|
|
108
108
|
"downloadList": "Download List",
|
|
109
109
|
"manageDownload": "Manage Download",
|
|
110
|
-
"
|
|
110
|
+
"userSession": "User Session",
|
|
111
111
|
"field": {
|
|
112
112
|
"currentPassword": "Current Password",
|
|
113
113
|
"newPassword": "New Password",
|
package/bajo/intl/id.json
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"currentApiKey": "Kunci API Saat Ini",
|
|
109
109
|
"downloadList": "Daftar Unduh",
|
|
110
110
|
"manageDownload": "Kelola Unduhan",
|
|
111
|
-
"
|
|
111
|
+
"userSession": "Sesi Pengguna",
|
|
112
112
|
"field": {
|
|
113
113
|
"currentPassword": "Kata Sandi Saat Ini",
|
|
114
114
|
"newPassword": "Kata Sandi Baru",
|
package/index.js
CHANGED
|
@@ -10,9 +10,8 @@ async function factory (pkgName) {
|
|
|
10
10
|
this.dependencies = ['bajo-extra', 'bajo-common-db', 'bajo-config']
|
|
11
11
|
this.config = {
|
|
12
12
|
multiSite: false,
|
|
13
|
-
license: false,
|
|
14
13
|
waibu: {
|
|
15
|
-
title: '
|
|
14
|
+
title: 'site',
|
|
16
15
|
prefix: 'site'
|
|
17
16
|
},
|
|
18
17
|
waibuMpa: {
|
|
@@ -173,6 +172,11 @@ async function factory (pkgName) {
|
|
|
173
172
|
{ title: 'manageDownload', href: `waibuAdmin:/${prefix}/download/list` },
|
|
174
173
|
{ title: 'resetUserPassword', href: `waibuAdmin:/${prefix}/reset-user-password` }
|
|
175
174
|
]
|
|
175
|
+
}, {
|
|
176
|
+
title: 'misc',
|
|
177
|
+
children: [
|
|
178
|
+
{ title: 'userSession', href: `waibuAdmin:/${prefix}/session/list` }
|
|
179
|
+
]
|
|
176
180
|
}]
|
|
177
181
|
}
|
|
178
182
|
|
package/package.json
CHANGED
package/waibuDb/schema/user.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const action = {
|
|
2
|
+
method: ['GET', 'POST'],
|
|
3
|
+
title: 'userSession',
|
|
4
|
+
handler: async function (req, reply) {
|
|
5
|
+
const { importModule } = this.app.bajo
|
|
6
|
+
const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
|
|
7
|
+
return await crudSkel.call(this, 'WmpaSession', req, reply)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default action
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
async function afterBuildPagesMenu (pages, req) {
|
|
2
|
-
if (!this.config.license) return
|
|
3
|
-
const { find } = this.lib._
|
|
4
|
-
const item = find(pages, { title: 'help' })
|
|
5
|
-
if (!item) return
|
|
6
|
-
item.children.push(
|
|
7
|
-
{ title: '-' },
|
|
8
|
-
{ title: 'license', href: 'sumba:/info/license' }
|
|
9
|
-
)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default afterBuildPagesMenu
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
async function license (req, reply) {
|
|
2
|
-
if (!this.config.license) throw this.error('_notFound')
|
|
3
|
-
const { fs } = this.lib
|
|
4
|
-
const base = `${this.app.main.dir.pkg}/../LICENSE`
|
|
5
|
-
let tpl = `${base}.${req.lang}.md`
|
|
6
|
-
if (!fs.existsSync(tpl)) tpl = `${base}.md`
|
|
7
|
-
return await reply.view(tpl, { page: { title: req.t('license') }, license: this.config.license })
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default license
|