mamba-layout 0.8.0 → 0.10.0

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.
Files changed (101) hide show
  1. package/dist/index.css +1 -0
  2. package/dist/index.js.js +2562 -0
  3. package/dist/layout/components/index.d.ts +2 -0
  4. package/package.json +1 -1
  5. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  6. package/dist/assets/logo.png.js +0 -4
  7. package/dist/components/UserAvatar/index.js +0 -5
  8. package/dist/components/UserAvatar/src/UserAvatar.css +0 -1
  9. package/dist/components/UserAvatar/src/UserAvatar.vue.js +0 -7
  10. package/dist/components/UserAvatar/src/UserAvatar.vue2.js +0 -61
  11. package/dist/components/index.js +0 -10
  12. package/dist/index.js +0 -27
  13. package/dist/layout/BaseLayout.css +0 -1
  14. package/dist/layout/BaseLayout.vue.js +0 -7
  15. package/dist/layout/BaseLayout.vue2.js +0 -111
  16. package/dist/layout/components/AppSelect.css +0 -1
  17. package/dist/layout/components/AppSelect.vue.js +0 -7
  18. package/dist/layout/components/AppSelect.vue2.js +0 -69
  19. package/dist/layout/components/AsideBar.css +0 -1
  20. package/dist/layout/components/AsideBar.vue.js +0 -7
  21. package/dist/layout/components/AsideBar.vue2.js +0 -49
  22. package/dist/layout/components/AsideSubMenuItem.vue.js +0 -84
  23. package/dist/layout/components/AsideSubMenuItem.vue2.js +0 -4
  24. package/dist/layout/components/AsideSubMenus.vue.js +0 -36
  25. package/dist/layout/components/AsideSubMenus.vue2.js +0 -4
  26. package/dist/layout/components/HeaderBar.css +0 -1
  27. package/dist/layout/components/HeaderBar.vue.js +0 -7
  28. package/dist/layout/components/HeaderBar.vue2.js +0 -55
  29. package/dist/layout/components/LanguageSelect.css +0 -1
  30. package/dist/layout/components/LanguageSelect.vue.js +0 -8
  31. package/dist/layout/components/LanguageSelect.vue2.js +0 -100
  32. package/dist/layout/components/LanguageSelect2.css +0 -1
  33. package/dist/layout/components/LayoutBreadcrumb.css +0 -1
  34. package/dist/layout/components/LayoutBreadcrumb.vue.js +0 -7
  35. package/dist/layout/components/LayoutBreadcrumb.vue2.js +0 -189
  36. package/dist/layout/components/MenuItemIcon.css +0 -1
  37. package/dist/layout/components/MenuItemIcon.vue.js +0 -7
  38. package/dist/layout/components/MenuItemIcon.vue2.js +0 -23
  39. package/dist/layout/components/NavIconBtn.css +0 -1
  40. package/dist/layout/components/NavIconBtn.vue.js +0 -7
  41. package/dist/layout/components/NavIconBtn.vue2.js +0 -23
  42. package/dist/layout/components/SHeaderRight.css +0 -1
  43. package/dist/layout/components/SHeaderRight.vue.js +0 -7
  44. package/dist/layout/components/SHeaderRight.vue2.js +0 -68
  45. package/dist/layout/components/ThemeToggle.css +0 -1
  46. package/dist/layout/components/ThemeToggle.vue.js +0 -7
  47. package/dist/layout/components/ThemeToggle.vue2.js +0 -30
  48. package/dist/layout/components/TimezoneSelect.css +0 -1
  49. package/dist/layout/components/TimezoneSelect.vue.js +0 -8
  50. package/dist/layout/components/TimezoneSelect.vue2.js +0 -78
  51. package/dist/layout/components/TimezoneSelect2.css +0 -1
  52. package/dist/layout/components/UserInfo.css +0 -1
  53. package/dist/layout/components/UserInfo.vue.js +0 -8
  54. package/dist/layout/components/UserInfo.vue2.js +0 -111
  55. package/dist/layout/components/UserInfo2.css +0 -1
  56. package/dist/layout/components/index.js +0 -8
  57. package/dist/layout/components/mobile/AppSelectMobile.vue.js +0 -60
  58. package/dist/layout/components/mobile/AppSelectMobile.vue2.js +0 -4
  59. package/dist/layout/components/mobile/AsideBarMobile.css +0 -1
  60. package/dist/layout/components/mobile/AsideBarMobile.vue.js +0 -7
  61. package/dist/layout/components/mobile/AsideBarMobile.vue2.js +0 -49
  62. package/dist/layout/components/mobile/AsideUserMobile.css +0 -1
  63. package/dist/layout/components/mobile/AsideUserMobile.vue.js +0 -7
  64. package/dist/layout/components/mobile/AsideUserMobile.vue2.js +0 -56
  65. package/dist/layout/components/mobile/AsideUserMobilePopover.css +0 -1
  66. package/dist/layout/components/mobile/AsideUserMobilePopover.vue.js +0 -7
  67. package/dist/layout/components/mobile/AsideUserMobilePopover.vue2.js +0 -52
  68. package/dist/layout/components/mobile/HeaderRightMobile.css +0 -1
  69. package/dist/layout/components/mobile/HeaderRightMobile.vue.js +0 -7
  70. package/dist/layout/components/mobile/HeaderRightMobile.vue2.js +0 -46
  71. package/dist/layout/components/mobile/MobileMenuToggle.css +0 -1
  72. package/dist/layout/components/mobile/MobileMenuToggle.vue.js +0 -7
  73. package/dist/layout/components/mobile/MobileMenuToggle.vue2.js +0 -33
  74. package/dist/layout/hooks/index.js +0 -13
  75. package/dist/layout/hooks/useApp.js +0 -20
  76. package/dist/layout/hooks/useSetting.js +0 -26
  77. package/dist/layout/hooks/useState.js +0 -100
  78. package/dist/layout/hooks/useTheme.js +0 -37
  79. package/dist/layout/utils/index.js +0 -54
  80. package/dist/locales/en/account.js +0 -12
  81. package/dist/locales/en/admin.js +0 -209
  82. package/dist/locales/en/common.js +0 -42
  83. package/dist/locales/en/components.js +0 -39
  84. package/dist/locales/en/constant.js +0 -153
  85. package/dist/locales/en/filterBox.js +0 -13
  86. package/dist/locales/en/index.js +0 -22
  87. package/dist/locales/en/instanceForm.js +0 -19
  88. package/dist/locales/en/password.js +0 -20
  89. package/dist/locales/index.js +0 -12
  90. package/dist/locales/messages.js +0 -9
  91. package/dist/locales/zh-cn/account.js +0 -12
  92. package/dist/locales/zh-cn/admin.js +0 -207
  93. package/dist/locales/zh-cn/common.js +0 -42
  94. package/dist/locales/zh-cn/components.js +0 -39
  95. package/dist/locales/zh-cn/constant.js +0 -153
  96. package/dist/locales/zh-cn/filterBox.js +0 -13
  97. package/dist/locales/zh-cn/index.js +0 -22
  98. package/dist/locales/zh-cn/instanceForm.js +0 -19
  99. package/dist/locales/zh-cn/password.js +0 -20
  100. package/dist/utils/createContext.js +0 -14
  101. package/dist/utils/repoUtils.js +0 -160
@@ -1,78 +0,0 @@
1
- import { defineComponent as w, ref as y, computed as c, resolveComponent as f, openBlock as t, createBlock as d, withCtx as o, createElementVNode as i, createElementBlock as r, Fragment as T, renderList as Z, normalizeClass as L, toDisplayString as u, createVNode as n, unref as b, createCommentVNode as h } from "vue";
2
- import { Clock as B, ArrowDown as N } from "@element-plus/icons-vue";
3
- import { useCurrentTimeZone as x, getTimeZoneOptions as V, getTimeZoneLabel as D, setCurrentTimeZone as E } from "../../utils/repoUtils.js";
4
- import O from "./NavIconBtn.vue.js";
5
- const S = {
6
- key: 0,
7
- class: "timezone-select__current"
8
- }, A = { class: "timezone-select__panel" }, F = ["onClick"], I = { class: "timezone-select__name" }, R = { class: "timezone-select__offset" }, H = /* @__PURE__ */ w({
9
- __name: "TimezoneSelect",
10
- props: {
11
- showLabel: { type: Boolean, default: !1 }
12
- },
13
- setup(l) {
14
- const z = x(), s = y(!1), a = c(() => z.value), C = c(() => V()), m = c(() => D(a.value)), k = (_) => {
15
- E(_), s.value = !1;
16
- };
17
- return (_, p) => {
18
- const v = f("el-icon"), g = f("el-popover");
19
- return t(), d(g, {
20
- visible: s.value,
21
- "onUpdate:visible": p[0] || (p[0] = (e) => s.value = e),
22
- placement: "bottom",
23
- width: 280,
24
- trigger: "hover",
25
- "popper-class": "top-timezone-popover"
26
- }, {
27
- reference: o(() => [
28
- n(O, {
29
- tag: "div",
30
- class: "timezone-select",
31
- "icon-only": !l.showLabel,
32
- title: m.value,
33
- "aria-label": m.value
34
- }, {
35
- default: o(() => [
36
- n(v, null, {
37
- default: o(() => [
38
- n(b(B))
39
- ]),
40
- _: 1
41
- }),
42
- l.showLabel ? (t(), r("span", S, u(a.value), 1)) : h("", !0),
43
- l.showLabel ? (t(), d(v, {
44
- key: 1,
45
- class: "timezone-select__caret"
46
- }, {
47
- default: o(() => [
48
- n(b(N))
49
- ]),
50
- _: 1
51
- })) : h("", !0)
52
- ]),
53
- _: 1
54
- }, 8, ["icon-only", "title", "aria-label"])
55
- ]),
56
- default: o(() => [
57
- i("div", A, [
58
- (t(!0), r(T, null, Z(C.value, (e) => (t(), r("button", {
59
- key: e.value,
60
- type: "button",
61
- class: L(["timezone-select__option", {
62
- "timezone-select__option--active": e.value === a.value
63
- }]),
64
- onClick: (U) => k(e.value)
65
- }, [
66
- i("span", I, u(e.value), 1),
67
- i("span", R, u(e.offset), 1)
68
- ], 10, F))), 128))
69
- ])
70
- ]),
71
- _: 1
72
- }, 8, ["visible"]);
73
- };
74
- }
75
- });
76
- export {
77
- H as default
78
- };
@@ -1 +0,0 @@
1
- .timezone-select[data-v-e62f5f2d]{flex-shrink:0}.timezone-select__current[data-v-e62f5f2d]{max-width:132px;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:600;line-height:1}.timezone-select__caret[data-v-e62f5f2d]{font-size:12px}.timezone-select__panel[data-v-e62f5f2d]{display:grid;gap:4px;max-height:min(360px,70vh);overflow-y:auto}.timezone-select__option[data-v-e62f5f2d]{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;border:0;border-radius:var(--ui-radius-control);background:transparent;color:var(--ui-text-primary);text-align:left;cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast)}.timezone-select__option[data-v-e62f5f2d]:hover{background:var(--ui-bg-muted)}.timezone-select__name[data-v-e62f5f2d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.timezone-select__offset[data-v-e62f5f2d]{color:var(--ui-text-muted);font-size:12px;white-space:nowrap}.timezone-select__option--active[data-v-e62f5f2d]{color:var(--el-color-primary);background:var(--el-color-primary-light-10)}.timezone-select__option--active .timezone-select__offset[data-v-e62f5f2d]{color:var(--el-color-primary)}
@@ -1 +0,0 @@
1
- .top-userinfo-popover{padding:8px!important;border:1px solid var(--ui-border-default)!important;background:var(--ui-bg-card)!important;border-radius:var(--ui-radius-card)!important;box-shadow:var(--ui-shadow-pop)!important}
@@ -1,8 +0,0 @@
1
- import o from "./UserInfo.vue2.js";
2
- /* empty css */
3
- /* empty css */
4
- import r from "../../_virtual/_plugin-vue_export-helper.js";
5
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ac052463"]]);
6
- export {
7
- f as default
8
- };
@@ -1,111 +0,0 @@
1
- import { defineComponent as x, computed as v, resolveComponent as M, openBlock as r, createBlock as w, withCtx as b, createElementVNode as l, createVNode as f, unref as d, toDisplayString as u, createElementBlock as m, createCommentVNode as B, Fragment as h, renderList as y } from "vue";
2
- import k from "../../components/UserAvatar/src/UserAvatar.vue.js";
3
- import U from "../../locales/index.js";
4
- import { tname as V } from "../../utils/repoUtils.js";
5
- import { useSetting as E } from "../hooks/useSetting.js";
6
- import { redirectToLayoutLogin as S } from "../utils/index.js";
7
- import A from "./MenuItemIcon.vue.js";
8
- const D = { class: "user-info__panel" }, F = { class: "user-info__profile" }, P = { class: "user-info__profile-main" }, T = ["title"], j = ["title"], q = { class: "user-info__meta" }, z = { class: "user-info__meta-label" }, G = ["title"], H = ["href"], Z = /* @__PURE__ */ x({
9
- __name: "UserInfo",
10
- setup(J) {
11
- const { t: _ } = U.global, i = E(), a = v(() => i.value.user || {}), L = v(() => i.value.accountMenu || []), c = v(
12
- () => {
13
- var o, e, n, t;
14
- return ((o = a.value) == null ? void 0 : o.name) || ((e = a.value) == null ? void 0 : e.username) || ((n = a.value) == null ? void 0 : n.email) || ((t = a.value) == null ? void 0 : t.userId) || "User";
15
- }
16
- ), I = v(
17
- () => {
18
- var o, e, n;
19
- return [
20
- { label: _("admin.label.userName"), value: (o = a.value) == null ? void 0 : o.username },
21
- { label: _("admin.label.email"), value: (e = a.value) == null ? void 0 : e.email },
22
- { label: _("admin.label.userId"), value: (n = a.value) == null ? void 0 : n.userId }
23
- ].filter((t) => !!t.value);
24
- }
25
- ), C = () => {
26
- var o, e;
27
- Promise.resolve((e = (o = i.value).onLogout) == null ? void 0 : e.call(o)).finally(() => {
28
- i.value.onLogout || S(i.value);
29
- });
30
- };
31
- return (o, e) => {
32
- const n = M("el-popover");
33
- return r(), w(n, {
34
- width: 280,
35
- trigger: "hover",
36
- "popper-class": "top-userinfo-popover"
37
- }, {
38
- reference: b(() => [
39
- f(d(k), {
40
- class: "user-info__trigger ml-2",
41
- src: a.value.avatar,
42
- name: c.value
43
- }, null, 8, ["src", "name"])
44
- ]),
45
- default: b(() => {
46
- var t;
47
- return [
48
- l("div", D, [
49
- l("div", F, [
50
- f(d(k), {
51
- class: "user-info__profile-avatar",
52
- src: a.value.avatar,
53
- name: c.value
54
- }, null, 8, ["src", "name"]),
55
- l("div", P, [
56
- l("div", {
57
- class: "user-info__display-name",
58
- title: c.value
59
- }, u(c.value), 9, T),
60
- (t = a.value) != null && t.username ? (r(), m("div", {
61
- key: 0,
62
- class: "user-info__username",
63
- title: a.value.username
64
- }, " @" + u(a.value.username), 9, j)) : B("", !0)
65
- ])
66
- ]),
67
- l("div", q, [
68
- (r(!0), m(h, null, y(I.value, (s) => (r(), m("div", {
69
- key: s.label,
70
- class: "user-info__meta-row"
71
- }, [
72
- l("span", z, u(s.label), 1),
73
- l("span", {
74
- class: "user-info__meta-value",
75
- title: s.value
76
- }, u(s.value), 9, G)
77
- ]))), 128))
78
- ]),
79
- e[1] || (e[1] = l("div", { class: "user-info__divider" }, null, -1)),
80
- (r(!0), m(h, null, y(L.value, (s, N) => {
81
- var p, g;
82
- return r(), m("a", {
83
- key: N,
84
- href: s.path,
85
- class: "user-info__item"
86
- }, [
87
- f(A, {
88
- icon: s.icon || ((p = s.meta) == null ? void 0 : p.icon)
89
- }, null, 8, ["icon"]),
90
- l("span", null, u(d(V)(((g = s.meta) == null ? void 0 : g.translations) || {}, "name", s.name)), 1)
91
- ], 8, H);
92
- }), 128)),
93
- e[2] || (e[2] = l("div", { class: "user-info__divider" }, null, -1)),
94
- l("div", {
95
- class: "user-info__item user-info__item--danger",
96
- onClick: C
97
- }, [
98
- e[0] || (e[0] = l("i", { class: "metisicon-exit-full" }, null, -1)),
99
- l("span", null, u(d(_)("common.btn.logout")), 1)
100
- ])
101
- ])
102
- ];
103
- }),
104
- _: 1
105
- });
106
- };
107
- }
108
- });
109
- export {
110
- Z as default
111
- };
@@ -1 +0,0 @@
1
- .user-info__trigger[data-v-ac052463]{display:inline-flex;width:28px;height:28px;overflow:hidden;border-radius:var(--ui-radius-pill);background:var(--ui-avatar-bg, var(--el-color-primary));border:1px solid var(--ui-topnav-border);align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--ui-text-on-brand);cursor:pointer;flex-shrink:0;-webkit-user-select:none;user-select:none;transition:border-color var(--ui-transition-fast),filter var(--ui-transition-fast)}.user-info__trigger[data-v-ac052463]:hover{border-color:var(--ui-topnav-foreground);filter:brightness(1.05)}.user-info__panel[data-v-ac052463]{display:grid;gap:2px}.user-info__profile[data-v-ac052463]{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:center;padding:8px 8px 10px}.user-info__profile-avatar[data-v-ac052463]{width:44px;height:44px;overflow:hidden;border-radius:var(--ui-radius-pill);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--ui-avatar-bg, var(--el-color-primary));color:var(--ui-text-on-brand);font-size:16px;font-weight:700}.user-info__profile-main[data-v-ac052463]{min-width:0}.user-info__display-name[data-v-ac052463]{color:var(--ui-text-primary);font-size:14px;font-weight:700;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-info__username[data-v-ac052463]{margin-top:2px;color:var(--ui-text-muted);font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-info__meta[data-v-ac052463]{display:grid;gap:2px;padding:8px;margin-bottom:2px;border-radius:var(--ui-radius-control);background:var(--ui-bg-muted)}.user-info__meta-row[data-v-ac052463]{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px;align-items:center;min-height:24px;font-size:12px;line-height:18px}.user-info__meta-label[data-v-ac052463]{color:var(--ui-text-muted)}.user-info__meta-value[data-v-ac052463]{min-width:0;color:var(--ui-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}.user-info__item[data-v-ac052463]{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:var(--ui-radius-control);color:var(--ui-text-primary);font-size:12px;cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast)}.user-info__item[data-v-ac052463]:hover{background:var(--ui-bg-muted)}.user-info__item--danger[data-v-ac052463]{color:var(--el-color-danger)}.user-info__divider[data-v-ac052463]{height:1px;background:var(--ui-border-soft);margin:4px 0}
@@ -1,8 +0,0 @@
1
- import { default as r } from "./LayoutBreadcrumb.vue.js";
2
- import { default as t } from "./TimezoneSelect.vue.js";
3
- import { default as m } from "./UserInfo.vue.js";
4
- export {
5
- r as LayoutBreadcrumb,
6
- t as TimezoneSelect,
7
- m as UserInfo
8
- };
@@ -1,60 +0,0 @@
1
- import { defineComponent as C, computed as x, resolveComponent as p, unref as l, openBlock as e, createElementBlock as o, createVNode as A, withCtx as i, Fragment as c, renderList as f, createBlock as u, createCommentVNode as B } from "vue";
2
- import { useApp as I } from "../../hooks/useApp.js";
3
- import { injectLayoutContext as w } from "../../hooks/useState.js";
4
- const L = {
5
- key: 0,
6
- class: "min-w-0 flex-1"
7
- }, F = /* @__PURE__ */ C({
8
- __name: "AppSelectMobile",
9
- setup(N) {
10
- const { currentAppId: v } = w(), { appList: s, getAppPath: a, findAppById: h } = I(), g = x(() => {
11
- const n = h(v.value);
12
- return n ? a(n) : "";
13
- }), k = (n) => {
14
- n && (location.href = n);
15
- };
16
- return (n, P) => {
17
- var d;
18
- const _ = p("el-option"), y = p("el-option-group"), b = p("el-select");
19
- return (d = l(s)) != null && d.length ? (e(), o("div", L, [
20
- A(b, {
21
- "model-value": g.value,
22
- class: "w-full",
23
- onChange: k
24
- }, {
25
- default: i(() => [
26
- (e(!0), o(c, null, f(l(s), (t) => {
27
- var m;
28
- return e(), o(c, {
29
- key: t.appId
30
- }, [
31
- (m = t.children) != null && m.length ? (e(), u(y, {
32
- key: 0,
33
- label: t.name
34
- }, {
35
- default: i(() => [
36
- (e(!0), o(c, null, f(t.children, (r) => (e(), u(_, {
37
- key: r.appId,
38
- label: r.name,
39
- value: l(a)(r),
40
- style: { "padding-left": "30px" }
41
- }, null, 8, ["label", "value"]))), 128))
42
- ]),
43
- _: 2
44
- }, 1032, ["label"])) : (e(), u(_, {
45
- key: 1,
46
- label: t.name,
47
- value: l(a)(t)
48
- }, null, 8, ["label", "value"]))
49
- ], 64);
50
- }), 128))
51
- ]),
52
- _: 1
53
- }, 8, ["model-value"])
54
- ])) : B("", !0);
55
- };
56
- }
57
- });
58
- export {
59
- F as default
60
- };
@@ -1,4 +0,0 @@
1
- import f from "./AppSelectMobile.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- .aside-bar-mobile[data-v-ffd10c8b]{width:min(86vw,320px);max-width:calc(100vw - 32px);height:100vh;height:100dvh;z-index:240;border-right:1px solid var(--ui-sidebar-border);background:var(--ui-sidebar-bg);color:var(--ui-sidebar-foreground);box-shadow:var(--ui-shadow-pop);will-change:transform}.aside-bar-mobile__head[data-v-ffd10c8b]{min-height:var(--layout-mobile-header-height, 56px);padding:10px 12px;border-bottom:1px solid var(--ui-sidebar-border);flex-shrink:0}.aside-bar-mobile__close[data-v-ffd10c8b]{width:36px;height:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--ui-sidebar-border);border-radius:var(--ui-radius-control);background:var(--ui-sidebar-accent);color:var(--ui-text-muted);cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast),border-color var(--ui-transition-fast)}.aside-bar-mobile__close[data-v-ffd10c8b]:hover{background:var(--ui-sidebar-hover-bg);color:var(--ui-sidebar-foreground)}.aside-bar-mobile[data-v-ffd10c8b] .el-scrollbar{flex:1 1 auto;min-height:0}
@@ -1,7 +0,0 @@
1
- import o from "./AsideBarMobile.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ffd10c8b"]]);
5
- export {
6
- e as default
7
- };
@@ -1,49 +0,0 @@
1
- import { defineComponent as d, resolveComponent as r, unref as o, openBlock as _, createElementBlock as f, normalizeClass as p, createElementVNode as t, createVNode as e, withCtx as a, renderSlot as u, createCommentVNode as b } from "vue";
2
- import { Fold as x } from "@element-plus/icons-vue";
3
- import { injectLayoutContext as h } from "../../hooks/useState.js";
4
- import C from "../AsideSubMenus.vue.js";
5
- import v from "./AppSelectMobile.vue.js";
6
- import k from "./AsideUserMobile.vue.js";
7
- const y = { class: "aside-bar-mobile__head flex items-center gap-3" }, S = { class: "p-3" }, M = /* @__PURE__ */ d({
8
- __name: "AsideBarMobile",
9
- setup($) {
10
- const { menus: l, sideOpen: n } = h(), i = () => void (n.value = !1);
11
- return (s, B) => {
12
- const m = r("el-icon"), c = r("el-scrollbar");
13
- return o(l).length && !s.$route.meta.hideSidebar ? (_(), f("div", {
14
- key: 0,
15
- class: p(["aside-bar-mobile fixed inset-y-0 left-0 z-200 flex min-h-0 flex-col transition-transform", [o(n) ? "translate-x-[0px]" : "translate-x-[-100%]"]])
16
- }, [
17
- t("div", y, [
18
- t("button", {
19
- type: "button",
20
- class: "aside-bar-mobile__close",
21
- "aria-label": "Close menu",
22
- onClick: i
23
- }, [
24
- e(m, null, {
25
- default: a(() => [
26
- e(o(x))
27
- ]),
28
- _: 1
29
- })
30
- ]),
31
- e(v)
32
- ]),
33
- e(c, { ref: "leftScrollRef" }, {
34
- default: a(() => [
35
- t("div", S, [
36
- e(C, { menus: o(l) }, null, 8, ["menus"])
37
- ])
38
- ]),
39
- _: 1
40
- }, 512),
41
- u(s.$slots, "sidebar-foot", {}, void 0, !0),
42
- e(k)
43
- ], 2)) : b("", !0);
44
- };
45
- }
46
- });
47
- export {
48
- M as default
49
- };
@@ -1 +0,0 @@
1
- .aside-user-mobile[data-v-c56964a5]{width:100%;position:relative;display:flex;align-items:center;gap:8px;padding:16px;border-top:1px solid var(--ui-sidebar-border);color:var(--ui-sidebar-foreground);cursor:pointer}.aside-user-mobile__icon[data-v-c56964a5]{color:var(--ui-text-muted)}
@@ -1,7 +0,0 @@
1
- import o from "./AsideUserMobile.vue2.js";
2
- /* empty css */
3
- import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c56964a5"]]);
5
- export {
6
- a as default
7
- };
@@ -1,56 +0,0 @@
1
- import { defineComponent as v, computed as n, resolveComponent as f, openBlock as u, createBlock as g, withCtx as r, createElementVNode as o, toDisplayString as b, createVNode as t, unref as c, createElementBlock as y } from "vue";
2
- import { ArrowRight as d } from "@element-plus/icons-vue";
3
- import { useSetting as h } from "../../hooks/useSetting.js";
4
- import { redirectToLayoutLogin as k } from "../../utils/index.js";
5
- import x from "./AsideUserMobilePopover.vue.js";
6
- const C = { class: "aside-user-mobile" }, L = { class: "flex-1" }, A = { class: "absolute right-4 top-1/2 -translate-y-1/2" }, B = { class: "absolute right-4 top-1/2 -translate-y-1/2" }, T = /* @__PURE__ */ v({
7
- __name: "AsideUserMobile",
8
- setup(U) {
9
- const i = h(), s = n(() => i.value.user || {}), m = n(() => !!(s.value.id || s.value.userId)), _ = n(() => s.value.name || s.value.username), p = () => {
10
- var l, e;
11
- (e = (l = i.value).onLogin) != null && e.call(l) || k(i.value);
12
- };
13
- return (l, e) => {
14
- const a = f("el-icon");
15
- return m.value ? (u(), g(x, { key: 0 }, {
16
- reference: r(() => [
17
- o("div", C, [
18
- e[0] || (e[0] = o("div", { class: "aside-user-mobile__icon text-lg" }, [
19
- o("i", { class: "metisicon-yonghu1" })
20
- ], -1)),
21
- o("div", L, b(_.value), 1),
22
- o("div", A, [
23
- t(a, null, {
24
- default: r(() => [
25
- t(c(d))
26
- ]),
27
- _: 1
28
- })
29
- ])
30
- ])
31
- ]),
32
- _: 1
33
- })) : (u(), y("div", {
34
- key: 1,
35
- class: "aside-user-mobile",
36
- onClick: p
37
- }, [
38
- e[1] || (e[1] = o("div", { class: "aside-user-mobile__icon text-lg" }, [
39
- o("i", { class: "metisicon-yonghu1" })
40
- ], -1)),
41
- e[2] || (e[2] = o("div", { class: "flex-1" }, "登录/注册", -1)),
42
- o("div", B, [
43
- t(a, null, {
44
- default: r(() => [
45
- t(c(d))
46
- ]),
47
- _: 1
48
- })
49
- ])
50
- ]));
51
- };
52
- }
53
- });
54
- export {
55
- T as default
56
- };
@@ -1 +0,0 @@
1
- .mobile-user-popover[data-v-87e082b1]{display:grid;gap:4px}.mobile-user-popover__item[data-v-87e082b1]{display:flex;align-items:center;gap:8px;padding:12px 14px;border-radius:var(--ui-radius-control);color:var(--ui-text-primary);cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast)}.mobile-user-popover__item[data-v-87e082b1]:hover{background:var(--ui-bg-muted)}.mobile-user-popover__item--danger[data-v-87e082b1]{color:var(--el-color-danger)}.mobile-user-popover__divider[data-v-87e082b1]{height:1px;background:var(--ui-border-default);margin:2px 0}
@@ -1,7 +0,0 @@
1
- import o from "./AsideUserMobilePopover.vue2.js";
2
- /* empty css */
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-87e082b1"]]);
5
- export {
6
- s as default
7
- };
@@ -1,52 +0,0 @@
1
- import { defineComponent as a, computed as c, resolveComponent as v, openBlock as d, createBlock as f, withCtx as n, createElementVNode as o, toDisplayString as i, unref as s, createVNode as _, renderSlot as g } from "vue";
2
- import b from "../../../locales/index.js";
3
- import { useSetting as C } from "../../hooks/useSetting.js";
4
- import { getLayoutUserCenterPath as L, redirectToLayoutLogin as y } from "../../utils/index.js";
5
- import h from "../LanguageSelect.vue.js";
6
- const k = { class: "mobile-user-popover" }, P = ["href"], V = /* @__PURE__ */ a({
7
- __name: "AsideUserMobilePopover",
8
- setup(S) {
9
- const { t: l } = b.global, t = C(), p = c(() => L(t.value)), u = () => {
10
- var r, e;
11
- Promise.resolve((e = (r = t.value).onLogout) == null ? void 0 : e.call(r)).finally(() => {
12
- t.value.onLogout || y(t.value);
13
- });
14
- };
15
- return (r, e) => {
16
- const m = v("el-popover");
17
- return d(), f(m, {
18
- width: 220,
19
- trigger: "click",
20
- "popper-class": "top-userinfo-popover"
21
- }, {
22
- reference: n(() => [
23
- g(r.$slots, "reference", {}, void 0, !0)
24
- ]),
25
- default: n(() => [
26
- o("div", k, [
27
- o("a", {
28
- href: p.value,
29
- class: "mobile-user-popover__item"
30
- }, [
31
- e[0] || (e[0] = o("i", { class: "metisicon-yonghu1" }, null, -1)),
32
- o("span", null, i(s(l)("admin.label.profile")), 1)
33
- ], 8, P),
34
- _(h),
35
- e[2] || (e[2] = o("div", { class: "mobile-user-popover__divider" }, null, -1)),
36
- o("div", {
37
- class: "mobile-user-popover__item mobile-user-popover__item--danger",
38
- onClick: u
39
- }, [
40
- e[1] || (e[1] = o("i", { class: "metisicon-exit-full" }, null, -1)),
41
- o("span", null, i(s(l)("common.btn.logout")), 1)
42
- ])
43
- ])
44
- ]),
45
- _: 3
46
- });
47
- };
48
- }
49
- });
50
- export {
51
- V as default
52
- };
@@ -1 +0,0 @@
1
- .header-right-mobile[data-v-48792b0a]{--nav-icon-btn-size: 40px;display:flex;align-items:center;gap:8px;padding-right:0;min-width:0}.header-right-mobile[data-v-48792b0a] .nav-icon-btn{--nav-icon-btn-size: 40px;--nav-icon-btn-color: var(--ui-topnav-foreground);--nav-icon-btn-bg: var(--ui-topnav-surface);--nav-icon-btn-border-color: var(--ui-topnav-border);--nav-icon-btn-hover-bg: var(--ui-topnav-hover);--nav-icon-btn-hover-color: var(--ui-topnav-foreground);--nav-icon-btn-hover-border-color: var(--ui-topnav-border)}.header-right-mobile__action[data-v-48792b0a]{--nav-icon-btn-color: var(--ui-topnav-foreground);--nav-icon-btn-bg: var(--ui-topnav-surface);--nav-icon-btn-border-color: var(--ui-topnav-border);--nav-icon-btn-hover-bg: var(--ui-topnav-hover);--nav-icon-btn-hover-color: var(--ui-topnav-foreground);--nav-icon-btn-hover-border-color: var(--ui-topnav-border)}@media(max-width:374px){.header-right-mobile[data-v-48792b0a]{--nav-icon-btn-size: 36px;gap:6px}.header-right-mobile[data-v-48792b0a] .nav-icon-btn{--nav-icon-btn-size: 36px}}
@@ -1,7 +0,0 @@
1
- import o from "./HeaderRightMobile.vue2.js";
2
- /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-48792b0a"]]);
5
- export {
6
- i as default
7
- };
@@ -1,46 +0,0 @@
1
- import { defineComponent as u, computed as d, openBlock as r, createElementBlock as p, createVNode as n, createBlock as l, withCtx as i, createElementVNode as s } from "vue";
2
- import { useSetting as g } from "../../hooks/useSetting.js";
3
- import { redirectToLayoutLogin as _ } from "../../utils/index.js";
4
- import a from "../NavIconBtn.vue.js";
5
- import f from "../ThemeToggle.vue.js";
6
- import h from "./AsideUserMobilePopover.vue.js";
7
- const v = { class: "header-right-mobile" }, N = /* @__PURE__ */ u({
8
- __name: "HeaderRightMobile",
9
- setup(k) {
10
- const t = g(), m = d(
11
- () => {
12
- var o, e;
13
- return !!((o = t.value.user) != null && o.id || (e = t.value.user) != null && e.userId);
14
- }
15
- ), c = () => {
16
- var o, e;
17
- (e = (o = t.value).onLogin) != null && e.call(o) || _(t.value);
18
- };
19
- return (o, e) => (r(), p("div", v, [
20
- n(f),
21
- m.value ? (r(), l(h, { key: 0 }, {
22
- reference: i(() => [
23
- n(a, { class: "header-right-mobile__action" }, {
24
- default: i(() => [...e[0] || (e[0] = [
25
- s("i", { class: "metisicon-yonghu1" }, null, -1)
26
- ])]),
27
- _: 1
28
- })
29
- ]),
30
- _: 1
31
- })) : (r(), l(a, {
32
- key: 1,
33
- class: "header-right-mobile__action",
34
- onClick: c
35
- }, {
36
- default: i(() => [...e[1] || (e[1] = [
37
- s("i", { class: "metisicon-yonghu1" }, null, -1)
38
- ])]),
39
- _: 1
40
- }))
41
- ]));
42
- }
43
- });
44
- export {
45
- N as default
46
- };
@@ -1 +0,0 @@
1
- .mobile-menu-toggle[data-v-c14b8f72]{width:40px;height:40px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border:1px solid var(--ui-topnav-border);border-radius:var(--ui-radius-control);background:var(--ui-topnav-surface);color:var(--ui-topnav-foreground);cursor:pointer;transition:background var(--ui-transition-fast),color var(--ui-transition-fast)}.mobile-menu-toggle[data-v-c14b8f72]:hover{background:var(--ui-topnav-hover)}.mobile-menu-toggle[data-v-c14b8f72]:focus-visible{outline:2px solid var(--ui-topnav-foreground);outline-offset:2px}.mobile-menu-toggle__icon[data-v-c14b8f72]{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:18px}
@@ -1,7 +0,0 @@
1
- import o from "./MobileMenuToggle.vue2.js";
2
- /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c14b8f72"]]);
5
- export {
6
- m as default
7
- };
@@ -1,33 +0,0 @@
1
- import { defineComponent as a, resolveComponent as c, openBlock as i, createElementBlock as r, unref as o, createElementVNode as m, createVNode as n, withCtx as s } from "vue";
2
- import { Expand as p } from "@element-plus/icons-vue";
3
- import { injectLayoutContext as _ } from "../../hooks/useState.js";
4
- const u = ["aria-label", "aria-expanded"], d = { class: "mobile-menu-toggle__icon" }, v = /* @__PURE__ */ a({
5
- __name: "MobileMenuToggle",
6
- setup(f) {
7
- const { sideOpen: e } = _(), t = () => {
8
- e.value = !e.value;
9
- };
10
- return (g, b) => {
11
- const l = c("el-icon");
12
- return i(), r("button", {
13
- type: "button",
14
- class: "mobile-menu-toggle",
15
- "aria-label": o(e) ? "Close menu" : "Open menu",
16
- "aria-expanded": o(e),
17
- onClick: t
18
- }, [
19
- m("div", d, [
20
- n(l, null, {
21
- default: s(() => [
22
- n(o(p))
23
- ]),
24
- _: 1
25
- })
26
- ])
27
- ], 8, u);
28
- };
29
- }
30
- });
31
- export {
32
- v as default
33
- };
@@ -1,13 +0,0 @@
1
- import { useApp as o } from "./useApp.js";
2
- import { provideSetting as p, useSetting as u } from "./useSetting.js";
3
- import { injectLayoutContext as i, provideLayoutContext as m, useStateHook as n } from "./useState.js";
4
- import { useTheme as s } from "./useTheme.js";
5
- export {
6
- i as injectLayoutContext,
7
- m as provideLayoutContext,
8
- p as provideSetting,
9
- o as useApp,
10
- u as useSetting,
11
- n as useStateHook,
12
- s as useTheme
13
- };
@@ -1,20 +0,0 @@
1
- import { computed as p } from "vue";
2
- import { useSetting as s } from "./useSetting.js";
3
- function d() {
4
- const o = s(), n = p(() => o.value.appList || []);
5
- return {
6
- appList: n,
7
- getAppPath: (t) => (t == null ? void 0 : t.path) || "",
8
- findAppById: (t) => {
9
- if (t)
10
- return r(n.value, t);
11
- }
12
- };
13
- }
14
- const r = (o, n) => o.reduce(
15
- (i, e) => i || (e.appId === n ? e : r(e.children || [], n)),
16
- void 0
17
- );
18
- export {
19
- d as useApp
20
- };