sumba 1.1.9 → 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.
@@ -7,7 +7,7 @@ export async function rebuildFilter (model, filter, req) {
7
7
  const hasSiteId = await hasColumn('siteId', model)
8
8
  const hasUserId = await hasColumn('userId', model)
9
9
  const hasTeamId = await hasColumn('teamId', model)
10
- const isAdmin = find(req.user.teams, { alias: 'administrator' }) && useAdmin.includes(get(req, 'routeOptions.config.ns'))
10
+ const isAdmin = find(get(req, 'user.teams', []), { alias: 'administrator' }) && useAdmin.includes(get(req, 'routeOptions.config.ns'))
11
11
  if (!(hasSiteId || hasUserId || hasTeamId)) return filter
12
12
  const q = { $and: [] }
13
13
  if (!isEmpty(filter.query)) {
@@ -2,14 +2,16 @@ async function afterBuildLocals (locals, req) {
2
2
  const { routePath } = this.app.waibu
3
3
  const items = []
4
4
  if (req.user) {
5
- items.push({ icon: 'person', tooltip: 'yourProfile', href: routePath('sumba:/my-stuff/profile') })
6
- items.push({ icon: 'key', tooltip: 'changePassword', href: routePath('sumba:/my-stuff/change-password') })
7
- items.push({ component: 'navItemSignout', tooltip: 'signout', bottom: true })
5
+ items.push({ icon: 'person', 't:tooltip': 'yourProfile', href: routePath('sumba:/my-stuff/profile') })
6
+ items.push({ icon: 'key', 't:tooltip': 'changePassword', href: routePath('sumba:/my-stuff/change-password') })
7
+ items.push({ component: 'navItemSignout', 't:tooltip': 'signout', bottom: true })
8
8
  } else {
9
- items.push({ icon: 'signin', tooltip: 'signin', href: routePath('sumba:/signin') })
10
- items.push({ icon: 'key', tooltip: 'forgotPassword', href: routePath('sumba:/user/forgot-password') })
11
- items.push({ icon: 'personAdd', tooltip: 'newUserSignup', href: routePath('sumba:/user/signup') })
9
+ items.push({ icon: 'signin', 't:tooltip': 'signin', href: routePath('sumba:/signin') })
10
+ items.push({ icon: 'key', 't:tooltip': 'forgotPassword', href: routePath('sumba:/user/forgot-password') })
11
+ items.push({ icon: 'personAdd', 't:tooltip': 'newUserSignup', href: routePath('sumba:/user/signup') })
12
12
  }
13
+ items.push({ icon: 'envelope', 't:tooltip': 'contactForm', href: routePath('sumba:/help/contact-form') })
14
+ items.push({ icon: 'chat', 't:tooltip': 'troubleTickets', href: routePath('sumba:/help/trouble-tickets') })
13
15
  for (const item of items) {
14
16
  if (locals._meta.url.startsWith(item.href)) item.active = true
15
17
  }
@@ -81,10 +81,17 @@
81
81
  "moreInfoContactAdmin": "Please <c:a href='sumba:/help/contact-form'>contact</c:a> your Admin for more info, thank you!",
82
82
  "restricted": "Restricted",
83
83
  "fullscreen": "Fullscreen",
84
+ "myStuff": "My Stuff",
85
+ "site": "Site",
86
+ "user": "User",
87
+ "catQuestion": "General Question",
88
+ "catMisc": "Misc",
89
+ "catTechnical": "Technical Problem",
84
90
  "field": {
85
91
  "currentPassword": "Current Password",
86
92
  "newPassword": "New Password",
87
93
  "verifyNewPassword": "Verify New Password",
94
+ "verifyPassword": "Verify Password",
88
95
  "usernameEmail": "Username/Email",
89
96
  "apiKey": "API Key",
90
97
  "hostname": "Hostname",
package/bajo/intl/id.json CHANGED
@@ -82,6 +82,12 @@
82
82
  "moreInfoContactAdmin": "Mohon <c:a href='sumba:/help/contact-form'>hubungi</c:a> Admin Anda untuk keterangan lebih lanjut, terima kasih!",
83
83
  "restricted": "Pembatasan",
84
84
  "fullscreen": "Layar Penuh",
85
+ "myStuff": "Perkakas Ku",
86
+ "site": "Situs",
87
+ "user": "Pengguna",
88
+ "catQuestion": "Pertanyaan Umum",
89
+ "catMisc": "Lain-lain",
90
+ "catTechnical": "Masalah Teknis",
85
91
  "field": {
86
92
  "currentPassword": "Kata Sandi Saat Ini",
87
93
  "newPassword": "Kata Sandi Baru",
@@ -6,9 +6,12 @@
6
6
  <c:nav-item t:content="privacy" href="sumba:/info/privacy"/>
7
7
  <c:nav-item t:content="terms" href="sumba:/info/terms-conditions"/>
8
8
  </c:nav>
9
+ <% if (!(_meta.routeOpts.pathSrc.startsWith('/my-profile') || _meta.routeOpts.pathSrc.startsWith('/info') ||
10
+ _meta.routeOpts.pathSrc.startsWith('/help'))) { %>
9
11
  <c:nav flex="justify-content:center">
10
12
  <c:nav-dropdown-darkmode />
11
13
  <c:nav-dropdown-language />
12
14
  </c:nav>
15
+ <% } %>
13
16
  </small>
14
17
  </c:footer>
@@ -1,18 +1,10 @@
1
- <c:navbar position="type:sticky-top" background="color:primary-subtle" expandable padding="x-3" border="side:bottom">
2
- <c:grid-row dim="width-100">
3
- <c:grid-col col="1-md 2-lg"></c:grid-col>
4
- <c:grid-col col="10-md 8-lg">
5
- <c:navbar-brand content="<%= page.title %>" />
6
- <c:nav tag="ul">
7
- </c:nav>
8
- <c:nav tag="ul" dim="width:100" flex="justify-content:end">
9
- <c:nav-dropdown-user no-menu />
10
- <c:nav-divider />
11
- <c:nav-toggle-fullscreen />
12
- <c:nav-dropdown-darkmode dropdown-menu="end" />
13
- <c:nav-dropdown-language dropdown-menu="end" />
14
- </c:nav>
15
- </c:grid-col>
16
- <c:grid-col col="1-md 2-lg"></c:grid-col>
17
- </c:grid-row>
1
+ <c:navbar background="color:secondary-subtle" position="type:sticky-top" expandable padding="x-3" border="side:bottom">
2
+ <c:navbar-brand content="<%= page.title %>" />
3
+ <c:nav tag="ul">
4
+ </c:nav>
5
+ <c:nav tag="ul" dim="width:100" flex="justify-content:end">
6
+ <c:nav-toggle-fullscreen />
7
+ <c:nav-dropdown-darkmode dropdown-menudir="end" />
8
+ <c:nav-dropdown-language dropdown-menudir="end" />
9
+ </c:nav>
18
10
  </c:navbar>
@@ -1,3 +1,3 @@
1
- <c:sidebar background="color:primary-subtle" mini border="side:end" auto-fill expanded>
2
- <c:app-launcher-trigger x-data @click="wbs.appLauncher()" border="side:bottom" img-style="width:100%;height:100%" />
1
+ <c:sidebar text="color:light" background="color:secondary" mini border="side:end" auto-fill expanded>
2
+ <c:app-launcher-trigger x-data @click="wbs.appLauncher()" border="side:bottom" img-dim-height="56" />
3
3
  </c:sidebar>
@@ -106,7 +106,7 @@ We use both Session and Persistent Cookies for the purposes set out below:
106
106
 
107
107
 
108
108
 
109
- For more information about the cookies we use and your choices regarding cookies, please visit our [Cookie Policy](cookie-policy) or the Cookies section of our Privacy Policy.
109
+ For more information about the cookies we use and your choices regarding cookies, please visit our [Cookie Policy](sumba:/info/cookie-policy) or the Cookies section of our Privacy Policy.
110
110
 
111
111
  #### Use of Your Personal Data
112
112
 
@@ -2,18 +2,6 @@
2
2
  "name": "QUESTION",
3
3
  "level": 2,
4
4
  "siteId": "?:SumbaSite::alias:default"
5
- }, {
6
- "name": "INQUIRY",
7
- "level": 1,
8
- "siteId": "?:SumbaSite::alias:default"
9
- }, {
10
- "name": "BILLING",
11
- "level": 4,
12
- "siteId": "?:SumbaSite::alias:default"
13
- }, {
14
- "name": "API",
15
- "level": 3,
16
- "siteId": "?:SumbaSite::alias:default"
17
5
  }, {
18
6
  "name": "MISC",
19
7
  "level": 5,
@@ -0,0 +1,7 @@
1
+ [{
2
+ "name": "TECHNICAL",
3
+ "siteId": "?:SumbaSite::alias:default"
4
+ }, {
5
+ "name": "MISC",
6
+ "siteId": "?:SumbaSite::alias:default"
7
+ }]
@@ -1,4 +1,5 @@
1
1
  {
2
+ "buildLevel": 1,
2
3
  "properties": [{
3
4
  "name": "hostname",
4
5
  "type": "string",
@@ -1,4 +1,5 @@
1
1
  {
2
+ "buildLevel": 2,
2
3
  "properties": [{
3
4
  "name": "username",
4
5
  "type": "string",
@@ -1,10 +1,13 @@
1
1
  async function checkIconset (req, reply) {
2
2
  const { get } = this.lib._
3
+ const mpa = this.app.waibuMpa
3
4
 
4
5
  if (!req.site) return
5
- const globalIconset = get(this.app, 'waibuMpa.config.iconset.default')
6
- req.iconset = get(req, 'site.setting.waibuMpa.iconset', globalIconset)
7
- // if (get(req, 'site.setting.allowUserIconset')) req.iconset = get(req, 'user.setting.iconset', req.iconset)
6
+ if (mpa.iconsets.length === 1) req.iconset = mpa.iconsets[0]
7
+ else {
8
+ const siteIconset = get(req, 'site.setting.waibuMpa.iconset')
9
+ req.iconset = get(mpa, 'config.iconset.default', siteIconset)
10
+ }
8
11
  }
9
12
 
10
13
  export default checkIconset
@@ -1,10 +1,14 @@
1
1
  async function checkTheme (req, reply) {
2
2
  const { get } = this.lib._
3
+ const mpa = this.app.waibuMpa
3
4
 
4
5
  if (!req.site) return
5
- const globalTheme = get(this.app, 'waibuMpa.config.theme.default')
6
- req.theme = get(req, 'site.setting.waibuMpa.theme', globalTheme)
7
- // if (get(req, 'site.setting.waibuMpa.allowUserTheme')) req.theme = get(req, 'user.setting.theme', req.theme)
6
+ if (mpa.themes.length === 1) req.theme = mpa.themes[0]
7
+ else {
8
+ const siteTheme = get(req, 'site.setting.waibuMpa.theme')
9
+ req.theme = get(mpa, 'config.theme.set', siteTheme)
10
+ req.theme = req.theme ?? mpa.themes[0]
11
+ }
8
12
  }
9
13
 
10
14
  export default checkTheme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Bajo Framework's Biz Suite",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,12 +0,0 @@
1
- async function afterInitWaibu () {
2
- const { isSet } = this.app.bajo
3
-
4
- if (!isSet(this.app.waibu.config.home)) {
5
- this.app.waibu.config.home = {
6
- path: 'sumba:/home',
7
- forward: true
8
- }
9
- }
10
- }
11
-
12
- export default afterInitWaibu
@@ -1,4 +0,0 @@
1
- ---
2
- layout: sumba.layout:/info.html
3
- title: aboutUs
4
- ---
@@ -1,13 +0,0 @@
1
- [{
2
- "name": "TECHNICAL",
3
- "siteId": "?:SumbaSite::alias:default"
4
- }, {
5
- "name": "BILLING",
6
- "siteId": "?:SumbaSite::alias:default"
7
- }, {
8
- "name": "API",
9
- "siteId": "?:SumbaSite::alias:default"
10
- }, {
11
- "name": "MISC",
12
- "siteId": "?:SumbaSite::alias:default"
13
- }]