waibu-bootstrap 2.1.6 → 2.1.8
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.
|
@@ -28,8 +28,8 @@ async function appLauncher () {
|
|
|
28
28
|
if (t === 'user' && this.app.sumba) launcher += '<c:sumba-nav-dropdown-user padding="end-2" />\n'
|
|
29
29
|
if (t === '-') launcher += '<c:nav-divider />\n'
|
|
30
30
|
if (t === 'fullscreen') launcher += '<c:nav-toggle-fullscreen padding="end-2" />\n'
|
|
31
|
-
if (t === 'darkmode') launcher += '<c:nav-dropdown-darkmode padding="end-2" dropdown-
|
|
32
|
-
if (t === 'language') launcher += '<c:nav-dropdown-language padding="end-2" dropdown-
|
|
31
|
+
if (t === 'darkmode') launcher += '<c:nav-dropdown-darkmode padding="end-2" dropdown-menu-dir="end" />\n'
|
|
32
|
+
if (t === 'language') launcher += '<c:nav-dropdown-language padding="end-2" dropdown-menu-dir="end" />\n'
|
|
33
33
|
}
|
|
34
34
|
launcher += '</c:nav></c:navbar></c:div>\n'
|
|
35
35
|
}
|
|
@@ -10,19 +10,19 @@ export async function buildMenu (params = {}) { // scope: component
|
|
|
10
10
|
const $ = this.$
|
|
11
11
|
let menuHtml = params.html
|
|
12
12
|
let style = params.attr.menuOnly ? 'display:block;' : ''
|
|
13
|
-
if (
|
|
13
|
+
if (params.attr.menuMax) {
|
|
14
14
|
const max = parseInt(params.attr.menuMax)
|
|
15
15
|
if (max > 0) {
|
|
16
16
|
const items = []
|
|
17
17
|
$(`<div>${params.html}</div>`).children().each(function () {
|
|
18
18
|
items.push($(this).prop('outerHTML'))
|
|
19
19
|
})
|
|
20
|
-
const maxCols = Math.
|
|
20
|
+
const maxCols = Math.ceil(items.length / max)
|
|
21
21
|
let els = ''
|
|
22
22
|
for (let i = 0; i < maxCols; i++) {
|
|
23
23
|
els += '<c:grid-col>'
|
|
24
24
|
for (let j = 0; j < parseInt(params.attr.menuMax); j++) {
|
|
25
|
-
els += items[max * i + j]
|
|
25
|
+
els += items[max * i + j] ?? ''
|
|
26
26
|
}
|
|
27
27
|
els += '</c:grid-col>'
|
|
28
28
|
}
|
|
@@ -41,6 +41,8 @@ export async function buildMenu (params = {}) { // scope: component
|
|
|
41
41
|
})
|
|
42
42
|
menuHtml = items.join('\n')
|
|
43
43
|
}
|
|
44
|
+
if (isString(params.attr.menuPrepend)) menuHtml = `${Buffer.from(params.attr.menuPrepend, 'base64').toString()}\n${menuHtml}`
|
|
45
|
+
if (isString(params.attr.menuAppend)) menuHtml = `${menuHtml}\n${Buffer.from(params.attr.menuAppend, 'base64').toString()}`
|
|
44
46
|
|
|
45
47
|
if (params.attr.menuScroll) {
|
|
46
48
|
const minHeight = isString(params.attr.menuScroll) ? numUnit(params.attr.menuScroll, 'px') : '80px'
|
|
@@ -51,7 +53,7 @@ export async function buildMenu (params = {}) { // scope: component
|
|
|
51
53
|
attr: {
|
|
52
54
|
class: [
|
|
53
55
|
'dropdown-menu',
|
|
54
|
-
parseVariant.call(this, { cls: 'dropdown-menu', value: params.attr.
|
|
56
|
+
parseVariant.call(this, { cls: 'dropdown-menu', value: params.attr.menuDir, values: dirs, variants: breakpoints, prepend: true })
|
|
55
57
|
],
|
|
56
58
|
style
|
|
57
59
|
},
|
|
@@ -30,7 +30,10 @@ async function navDropdownSetting () {
|
|
|
30
30
|
</c:dropdown-item>
|
|
31
31
|
</div>
|
|
32
32
|
`)
|
|
33
|
+
if (this.params.attr.changePassword || this.params.attr.downloadList) profile += '<c:dropdown-item divider />'
|
|
33
34
|
}
|
|
35
|
+
if (this.params.attr.changePassword) profile += '<c:dropdown-item href="sumba:/your-stuff/change-password" t:content="changePassword" />'
|
|
36
|
+
if (this.params.attr.downloadList) profile += '<c:dropdown-item href="sumba:/your-stuff/download/list" t:content="downloadList" />'
|
|
34
37
|
profile += '<c:dropdown-item divider />'
|
|
35
38
|
}
|
|
36
39
|
let darkMode = ''
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED