@duxweb/dvha-pro 1.0.18 → 1.0.20
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/dist/cjs/component.cjs +1 -1
- package/dist/cjs/components/card/card.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/code/code.cjs +1 -0
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
- package/dist/cjs/components/form/formItem.cjs +1 -1
- package/dist/cjs/components/form/formLayout.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.cjs +1 -0
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -1
- package/dist/cjs/components/modal/modal.cjs +1 -1
- package/dist/cjs/components/modal/modalPage.cjs +1 -1
- package/dist/cjs/components/panel/collapse.cjs +1 -0
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -0
- package/dist/cjs/components/table/table.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/components/tree/treeFilter.cjs +1 -1
- package/dist/cjs/components/upload/config.cjs +1 -0
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/naiveTheme.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +23 -7
- package/dist/esm/component.js +36 -34
- package/dist/esm/components/card/card.js +6 -6
- package/dist/esm/components/chart/echart.js +17 -6
- package/dist/esm/components/code/code.js +53 -0
- package/dist/esm/components/crop/imageCrop.js +37 -26
- package/dist/esm/components/data/dynamicSelect.js +29 -18
- package/dist/esm/components/data/selectModal.js +49 -38
- package/dist/esm/components/drawer/drawer.js +17 -28
- package/dist/esm/components/drawer/drawerPage.js +54 -17
- package/dist/esm/components/form/formItem.js +17 -17
- package/dist/esm/components/form/formLayout.js +8 -8
- package/dist/esm/components/form/modalForm.js +44 -35
- package/dist/esm/components/form/pageForm.js +81 -43
- package/dist/esm/components/form/settingForm.js +28 -17
- package/dist/esm/components/icon/icon.js +23 -12
- package/dist/esm/components/layout/filter.js +15 -11
- package/dist/esm/components/layout/filterLayout.js +34 -0
- package/dist/esm/components/layout/list.js +211 -161
- package/dist/esm/components/layout/table.js +217 -186
- package/dist/esm/components/level/level.js +28 -17
- package/dist/esm/components/modal/modal.js +9 -9
- package/dist/esm/components/modal/modalPage.js +2 -2
- package/dist/esm/components/panel/collapse.js +49 -0
- package/dist/esm/components/panel/setting.js +3 -3
- package/dist/esm/components/status/listEmpty.js +26 -0
- package/dist/esm/components/table/table.js +110 -0
- package/dist/esm/components/table/tablePage.js +24 -18
- package/dist/esm/components/tree/treeFilter.js +44 -39
- package/dist/esm/components/upload/config.js +32 -0
- package/dist/esm/components/upload/file.js +142 -116
- package/dist/esm/components/upload/image.js +95 -66
- package/dist/esm/components/upload/manage/item.js +17 -6
- package/dist/esm/components/upload/manager.js +202 -164
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +77 -75
- package/dist/esm/hooks/dialog.js +13 -2
- package/dist/esm/hooks/drawer.js +13 -2
- package/dist/esm/hooks/modal.js +13 -2
- package/dist/esm/hooks/table/image.js +21 -10
- package/dist/esm/hooks/table/media.js +20 -9
- package/dist/esm/hooks/table.js +16 -16
- package/dist/esm/index.js +174 -164
- package/dist/esm/langs/en-US.json.js +5 -3
- package/dist/esm/langs/zh-CN.json.js +5 -3
- package/dist/esm/pages/authLayout.js +19 -8
- package/dist/esm/pages/layout/page.js +17 -6
- package/dist/esm/pages/login.js +40 -29
- package/dist/esm/pages/menu/avatar.js +97 -86
- package/dist/esm/pages/menu/button.js +23 -12
- package/dist/esm/pages/menu/cmd.js +45 -34
- package/dist/esm/pages/menu/main.js +40 -27
- package/dist/esm/pages/menu/mobile.js +13 -2
- package/dist/esm/pages/page.js +1 -1
- package/dist/esm/pages/page404.js +20 -9
- package/dist/esm/pages/pageStatus.js +31 -15
- package/dist/esm/theme/naiveTheme.js +6 -6
- package/dist/esm/theme/uno.css.js +23 -7
- package/dist/types/components/code/code.d.ts +44 -0
- package/dist/types/components/code/index.d.ts +1 -0
- package/dist/types/components/drawer/drawer.d.ts +2 -0
- package/dist/types/components/drawer/drawerPage.d.ts +20 -1
- package/dist/types/components/form/formItem.d.ts +2 -2
- package/dist/types/components/form/formLayout.d.ts +3 -3
- package/dist/types/components/form/modalForm.d.ts +3 -3
- package/dist/types/components/form/pageForm.d.ts +12 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/filterLayout.d.ts +32 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/list.d.ts +7 -1
- package/dist/types/components/layout/table.d.ts +10 -1
- package/dist/types/components/list/card.d.ts +6 -0
- package/dist/types/components/list/list.d.ts +6 -0
- package/dist/types/components/panel/collapse.d.ts +14 -0
- package/dist/types/components/panel/index.d.ts +1 -0
- package/dist/types/components/select/cardSelect.d.ts +1 -1
- package/dist/types/components/status/index.d.ts +1 -0
- package/dist/types/components/status/listEmpty.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +6552 -0
- package/dist/types/components/table/tablePage.d.ts +9 -0
- package/dist/types/components/tree/treeFilter.d.ts +13 -12
- package/dist/types/components/upload/config.d.ts +13 -0
- package/dist/types/components/upload/file.d.ts +4 -0
- package/dist/types/components/upload/image.d.ts +30 -2
- package/dist/types/components/upload/manager.d.ts +4 -0
- package/dist/types/hooks/drawer.d.ts +1 -0
- package/dist/types/hooks/table/types.d.ts +1 -0
- package/dist/types/main.d.ts +6 -0
- package/dist/types/pages/pageStatus.d.ts +11 -1
- package/package.json +7 -5
package/dist/esm/pages/login.js
CHANGED
|
@@ -30,17 +30,28 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
30
30
|
import "vue-command-palette";
|
|
31
31
|
import "./page404.js";
|
|
32
32
|
import "@iconify-json/tabler/icons.json";
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
import "vue3-ace-editor";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
36
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
37
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
38
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
39
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
40
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
41
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
42
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
43
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
44
|
+
function O(i) {
|
|
45
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !L(i);
|
|
35
46
|
}
|
|
36
|
-
const
|
|
47
|
+
const Ne = /* @__PURE__ */ k({
|
|
37
48
|
name: "DuxLoginPage",
|
|
38
|
-
setup(
|
|
39
|
-
slots:
|
|
49
|
+
setup(i, {
|
|
50
|
+
slots: a
|
|
40
51
|
}) {
|
|
41
|
-
const
|
|
42
|
-
t:
|
|
43
|
-
} = P(), w = j(),
|
|
52
|
+
const l = N(), r = F(), {
|
|
53
|
+
t: s
|
|
54
|
+
} = P(), w = j(), n = A(), t = D({
|
|
44
55
|
username: "",
|
|
45
56
|
password: ""
|
|
46
57
|
}), {
|
|
@@ -48,50 +59,50 @@ const fe = /* @__PURE__ */ k({
|
|
|
48
59
|
isLoading: b
|
|
49
60
|
} = S({
|
|
50
61
|
onSuccess: () => {
|
|
51
|
-
|
|
62
|
+
n.success(s("pages.login.success"));
|
|
52
63
|
},
|
|
53
64
|
onError: (o) => {
|
|
54
|
-
|
|
65
|
+
n.error((o == null ? void 0 : o.message) || s("pages.login.error"));
|
|
55
66
|
}
|
|
56
67
|
}), y = () => {
|
|
57
68
|
x(t);
|
|
58
69
|
};
|
|
59
70
|
return () => {
|
|
60
|
-
var
|
|
71
|
+
var p, u, c, d, g;
|
|
61
72
|
let o;
|
|
62
73
|
return e("div", {
|
|
63
74
|
"un-cloak": !0,
|
|
64
|
-
class: z(["h-screen w-screen flex items-start justify-center text-secondary md:items-center",
|
|
75
|
+
class: z(["h-screen w-screen flex items-start justify-center text-secondary md:items-center", l.isDark.value ? "app-login-dark-bg" : "app-login-bg"])
|
|
65
76
|
}, [e("div", {
|
|
66
77
|
class: "relative md:m-4 max-w-180 w-full h-full md:h-auto grid-cols-1 md:grid-cols-2 gap-12 overflow-hidden md:rounded-lg p-8 md:shadow bg-default dark:bg-muted grid"
|
|
67
78
|
}, [e("div", {
|
|
68
79
|
class: "flex justify-center tex absolute h-30 w-30 rotate-45 cursor-pointer items-end p-3 text-white bg-primary -right-15 -top-15 hover:bg-primary-hover",
|
|
69
|
-
onClick: () =>
|
|
70
|
-
}, [
|
|
80
|
+
onClick: () => l.toggle()
|
|
81
|
+
}, [l.mode.value === "auto" && e("div", {
|
|
71
82
|
class: "i-tabler:brightness-half h-5 w-5"
|
|
72
|
-
}, null),
|
|
83
|
+
}, null), l.mode.value === "light" && e("div", {
|
|
73
84
|
class: "h-5 w-5 i-tabler:sun"
|
|
74
|
-
}, null),
|
|
85
|
+
}, null), l.mode.value === "dark" && e("div", {
|
|
75
86
|
class: "h-5 w-5 i-tabler:moon"
|
|
76
87
|
}, null)]), e("div", {
|
|
77
88
|
class: "justify-center hidden md:flex flex-row items-center"
|
|
78
|
-
}, [(
|
|
89
|
+
}, [(p = r.config.theme) != null && p.banner ? e("img", {
|
|
79
90
|
class: "w-full h-auto",
|
|
80
|
-
src: (
|
|
91
|
+
src: (u = r.config.theme) == null ? void 0 : u.banner
|
|
81
92
|
}, null) : e("div", {
|
|
82
93
|
class: "w-full h-auto"
|
|
83
94
|
}, [e(M, null, null)])]), e("div", {
|
|
84
95
|
class: "flex flex-col"
|
|
85
96
|
}, [e("div", {
|
|
86
97
|
class: "flex flex-col items-center justify-center mt-4"
|
|
87
|
-
}, [e("div", null, [(c =
|
|
98
|
+
}, [e("div", null, [(c = r.config.theme) != null && c.logo ? e("img", {
|
|
88
99
|
class: "w-auto h-16",
|
|
89
|
-
src: (d =
|
|
100
|
+
src: (d = r.config.theme) == null ? void 0 : d.logo
|
|
90
101
|
}, null) : e("div", {
|
|
91
102
|
class: "h-10"
|
|
92
103
|
}, [e(V, null, null)])]), e("div", {
|
|
93
104
|
class: "mt-4 text-lg text-muted"
|
|
94
|
-
}, [
|
|
105
|
+
}, [r.config.title || "Dux Admin Manage"])]), e("div", {
|
|
95
106
|
class: "my-6"
|
|
96
107
|
}, [e(C, {
|
|
97
108
|
ref: w,
|
|
@@ -107,9 +118,9 @@ const fe = /* @__PURE__ */ k({
|
|
|
107
118
|
}, {
|
|
108
119
|
default: () => [e(v, {
|
|
109
120
|
value: t.username,
|
|
110
|
-
onUpdateValue: (
|
|
121
|
+
onUpdateValue: (m) => t.username = m,
|
|
111
122
|
type: "text",
|
|
112
|
-
placeholder:
|
|
123
|
+
placeholder: s("pages.login.placeholder.username"),
|
|
113
124
|
size: "large"
|
|
114
125
|
}, {
|
|
115
126
|
default: () => e("div", {
|
|
@@ -123,10 +134,10 @@ const fe = /* @__PURE__ */ k({
|
|
|
123
134
|
}, {
|
|
124
135
|
default: () => [e(v, {
|
|
125
136
|
value: t.password,
|
|
126
|
-
onUpdateValue: (
|
|
137
|
+
onUpdateValue: (m) => t.password = m,
|
|
127
138
|
type: "password",
|
|
128
139
|
showPasswordOn: "mousedown",
|
|
129
|
-
placeholder:
|
|
140
|
+
placeholder: s("pages.login.placeholder.password"),
|
|
130
141
|
size: "large",
|
|
131
142
|
inputProps: {
|
|
132
143
|
autocomplete: "new-password"
|
|
@@ -136,7 +147,7 @@ const fe = /* @__PURE__ */ k({
|
|
|
136
147
|
class: "text-lg i-tabler:lock"
|
|
137
148
|
}, null)
|
|
138
149
|
})]
|
|
139
|
-
}), (f =
|
|
150
|
+
}), (f = a.default) == null ? void 0 : f.call(a, t), e("div", {
|
|
140
151
|
class: "mb-2 mt-4"
|
|
141
152
|
}, [e(I, {
|
|
142
153
|
type: "primary",
|
|
@@ -144,16 +155,16 @@ const fe = /* @__PURE__ */ k({
|
|
|
144
155
|
block: !0,
|
|
145
156
|
loading: b.value,
|
|
146
157
|
onClick: y
|
|
147
|
-
}, O(o =
|
|
158
|
+
}, O(o = s("pages.login.buttons.login")) ? o : {
|
|
148
159
|
default: () => [o]
|
|
149
160
|
})])];
|
|
150
161
|
}
|
|
151
162
|
})]), e("div", {
|
|
152
163
|
class: "text-center text-sm text-gray-5"
|
|
153
|
-
}, [((g =
|
|
164
|
+
}, [((g = r.config) == null ? void 0 : g.copyright) || "All rights reserved © duxweb 2024"])])])]);
|
|
154
165
|
};
|
|
155
166
|
}
|
|
156
167
|
});
|
|
157
168
|
export {
|
|
158
|
-
|
|
169
|
+
Ne as DuxLoginPage
|
|
159
170
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as f, useManage as
|
|
1
|
+
import { defineComponent as A, computed as v, createVNode as e } from "vue";
|
|
2
|
+
import { useI18n as f, useManage as L, useLogout as R, useTheme as I, useGetAuth as S } from "@duxweb/dvha-core";
|
|
3
3
|
import { NDropdown as B } from "naive-ui";
|
|
4
|
-
import { useRouter as
|
|
4
|
+
import { useRouter as N } from "vue-router";
|
|
5
5
|
import "clsx";
|
|
6
|
-
import { DuxAvatar as
|
|
6
|
+
import { DuxAvatar as g } from "../../components/widget/avatar.js";
|
|
7
7
|
import "vue-echarts";
|
|
8
8
|
import "@overlastic/vue";
|
|
9
9
|
import "dayjs";
|
|
@@ -27,11 +27,22 @@ import "@unocss/preset-typography";
|
|
|
27
27
|
import "unocss/preset-wind4";
|
|
28
28
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
29
29
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
30
|
-
import
|
|
30
|
+
import G from "./button.js";
|
|
31
31
|
import "vue-command-palette";
|
|
32
32
|
import "../page404.js";
|
|
33
33
|
import "@iconify-json/tabler/icons.json";
|
|
34
|
-
|
|
34
|
+
import "vue3-ace-editor";
|
|
35
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
36
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
37
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
38
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
40
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
41
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
42
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
43
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
44
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
45
|
+
const $e = /* @__PURE__ */ A({
|
|
35
46
|
name: "DuxMenuAvatar",
|
|
36
47
|
props: {
|
|
37
48
|
collapsed: {
|
|
@@ -39,76 +50,73 @@ const fe = /* @__PURE__ */ $({
|
|
|
39
50
|
default: !1
|
|
40
51
|
}
|
|
41
52
|
},
|
|
42
|
-
setup(
|
|
53
|
+
setup(b) {
|
|
43
54
|
const {
|
|
44
|
-
t
|
|
45
|
-
} = f(),
|
|
46
|
-
config:
|
|
55
|
+
t: r
|
|
56
|
+
} = f(), c = f(), h = N(), {
|
|
57
|
+
config: y,
|
|
47
58
|
getRoutePath: k
|
|
48
|
-
} = A(), {
|
|
49
|
-
mutate: C
|
|
50
59
|
} = L(), {
|
|
60
|
+
mutate: x
|
|
61
|
+
} = R(), {
|
|
51
62
|
mode: m,
|
|
52
|
-
primaryColors:
|
|
53
|
-
neutralColors:
|
|
63
|
+
primaryColors: C,
|
|
64
|
+
neutralColors: M,
|
|
54
65
|
colorMapping: p,
|
|
55
66
|
setColor: d,
|
|
56
|
-
setMode:
|
|
57
|
-
} =
|
|
67
|
+
setMode: w
|
|
68
|
+
} = I(), n = (t, l) => e("div", {
|
|
58
69
|
class: "flex gap-2 items-center w-30"
|
|
59
70
|
}, [e("div", {
|
|
60
71
|
class: "flex-1 min-w-0"
|
|
61
|
-
}, [
|
|
72
|
+
}, [t]), e("div", null, [l && e("div", {
|
|
62
73
|
class: "i-tabler:check"
|
|
63
|
-
}, null)])]), s = (
|
|
64
|
-
class: `${
|
|
65
|
-
}, null),
|
|
66
|
-
var
|
|
67
|
-
const
|
|
68
|
-
label:
|
|
69
|
-
key:
|
|
70
|
-
icon: () => s(
|
|
71
|
-
path:
|
|
74
|
+
}, null)])]), s = (t) => e("div", {
|
|
75
|
+
class: `${t} size-4`
|
|
76
|
+
}, null), z = v(() => {
|
|
77
|
+
var l;
|
|
78
|
+
const t = (l = y.userMenus) == null ? void 0 : l.map((o) => ({
|
|
79
|
+
label: r(o.label || "", {}, o.label),
|
|
80
|
+
key: o.key,
|
|
81
|
+
icon: () => s(o.icon),
|
|
82
|
+
path: o.path
|
|
72
83
|
}));
|
|
73
|
-
return (
|
|
84
|
+
return (t == null ? void 0 : t.length) > 0 ? [...t, {
|
|
74
85
|
type: "divider"
|
|
75
86
|
}] : [];
|
|
76
|
-
}), i =
|
|
77
|
-
var
|
|
87
|
+
}), i = S(), $ = v(() => {
|
|
88
|
+
var t, l;
|
|
78
89
|
return [{
|
|
79
90
|
key: "header",
|
|
80
91
|
type: "render",
|
|
81
92
|
render: () => {
|
|
82
|
-
var
|
|
93
|
+
var o, u, a;
|
|
83
94
|
return e("div", {
|
|
84
95
|
class: "flex gap-2 px-3 pb-1 pt-1 items-center "
|
|
85
|
-
}, [e(
|
|
96
|
+
}, [e(g, {
|
|
86
97
|
round: !0,
|
|
87
98
|
size: 28,
|
|
88
|
-
src: (
|
|
99
|
+
src: (o = i.info) == null ? void 0 : o.avatar
|
|
89
100
|
}, null), e("div", {
|
|
90
101
|
class: "flex flex-col"
|
|
91
102
|
}, [e("div", {
|
|
92
103
|
class: "text-sm font-medium"
|
|
93
|
-
}, [(
|
|
104
|
+
}, [(u = i.info) == null ? void 0 : u.nickname]), e("div", {
|
|
94
105
|
class: "text-xs text-muted"
|
|
95
|
-
}, [(
|
|
106
|
+
}, [(a = i.info) == null ? void 0 : a.username])])]);
|
|
96
107
|
}
|
|
97
108
|
}, {
|
|
98
109
|
type: "divider"
|
|
99
|
-
}, ...
|
|
100
|
-
label:
|
|
110
|
+
}, ...z.value, {
|
|
111
|
+
label: r("components.menu.language"),
|
|
101
112
|
key: "locale",
|
|
102
113
|
icon: () => s("i-tabler:language"),
|
|
103
|
-
children: [{
|
|
104
|
-
label: () =>
|
|
105
|
-
key:
|
|
106
|
-
}
|
|
107
|
-
label: () => a(t("components.menu.english"), u.getLocale() === "en-US"),
|
|
108
|
-
key: "locale.en-US"
|
|
109
|
-
}]
|
|
114
|
+
children: [...(c.getLocales() || []).map((o) => ({
|
|
115
|
+
label: () => n(r(`locale.${o}`), c.getLocale() === o),
|
|
116
|
+
key: `locale.${o}`
|
|
117
|
+
}))]
|
|
110
118
|
}, {
|
|
111
|
-
label:
|
|
119
|
+
label: r("components.menu.color"),
|
|
112
120
|
key: "color",
|
|
113
121
|
icon: () => s("i-tabler:palette"),
|
|
114
122
|
children: [{
|
|
@@ -119,18 +127,18 @@ const fe = /* @__PURE__ */ $({
|
|
|
119
127
|
style: {
|
|
120
128
|
backgroundColor: "rgb(var(--ui-color-primary))"
|
|
121
129
|
}
|
|
122
|
-
}, null), e("div", null, [
|
|
130
|
+
}, null), e("div", null, [r("components.menu.primaryColor")])]),
|
|
123
131
|
key: "color.primary",
|
|
124
|
-
children: (
|
|
125
|
-
label: () =>
|
|
132
|
+
children: (t = C.value) == null ? void 0 : t.map((o) => ({
|
|
133
|
+
label: () => n(e("div", {
|
|
126
134
|
class: "flex gap-2 items-center"
|
|
127
135
|
}, [e("div", {
|
|
128
136
|
class: "size-2 rounded-full",
|
|
129
137
|
style: {
|
|
130
|
-
backgroundColor: `rgb(var(--base-color-${
|
|
138
|
+
backgroundColor: `rgb(var(--base-color-${o}-500))`
|
|
131
139
|
}
|
|
132
|
-
}, null), e("div", null, [
|
|
133
|
-
key: `color.primary.${
|
|
140
|
+
}, null), e("div", null, [o])]), p.value.primary === o),
|
|
141
|
+
key: `color.primary.${o}`
|
|
134
142
|
}))
|
|
135
143
|
}, {
|
|
136
144
|
label: () => e("div", {
|
|
@@ -140,96 +148,99 @@ const fe = /* @__PURE__ */ $({
|
|
|
140
148
|
style: {
|
|
141
149
|
backgroundColor: "rgb(var(--ui-color-gray-600))"
|
|
142
150
|
}
|
|
143
|
-
}, null), e("div", null, [
|
|
151
|
+
}, null), e("div", null, [r("components.menu.neutralColor")])]),
|
|
144
152
|
key: "color.neutral",
|
|
145
|
-
children: (
|
|
146
|
-
label: () =>
|
|
153
|
+
children: (l = M.value) == null ? void 0 : l.map((o) => ({
|
|
154
|
+
label: () => n(e("div", {
|
|
147
155
|
class: "flex gap-2 items-center"
|
|
148
156
|
}, [e("div", {
|
|
149
157
|
class: "size-2 rounded-full",
|
|
150
158
|
style: {
|
|
151
|
-
backgroundColor: `rgb(var(--base-color-${
|
|
159
|
+
backgroundColor: `rgb(var(--base-color-${o}-600))`
|
|
152
160
|
}
|
|
153
|
-
}, null), e("div", null, [
|
|
154
|
-
key: `color.neutral.${
|
|
161
|
+
}, null), e("div", null, [o])]), p.value.gray === o),
|
|
162
|
+
key: `color.neutral.${o}`
|
|
155
163
|
}))
|
|
156
164
|
}]
|
|
157
165
|
}, {
|
|
158
|
-
label:
|
|
166
|
+
label: r("components.menu.theme"),
|
|
159
167
|
key: "theme",
|
|
160
168
|
icon: () => s("i-tabler:brightness-half"),
|
|
161
169
|
children: [{
|
|
162
|
-
label: () =>
|
|
170
|
+
label: () => n(r("components.menu.followSystem"), m.value === "auto"),
|
|
163
171
|
key: "theme.auto"
|
|
164
172
|
}, {
|
|
165
|
-
label: () =>
|
|
173
|
+
label: () => n(r("components.menu.lightMode"), m.value === "light"),
|
|
166
174
|
key: "theme.light"
|
|
167
175
|
}, {
|
|
168
|
-
label: () =>
|
|
176
|
+
label: () => n(r("components.menu.darkMode"), m.value === "dark"),
|
|
169
177
|
key: "theme.dark"
|
|
170
178
|
}]
|
|
171
179
|
}, {
|
|
172
180
|
type: "divider"
|
|
173
181
|
}, {
|
|
174
|
-
label:
|
|
182
|
+
label: r("components.menu.logout"),
|
|
175
183
|
key: "logout",
|
|
176
184
|
icon: () => s("i-tabler:logout")
|
|
177
185
|
}];
|
|
178
186
|
});
|
|
179
|
-
function
|
|
180
|
-
const
|
|
181
|
-
switch (
|
|
187
|
+
function D(t, l) {
|
|
188
|
+
const o = t.lastIndexOf("."), [u, a] = o === -1 ? [t, ""] : [t.substring(0, o), t.substring(o + 1)];
|
|
189
|
+
switch (u) {
|
|
182
190
|
case "locale":
|
|
183
|
-
|
|
191
|
+
c.changeLocale(a);
|
|
184
192
|
break;
|
|
185
193
|
case "color.primary":
|
|
186
|
-
d("primary",
|
|
194
|
+
d("primary", a);
|
|
187
195
|
break;
|
|
188
196
|
case "color.neutral":
|
|
189
|
-
d("gray",
|
|
197
|
+
d("gray", a);
|
|
190
198
|
break;
|
|
191
199
|
case "theme":
|
|
192
|
-
|
|
200
|
+
w(a);
|
|
193
201
|
break;
|
|
194
202
|
case "logout":
|
|
195
|
-
|
|
203
|
+
x();
|
|
196
204
|
break;
|
|
197
205
|
default:
|
|
198
|
-
if (!(
|
|
206
|
+
if (!(l != null && l.path))
|
|
199
207
|
return;
|
|
200
|
-
|
|
208
|
+
h.push(k(l.path));
|
|
201
209
|
}
|
|
202
210
|
}
|
|
203
211
|
return () => e(B, {
|
|
204
|
-
options:
|
|
212
|
+
options: $.value,
|
|
205
213
|
placement: "bottom-start",
|
|
206
214
|
trigger: "click",
|
|
207
|
-
onSelect:
|
|
215
|
+
onSelect: D,
|
|
208
216
|
width: 200
|
|
209
217
|
}, {
|
|
210
|
-
default: () => [e(
|
|
211
|
-
collapsed:
|
|
218
|
+
default: () => [e(G, {
|
|
219
|
+
collapsed: b.collapsed
|
|
212
220
|
}, {
|
|
213
221
|
icon: () => {
|
|
214
|
-
var
|
|
215
|
-
return e(
|
|
222
|
+
var t;
|
|
223
|
+
return e(g, {
|
|
216
224
|
class: "group-hover:shadow-lg",
|
|
217
225
|
round: !0,
|
|
218
226
|
size: 28,
|
|
219
|
-
src: (
|
|
227
|
+
src: (t = i.info) == null ? void 0 : t.avatar
|
|
220
228
|
}, null);
|
|
221
229
|
},
|
|
222
|
-
default: () =>
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
default: () => {
|
|
231
|
+
var t, l;
|
|
232
|
+
return e("div", {
|
|
233
|
+
class: "flex flex-col"
|
|
234
|
+
}, [e("div", {
|
|
235
|
+
class: "text-sm font-medium"
|
|
236
|
+
}, [(t = i.info) == null ? void 0 : t.nickname]), e("div", {
|
|
237
|
+
class: "text-xs text-muted"
|
|
238
|
+
}, [(l = i.info) == null ? void 0 : l.username])]);
|
|
239
|
+
}
|
|
229
240
|
})]
|
|
230
241
|
});
|
|
231
242
|
}
|
|
232
243
|
});
|
|
233
244
|
export {
|
|
234
|
-
|
|
245
|
+
$e as default
|
|
235
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as n, createVNode as a } from "vue";
|
|
2
2
|
import "@duxweb/dvha-core";
|
|
3
3
|
import "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
@@ -26,10 +26,21 @@ import "@duxweb/dvha-naiveui";
|
|
|
26
26
|
import "../page404.js";
|
|
27
27
|
import "@iconify-json/tabler/icons.json";
|
|
28
28
|
import "mime";
|
|
29
|
+
import "vue3-ace-editor";
|
|
30
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
35
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
37
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
29
40
|
import "dayjs";
|
|
30
41
|
import "@tanstack/vue-query";
|
|
31
42
|
import { useUI as l } from "../../hooks/ui.js";
|
|
32
|
-
const
|
|
43
|
+
const _ = /* @__PURE__ */ n({
|
|
33
44
|
name: "DuxMenuButton",
|
|
34
45
|
props: {
|
|
35
46
|
class: {
|
|
@@ -50,8 +61,8 @@ const K = /* @__PURE__ */ p({
|
|
|
50
61
|
default: !1
|
|
51
62
|
}
|
|
52
63
|
},
|
|
53
|
-
setup(
|
|
54
|
-
slots:
|
|
64
|
+
setup(t, {
|
|
65
|
+
slots: e
|
|
55
66
|
}) {
|
|
56
67
|
const {
|
|
57
68
|
menuCollapsed: o,
|
|
@@ -59,18 +70,18 @@ const K = /* @__PURE__ */ p({
|
|
|
59
70
|
} = l();
|
|
60
71
|
return () => {
|
|
61
72
|
var r, m;
|
|
62
|
-
return
|
|
73
|
+
return a("div", {
|
|
63
74
|
onClick: () => {
|
|
64
|
-
var
|
|
65
|
-
(
|
|
75
|
+
var p;
|
|
76
|
+
(p = t.onClick) == null || p.call(t);
|
|
66
77
|
},
|
|
67
|
-
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2",
|
|
68
|
-
}, [(r =
|
|
69
|
-
class: ["overflow-hidden ease-in-out whitespace-nowrap text-left min-w-0 flex-1",
|
|
70
|
-
}, [(m =
|
|
78
|
+
class: ["flex items-center gap-1 justify-center py-1 px-2 cursor-pointer gap-2", t.class, o.value && !i.value ? "group" : "hover:shadow-xs hover:bg-default flex-1 w-full", t.inverted ? "transition-all duration-300 bg-inverted/5 rounded-full hover:bg-default hover:shadow-xs" : " rounded-md"]
|
|
79
|
+
}, [(r = e.icon) == null ? void 0 : r.call(e), t.collapsed === !1 && !o.value && !i.value && a("div", {
|
|
80
|
+
class: ["overflow-hidden ease-in-out whitespace-nowrap text-left min-w-0 flex-1", t.inverted ? "text-default" : ""]
|
|
81
|
+
}, [(m = e.default) == null ? void 0 : m.call(e)])]);
|
|
71
82
|
};
|
|
72
83
|
}
|
|
73
84
|
});
|
|
74
85
|
export {
|
|
75
|
-
|
|
86
|
+
_ as default
|
|
76
87
|
};
|