@choubo/kerthus-web-admin-shell 0.0.0-stage → 0.2.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.
- package/README.md +51 -2
- package/dist/agent/AgentApprovalCard.vue.d.ts +34 -0
- package/dist/agent/AgentAttachmentList.vue.d.ts +42 -0
- package/dist/agent/AgentComposer.vue.d.ts +120 -0
- package/dist/agent/AgentModelSelect.vue.d.ts +53 -0
- package/dist/agent/types.d.ts +21 -0
- package/dist/application/AdminAppSwitcher.vue.d.ts +69 -0
- package/dist/application/AdminFullscreenButton.vue.d.ts +34 -0
- package/dist/application/AdminNotificationCenter.vue.d.ts +63 -0
- package/dist/application/AdminUserMenu.vue.d.ts +33 -0
- package/dist/application/AppDarkModeToggle.vue.d.ts +35 -0
- package/dist/application/AppLocalePicker.vue.d.ts +39 -0
- package/dist/application/AppLogo.vue.d.ts +35 -0
- package/dist/application/AppProvider.vue.d.ts +45 -0
- package/dist/application/AppSearch.vue.d.ts +2 -0
- package/dist/application/useAppContext.d.ts +9 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +2632 -0
- package/dist/layout/AdminLayout.vue.d.ts +146 -0
- package/dist/locales/index.d.ts +62 -0
- package/dist/locales/legacy-messages.d.ts +367 -0
- package/dist/menu/AdminMenuNode.d.ts +17 -0
- package/dist/menu/BasicMenu.vue.d.ts +65 -0
- package/dist/menu/SimpleMenu.vue.d.ts +55 -0
- package/dist/menu/SimpleMenuTag.vue.d.ts +38 -0
- package/dist/menu/paths.d.ts +3 -0
- package/dist/menu/runtime.d.ts +8 -0
- package/dist/menu/types.d.ts +39 -0
- package/dist/pages/AdminAboutView.vue.d.ts +66 -0
- package/dist/pages/AdminBreadcrumb.vue.d.ts +23 -0
- package/dist/pages/AdminErrorLogView.vue.d.ts +77 -0
- package/dist/pages/AdminExceptionView.vue.d.ts +25 -0
- package/dist/pages/AdminIframeView.vue.d.ts +51 -0
- package/dist/pages/AdminLockView.vue.d.ts +64 -0
- package/dist/pages/AdminLoginView.vue.d.ts +77 -0
- package/dist/pages/AdminPasswordForm.vue.d.ts +96 -0
- package/dist/pages/AdminProfileForm.vue.d.ts +94 -0
- package/dist/pages/AdminProfileTabs.vue.d.ts +55 -0
- package/dist/pages/AdminSecuritySettings.vue.d.ts +41 -0
- package/dist/settings/AdminSettingsDrawer.vue.d.ts +56 -0
- package/dist/settings/SettingsPanel.vue.d.ts +21 -0
- package/dist/settings/types.d.ts +38 -0
- package/dist/style.css +1 -0
- package/dist/tabs/AdminTabs.vue.d.ts +47 -0
- package/dist/tabs/actions.d.ts +4 -0
- package/dist/tabs/types.d.ts +16 -0
- package/package.json +37 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,2632 @@
|
|
|
1
|
+
import { inject as le, defineComponent as k, h as O, computed as I, reactive as oe, onUnmounted as Q, watch as U, openBlock as a, createBlock as P, unref as y, normalizeClass as N, withCtx as j, createElementBlock as o, Fragment as x, renderList as M, toDisplayString as d, createCommentVNode as p, ref as S, createElementVNode as s, createVNode as $, onMounted as Y, withKeys as J, createTextVNode as z, provide as ve, toRef as pe, renderSlot as B, Teleport as ge, withModifiers as H, withDirectives as K, vModelText as V, nextTick as se, normalizeStyle as ie, resolveDynamicComponent as he, createSlots as fe } from "vue";
|
|
2
|
+
import { Menu as Z, Switch as ye, Select as ke, InputNumber as _e, Drawer as we } from "ant-design-vue";
|
|
3
|
+
import { Icon as w, Dropdown as re } from "@choubo/kerthus-web-vue-ui";
|
|
4
|
+
import { useFrontendRuntime as q } from "@choubo/kerthus-web-vue-runtime";
|
|
5
|
+
const ne = {
|
|
6
|
+
"en-US": {
|
|
7
|
+
navigation: "Navigation",
|
|
8
|
+
closeNavigation: "Close navigation",
|
|
9
|
+
username: "Username",
|
|
10
|
+
password: "Password",
|
|
11
|
+
signIn: "Sign in",
|
|
12
|
+
signingIn: "Signing in",
|
|
13
|
+
unlock: "Unlock",
|
|
14
|
+
switchAccount: "Switch account",
|
|
15
|
+
attachments: "Attachments",
|
|
16
|
+
attachFiles: "Attach files",
|
|
17
|
+
approvalMode: "Approval mode",
|
|
18
|
+
model: "Model",
|
|
19
|
+
send: "Send",
|
|
20
|
+
stop: "Stop",
|
|
21
|
+
notifications: "Notifications",
|
|
22
|
+
noNotifications: "No notifications",
|
|
23
|
+
markAllRead: "Mark all as read",
|
|
24
|
+
profileSettings: "Profile settings",
|
|
25
|
+
errorLog: "Error log",
|
|
26
|
+
clear: "Clear",
|
|
27
|
+
details: "Details",
|
|
28
|
+
noErrors: "No errors",
|
|
29
|
+
version: "Version",
|
|
30
|
+
builtAt: "Built at",
|
|
31
|
+
dependencies: "Dependencies",
|
|
32
|
+
approve: "Approve",
|
|
33
|
+
reject: "Reject"
|
|
34
|
+
},
|
|
35
|
+
"zh-CN": {
|
|
36
|
+
navigation: "导航",
|
|
37
|
+
closeNavigation: "关闭导航",
|
|
38
|
+
username: "账号",
|
|
39
|
+
password: "密码",
|
|
40
|
+
signIn: "登录",
|
|
41
|
+
signingIn: "正在登录",
|
|
42
|
+
unlock: "解锁",
|
|
43
|
+
switchAccount: "切换账号",
|
|
44
|
+
attachments: "附件",
|
|
45
|
+
attachFiles: "添加附件",
|
|
46
|
+
approvalMode: "审批模式",
|
|
47
|
+
model: "模型",
|
|
48
|
+
send: "发送",
|
|
49
|
+
stop: "停止",
|
|
50
|
+
notifications: "通知",
|
|
51
|
+
noNotifications: "暂无通知",
|
|
52
|
+
markAllRead: "全部标为已读",
|
|
53
|
+
profileSettings: "个人设置",
|
|
54
|
+
errorLog: "错误日志",
|
|
55
|
+
clear: "清除",
|
|
56
|
+
details: "详情",
|
|
57
|
+
noErrors: "暂无错误",
|
|
58
|
+
version: "版本",
|
|
59
|
+
builtAt: "构建时间",
|
|
60
|
+
dependencies: "依赖",
|
|
61
|
+
approve: "批准",
|
|
62
|
+
reject: "拒绝"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function Wn(e, c) {
|
|
66
|
+
return (e === "zh-CN" ? ne["zh-CN"] : ne["en-US"])[c];
|
|
67
|
+
}
|
|
68
|
+
const On = {
|
|
69
|
+
"en-US": {
|
|
70
|
+
layout: {
|
|
71
|
+
footer: {
|
|
72
|
+
onlinePreview: "Preview",
|
|
73
|
+
onlineDocument: "Document"
|
|
74
|
+
},
|
|
75
|
+
header: {
|
|
76
|
+
dropdownItemDoc: "Document",
|
|
77
|
+
dropdownItemLoginOut: "Log Out",
|
|
78
|
+
tooltipErrorLog: "Error log",
|
|
79
|
+
tooltipLock: "Lock screen",
|
|
80
|
+
tooltipNotify: "Notification",
|
|
81
|
+
tooltipEntryFull: "Full Screen",
|
|
82
|
+
tooltipExitFull: "Exit Full Screen",
|
|
83
|
+
lockScreenPassword: "Lock screen password",
|
|
84
|
+
lockScreen: "Lock screen",
|
|
85
|
+
lockScreenBtn: "Locking",
|
|
86
|
+
home: "Home"
|
|
87
|
+
},
|
|
88
|
+
multipleTab: {
|
|
89
|
+
reload: "Refresh current",
|
|
90
|
+
close: "Close current",
|
|
91
|
+
closeLeft: "Close Left",
|
|
92
|
+
closeRight: "Close Right",
|
|
93
|
+
closeOther: "Close Other",
|
|
94
|
+
closeAll: "Close All"
|
|
95
|
+
},
|
|
96
|
+
setting: {
|
|
97
|
+
contentModeFull: "Full",
|
|
98
|
+
contentModeFixed: "Fixed width",
|
|
99
|
+
topMenuAlignLeft: "Left",
|
|
100
|
+
topMenuAlignRight: "Center",
|
|
101
|
+
topMenuAlignCenter: "Right",
|
|
102
|
+
menuTriggerNone: "Not Show",
|
|
103
|
+
menuTriggerBottom: "Bottom",
|
|
104
|
+
menuTriggerTop: "Top",
|
|
105
|
+
menuTypeSidebar: "Left menu mode",
|
|
106
|
+
menuTypeMixSidebar: "Left menu mixed mode",
|
|
107
|
+
menuTypeMix: "Top Menu Mix mode",
|
|
108
|
+
menuTypeTopMenu: "Top menu mode",
|
|
109
|
+
on: "On",
|
|
110
|
+
off: "Off",
|
|
111
|
+
minute: "Minute",
|
|
112
|
+
operatingTitle: "Successful!",
|
|
113
|
+
resetSuccess: "Successfully reset!",
|
|
114
|
+
copyBtn: "Copy",
|
|
115
|
+
clearBtn: "Clear cache and to the login page",
|
|
116
|
+
drawerTitle: "Configuration",
|
|
117
|
+
darkMode: "Dark mode",
|
|
118
|
+
navMode: "Navigation mode",
|
|
119
|
+
interfaceFunction: "Interface function",
|
|
120
|
+
interfaceDisplay: "Interface display",
|
|
121
|
+
animation: "Animation",
|
|
122
|
+
splitMenu: "Split menu",
|
|
123
|
+
closeMixSidebarOnChange: "Switch page to close menu",
|
|
124
|
+
sysTheme: "System theme",
|
|
125
|
+
headerTheme: "Header theme",
|
|
126
|
+
sidebarTheme: "Menu theme",
|
|
127
|
+
menuDrag: "Drag Sidebar",
|
|
128
|
+
menuSearch: "Menu search",
|
|
129
|
+
menuAccordion: "Sidebar accordion",
|
|
130
|
+
menuCollapse: "Collapse menu",
|
|
131
|
+
collapseMenuDisplayName: "Collapse menu display name",
|
|
132
|
+
topMenuLayout: "Top menu layout",
|
|
133
|
+
menuCollapseButton: "Menu collapse button",
|
|
134
|
+
contentMode: "Content area width",
|
|
135
|
+
expandedMenuWidth: "Expanded menu width",
|
|
136
|
+
breadcrumb: "Breadcrumbs",
|
|
137
|
+
breadcrumbIcon: "Breadcrumbs Icon",
|
|
138
|
+
tabs: "Tabs",
|
|
139
|
+
tabDetail: "Tab Detail",
|
|
140
|
+
tabsQuickBtn: "Tabs quick button",
|
|
141
|
+
tabsRedoBtn: "Tabs redo button",
|
|
142
|
+
tabsFoldBtn: "Tabs flod button",
|
|
143
|
+
sidebar: "Sidebar",
|
|
144
|
+
header: "Header",
|
|
145
|
+
footer: "Footer",
|
|
146
|
+
fullContent: "Full content",
|
|
147
|
+
grayMode: "Gray mode",
|
|
148
|
+
colorWeak: "Color Weak Mode",
|
|
149
|
+
progress: "Progress",
|
|
150
|
+
switchLoading: "Switch Loading",
|
|
151
|
+
switchAnimation: "Switch animation",
|
|
152
|
+
animationType: "Animation type",
|
|
153
|
+
autoScreenLock: "Auto screen lock",
|
|
154
|
+
notAutoScreenLock: "Not auto lock",
|
|
155
|
+
fixedHeader: "Fixed header",
|
|
156
|
+
fixedSideBar: "Fixed Sidebar",
|
|
157
|
+
mixSidebarTrigger: "Mixed menu Trigger",
|
|
158
|
+
triggerHover: "Hover",
|
|
159
|
+
triggerClick: "Click",
|
|
160
|
+
mixSidebarFixed: "Fixed expanded menu"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
sys: {
|
|
164
|
+
api: {
|
|
165
|
+
operationSuccess: "Operation Success",
|
|
166
|
+
operationFailed: "Operation failed",
|
|
167
|
+
errorTip: "Error Tip",
|
|
168
|
+
successTip: "Success Tip",
|
|
169
|
+
errorMessage: "The operation failed, the system is abnormal!",
|
|
170
|
+
timeoutMessage: "Login timed out, please log in again!",
|
|
171
|
+
apiTimeoutMessage: "The interface request timed out, please refresh the page and try again!",
|
|
172
|
+
apiRequestFailed: "The interface request failed, please try again later!",
|
|
173
|
+
networkException: "network anomaly",
|
|
174
|
+
networkExceptionMsg: "Please check if your network connection is normal! The network is abnormal",
|
|
175
|
+
errMsg401: "The user does not have permission (token, user name, password error)!",
|
|
176
|
+
errMsg403: "The user is authorized, but access is forbidden!",
|
|
177
|
+
errMsg404: "Network request error, the resource was not found!",
|
|
178
|
+
errMsg405: "Network request error, request method not allowed!",
|
|
179
|
+
errMsg408: "Network request timed out!",
|
|
180
|
+
errMsg500: "Server error, please contact the administrator!",
|
|
181
|
+
errMsg501: "The network is not implemented!",
|
|
182
|
+
errMsg502: "Network Error!",
|
|
183
|
+
errMsg503: "The service is unavailable, the server is temporarily overloaded or maintained!",
|
|
184
|
+
errMsg504: "Network timeout!",
|
|
185
|
+
errMsg505: "The http version does not support the request!"
|
|
186
|
+
},
|
|
187
|
+
app: {
|
|
188
|
+
logoutTip: "Reminder",
|
|
189
|
+
logoutMessage: "Confirm to exit the system?",
|
|
190
|
+
menuLoading: "Menu loading..."
|
|
191
|
+
},
|
|
192
|
+
errorLog: {
|
|
193
|
+
tableTitle: "Error log list",
|
|
194
|
+
tableColumnType: "Type",
|
|
195
|
+
tableColumnDate: "Time",
|
|
196
|
+
tableColumnFile: "File",
|
|
197
|
+
tableColumnMsg: "Error message",
|
|
198
|
+
tableColumnStackMsg: "Stack info",
|
|
199
|
+
tableActionDesc: "Details",
|
|
200
|
+
modalTitle: "Error details",
|
|
201
|
+
clearErrorStore: "Clear Logs"
|
|
202
|
+
},
|
|
203
|
+
exception: {
|
|
204
|
+
backLogin: "Back Login",
|
|
205
|
+
backHome: "Back Home",
|
|
206
|
+
subTitle403: "Sorry, you don't have access to this page.",
|
|
207
|
+
subTitle404: "Sorry, the page you visited does not exist.",
|
|
208
|
+
subTitle500: "Sorry, the server is reporting an error.",
|
|
209
|
+
noDataTitle: "No data on the current page.",
|
|
210
|
+
networkErrorTitle: "Network Error",
|
|
211
|
+
networkErrorSubTitle: "Sorry,Your network connection has been disconnected, please check your network!"
|
|
212
|
+
},
|
|
213
|
+
lock: {
|
|
214
|
+
unlock: "Click to unlock",
|
|
215
|
+
alert: "Lock screen password error",
|
|
216
|
+
backToLogin: "Back to login",
|
|
217
|
+
entry: "Enter the system",
|
|
218
|
+
placeholder: "Please enter the lock screen password or user password"
|
|
219
|
+
},
|
|
220
|
+
login: {
|
|
221
|
+
backSignIn: "Back sign in",
|
|
222
|
+
mobileSignInFormTitle: "Mobile sign in",
|
|
223
|
+
qrSignInFormTitle: "Qr code sign in",
|
|
224
|
+
signInFormTitle: "Sign in",
|
|
225
|
+
signUpFormTitle: "Sign up",
|
|
226
|
+
forgetFormTitle: "Reset password",
|
|
227
|
+
policy: "I agree to the xxx Privacy Policy",
|
|
228
|
+
scanSign: "scanning the code to complete the login",
|
|
229
|
+
loginButton: "Sign in",
|
|
230
|
+
registerButton: "Sign up",
|
|
231
|
+
rememberMe: "Remember me",
|
|
232
|
+
forgetPassword: "Forget Password?",
|
|
233
|
+
otherSignIn: "Sign in with",
|
|
234
|
+
loginSuccessTitle: "Login successful",
|
|
235
|
+
loginSuccessDesc: "Welcome back",
|
|
236
|
+
accountPlaceholder: "Please input username",
|
|
237
|
+
passwordPlaceholder: "Please input password",
|
|
238
|
+
smsPlaceholder: "Please input sms code",
|
|
239
|
+
mobilePlaceholder: "Please input mobile",
|
|
240
|
+
policyPlaceholder: "Register after checking",
|
|
241
|
+
diffPwd: "The two passwords are inconsistent",
|
|
242
|
+
userName: "Username",
|
|
243
|
+
password: "Password",
|
|
244
|
+
confirmPassword: "Confirm Password",
|
|
245
|
+
email: "Email",
|
|
246
|
+
smsCode: "SMS code",
|
|
247
|
+
mobile: "Mobile"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"zh-CN": {
|
|
252
|
+
layout: {
|
|
253
|
+
footer: {
|
|
254
|
+
onlinePreview: "在线预览",
|
|
255
|
+
onlineDocument: "在线文档"
|
|
256
|
+
},
|
|
257
|
+
header: {
|
|
258
|
+
dropdownItemDoc: "文档",
|
|
259
|
+
dropdownItemLoginOut: "退出系统",
|
|
260
|
+
tooltipErrorLog: "错误日志",
|
|
261
|
+
userCenter: "用户中心",
|
|
262
|
+
tooltipLock: "锁定屏幕",
|
|
263
|
+
tooltipNotify: "消息通知",
|
|
264
|
+
tooltipEntryFull: "全屏",
|
|
265
|
+
tooltipExitFull: "退出全屏",
|
|
266
|
+
lockScreenPassword: "锁屏密码",
|
|
267
|
+
lockScreen: "锁定屏幕",
|
|
268
|
+
lockScreenBtn: "锁定",
|
|
269
|
+
home: "首页"
|
|
270
|
+
},
|
|
271
|
+
multipleTab: {
|
|
272
|
+
reload: "重新加载",
|
|
273
|
+
close: "关闭标签页",
|
|
274
|
+
closeLeft: "关闭左侧标签页",
|
|
275
|
+
closeRight: "关闭右侧标签页",
|
|
276
|
+
closeOther: "关闭其它标签页",
|
|
277
|
+
closeAll: "关闭全部标签页"
|
|
278
|
+
},
|
|
279
|
+
setting: {
|
|
280
|
+
contentModeFull: "流式",
|
|
281
|
+
contentModeFixed: "定宽",
|
|
282
|
+
topMenuAlignLeft: "居左",
|
|
283
|
+
topMenuAlignRight: "居中",
|
|
284
|
+
topMenuAlignCenter: "居右",
|
|
285
|
+
menuTriggerNone: "不显示",
|
|
286
|
+
menuTriggerBottom: "底部",
|
|
287
|
+
menuTriggerTop: "顶部",
|
|
288
|
+
menuTypeSidebar: "左侧菜单模式",
|
|
289
|
+
menuTypeMixSidebar: "左侧菜单混合模式",
|
|
290
|
+
menuTypeMix: "顶部菜单混合模式",
|
|
291
|
+
menuTypeTopMenu: "顶部菜单模式",
|
|
292
|
+
on: "开",
|
|
293
|
+
off: "关",
|
|
294
|
+
minute: "分钟",
|
|
295
|
+
operatingTitle: "操作成功",
|
|
296
|
+
resetSuccess: "重置成功!",
|
|
297
|
+
copyBtn: "拷贝",
|
|
298
|
+
clearBtn: "清空缓存并返回登录页",
|
|
299
|
+
drawerTitle: "项目配置",
|
|
300
|
+
darkMode: "主题",
|
|
301
|
+
navMode: "导航栏模式",
|
|
302
|
+
interfaceFunction: "界面功能",
|
|
303
|
+
interfaceDisplay: "界面显示",
|
|
304
|
+
animation: "动画",
|
|
305
|
+
splitMenu: "分割菜单",
|
|
306
|
+
closeMixSidebarOnChange: "切换页面关闭菜单",
|
|
307
|
+
sysTheme: "系统主题",
|
|
308
|
+
headerTheme: "顶栏主题",
|
|
309
|
+
sidebarTheme: "菜单主题",
|
|
310
|
+
menuDrag: "侧边菜单拖拽",
|
|
311
|
+
menuSearch: "菜单搜索",
|
|
312
|
+
menuAccordion: "侧边菜单手风琴模式",
|
|
313
|
+
menuCollapse: "折叠菜单",
|
|
314
|
+
collapseMenuDisplayName: "折叠菜单显示名称",
|
|
315
|
+
topMenuLayout: "顶部菜单布局",
|
|
316
|
+
menuCollapseButton: "菜单折叠按钮",
|
|
317
|
+
contentMode: "内容区域宽度",
|
|
318
|
+
expandedMenuWidth: "菜单展开宽度",
|
|
319
|
+
breadcrumb: "面包屑",
|
|
320
|
+
breadcrumbIcon: "面包屑图标",
|
|
321
|
+
tabs: "标签页",
|
|
322
|
+
tabDetail: "标签详情页",
|
|
323
|
+
tabsQuickBtn: "标签页快捷按钮",
|
|
324
|
+
tabsRedoBtn: "标签页刷新按钮",
|
|
325
|
+
tabsFoldBtn: "标签页折叠按钮",
|
|
326
|
+
sidebar: "左侧菜单",
|
|
327
|
+
header: "顶栏",
|
|
328
|
+
footer: "页脚",
|
|
329
|
+
fullContent: "全屏内容",
|
|
330
|
+
grayMode: "灰色模式",
|
|
331
|
+
colorWeak: "色弱模式",
|
|
332
|
+
progress: "顶部进度条",
|
|
333
|
+
switchLoading: "切换loading",
|
|
334
|
+
switchAnimation: "切换动画",
|
|
335
|
+
animationType: "动画类型",
|
|
336
|
+
autoScreenLock: "自动锁屏",
|
|
337
|
+
notAutoScreenLock: "不自动锁屏",
|
|
338
|
+
fixedHeader: "固定header",
|
|
339
|
+
fixedSideBar: "固定Sidebar",
|
|
340
|
+
mixSidebarTrigger: "混合菜单触发方式",
|
|
341
|
+
triggerHover: "悬停",
|
|
342
|
+
triggerClick: "点击",
|
|
343
|
+
mixSidebarFixed: "固定展开菜单"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
sys: {
|
|
347
|
+
api: {
|
|
348
|
+
operationSuccess: "操作成功",
|
|
349
|
+
operationFailed: "操作失败",
|
|
350
|
+
errorTip: "错误提示",
|
|
351
|
+
successTip: "成功提示",
|
|
352
|
+
errorMessage: "操作失败,系统异常!",
|
|
353
|
+
timeoutMessage: "登录超时,请重新登录!",
|
|
354
|
+
apiTimeoutMessage: "接口请求超时,请刷新页面重试!",
|
|
355
|
+
apiRequestFailed: "请求出错,请稍候重试",
|
|
356
|
+
networkException: "网络异常",
|
|
357
|
+
networkExceptionMsg: "网络异常,请检查您的网络连接是否正常!",
|
|
358
|
+
errMsg401: "用户没有权限(令牌、用户名、密码错误)!",
|
|
359
|
+
errMsg403: "用户得到授权,但是访问是被禁止的。!",
|
|
360
|
+
errMsg404: "网络请求错误,未找到该资源!",
|
|
361
|
+
errMsg405: "网络请求错误,请求方法未允许!",
|
|
362
|
+
errMsg408: "网络请求超时!",
|
|
363
|
+
errMsg500: "服务器错误,请联系管理员!",
|
|
364
|
+
errMsg501: "网络未实现!",
|
|
365
|
+
errMsg502: "网络错误!",
|
|
366
|
+
errMsg503: "服务不可用,服务器暂时过载或维护!",
|
|
367
|
+
errMsg504: "网络超时!",
|
|
368
|
+
errMsg505: "http版本不支持该请求!"
|
|
369
|
+
},
|
|
370
|
+
app: {
|
|
371
|
+
logoutTip: "温馨提醒",
|
|
372
|
+
logoutMessage: "是否确认退出系统?",
|
|
373
|
+
menuLoading: "菜单加载中..."
|
|
374
|
+
},
|
|
375
|
+
errorLog: {
|
|
376
|
+
tableTitle: "错误日志列表",
|
|
377
|
+
tableColumnType: "类型",
|
|
378
|
+
tableColumnDate: "时间",
|
|
379
|
+
tableColumnFile: "文件",
|
|
380
|
+
tableColumnMsg: "错误信息",
|
|
381
|
+
tableColumnStackMsg: "stack信息",
|
|
382
|
+
tableActionDesc: "详情",
|
|
383
|
+
modalTitle: "错误详情",
|
|
384
|
+
clearErrorStore: "清除日志"
|
|
385
|
+
},
|
|
386
|
+
exception: {
|
|
387
|
+
backLogin: "返回登录",
|
|
388
|
+
backHome: "返回首页",
|
|
389
|
+
subTitle403: "抱歉,您无权访问此页面。",
|
|
390
|
+
subTitle404: "抱歉,您访问的页面不存在。",
|
|
391
|
+
subTitle500: "抱歉,服务器报告错误。",
|
|
392
|
+
noDataTitle: "当前页无数据",
|
|
393
|
+
networkErrorTitle: "网络错误",
|
|
394
|
+
networkErrorSubTitle: "抱歉,您的网络连接已断开,请检查您的网络!"
|
|
395
|
+
},
|
|
396
|
+
lock: {
|
|
397
|
+
unlock: "点击解锁",
|
|
398
|
+
alert: "锁屏密码错误",
|
|
399
|
+
backToLogin: "返回登录",
|
|
400
|
+
entry: "进入系统",
|
|
401
|
+
placeholder: "请输入锁屏密码或者用户密码"
|
|
402
|
+
},
|
|
403
|
+
login: {
|
|
404
|
+
backSignIn: "返回",
|
|
405
|
+
signInFormTitle: "登录",
|
|
406
|
+
mobileSignInFormTitle: "手机登录",
|
|
407
|
+
qrSignInFormTitle: "二维码登录",
|
|
408
|
+
signUpFormTitle: "注册",
|
|
409
|
+
forgetFormTitle: "重置密码",
|
|
410
|
+
policy: "我同意xxx隐私政策",
|
|
411
|
+
scanSign: '扫码后点击"确认",即可完成登录',
|
|
412
|
+
loginButton: "登录",
|
|
413
|
+
registerButton: "注册",
|
|
414
|
+
rememberMe: "记住我",
|
|
415
|
+
forgetPassword: "忘记密码?",
|
|
416
|
+
otherSignIn: "其他登录方式",
|
|
417
|
+
loginSuccessTitle: "登录成功",
|
|
418
|
+
loginSuccessDesc: "欢迎回来",
|
|
419
|
+
accountPlaceholder: "请输入账号",
|
|
420
|
+
passwordPlaceholder: "请输入密码",
|
|
421
|
+
smsPlaceholder: "请输入验证码",
|
|
422
|
+
mobilePlaceholder: "请输入手机号码",
|
|
423
|
+
policyPlaceholder: "勾选后才能注册",
|
|
424
|
+
diffPwd: "两次输入密码不一致",
|
|
425
|
+
userName: "账号",
|
|
426
|
+
password: "密码",
|
|
427
|
+
confirmPassword: "确认密码",
|
|
428
|
+
email: "邮箱",
|
|
429
|
+
smsCode: "短信验证码",
|
|
430
|
+
mobile: "手机号码"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}, de = Symbol("admin-menu");
|
|
435
|
+
function Hn(e) {
|
|
436
|
+
return {
|
|
437
|
+
install(c) {
|
|
438
|
+
c.provide(de, e);
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
function ce() {
|
|
443
|
+
const e = le(de);
|
|
444
|
+
if (!e)
|
|
445
|
+
throw new Error("Admin menu port is not installed");
|
|
446
|
+
return e;
|
|
447
|
+
}
|
|
448
|
+
function ee(e, c) {
|
|
449
|
+
for (const t of e) {
|
|
450
|
+
if (t.path === c)
|
|
451
|
+
return [t.path];
|
|
452
|
+
const i = ee(t.children ?? [], c);
|
|
453
|
+
if (i.length)
|
|
454
|
+
return [t.path, ...i];
|
|
455
|
+
}
|
|
456
|
+
return [];
|
|
457
|
+
}
|
|
458
|
+
const ue = k({
|
|
459
|
+
name: "AdminMenuNode",
|
|
460
|
+
props: {
|
|
461
|
+
item: { type: Object, required: !0 }
|
|
462
|
+
},
|
|
463
|
+
setup(e) {
|
|
464
|
+
const { ports: c } = q();
|
|
465
|
+
return () => {
|
|
466
|
+
var r, n;
|
|
467
|
+
const t = e.item;
|
|
468
|
+
if ((r = t.meta) != null && r.hideMenu)
|
|
469
|
+
return null;
|
|
470
|
+
const i = () => {
|
|
471
|
+
var u, b;
|
|
472
|
+
return O("span", { class: "dsea-basic-menu-item-content" }, [
|
|
473
|
+
t.icon ? O(w, { icon: t.icon, size: 18, class: "dsea-basic-menu-item-content-wrapper__icon" }) : null,
|
|
474
|
+
c.locale.translate(t.name),
|
|
475
|
+
(u = t.tag) != null && u.content || (b = t.tag) != null && b.dot ? O("span", {
|
|
476
|
+
class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${t.tag.type ?? "error"}`, {
|
|
477
|
+
"dsea-simple-menu-tag--dot": t.tag.dot
|
|
478
|
+
}]
|
|
479
|
+
}, t.tag.dot ? "" : t.tag.content) : null
|
|
480
|
+
]);
|
|
481
|
+
}, l = (n = t.meta) != null && n.hideChildrenInMenu ? [] : t.children ?? [];
|
|
482
|
+
return l.length ? O(Z.SubMenu, {
|
|
483
|
+
key: t.path,
|
|
484
|
+
popupClassName: "app-top-menu-popup",
|
|
485
|
+
disabled: t.disabled
|
|
486
|
+
}, {
|
|
487
|
+
title: i,
|
|
488
|
+
default: () => l.map((u) => O(ue, { key: u.path, item: u }))
|
|
489
|
+
}) : O(Z.Item, { key: t.path, disabled: t.disabled }, { default: i });
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
}), te = /* @__PURE__ */ k({
|
|
493
|
+
__name: "BasicMenu",
|
|
494
|
+
props: {
|
|
495
|
+
items: { default: () => [] },
|
|
496
|
+
mode: { default: "inline" },
|
|
497
|
+
theme: { default: "dark" },
|
|
498
|
+
type: {},
|
|
499
|
+
inlineIndent: { default: 20 },
|
|
500
|
+
mixSider: { type: Boolean },
|
|
501
|
+
isHorizontal: { type: Boolean },
|
|
502
|
+
accordion: { type: Boolean, default: !0 },
|
|
503
|
+
collapse: { type: Boolean },
|
|
504
|
+
beforeClickFn: {}
|
|
505
|
+
},
|
|
506
|
+
emits: ["menuClick"],
|
|
507
|
+
setup(e, { emit: c }) {
|
|
508
|
+
const t = e, i = c, l = ce(), r = I(() => t.collapse ?? l.settings.collapsed.value), n = oe({
|
|
509
|
+
defaultSelectedKeys: [],
|
|
510
|
+
selectedKeys: [],
|
|
511
|
+
openKeys: [],
|
|
512
|
+
collapsedOpenKeys: []
|
|
513
|
+
}), u = I(() => r.value && !l.settings.mixSidebar.value ? n.collapsedOpenKeys : n.openKeys), b = I(() => {
|
|
514
|
+
const T = t.type === "top" && t.mode === "horizontal" || t.isHorizontal && l.settings.split.value;
|
|
515
|
+
return [
|
|
516
|
+
"dsea-basic-menu",
|
|
517
|
+
`justify-${t.isHorizontal && l.settings.split.value ? "start" : l.settings.topMenuAlign.value}`,
|
|
518
|
+
{
|
|
519
|
+
"dsea-basic-menu__second": !t.isHorizontal && l.settings.split.value,
|
|
520
|
+
"dsea-basic-menu__sidebar-hor": T
|
|
521
|
+
}
|
|
522
|
+
];
|
|
523
|
+
});
|
|
524
|
+
let g = !1, v = 0;
|
|
525
|
+
async function m(T) {
|
|
526
|
+
var C, E;
|
|
527
|
+
if (T.name === l.redirectRouteName)
|
|
528
|
+
return;
|
|
529
|
+
if (g) {
|
|
530
|
+
g = !1;
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
const f = ((C = T.meta) == null ? void 0 : C.currentActiveMenu) || T.path, h = ++v, _ = ee(t.items, f);
|
|
534
|
+
if (t.isHorizontal && l.settings.split.value) {
|
|
535
|
+
const R = await ((E = l.getCurrentParentPath) == null ? void 0 : E.call(l, f));
|
|
536
|
+
if (h !== v)
|
|
537
|
+
return;
|
|
538
|
+
n.selectedKeys = [R || _[0] || f];
|
|
539
|
+
} else
|
|
540
|
+
n.selectedKeys = _.length ? _ : [f];
|
|
541
|
+
L(f);
|
|
542
|
+
}
|
|
543
|
+
function L(T) {
|
|
544
|
+
if (t.mode === "horizontal")
|
|
545
|
+
return;
|
|
546
|
+
const f = ee(t.items, T);
|
|
547
|
+
n.openKeys = t.accordion ? f : [.../* @__PURE__ */ new Set([...n.openKeys, ...f])];
|
|
548
|
+
}
|
|
549
|
+
function F(T) {
|
|
550
|
+
const f = T.map(String);
|
|
551
|
+
if (t.mode === "horizontal" || !t.accordion || l.settings.mixSidebar.value) {
|
|
552
|
+
n.openKeys = f;
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
if (r.value) {
|
|
556
|
+
n.collapsedOpenKeys = f;
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
const h = t.items.filter((C) => {
|
|
560
|
+
var E;
|
|
561
|
+
return (E = C.children) == null ? void 0 : E.length;
|
|
562
|
+
}).map((C) => C.path), _ = f.find((C) => !n.openKeys.includes(C));
|
|
563
|
+
n.openKeys = _ && h.includes(_) ? [_] : f;
|
|
564
|
+
}
|
|
565
|
+
async function D(T) {
|
|
566
|
+
const f = String(T.key);
|
|
567
|
+
t.beforeClickFn && !await t.beforeClickFn(f) || (i("menuClick", f), g = !0, n.selectedKeys = [f]);
|
|
568
|
+
}
|
|
569
|
+
const W = l.onRouteChange(m);
|
|
570
|
+
return Q(W), U(() => t.items, () => m(l.currentRoute.value)), m(l.currentRoute.value), (T, f) => (a(), P(y(Z), {
|
|
571
|
+
selectedKeys: n.selectedKeys,
|
|
572
|
+
defaultSelectedKeys: n.defaultSelectedKeys,
|
|
573
|
+
mode: e.mode,
|
|
574
|
+
openKeys: u.value,
|
|
575
|
+
inlineIndent: e.inlineIndent,
|
|
576
|
+
theme: e.theme,
|
|
577
|
+
inlineCollapsed: e.mode === "inline" && !e.mixSider && r.value,
|
|
578
|
+
class: N(b.value),
|
|
579
|
+
subMenuOpenDelay: 0.2,
|
|
580
|
+
onOpenChange: F,
|
|
581
|
+
onClick: D
|
|
582
|
+
}, {
|
|
583
|
+
default: j(() => [
|
|
584
|
+
(a(!0), o(x, null, M(e.items, (h) => (a(), P(y(ue), {
|
|
585
|
+
key: h.path,
|
|
586
|
+
item: h
|
|
587
|
+
}, null, 8, ["item"]))), 128))
|
|
588
|
+
]),
|
|
589
|
+
_: 1
|
|
590
|
+
}, 8, ["selectedKeys", "defaultSelectedKeys", "mode", "openKeys", "inlineIndent", "theme", "inlineCollapsed", "class"]));
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
const jn = /* @__PURE__ */ k({
|
|
594
|
+
__name: "SimpleMenu",
|
|
595
|
+
props: {
|
|
596
|
+
items: { default: () => [] },
|
|
597
|
+
collapse: { type: Boolean },
|
|
598
|
+
mixSider: { type: Boolean },
|
|
599
|
+
theme: { default: "light" },
|
|
600
|
+
accordion: { type: Boolean, default: !0 },
|
|
601
|
+
collapsedShowTitle: { type: Boolean },
|
|
602
|
+
isSplitMenu: { type: Boolean },
|
|
603
|
+
beforeClickFn: {}
|
|
604
|
+
},
|
|
605
|
+
emits: ["menuClick"],
|
|
606
|
+
setup(e, { emit: c }) {
|
|
607
|
+
const t = e, i = c;
|
|
608
|
+
async function l(r) {
|
|
609
|
+
return /^https?:\/\//i.test(r) ? (window.open(r, "_blank", "noopener,noreferrer"), !1) : t.beforeClickFn ? t.beforeClickFn(r) : !0;
|
|
610
|
+
}
|
|
611
|
+
return (r, n) => (a(), P(te, {
|
|
612
|
+
class: "dsea-simple-menu",
|
|
613
|
+
items: e.items,
|
|
614
|
+
mode: "inline",
|
|
615
|
+
theme: e.theme,
|
|
616
|
+
collapse: e.collapse,
|
|
617
|
+
mixSider: e.mixSider,
|
|
618
|
+
accordion: e.accordion,
|
|
619
|
+
beforeClickFn: l,
|
|
620
|
+
onMenuClick: n[0] || (n[0] = (u) => i("menuClick", u))
|
|
621
|
+
}, null, 8, ["items", "theme", "collapse", "mixSider", "accordion"]));
|
|
622
|
+
}
|
|
623
|
+
}), Qn = /* @__PURE__ */ k({
|
|
624
|
+
__name: "SimpleMenuTag",
|
|
625
|
+
props: {
|
|
626
|
+
item: {},
|
|
627
|
+
dot: { type: Boolean, default: !1 },
|
|
628
|
+
collapseParent: { type: Boolean, default: !1 }
|
|
629
|
+
},
|
|
630
|
+
setup(e) {
|
|
631
|
+
return (c, t) => {
|
|
632
|
+
var i, l;
|
|
633
|
+
return (i = e.item.tag) != null && i.content || (l = e.item.tag) != null && l.dot ? (a(), o("span", {
|
|
634
|
+
key: 0,
|
|
635
|
+
class: N(["dsea-simple-menu-tag", [`dsea-simple-menu-tag--${e.item.tag.type ?? "error"}`, {
|
|
636
|
+
"dsea-simple-menu-tag--dot": e.dot || e.item.tag.dot,
|
|
637
|
+
"dsea-simple-menu-tag--collapse": e.collapseParent
|
|
638
|
+
}]])
|
|
639
|
+
}, d(e.dot || e.item.tag.dot || e.collapseParent ? "" : e.item.tag.content), 3)) : p("", !0);
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
}), $e = ["src", "alt"], Le = /* @__PURE__ */ k({
|
|
643
|
+
__name: "AppLogo",
|
|
644
|
+
props: {
|
|
645
|
+
theme: {},
|
|
646
|
+
showTitle: { type: Boolean, default: !0 },
|
|
647
|
+
alwaysShowTitle: { type: Boolean },
|
|
648
|
+
collapsedShowTitle: { type: Boolean }
|
|
649
|
+
},
|
|
650
|
+
setup(e) {
|
|
651
|
+
const { ports: c } = q(), t = I(() => c.appConfig.getTitle()), i = I(() => {
|
|
652
|
+
var r, n;
|
|
653
|
+
return (n = (r = c.appConfig).getLogo) == null ? void 0 : n.call(r);
|
|
654
|
+
});
|
|
655
|
+
function l() {
|
|
656
|
+
c.navigation.go(c.navigation.getHome());
|
|
657
|
+
}
|
|
658
|
+
return (r, n) => (a(), o("div", {
|
|
659
|
+
class: N(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
|
|
660
|
+
onClick: l
|
|
661
|
+
}, [
|
|
662
|
+
i.value ? (a(), o("img", {
|
|
663
|
+
key: 0,
|
|
664
|
+
src: i.value,
|
|
665
|
+
alt: t.value
|
|
666
|
+
}, null, 8, $e)) : p("", !0),
|
|
667
|
+
e.showTitle ? (a(), o("div", {
|
|
668
|
+
key: 1,
|
|
669
|
+
class: N(["dsea-app-logo__title ml-2 truncate md:opacity-100", { "xs:opacity-0": !e.alwaysShowTitle }])
|
|
670
|
+
}, d(t.value), 3)) : p("", !0)
|
|
671
|
+
], 2));
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
const A = (e, c) => {
|
|
675
|
+
const t = e.__vccOpts || e;
|
|
676
|
+
for (const [i, l] of c)
|
|
677
|
+
t[i] = l;
|
|
678
|
+
return t;
|
|
679
|
+
}, Ce = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-f9695ead"]]), Se = { class: "dsea-app-locale-picker" }, xe = { key: 0 }, Gn = /* @__PURE__ */ k({
|
|
680
|
+
__name: "AppLocalePicker",
|
|
681
|
+
props: {
|
|
682
|
+
locales: {},
|
|
683
|
+
locale: {},
|
|
684
|
+
showText: { type: Boolean, default: !0 },
|
|
685
|
+
reload: { type: Boolean }
|
|
686
|
+
},
|
|
687
|
+
setup(e) {
|
|
688
|
+
const c = e, { ports: t } = q(), i = S(c.locale ?? t.locale.getLocale()), l = I(() => {
|
|
689
|
+
var n;
|
|
690
|
+
return ((n = c.locales.find((u) => u.event === i.value)) == null ? void 0 : n.text) ?? "";
|
|
691
|
+
});
|
|
692
|
+
U(() => c.locale, (n) => {
|
|
693
|
+
n && (i.value = n);
|
|
694
|
+
});
|
|
695
|
+
async function r(n) {
|
|
696
|
+
n.event !== i.value && (await t.locale.setLocale(n.event), i.value = n.event, c.reload && location.reload());
|
|
697
|
+
}
|
|
698
|
+
return (n, u) => (a(), P(y(re), {
|
|
699
|
+
placement: "bottom",
|
|
700
|
+
trigger: ["click"],
|
|
701
|
+
dropMenuList: e.locales,
|
|
702
|
+
selectedKeys: [i.value],
|
|
703
|
+
overlayClassName: "app-locale-picker-overlay",
|
|
704
|
+
onMenuEvent: r
|
|
705
|
+
}, {
|
|
706
|
+
default: j(() => [
|
|
707
|
+
s("span", Se, [
|
|
708
|
+
$(y(w), { icon: "ion:language" }),
|
|
709
|
+
e.showText ? (a(), o("span", xe, d(l.value), 1)) : p("", !0)
|
|
710
|
+
])
|
|
711
|
+
]),
|
|
712
|
+
_: 1
|
|
713
|
+
}, 8, ["dropMenuList", "selectedKeys"]));
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
const Ae = ["aria-label"], Me = /* @__PURE__ */ k({
|
|
717
|
+
__name: "AppDarkModeToggle",
|
|
718
|
+
props: {
|
|
719
|
+
darkMode: { type: Boolean },
|
|
720
|
+
visible: { type: Boolean, default: !0 }
|
|
721
|
+
},
|
|
722
|
+
emits: ["update:darkMode"],
|
|
723
|
+
setup(e, { emit: c }) {
|
|
724
|
+
const t = c;
|
|
725
|
+
return (i, l) => e.visible ? (a(), o("button", {
|
|
726
|
+
key: 0,
|
|
727
|
+
type: "button",
|
|
728
|
+
class: N(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
|
|
729
|
+
"aria-label": e.darkMode ? "Switch to light mode" : "Switch to dark mode",
|
|
730
|
+
onClick: l[0] || (l[0] = (r) => t("update:darkMode", !e.darkMode))
|
|
731
|
+
}, [
|
|
732
|
+
l[1] || (l[1] = s("span", { class: "dsea-dark-switch-inner" }, null, -1)),
|
|
733
|
+
$(y(w), {
|
|
734
|
+
icon: "lucide:sun",
|
|
735
|
+
size: 14
|
|
736
|
+
}),
|
|
737
|
+
$(y(w), {
|
|
738
|
+
icon: "lucide:moon",
|
|
739
|
+
size: 14
|
|
740
|
+
})
|
|
741
|
+
], 10, Ae)) : p("", !0);
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
const Xn = /* @__PURE__ */ A(Me, [["__scopeId", "data-v-bc7f2cad"]]), Te = ["aria-label", "title", "aria-pressed"], Be = /* @__PURE__ */ k({
|
|
745
|
+
__name: "AdminFullscreenButton",
|
|
746
|
+
props: {
|
|
747
|
+
enterLabel: { default: "Enter fullscreen" },
|
|
748
|
+
exitLabel: { default: "Exit fullscreen" }
|
|
749
|
+
},
|
|
750
|
+
setup(e) {
|
|
751
|
+
const c = S(!1);
|
|
752
|
+
function t() {
|
|
753
|
+
c.value = !!document.fullscreenElement;
|
|
754
|
+
}
|
|
755
|
+
async function i() {
|
|
756
|
+
document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(), t();
|
|
757
|
+
}
|
|
758
|
+
return Y(() => {
|
|
759
|
+
t(), document.addEventListener("fullscreenchange", t);
|
|
760
|
+
}), Q(() => document.removeEventListener("fullscreenchange", t)), (l, r) => (a(), o("button", {
|
|
761
|
+
type: "button",
|
|
762
|
+
class: "dsea-icon-command",
|
|
763
|
+
"aria-label": c.value ? e.exitLabel : e.enterLabel,
|
|
764
|
+
title: c.value ? e.exitLabel : e.enterLabel,
|
|
765
|
+
"aria-pressed": c.value,
|
|
766
|
+
onClick: i
|
|
767
|
+
}, [
|
|
768
|
+
$(y(w), {
|
|
769
|
+
icon: c.value ? "lucide:minimize" : "lucide:maximize",
|
|
770
|
+
size: 18
|
|
771
|
+
}, null, 8, ["icon"])
|
|
772
|
+
], 8, Te));
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
const Yn = /* @__PURE__ */ A(Be, [["__scopeId", "data-v-1787f599"]]);
|
|
776
|
+
new TextEncoder().encode("kerthus-web-shared-auth-v2-key!!");
|
|
777
|
+
function X(e) {
|
|
778
|
+
if (typeof e != "string")
|
|
779
|
+
return "";
|
|
780
|
+
const c = e.trim();
|
|
781
|
+
if (!/^https?:\/\/[^/]/i.test(c) || /^https?:\/\/[^/?#]*@/i.test(c) || /[\s\\\u0000-\u001f\u007f]/.test(c))
|
|
782
|
+
return "";
|
|
783
|
+
try {
|
|
784
|
+
const t = new URL(c);
|
|
785
|
+
return !["http:", "https:"].includes(t.protocol) || !t.hostname || t.username || t.password ? "" : c;
|
|
786
|
+
} catch {
|
|
787
|
+
return "";
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" }, Ee = {
|
|
791
|
+
key: 0,
|
|
792
|
+
role: "status"
|
|
793
|
+
}, Fe = {
|
|
794
|
+
key: 1,
|
|
795
|
+
role: "alert"
|
|
796
|
+
}, Ne = { key: 2 }, ze = { key: 3 }, De = ["href"], Ke = ["src"], Ve = { key: 0 }, Re = ["title"], Ue = ["disabled", "aria-current", "onClick"], qe = ["src"], We = { key: 0 }, Oe = /* @__PURE__ */ k({
|
|
797
|
+
__name: "AdminAppSwitcher",
|
|
798
|
+
props: {
|
|
799
|
+
apps: {},
|
|
800
|
+
currentId: {},
|
|
801
|
+
loading: { type: Boolean },
|
|
802
|
+
error: {},
|
|
803
|
+
label: { default: "Applications" },
|
|
804
|
+
emptyLabel: { default: "No applications" },
|
|
805
|
+
loadingLabel: { default: "Loading applications" },
|
|
806
|
+
invalidUrlLabel: { default: "Invalid application URL" },
|
|
807
|
+
confirmSwitch: {}
|
|
808
|
+
},
|
|
809
|
+
emits: ["open", "switch", "error"],
|
|
810
|
+
setup(e, { emit: c }) {
|
|
811
|
+
const t = e, i = c, l = S(), r = S();
|
|
812
|
+
function n() {
|
|
813
|
+
l.value && (l.value.open = !1);
|
|
814
|
+
}
|
|
815
|
+
function u(g) {
|
|
816
|
+
g.target.open && i("open");
|
|
817
|
+
}
|
|
818
|
+
async function b(g) {
|
|
819
|
+
var v;
|
|
820
|
+
if (!(r.value || g.id === t.currentId)) {
|
|
821
|
+
r.value = g.id;
|
|
822
|
+
try {
|
|
823
|
+
if (await ((v = t.confirmSwitch) == null ? void 0 : v.call(t, g)) === !1)
|
|
824
|
+
return;
|
|
825
|
+
i("switch", g), n();
|
|
826
|
+
} catch (m) {
|
|
827
|
+
i("error", m);
|
|
828
|
+
} finally {
|
|
829
|
+
r.value = void 0;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return (g, v) => (a(), o("details", {
|
|
834
|
+
ref_key: "menu",
|
|
835
|
+
ref: l,
|
|
836
|
+
class: "dsea-app-switcher",
|
|
837
|
+
onToggle: u,
|
|
838
|
+
onKeydown: J(n, ["esc"])
|
|
839
|
+
}, [
|
|
840
|
+
s("summary", {
|
|
841
|
+
"aria-label": e.label,
|
|
842
|
+
title: e.label
|
|
843
|
+
}, [
|
|
844
|
+
$(y(w), {
|
|
845
|
+
icon: "lucide:layout-grid",
|
|
846
|
+
size: 18
|
|
847
|
+
})
|
|
848
|
+
], 8, Pe),
|
|
849
|
+
s("div", Ie, [
|
|
850
|
+
e.loading ? (a(), o("p", Ee, d(e.loadingLabel), 1)) : e.error ? (a(), o("p", Fe, d(e.error), 1)) : e.apps.length ? (a(), o("ul", ze, [
|
|
851
|
+
(a(!0), o(x, null, M(e.apps, (m) => (a(), o("li", {
|
|
852
|
+
key: m.id
|
|
853
|
+
}, [
|
|
854
|
+
m.url && y(X)(m.url) ? (a(), o("a", {
|
|
855
|
+
key: 0,
|
|
856
|
+
href: y(X)(m.url),
|
|
857
|
+
target: "_blank",
|
|
858
|
+
rel: "noopener noreferrer",
|
|
859
|
+
referrerpolicy: "no-referrer",
|
|
860
|
+
onClick: n
|
|
861
|
+
}, [
|
|
862
|
+
m.icon ? (a(), o("img", {
|
|
863
|
+
key: 0,
|
|
864
|
+
src: m.icon,
|
|
865
|
+
alt: ""
|
|
866
|
+
}, null, 8, Ke)) : p("", !0),
|
|
867
|
+
s("span", null, [
|
|
868
|
+
z(d(m.name), 1),
|
|
869
|
+
m.description ? (a(), o("small", Ve, d(m.description), 1)) : p("", !0)
|
|
870
|
+
]),
|
|
871
|
+
$(y(w), {
|
|
872
|
+
icon: "lucide:external-link",
|
|
873
|
+
size: 14
|
|
874
|
+
})
|
|
875
|
+
], 8, De)) : m.url ? (a(), o("button", {
|
|
876
|
+
key: 1,
|
|
877
|
+
type: "button",
|
|
878
|
+
disabled: "",
|
|
879
|
+
title: e.invalidUrlLabel
|
|
880
|
+
}, [
|
|
881
|
+
s("span", null, [
|
|
882
|
+
z(d(m.name), 1),
|
|
883
|
+
s("small", null, d(e.invalidUrlLabel), 1)
|
|
884
|
+
])
|
|
885
|
+
], 8, Re)) : (a(), o("button", {
|
|
886
|
+
key: 2,
|
|
887
|
+
type: "button",
|
|
888
|
+
disabled: m.id === e.currentId || r.value === m.id,
|
|
889
|
+
"aria-current": m.id === e.currentId ? "page" : void 0,
|
|
890
|
+
onClick: (L) => b(m)
|
|
891
|
+
}, [
|
|
892
|
+
m.icon ? (a(), o("img", {
|
|
893
|
+
key: 0,
|
|
894
|
+
src: m.icon,
|
|
895
|
+
alt: ""
|
|
896
|
+
}, null, 8, qe)) : p("", !0),
|
|
897
|
+
s("span", null, [
|
|
898
|
+
z(d(m.name), 1),
|
|
899
|
+
m.description ? (a(), o("small", We, d(m.description), 1)) : p("", !0)
|
|
900
|
+
]),
|
|
901
|
+
m.id === e.currentId ? (a(), P(y(w), {
|
|
902
|
+
key: 1,
|
|
903
|
+
icon: "lucide:check",
|
|
904
|
+
size: 16
|
|
905
|
+
})) : p("", !0)
|
|
906
|
+
], 8, Ue))
|
|
907
|
+
]))), 128))
|
|
908
|
+
])) : (a(), o("p", Ne, d(e.emptyLabel), 1))
|
|
909
|
+
])
|
|
910
|
+
], 544));
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
const Jn = /* @__PURE__ */ A(Oe, [["__scopeId", "data-v-29d987c2"]]), me = Symbol("app-provider");
|
|
914
|
+
function be(e) {
|
|
915
|
+
return ve(me, e), e;
|
|
916
|
+
}
|
|
917
|
+
function Zn() {
|
|
918
|
+
const e = le(me);
|
|
919
|
+
if (!e)
|
|
920
|
+
throw new Error("AppProvider is missing");
|
|
921
|
+
return e;
|
|
922
|
+
}
|
|
923
|
+
const el = /* @__PURE__ */ k({
|
|
924
|
+
__name: "AppProvider",
|
|
925
|
+
props: {
|
|
926
|
+
prefixCls: { default: "dsea" },
|
|
927
|
+
mobileBreakpoint: { default: 992 },
|
|
928
|
+
onMobileChange: {}
|
|
929
|
+
},
|
|
930
|
+
setup(e) {
|
|
931
|
+
const c = e, t = S(!1);
|
|
932
|
+
be({ prefixCls: pe(c, "prefixCls"), isMobile: t });
|
|
933
|
+
function i() {
|
|
934
|
+
var r;
|
|
935
|
+
const l = window.innerWidth < c.mobileBreakpoint;
|
|
936
|
+
l !== t.value && (t.value = l, (r = c.onMobileChange) == null || r.call(c, l));
|
|
937
|
+
}
|
|
938
|
+
return Y(() => {
|
|
939
|
+
i(), window.addEventListener("resize", i);
|
|
940
|
+
}), Q(() => window.removeEventListener("resize", i)), (l, r) => B(l.$slots, "default");
|
|
941
|
+
}
|
|
942
|
+
}), He = ["aria-label"], je = ["aria-label"], Qe = { class: "dsea-app-search-input-row" }, Ge = ["placeholder", "aria-label"], Xe = ["aria-label"], Ye = ["data-index", "aria-selected", "onMouseenter", "onClick"], Je = {
|
|
943
|
+
key: 1,
|
|
944
|
+
class: "dsea-app-search-empty"
|
|
945
|
+
}, Ze = /* @__PURE__ */ k({
|
|
946
|
+
__name: "AppSearch",
|
|
947
|
+
setup(e) {
|
|
948
|
+
const { ports: c } = q(), t = ce(), i = (f) => c.locale.translate(f), l = S(!1), r = S(""), n = S([]), u = S(0), b = S(), g = S();
|
|
949
|
+
function v(f, h = "") {
|
|
950
|
+
return f.flatMap((_) => {
|
|
951
|
+
var G, ae;
|
|
952
|
+
if ((G = _.meta) != null && G.hideMenu)
|
|
953
|
+
return [];
|
|
954
|
+
const C = i(_.name), E = h ? `${h} > ${C}` : C, R = (ae = _.meta) != null && ae.hideChildrenInMenu ? [] : _.children ?? [];
|
|
955
|
+
return R.length ? v(R, E) : [{ label: E, path: _.path, icon: _.icon }];
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
function m(f, h) {
|
|
959
|
+
const _ = f.toLocaleLowerCase();
|
|
960
|
+
let C = 0;
|
|
961
|
+
for (const E of h.toLocaleLowerCase()) {
|
|
962
|
+
if (C = _.indexOf(E, C), C < 0)
|
|
963
|
+
return !1;
|
|
964
|
+
C += 1;
|
|
965
|
+
}
|
|
966
|
+
return !0;
|
|
967
|
+
}
|
|
968
|
+
const L = I(() => {
|
|
969
|
+
const f = r.value.trim();
|
|
970
|
+
return f ? v(n.value).filter((h) => m(h.label, f)) : [];
|
|
971
|
+
});
|
|
972
|
+
U(L, () => {
|
|
973
|
+
u.value = 0;
|
|
974
|
+
});
|
|
975
|
+
async function F() {
|
|
976
|
+
var f, h;
|
|
977
|
+
l.value = !0, n.value = await ((f = t.getItems) == null ? void 0 : f.call(t)) ?? [], l.value && (await se(), (h = b.value) == null || h.focus());
|
|
978
|
+
}
|
|
979
|
+
function D() {
|
|
980
|
+
l.value = !1, r.value = "";
|
|
981
|
+
}
|
|
982
|
+
function W(f) {
|
|
983
|
+
D(), c.navigation.go(f.path);
|
|
984
|
+
}
|
|
985
|
+
function T(f) {
|
|
986
|
+
var h, _;
|
|
987
|
+
if (l.value)
|
|
988
|
+
if (f.key === "Escape")
|
|
989
|
+
D();
|
|
990
|
+
else if (f.key === "ArrowDown" || f.key === "ArrowUp") {
|
|
991
|
+
if (f.preventDefault(), !L.value.length)
|
|
992
|
+
return;
|
|
993
|
+
const C = f.key === "ArrowDown" ? 1 : -1;
|
|
994
|
+
u.value = (u.value + C + L.value.length) % L.value.length, (_ = (h = g.value) == null ? void 0 : h.querySelector(`[data-index="${u.value}"]`)) == null || _.scrollIntoView({ block: "nearest" });
|
|
995
|
+
} else
|
|
996
|
+
f.key === "Enter" && L.value[u.value] && (f.preventDefault(), W(L.value[u.value]));
|
|
997
|
+
}
|
|
998
|
+
return Y(() => window.addEventListener("keydown", T)), Q(() => window.removeEventListener("keydown", T)), (f, h) => (a(), o(x, null, [
|
|
999
|
+
s("button", {
|
|
1000
|
+
type: "button",
|
|
1001
|
+
class: "dsea-app-search-trigger",
|
|
1002
|
+
"aria-label": i("common.searchText"),
|
|
1003
|
+
onClick: F
|
|
1004
|
+
}, [
|
|
1005
|
+
$(y(w), {
|
|
1006
|
+
icon: "ant-design:search-outlined",
|
|
1007
|
+
size: 18
|
|
1008
|
+
})
|
|
1009
|
+
], 8, He),
|
|
1010
|
+
(a(), P(ge, { to: "body" }, [
|
|
1011
|
+
l.value ? (a(), o("div", {
|
|
1012
|
+
key: 0,
|
|
1013
|
+
class: "dsea-app-search-backdrop",
|
|
1014
|
+
onClick: H(D, ["self"])
|
|
1015
|
+
}, [
|
|
1016
|
+
s("section", {
|
|
1017
|
+
class: "dsea-app-search-modal",
|
|
1018
|
+
role: "dialog",
|
|
1019
|
+
"aria-modal": "true",
|
|
1020
|
+
"aria-label": i("common.searchText")
|
|
1021
|
+
}, [
|
|
1022
|
+
s("div", Qe, [
|
|
1023
|
+
$(y(w), {
|
|
1024
|
+
icon: "ant-design:search-outlined",
|
|
1025
|
+
size: 18
|
|
1026
|
+
}),
|
|
1027
|
+
K(s("input", {
|
|
1028
|
+
ref_key: "inputEl",
|
|
1029
|
+
ref: b,
|
|
1030
|
+
"onUpdate:modelValue": h[0] || (h[0] = (_) => r.value = _),
|
|
1031
|
+
type: "search",
|
|
1032
|
+
placeholder: i("common.searchText"),
|
|
1033
|
+
"aria-label": i("common.searchText")
|
|
1034
|
+
}, null, 8, Ge), [
|
|
1035
|
+
[V, r.value]
|
|
1036
|
+
]),
|
|
1037
|
+
s("button", {
|
|
1038
|
+
type: "button",
|
|
1039
|
+
class: "dsea-app-search-close",
|
|
1040
|
+
"aria-label": i("common.cancelText"),
|
|
1041
|
+
onClick: D
|
|
1042
|
+
}, [
|
|
1043
|
+
$(y(w), {
|
|
1044
|
+
icon: "lucide:x",
|
|
1045
|
+
size: 18
|
|
1046
|
+
})
|
|
1047
|
+
], 8, Xe)
|
|
1048
|
+
]),
|
|
1049
|
+
L.value.length ? (a(), o("ul", {
|
|
1050
|
+
key: 0,
|
|
1051
|
+
ref_key: "resultList",
|
|
1052
|
+
ref: g,
|
|
1053
|
+
class: "dsea-app-search-results",
|
|
1054
|
+
role: "listbox"
|
|
1055
|
+
}, [
|
|
1056
|
+
(a(!0), o(x, null, M(L.value, (_, C) => (a(), o("li", {
|
|
1057
|
+
key: _.path,
|
|
1058
|
+
"data-index": C,
|
|
1059
|
+
role: "option",
|
|
1060
|
+
"aria-selected": C === u.value,
|
|
1061
|
+
class: N({ active: C === u.value }),
|
|
1062
|
+
onMouseenter: (E) => u.value = C,
|
|
1063
|
+
onClick: (E) => W(_)
|
|
1064
|
+
}, [
|
|
1065
|
+
_.icon ? (a(), P(y(w), {
|
|
1066
|
+
key: 0,
|
|
1067
|
+
icon: _.icon,
|
|
1068
|
+
size: 18
|
|
1069
|
+
}, null, 8, ["icon"])) : p("", !0),
|
|
1070
|
+
s("span", null, d(_.label), 1),
|
|
1071
|
+
C === u.value ? (a(), P(y(w), {
|
|
1072
|
+
key: 1,
|
|
1073
|
+
icon: "ant-design:enter-outlined",
|
|
1074
|
+
size: 16
|
|
1075
|
+
})) : p("", !0)
|
|
1076
|
+
], 42, Ye))), 128))
|
|
1077
|
+
], 512)) : r.value.trim() ? (a(), o("div", Je, d(i("component.app.searchNotData")), 1)) : p("", !0)
|
|
1078
|
+
], 8, je)
|
|
1079
|
+
])) : p("", !0)
|
|
1080
|
+
]))
|
|
1081
|
+
], 64));
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["aria-label"], tt = ["src", "alt"], at = {
|
|
1085
|
+
key: 1,
|
|
1086
|
+
class: "dsea-user-menu__initial"
|
|
1087
|
+
}, nt = { class: "dsea-user-menu__name" }, lt = { role: "menu" }, ot = ["onClick"], st = /* @__PURE__ */ k({
|
|
1088
|
+
__name: "AdminUserMenu",
|
|
1089
|
+
props: {
|
|
1090
|
+
name: {},
|
|
1091
|
+
avatar: {},
|
|
1092
|
+
label: {},
|
|
1093
|
+
items: {}
|
|
1094
|
+
},
|
|
1095
|
+
emits: ["select"],
|
|
1096
|
+
setup(e, { emit: c }) {
|
|
1097
|
+
const t = c, i = S();
|
|
1098
|
+
function l(n) {
|
|
1099
|
+
n.currentTarget.open = !1;
|
|
1100
|
+
}
|
|
1101
|
+
function r(n) {
|
|
1102
|
+
t("select", n), i.value && (i.value.open = !1);
|
|
1103
|
+
}
|
|
1104
|
+
return (n, u) => (a(), o("details", {
|
|
1105
|
+
ref_key: "menu",
|
|
1106
|
+
ref: i,
|
|
1107
|
+
class: "dsea-user-menu",
|
|
1108
|
+
onKeydown: J(l, ["esc"])
|
|
1109
|
+
}, [
|
|
1110
|
+
s("summary", { "aria-label": e.label }, [
|
|
1111
|
+
e.avatar ? (a(), o("img", {
|
|
1112
|
+
key: 0,
|
|
1113
|
+
src: e.avatar,
|
|
1114
|
+
alt: e.name
|
|
1115
|
+
}, null, 8, tt)) : (a(), o("span", at, d(e.name.slice(0, 1).toUpperCase()), 1)),
|
|
1116
|
+
s("span", nt, d(e.name), 1),
|
|
1117
|
+
$(y(w), {
|
|
1118
|
+
icon: "lucide:chevron-down",
|
|
1119
|
+
size: 14
|
|
1120
|
+
})
|
|
1121
|
+
], 8, et),
|
|
1122
|
+
s("ul", lt, [
|
|
1123
|
+
(a(!0), o(x, null, M(e.items, (b) => (a(), o("li", {
|
|
1124
|
+
key: b.key,
|
|
1125
|
+
role: "none"
|
|
1126
|
+
}, [
|
|
1127
|
+
s("button", {
|
|
1128
|
+
type: "button",
|
|
1129
|
+
role: "menuitem",
|
|
1130
|
+
onClick: (g) => r(b.key)
|
|
1131
|
+
}, [
|
|
1132
|
+
b.icon ? (a(), P(y(w), {
|
|
1133
|
+
key: 0,
|
|
1134
|
+
icon: b.icon,
|
|
1135
|
+
size: 16
|
|
1136
|
+
}, null, 8, ["icon"])) : p("", !0),
|
|
1137
|
+
z(" " + d(b.label), 1)
|
|
1138
|
+
], 8, ot)
|
|
1139
|
+
]))), 128))
|
|
1140
|
+
])
|
|
1141
|
+
], 544));
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
const al = /* @__PURE__ */ A(st, [["__scopeId", "data-v-d193d9f3"]]), it = ["aria-label"], rt = {
|
|
1145
|
+
key: 0,
|
|
1146
|
+
class: "dsea-notifications__count"
|
|
1147
|
+
}, dt = ["aria-label"], ct = {
|
|
1148
|
+
class: "dsea-notifications__tabs",
|
|
1149
|
+
role: "tablist"
|
|
1150
|
+
}, ut = ["aria-selected", "onClick"], mt = { key: 0 }, bt = ["onClick"], vt = { key: 0 }, pt = { key: 1 }, gt = {
|
|
1151
|
+
key: 1,
|
|
1152
|
+
class: "dsea-notifications__empty"
|
|
1153
|
+
}, ht = /* @__PURE__ */ k({
|
|
1154
|
+
__name: "AdminNotificationCenter",
|
|
1155
|
+
props: {
|
|
1156
|
+
items: {},
|
|
1157
|
+
categories: {},
|
|
1158
|
+
label: { default: "Notifications" },
|
|
1159
|
+
emptyLabel: { default: "No notifications" },
|
|
1160
|
+
markAllLabel: { default: "Mark all as read" }
|
|
1161
|
+
},
|
|
1162
|
+
emits: ["open", "markAllRead"],
|
|
1163
|
+
setup(e, { emit: c }) {
|
|
1164
|
+
var b;
|
|
1165
|
+
const t = e, i = c, l = S(((b = t.categories[0]) == null ? void 0 : b.key) ?? "");
|
|
1166
|
+
U(() => t.categories, (g) => {
|
|
1167
|
+
var v;
|
|
1168
|
+
g.some((m) => m.key === l.value) || (l.value = ((v = g[0]) == null ? void 0 : v.key) ?? "");
|
|
1169
|
+
});
|
|
1170
|
+
const r = I(() => t.items.filter((g) => !g.read).length), n = I(() => t.items.filter((g) => g.category === l.value));
|
|
1171
|
+
function u(g) {
|
|
1172
|
+
g.currentTarget.open = !1;
|
|
1173
|
+
}
|
|
1174
|
+
return (g, v) => (a(), o("details", {
|
|
1175
|
+
class: "dsea-notifications",
|
|
1176
|
+
onKeydown: J(u, ["esc"])
|
|
1177
|
+
}, [
|
|
1178
|
+
s("summary", { "aria-label": e.label }, [
|
|
1179
|
+
$(y(w), {
|
|
1180
|
+
icon: "lucide:bell",
|
|
1181
|
+
size: 18
|
|
1182
|
+
}),
|
|
1183
|
+
r.value ? (a(), o("span", rt, d(r.value > 99 ? "99+" : r.value), 1)) : p("", !0)
|
|
1184
|
+
], 8, it),
|
|
1185
|
+
s("section", {
|
|
1186
|
+
class: "dsea-notifications__panel",
|
|
1187
|
+
"aria-label": e.label
|
|
1188
|
+
}, [
|
|
1189
|
+
s("header", null, d(e.label), 1),
|
|
1190
|
+
s("div", ct, [
|
|
1191
|
+
(a(!0), o(x, null, M(e.categories, (m) => (a(), o("button", {
|
|
1192
|
+
key: m.key,
|
|
1193
|
+
type: "button",
|
|
1194
|
+
role: "tab",
|
|
1195
|
+
"aria-selected": l.value === m.key,
|
|
1196
|
+
onClick: (L) => l.value = m.key
|
|
1197
|
+
}, d(m.label), 9, ut))), 128))
|
|
1198
|
+
]),
|
|
1199
|
+
n.value.length ? (a(), o("ul", mt, [
|
|
1200
|
+
(a(!0), o(x, null, M(n.value, (m) => (a(), o("li", {
|
|
1201
|
+
key: m.id,
|
|
1202
|
+
class: N({ "is-read": m.read })
|
|
1203
|
+
}, [
|
|
1204
|
+
s("button", {
|
|
1205
|
+
type: "button",
|
|
1206
|
+
onClick: (L) => i("open", m)
|
|
1207
|
+
}, [
|
|
1208
|
+
s("strong", null, d(m.title), 1),
|
|
1209
|
+
m.description ? (a(), o("span", vt, d(m.description), 1)) : p("", !0),
|
|
1210
|
+
m.time ? (a(), o("small", pt, d(m.time), 1)) : p("", !0)
|
|
1211
|
+
], 8, bt)
|
|
1212
|
+
], 2))), 128))
|
|
1213
|
+
])) : (a(), o("p", gt, d(e.emptyLabel), 1)),
|
|
1214
|
+
r.value ? (a(), o("button", {
|
|
1215
|
+
key: 2,
|
|
1216
|
+
type: "button",
|
|
1217
|
+
class: "dsea-notifications__mark",
|
|
1218
|
+
onClick: v[0] || (v[0] = (m) => i("markAllRead"))
|
|
1219
|
+
}, d(e.markAllLabel), 1)) : p("", !0)
|
|
1220
|
+
], 8, dt)
|
|
1221
|
+
], 32));
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["aria-hidden", "inert"], yt = { class: "dsea-admin-layout__brand" }, kt = ["aria-label"], _t = {
|
|
1225
|
+
key: 0,
|
|
1226
|
+
class: "dsea-admin-layout__sidebar-footer"
|
|
1227
|
+
}, wt = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], $t = ["aria-label"], Lt = { class: "dsea-admin-layout__main" }, Ct = {
|
|
1228
|
+
key: 0,
|
|
1229
|
+
class: "dsea-admin-layout__header"
|
|
1230
|
+
}, St = ["aria-label", "aria-expanded"], xt = ["aria-label"], At = { class: "dsea-admin-layout__header-actions" }, Mt = {
|
|
1231
|
+
key: 1,
|
|
1232
|
+
class: "dsea-admin-layout__tabs"
|
|
1233
|
+
}, Tt = { class: "dsea-admin-layout__content" }, Bt = {
|
|
1234
|
+
key: 2,
|
|
1235
|
+
class: "dsea-admin-layout__footer"
|
|
1236
|
+
}, ll = /* @__PURE__ */ k({
|
|
1237
|
+
__name: "AdminLayout",
|
|
1238
|
+
props: {
|
|
1239
|
+
menus: { default: () => [] },
|
|
1240
|
+
topMenus: { default: () => [] },
|
|
1241
|
+
mode: { default: "sidebar" },
|
|
1242
|
+
collapsed: { type: Boolean, default: !1 },
|
|
1243
|
+
showSidebar: { type: Boolean, default: !0 },
|
|
1244
|
+
fullContent: { type: Boolean, default: !1 },
|
|
1245
|
+
resizableSidebar: { type: Boolean, default: !1 },
|
|
1246
|
+
minSidebarWidth: { default: 160 },
|
|
1247
|
+
maxSidebarWidth: { default: 420 },
|
|
1248
|
+
sidebarWidth: { default: 232 },
|
|
1249
|
+
collapsedWidth: { default: 64 },
|
|
1250
|
+
headerHeight: { default: 48 },
|
|
1251
|
+
mobileBreakpoint: { default: 992 },
|
|
1252
|
+
menuTheme: { default: "dark" },
|
|
1253
|
+
topMenuTheme: { default: "light" },
|
|
1254
|
+
topNavigationLabel: { default: "Top navigation" },
|
|
1255
|
+
navigationLabel: { default: "Navigation" },
|
|
1256
|
+
closeNavigationLabel: { default: "Close navigation" },
|
|
1257
|
+
resizeLabel: { default: "Resize sidebar" }
|
|
1258
|
+
},
|
|
1259
|
+
emits: ["update:collapsed", "menuClick", "update:sidebarWidth"],
|
|
1260
|
+
setup(e, { emit: c }) {
|
|
1261
|
+
const t = e, i = c, { ports: l } = q(), r = S(!1), n = S(!1), u = I(() => t.showSidebar && t.mode !== "top" && !t.fullContent);
|
|
1262
|
+
let b;
|
|
1263
|
+
function g(h) {
|
|
1264
|
+
return Math.min(t.maxSidebarWidth, Math.max(t.minSidebarWidth, h));
|
|
1265
|
+
}
|
|
1266
|
+
function v(h) {
|
|
1267
|
+
if (h.button !== 0)
|
|
1268
|
+
return;
|
|
1269
|
+
b == null || b();
|
|
1270
|
+
const _ = h.clientX, C = t.sidebarWidth, E = (G) => i("update:sidebarWidth", g(C + G.clientX - _)), R = () => b == null ? void 0 : b();
|
|
1271
|
+
window.addEventListener("pointermove", E), window.addEventListener("pointerup", R), window.addEventListener("pointercancel", R), b = () => {
|
|
1272
|
+
window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", R), window.removeEventListener("pointercancel", R), b = void 0;
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
function m(h) {
|
|
1276
|
+
h.key !== "ArrowLeft" && h.key !== "ArrowRight" || (h.preventDefault(), i("update:sidebarWidth", g(t.sidebarWidth + (h.key === "ArrowRight" ? 10 : -10))));
|
|
1277
|
+
}
|
|
1278
|
+
be({ prefixCls: S("dsea"), isMobile: r });
|
|
1279
|
+
const L = I(() => ({
|
|
1280
|
+
"--dsea-sidebar-width": `${t.sidebarWidth}px`,
|
|
1281
|
+
"--dsea-collapsed-width": `${t.collapsedWidth}px`,
|
|
1282
|
+
"--dsea-header-height": `${t.headerHeight}px`
|
|
1283
|
+
}));
|
|
1284
|
+
function F() {
|
|
1285
|
+
const h = window.innerWidth < t.mobileBreakpoint;
|
|
1286
|
+
h !== r.value && (r.value = h, n.value = !1);
|
|
1287
|
+
}
|
|
1288
|
+
function D() {
|
|
1289
|
+
n.value = !1;
|
|
1290
|
+
}
|
|
1291
|
+
function W() {
|
|
1292
|
+
r.value ? n.value = !n.value : i("update:collapsed", !t.collapsed);
|
|
1293
|
+
}
|
|
1294
|
+
function T(h) {
|
|
1295
|
+
i("menuClick", h), D(), l.navigation.go(h);
|
|
1296
|
+
}
|
|
1297
|
+
function f(h) {
|
|
1298
|
+
h.key === "Escape" && n.value && D();
|
|
1299
|
+
}
|
|
1300
|
+
return U(() => t.mobileBreakpoint, F), U(() => t.fullContent, () => {
|
|
1301
|
+
n.value = !1;
|
|
1302
|
+
}), Y(() => {
|
|
1303
|
+
F(), window.addEventListener("resize", F), window.addEventListener("keydown", f);
|
|
1304
|
+
}), Q(() => {
|
|
1305
|
+
b == null || b(), window.removeEventListener("resize", F), window.removeEventListener("keydown", f);
|
|
1306
|
+
}), (h, _) => (a(), o("div", {
|
|
1307
|
+
class: N(["dsea-admin-layout", { "dsea-admin-layout--mobile": r.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !u.value }]),
|
|
1308
|
+
style: ie(L.value)
|
|
1309
|
+
}, [
|
|
1310
|
+
u.value ? (a(), o("aside", {
|
|
1311
|
+
key: 0,
|
|
1312
|
+
class: N(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": n.value }]),
|
|
1313
|
+
"aria-hidden": r.value && !n.value,
|
|
1314
|
+
inert: r.value && !n.value
|
|
1315
|
+
}, [
|
|
1316
|
+
s("div", yt, [
|
|
1317
|
+
B(h.$slots, "brand", {}, () => [
|
|
1318
|
+
$(Ce, {
|
|
1319
|
+
"show-title": !e.collapsed || r.value
|
|
1320
|
+
}, null, 8, ["show-title"])
|
|
1321
|
+
])
|
|
1322
|
+
]),
|
|
1323
|
+
s("nav", {
|
|
1324
|
+
class: "dsea-admin-layout__navigation",
|
|
1325
|
+
"aria-label": e.navigationLabel
|
|
1326
|
+
}, [
|
|
1327
|
+
B(h.$slots, "navigation", {}, () => [
|
|
1328
|
+
$(te, {
|
|
1329
|
+
items: e.menus,
|
|
1330
|
+
collapse: e.collapsed && !r.value,
|
|
1331
|
+
theme: e.menuTheme,
|
|
1332
|
+
onMenuClick: T
|
|
1333
|
+
}, null, 8, ["items", "collapse", "theme"])
|
|
1334
|
+
])
|
|
1335
|
+
], 8, kt),
|
|
1336
|
+
h.$slots.sidebarFooter ? (a(), o("div", _t, [
|
|
1337
|
+
B(h.$slots, "sidebarFooter")
|
|
1338
|
+
])) : p("", !0),
|
|
1339
|
+
e.resizableSidebar && !r.value && !e.collapsed ? (a(), o("div", {
|
|
1340
|
+
key: 1,
|
|
1341
|
+
class: "dsea-admin-layout__resize",
|
|
1342
|
+
role: "separator",
|
|
1343
|
+
tabindex: "0",
|
|
1344
|
+
"aria-orientation": "vertical",
|
|
1345
|
+
"aria-label": e.resizeLabel,
|
|
1346
|
+
"aria-valuenow": e.sidebarWidth,
|
|
1347
|
+
"aria-valuemin": e.minSidebarWidth,
|
|
1348
|
+
"aria-valuemax": e.maxSidebarWidth,
|
|
1349
|
+
onPointerdown: v,
|
|
1350
|
+
onKeydown: m
|
|
1351
|
+
}, null, 40, wt)) : p("", !0)
|
|
1352
|
+
], 10, ft)) : p("", !0),
|
|
1353
|
+
u.value && r.value && n.value ? (a(), o("button", {
|
|
1354
|
+
key: 1,
|
|
1355
|
+
type: "button",
|
|
1356
|
+
class: "dsea-admin-layout__scrim",
|
|
1357
|
+
"aria-label": e.closeNavigationLabel,
|
|
1358
|
+
onClick: D
|
|
1359
|
+
}, null, 8, $t)) : p("", !0),
|
|
1360
|
+
s("div", Lt, [
|
|
1361
|
+
e.fullContent ? p("", !0) : (a(), o("header", Ct, [
|
|
1362
|
+
u.value ? (a(), o("button", {
|
|
1363
|
+
key: 0,
|
|
1364
|
+
type: "button",
|
|
1365
|
+
class: "dsea-admin-layout__toggle",
|
|
1366
|
+
"aria-label": e.navigationLabel,
|
|
1367
|
+
"aria-expanded": r.value ? n.value : !e.collapsed,
|
|
1368
|
+
onClick: W
|
|
1369
|
+
}, [
|
|
1370
|
+
$(y(w), {
|
|
1371
|
+
icon: r.value && n.value ? "lucide:x" : "lucide:menu",
|
|
1372
|
+
size: 20
|
|
1373
|
+
}, null, 8, ["icon"])
|
|
1374
|
+
], 8, St)) : p("", !0),
|
|
1375
|
+
B(h.$slots, "header"),
|
|
1376
|
+
e.mode !== "sidebar" ? (a(), o("nav", {
|
|
1377
|
+
key: 1,
|
|
1378
|
+
class: "dsea-admin-layout__top-navigation",
|
|
1379
|
+
"aria-label": e.topNavigationLabel
|
|
1380
|
+
}, [
|
|
1381
|
+
B(h.$slots, "topNavigation", {}, () => [
|
|
1382
|
+
$(te, {
|
|
1383
|
+
items: e.mode === "top" ? e.menus : e.topMenus,
|
|
1384
|
+
mode: "horizontal",
|
|
1385
|
+
type: "top",
|
|
1386
|
+
theme: e.topMenuTheme,
|
|
1387
|
+
onMenuClick: T
|
|
1388
|
+
}, null, 8, ["items", "theme"])
|
|
1389
|
+
])
|
|
1390
|
+
], 8, xt)) : p("", !0),
|
|
1391
|
+
s("div", At, [
|
|
1392
|
+
B(h.$slots, "headerActions")
|
|
1393
|
+
])
|
|
1394
|
+
])),
|
|
1395
|
+
!e.fullContent && h.$slots.tabs ? (a(), o("div", Mt, [
|
|
1396
|
+
B(h.$slots, "tabs")
|
|
1397
|
+
])) : p("", !0),
|
|
1398
|
+
s("main", Tt, [
|
|
1399
|
+
B(h.$slots, "default")
|
|
1400
|
+
]),
|
|
1401
|
+
!e.fullContent && h.$slots.footer ? (a(), o("footer", Bt, [
|
|
1402
|
+
B(h.$slots, "footer")
|
|
1403
|
+
])) : p("", !0)
|
|
1404
|
+
])
|
|
1405
|
+
], 6));
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
const Pt = ["aria-label"], It = {
|
|
1409
|
+
key: 0,
|
|
1410
|
+
class: "dsea-breadcrumb__separator",
|
|
1411
|
+
"aria-hidden": "true"
|
|
1412
|
+
}, Et = ["onClick"], Ft = ["aria-current"], Nt = /* @__PURE__ */ k({
|
|
1413
|
+
__name: "AdminBreadcrumb",
|
|
1414
|
+
props: {
|
|
1415
|
+
items: {},
|
|
1416
|
+
label: {}
|
|
1417
|
+
},
|
|
1418
|
+
setup(e) {
|
|
1419
|
+
const { ports: c } = q();
|
|
1420
|
+
function t(i) {
|
|
1421
|
+
c.navigation.go(i);
|
|
1422
|
+
}
|
|
1423
|
+
return (i, l) => e.items.length ? (a(), o("nav", {
|
|
1424
|
+
key: 0,
|
|
1425
|
+
class: "dsea-breadcrumb",
|
|
1426
|
+
"aria-label": e.label
|
|
1427
|
+
}, [
|
|
1428
|
+
s("ol", null, [
|
|
1429
|
+
(a(!0), o(x, null, M(e.items, (r, n) => (a(), o("li", {
|
|
1430
|
+
key: r.path || n
|
|
1431
|
+
}, [
|
|
1432
|
+
n ? (a(), o("span", It, "/")) : p("", !0),
|
|
1433
|
+
r.path && n < e.items.length - 1 ? (a(), o("button", {
|
|
1434
|
+
key: 1,
|
|
1435
|
+
type: "button",
|
|
1436
|
+
onClick: (u) => t(r.path)
|
|
1437
|
+
}, d(r.title), 9, Et)) : (a(), o("span", {
|
|
1438
|
+
key: 2,
|
|
1439
|
+
"aria-current": n === e.items.length - 1 ? "page" : void 0
|
|
1440
|
+
}, d(r.title), 9, Ft))
|
|
1441
|
+
]))), 128))
|
|
1442
|
+
])
|
|
1443
|
+
], 8, Pt)) : p("", !0);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { class: "dsea-iframe-view" }, Dt = ["src", "title", "loading", "referrerpolicy"], Kt = /* @__PURE__ */ k({
|
|
1447
|
+
__name: "AdminIframeView",
|
|
1448
|
+
props: {
|
|
1449
|
+
src: {},
|
|
1450
|
+
title: {},
|
|
1451
|
+
loading: { default: "eager" },
|
|
1452
|
+
referrerPolicy: { default: "strict-origin-when-cross-origin" }
|
|
1453
|
+
},
|
|
1454
|
+
emits: ["load"],
|
|
1455
|
+
setup(e, { emit: c }) {
|
|
1456
|
+
const t = e, i = c, l = I(() => {
|
|
1457
|
+
var n;
|
|
1458
|
+
const r = ((n = t.src) == null ? void 0 : n.trim()) ?? "";
|
|
1459
|
+
return X(r) || (r.startsWith("/") && !r.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(r) ? r : "");
|
|
1460
|
+
});
|
|
1461
|
+
return (r, n) => (a(), o("div", zt, [
|
|
1462
|
+
l.value ? (a(), o("iframe", {
|
|
1463
|
+
key: l.value,
|
|
1464
|
+
src: l.value,
|
|
1465
|
+
title: e.title,
|
|
1466
|
+
loading: e.loading,
|
|
1467
|
+
referrerpolicy: e.referrerPolicy,
|
|
1468
|
+
onLoad: n[0] || (n[0] = (u) => i("load"))
|
|
1469
|
+
}, null, 40, Dt)) : B(r.$slots, "invalid", {}, void 0, !0, 1)
|
|
1470
|
+
]));
|
|
1471
|
+
}
|
|
1472
|
+
});
|
|
1473
|
+
const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { class: "dsea-login-view" }, Rt = { class: "dsea-login-view__identity" }, Ut = {
|
|
1474
|
+
key: 0,
|
|
1475
|
+
class: "dsea-login-view__subtitle"
|
|
1476
|
+
}, qt = ["for"], Wt = ["id", "disabled"], Ot = ["for"], Ht = ["id", "disabled"], jt = {
|
|
1477
|
+
key: 1,
|
|
1478
|
+
class: "dsea-login-view__error",
|
|
1479
|
+
role: "alert"
|
|
1480
|
+
}, Qt = ["disabled"], Gt = {
|
|
1481
|
+
key: 2,
|
|
1482
|
+
class: "dsea-login-view__footer"
|
|
1483
|
+
}, Xt = /* @__PURE__ */ k({
|
|
1484
|
+
__name: "AdminLoginView",
|
|
1485
|
+
props: {
|
|
1486
|
+
title: {},
|
|
1487
|
+
subtitle: {},
|
|
1488
|
+
usernameLabel: { default: "Username" },
|
|
1489
|
+
passwordLabel: { default: "Password" },
|
|
1490
|
+
submitLabel: { default: "Sign in" },
|
|
1491
|
+
loadingLabel: { default: "Signing in" },
|
|
1492
|
+
loading: { type: Boolean },
|
|
1493
|
+
error: {},
|
|
1494
|
+
formId: { default: "admin-login" }
|
|
1495
|
+
},
|
|
1496
|
+
emits: ["submit"],
|
|
1497
|
+
setup(e, { emit: c }) {
|
|
1498
|
+
const t = c, i = S(""), l = S("");
|
|
1499
|
+
function r() {
|
|
1500
|
+
t("submit", { username: i.value, password: l.value });
|
|
1501
|
+
}
|
|
1502
|
+
return (n, u) => (a(), o("main", Vt, [
|
|
1503
|
+
s("form", {
|
|
1504
|
+
class: "dsea-login-view__form",
|
|
1505
|
+
onSubmit: H(r, ["prevent"])
|
|
1506
|
+
}, [
|
|
1507
|
+
s("div", Rt, [
|
|
1508
|
+
B(n.$slots, "brand", {}, void 0, !0)
|
|
1509
|
+
]),
|
|
1510
|
+
s("h1", null, d(e.title), 1),
|
|
1511
|
+
e.subtitle ? (a(), o("p", Ut, d(e.subtitle), 1)) : p("", !0),
|
|
1512
|
+
s("label", {
|
|
1513
|
+
for: `${e.formId}-username`
|
|
1514
|
+
}, d(e.usernameLabel), 9, qt),
|
|
1515
|
+
K(s("input", {
|
|
1516
|
+
id: `${e.formId}-username`,
|
|
1517
|
+
"onUpdate:modelValue": u[0] || (u[0] = (b) => i.value = b),
|
|
1518
|
+
type: "text",
|
|
1519
|
+
name: "username",
|
|
1520
|
+
autocomplete: "username",
|
|
1521
|
+
required: "",
|
|
1522
|
+
disabled: e.loading
|
|
1523
|
+
}, null, 8, Wt), [
|
|
1524
|
+
[
|
|
1525
|
+
V,
|
|
1526
|
+
i.value,
|
|
1527
|
+
void 0,
|
|
1528
|
+
{ trim: !0 }
|
|
1529
|
+
]
|
|
1530
|
+
]),
|
|
1531
|
+
s("label", {
|
|
1532
|
+
for: `${e.formId}-password`
|
|
1533
|
+
}, d(e.passwordLabel), 9, Ot),
|
|
1534
|
+
K(s("input", {
|
|
1535
|
+
id: `${e.formId}-password`,
|
|
1536
|
+
"onUpdate:modelValue": u[1] || (u[1] = (b) => l.value = b),
|
|
1537
|
+
type: "password",
|
|
1538
|
+
name: "password",
|
|
1539
|
+
autocomplete: "current-password",
|
|
1540
|
+
required: "",
|
|
1541
|
+
disabled: e.loading
|
|
1542
|
+
}, null, 8, Ht), [
|
|
1543
|
+
[V, l.value]
|
|
1544
|
+
]),
|
|
1545
|
+
e.error ? (a(), o("p", jt, d(e.error), 1)) : p("", !0),
|
|
1546
|
+
s("button", {
|
|
1547
|
+
type: "submit",
|
|
1548
|
+
disabled: e.loading
|
|
1549
|
+
}, d(e.loading ? e.loadingLabel : e.submitLabel), 9, Qt),
|
|
1550
|
+
n.$slots.footer ? (a(), o("div", Gt, [
|
|
1551
|
+
B(n.$slots, "footer", {}, void 0, !0)
|
|
1552
|
+
])) : p("", !0)
|
|
1553
|
+
], 32)
|
|
1554
|
+
]));
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { class: "dsea-lock-view" }, Jt = { key: 0 }, Zt = ["for"], ea = ["id", "disabled"], ta = {
|
|
1558
|
+
key: 1,
|
|
1559
|
+
class: "dsea-lock-view__error",
|
|
1560
|
+
role: "alert"
|
|
1561
|
+
}, aa = ["disabled"], na = /* @__PURE__ */ k({
|
|
1562
|
+
__name: "AdminLockView",
|
|
1563
|
+
props: {
|
|
1564
|
+
title: {},
|
|
1565
|
+
identity: {},
|
|
1566
|
+
passwordLabel: { default: "Password" },
|
|
1567
|
+
unlockLabel: { default: "Unlock" },
|
|
1568
|
+
switchLabel: {},
|
|
1569
|
+
loading: { type: Boolean },
|
|
1570
|
+
error: {},
|
|
1571
|
+
formId: { default: "admin-lock" }
|
|
1572
|
+
},
|
|
1573
|
+
emits: ["unlock", "switchAccount"],
|
|
1574
|
+
setup(e, { emit: c }) {
|
|
1575
|
+
const t = c, i = S("");
|
|
1576
|
+
function l() {
|
|
1577
|
+
t("unlock", i.value);
|
|
1578
|
+
}
|
|
1579
|
+
return (r, n) => (a(), o("main", Yt, [
|
|
1580
|
+
s("form", {
|
|
1581
|
+
class: "dsea-lock-view__form",
|
|
1582
|
+
onSubmit: H(l, ["prevent"])
|
|
1583
|
+
}, [
|
|
1584
|
+
B(r.$slots, "avatar", {}, void 0, !0),
|
|
1585
|
+
s("h1", null, d(e.title), 1),
|
|
1586
|
+
e.identity ? (a(), o("p", Jt, d(e.identity), 1)) : p("", !0),
|
|
1587
|
+
s("label", {
|
|
1588
|
+
for: `${e.formId}-password`
|
|
1589
|
+
}, d(e.passwordLabel), 9, Zt),
|
|
1590
|
+
K(s("input", {
|
|
1591
|
+
id: `${e.formId}-password`,
|
|
1592
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => i.value = u),
|
|
1593
|
+
type: "password",
|
|
1594
|
+
autocomplete: "current-password",
|
|
1595
|
+
required: "",
|
|
1596
|
+
disabled: e.loading
|
|
1597
|
+
}, null, 8, ea), [
|
|
1598
|
+
[V, i.value]
|
|
1599
|
+
]),
|
|
1600
|
+
e.error ? (a(), o("p", ta, d(e.error), 1)) : p("", !0),
|
|
1601
|
+
s("button", {
|
|
1602
|
+
type: "submit",
|
|
1603
|
+
disabled: e.loading
|
|
1604
|
+
}, d(e.unlockLabel), 9, aa),
|
|
1605
|
+
e.switchLabel ? (a(), o("button", {
|
|
1606
|
+
key: 2,
|
|
1607
|
+
type: "button",
|
|
1608
|
+
class: "dsea-lock-view__switch",
|
|
1609
|
+
onClick: n[1] || (n[1] = (u) => t("switchAccount"))
|
|
1610
|
+
}, d(e.switchLabel), 1)) : p("", !0)
|
|
1611
|
+
], 32)
|
|
1612
|
+
]));
|
|
1613
|
+
}
|
|
1614
|
+
});
|
|
1615
|
+
const rl = /* @__PURE__ */ A(na, [["__scopeId", "data-v-e70aeaca"]]), la = { class: "dsea-exception-view" }, oa = { class: "dsea-exception-view__content" }, sa = { class: "dsea-exception-view__status" }, ia = {
|
|
1616
|
+
key: 0,
|
|
1617
|
+
class: "dsea-exception-view__description"
|
|
1618
|
+
}, ra = /* @__PURE__ */ k({
|
|
1619
|
+
__name: "AdminExceptionView",
|
|
1620
|
+
props: {
|
|
1621
|
+
status: {},
|
|
1622
|
+
title: {},
|
|
1623
|
+
description: {},
|
|
1624
|
+
actionLabel: {}
|
|
1625
|
+
},
|
|
1626
|
+
emits: ["action"],
|
|
1627
|
+
setup(e, { emit: c }) {
|
|
1628
|
+
const t = c;
|
|
1629
|
+
return (i, l) => (a(), o("main", la, [
|
|
1630
|
+
s("div", oa, [
|
|
1631
|
+
s("p", sa, d(e.status), 1),
|
|
1632
|
+
s("h1", null, d(e.title), 1),
|
|
1633
|
+
e.description ? (a(), o("p", ia, d(e.description), 1)) : p("", !0),
|
|
1634
|
+
e.actionLabel ? (a(), o("button", {
|
|
1635
|
+
key: 1,
|
|
1636
|
+
type: "button",
|
|
1637
|
+
onClick: l[0] || (l[0] = (r) => t("action"))
|
|
1638
|
+
}, d(e.actionLabel), 1)) : p("", !0)
|
|
1639
|
+
])
|
|
1640
|
+
]));
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1643
|
+
const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { class: "dsea-profile-tabs" }, ca = {
|
|
1644
|
+
key: 0,
|
|
1645
|
+
class: "dsea-profile-tabs__notice",
|
|
1646
|
+
role: "status"
|
|
1647
|
+
}, ua = { class: "dsea-profile-tabs__body" }, ma = ["aria-label"], ba = ["aria-current", "onClick"], va = ["aria-label"], pa = /* @__PURE__ */ k({
|
|
1648
|
+
__name: "AdminProfileTabs",
|
|
1649
|
+
props: {
|
|
1650
|
+
tabs: {},
|
|
1651
|
+
activeKey: {},
|
|
1652
|
+
label: { default: "Profile settings" },
|
|
1653
|
+
notice: {}
|
|
1654
|
+
},
|
|
1655
|
+
emits: ["update:activeKey"],
|
|
1656
|
+
setup(e, { emit: c }) {
|
|
1657
|
+
const t = e, i = c, l = I(() => t.tabs.find((r) => r.key === t.activeKey));
|
|
1658
|
+
return (r, n) => {
|
|
1659
|
+
var u;
|
|
1660
|
+
return a(), o("div", da, [
|
|
1661
|
+
e.notice ? (a(), o("p", ca, d(e.notice), 1)) : p("", !0),
|
|
1662
|
+
s("div", ua, [
|
|
1663
|
+
s("nav", { "aria-label": e.label }, [
|
|
1664
|
+
(a(!0), o(x, null, M(e.tabs, (b) => (a(), o("button", {
|
|
1665
|
+
key: b.key,
|
|
1666
|
+
type: "button",
|
|
1667
|
+
"aria-current": b.key === e.activeKey ? "page" : void 0,
|
|
1668
|
+
onClick: (g) => i("update:activeKey", b.key)
|
|
1669
|
+
}, d(b.label), 9, ba))), 128))
|
|
1670
|
+
], 8, ma),
|
|
1671
|
+
s("section", {
|
|
1672
|
+
"aria-label": (u = l.value) == null ? void 0 : u.label
|
|
1673
|
+
}, [
|
|
1674
|
+
l.value ? (a(), P(he(l.value.component), { key: 0 })) : B(r.$slots, "default", {}, void 0, !0, 1)
|
|
1675
|
+
], 8, va)
|
|
1676
|
+
])
|
|
1677
|
+
]);
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key: 0 }, ha = ["value"], fa = { key: 1 }, ya = {
|
|
1682
|
+
key: 2,
|
|
1683
|
+
class: "dsea-profile-form__avatar"
|
|
1684
|
+
}, ka = {
|
|
1685
|
+
key: 3,
|
|
1686
|
+
role: "alert"
|
|
1687
|
+
}, _a = ["disabled"], wa = /* @__PURE__ */ k({
|
|
1688
|
+
__name: "AdminProfileForm",
|
|
1689
|
+
props: {
|
|
1690
|
+
name: {},
|
|
1691
|
+
email: {},
|
|
1692
|
+
phone: {},
|
|
1693
|
+
requireCurrentPassword: { type: Boolean },
|
|
1694
|
+
saving: { type: Boolean },
|
|
1695
|
+
error: {},
|
|
1696
|
+
labels: { default: () => ({ name: "Name", email: "Email", phone: "Phone", currentPassword: "Current password", save: "Save changes", saving: "Saving" }) }
|
|
1697
|
+
},
|
|
1698
|
+
emits: ["submit"],
|
|
1699
|
+
setup(e, { emit: c }) {
|
|
1700
|
+
const t = e, i = c, l = oe({ name: t.name, email: t.email, currentPassword: "" });
|
|
1701
|
+
U(() => [t.name, t.email], () => {
|
|
1702
|
+
l.name = t.name, l.email = t.email;
|
|
1703
|
+
});
|
|
1704
|
+
function r() {
|
|
1705
|
+
t.saving || (i("submit", {
|
|
1706
|
+
name: l.name.trim(),
|
|
1707
|
+
email: l.email.trim(),
|
|
1708
|
+
...t.requireCurrentPassword ? { currentPassword: l.currentPassword } : {}
|
|
1709
|
+
}), l.currentPassword = "");
|
|
1710
|
+
}
|
|
1711
|
+
return (n, u) => (a(), o("form", {
|
|
1712
|
+
class: "dsea-profile-form",
|
|
1713
|
+
onSubmit: H(r, ["prevent"])
|
|
1714
|
+
}, [
|
|
1715
|
+
s("label", null, [
|
|
1716
|
+
z(d(e.labels.name), 1),
|
|
1717
|
+
K(s("input", {
|
|
1718
|
+
"onUpdate:modelValue": u[0] || (u[0] = (b) => l.name = b),
|
|
1719
|
+
type: "text",
|
|
1720
|
+
required: "",
|
|
1721
|
+
maxlength: "100",
|
|
1722
|
+
autocomplete: "name"
|
|
1723
|
+
}, null, 512), [
|
|
1724
|
+
[
|
|
1725
|
+
V,
|
|
1726
|
+
l.name,
|
|
1727
|
+
void 0,
|
|
1728
|
+
{ trim: !0 }
|
|
1729
|
+
]
|
|
1730
|
+
])
|
|
1731
|
+
]),
|
|
1732
|
+
s("label", null, [
|
|
1733
|
+
z(d(e.labels.email), 1),
|
|
1734
|
+
K(s("input", {
|
|
1735
|
+
"onUpdate:modelValue": u[1] || (u[1] = (b) => l.email = b),
|
|
1736
|
+
type: "email",
|
|
1737
|
+
autocomplete: "email"
|
|
1738
|
+
}, null, 512), [
|
|
1739
|
+
[
|
|
1740
|
+
V,
|
|
1741
|
+
l.email,
|
|
1742
|
+
void 0,
|
|
1743
|
+
{ trim: !0 }
|
|
1744
|
+
]
|
|
1745
|
+
])
|
|
1746
|
+
]),
|
|
1747
|
+
e.phone !== void 0 ? (a(), o("label", ga, [
|
|
1748
|
+
z(d(e.labels.phone), 1),
|
|
1749
|
+
s("input", {
|
|
1750
|
+
value: e.phone,
|
|
1751
|
+
type: "tel",
|
|
1752
|
+
disabled: "",
|
|
1753
|
+
autocomplete: "tel"
|
|
1754
|
+
}, null, 8, ha)
|
|
1755
|
+
])) : p("", !0),
|
|
1756
|
+
e.requireCurrentPassword ? (a(), o("label", fa, [
|
|
1757
|
+
z(d(e.labels.currentPassword), 1),
|
|
1758
|
+
K(s("input", {
|
|
1759
|
+
"onUpdate:modelValue": u[2] || (u[2] = (b) => l.currentPassword = b),
|
|
1760
|
+
type: "password",
|
|
1761
|
+
required: "",
|
|
1762
|
+
autocomplete: "current-password"
|
|
1763
|
+
}, null, 512), [
|
|
1764
|
+
[V, l.currentPassword]
|
|
1765
|
+
])
|
|
1766
|
+
])) : p("", !0),
|
|
1767
|
+
n.$slots.avatar ? (a(), o("div", ya, [
|
|
1768
|
+
B(n.$slots, "avatar", {}, void 0, !0)
|
|
1769
|
+
])) : p("", !0),
|
|
1770
|
+
e.error ? (a(), o("p", ka, d(e.error), 1)) : p("", !0),
|
|
1771
|
+
s("button", {
|
|
1772
|
+
type: "submit",
|
|
1773
|
+
disabled: e.saving
|
|
1774
|
+
}, d(e.saving ? e.labels.saving : e.labels.save), 9, _a)
|
|
1775
|
+
], 32));
|
|
1776
|
+
}
|
|
1777
|
+
});
|
|
1778
|
+
const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
|
|
1779
|
+
key: 0,
|
|
1780
|
+
role: "alert"
|
|
1781
|
+
}, La = ["disabled"], Ca = /* @__PURE__ */ k({
|
|
1782
|
+
__name: "AdminPasswordForm",
|
|
1783
|
+
props: {
|
|
1784
|
+
minBytes: { default: 10 },
|
|
1785
|
+
maxBytes: { default: 72 },
|
|
1786
|
+
saving: { type: Boolean },
|
|
1787
|
+
error: {},
|
|
1788
|
+
labels: { default: () => ({ current: "Current password", next: "New password", confirm: "Confirm password", save: "Change password", saving: "Saving", mismatch: "Passwords do not match", length: "Password length is invalid" }) }
|
|
1789
|
+
},
|
|
1790
|
+
emits: ["submit"],
|
|
1791
|
+
setup(e, { expose: c, emit: t }) {
|
|
1792
|
+
const i = e, l = t, r = S(""), n = S(""), u = S(""), b = S("");
|
|
1793
|
+
function g() {
|
|
1794
|
+
if (i.saving)
|
|
1795
|
+
return;
|
|
1796
|
+
const m = new TextEncoder().encode(n.value).length;
|
|
1797
|
+
if (m < i.minBytes || m > i.maxBytes) {
|
|
1798
|
+
b.value = i.labels.length;
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1801
|
+
if (n.value !== u.value) {
|
|
1802
|
+
b.value = i.labels.mismatch;
|
|
1803
|
+
return;
|
|
1804
|
+
}
|
|
1805
|
+
b.value = "", l("submit", { currentPassword: r.value, password: n.value });
|
|
1806
|
+
}
|
|
1807
|
+
function v() {
|
|
1808
|
+
r.value = "", n.value = "", u.value = "", b.value = "";
|
|
1809
|
+
}
|
|
1810
|
+
return c({ reset: v }), (m, L) => (a(), o("form", {
|
|
1811
|
+
class: "dsea-password-form",
|
|
1812
|
+
onSubmit: H(g, ["prevent"])
|
|
1813
|
+
}, [
|
|
1814
|
+
s("label", null, [
|
|
1815
|
+
z(d(e.labels.current), 1),
|
|
1816
|
+
K(s("input", {
|
|
1817
|
+
"onUpdate:modelValue": L[0] || (L[0] = (F) => r.value = F),
|
|
1818
|
+
type: "password",
|
|
1819
|
+
required: "",
|
|
1820
|
+
autocomplete: "current-password"
|
|
1821
|
+
}, null, 512), [
|
|
1822
|
+
[V, r.value]
|
|
1823
|
+
])
|
|
1824
|
+
]),
|
|
1825
|
+
s("label", null, [
|
|
1826
|
+
z(d(e.labels.next), 1),
|
|
1827
|
+
K(s("input", {
|
|
1828
|
+
"onUpdate:modelValue": L[1] || (L[1] = (F) => n.value = F),
|
|
1829
|
+
type: "password",
|
|
1830
|
+
required: "",
|
|
1831
|
+
autocomplete: "new-password"
|
|
1832
|
+
}, null, 512), [
|
|
1833
|
+
[V, n.value]
|
|
1834
|
+
])
|
|
1835
|
+
]),
|
|
1836
|
+
s("label", null, [
|
|
1837
|
+
z(d(e.labels.confirm), 1),
|
|
1838
|
+
K(s("input", {
|
|
1839
|
+
"onUpdate:modelValue": L[2] || (L[2] = (F) => u.value = F),
|
|
1840
|
+
type: "password",
|
|
1841
|
+
required: "",
|
|
1842
|
+
autocomplete: "new-password"
|
|
1843
|
+
}, null, 512), [
|
|
1844
|
+
[V, u.value]
|
|
1845
|
+
])
|
|
1846
|
+
]),
|
|
1847
|
+
b.value || e.error ? (a(), o("p", $a, d(b.value || e.error), 1)) : p("", !0),
|
|
1848
|
+
s("button", {
|
|
1849
|
+
type: "submit",
|
|
1850
|
+
disabled: e.saving
|
|
1851
|
+
}, d(e.saving ? e.labels.saving : e.labels.save), 9, La)
|
|
1852
|
+
], 32));
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
const ml = /* @__PURE__ */ A(Ca, [["__scopeId", "data-v-3eb63418"]]), Sa = ["aria-label"], xa = ["onClick"], Aa = /* @__PURE__ */ k({
|
|
1856
|
+
__name: "AdminSecuritySettings",
|
|
1857
|
+
props: {
|
|
1858
|
+
items: {},
|
|
1859
|
+
label: { default: "Security settings" }
|
|
1860
|
+
},
|
|
1861
|
+
emits: ["action"],
|
|
1862
|
+
setup(e, { emit: c }) {
|
|
1863
|
+
const t = c;
|
|
1864
|
+
return (i, l) => (a(), o("section", {
|
|
1865
|
+
class: "dsea-security-settings",
|
|
1866
|
+
"aria-label": e.label
|
|
1867
|
+
}, [
|
|
1868
|
+
(a(!0), o(x, null, M(e.items, (r) => (a(), o("div", {
|
|
1869
|
+
key: r.key,
|
|
1870
|
+
class: "dsea-security-settings__row"
|
|
1871
|
+
}, [
|
|
1872
|
+
s("div", null, [
|
|
1873
|
+
s("strong", null, d(r.title), 1),
|
|
1874
|
+
s("p", null, d(r.description), 1)
|
|
1875
|
+
]),
|
|
1876
|
+
r.action ? (a(), o("button", {
|
|
1877
|
+
key: 0,
|
|
1878
|
+
type: "button",
|
|
1879
|
+
onClick: (n) => t("action", r.key)
|
|
1880
|
+
}, d(r.action), 9, xa)) : p("", !0)
|
|
1881
|
+
]))), 128))
|
|
1882
|
+
], 8, Sa));
|
|
1883
|
+
}
|
|
1884
|
+
});
|
|
1885
|
+
const bl = /* @__PURE__ */ A(Aa, [["__scopeId", "data-v-9de763c2"]]), Ma = ["aria-label"], Ta = ["disabled"], Ba = { class: "dsea-error-log__table-wrap" }, Pa = { scope: "col" }, Ia = { scope: "col" }, Ea = { scope: "col" }, Fa = ["onClick"], Na = { key: 0 }, za = {
|
|
1886
|
+
colspan: "4",
|
|
1887
|
+
class: "dsea-error-log__empty"
|
|
1888
|
+
}, Da = ["aria-label"], Ka = ["aria-label"], Va = { key: 0 }, Ra = /* @__PURE__ */ k({
|
|
1889
|
+
__name: "AdminErrorLogView",
|
|
1890
|
+
props: {
|
|
1891
|
+
entries: {},
|
|
1892
|
+
title: { default: "Error log" },
|
|
1893
|
+
clearLabel: { default: "Clear" },
|
|
1894
|
+
timeLabel: { default: "Time" },
|
|
1895
|
+
messageLabel: { default: "Message" },
|
|
1896
|
+
sourceLabel: { default: "Source" },
|
|
1897
|
+
detailsLabel: { default: "Details" },
|
|
1898
|
+
closeLabel: { default: "Close" },
|
|
1899
|
+
emptyLabel: { default: "No errors" }
|
|
1900
|
+
},
|
|
1901
|
+
emits: ["clear"],
|
|
1902
|
+
setup(e, { emit: c }) {
|
|
1903
|
+
const t = c, i = S(null), l = S();
|
|
1904
|
+
return U(i, async (r) => {
|
|
1905
|
+
var n;
|
|
1906
|
+
r && (await se(), (n = l.value) == null || n.focus());
|
|
1907
|
+
}), (r, n) => (a(), o("section", {
|
|
1908
|
+
class: "dsea-error-log",
|
|
1909
|
+
"aria-label": e.title
|
|
1910
|
+
}, [
|
|
1911
|
+
s("header", null, [
|
|
1912
|
+
s("h1", null, d(e.title), 1),
|
|
1913
|
+
s("button", {
|
|
1914
|
+
type: "button",
|
|
1915
|
+
disabled: !e.entries.length,
|
|
1916
|
+
onClick: n[0] || (n[0] = (u) => t("clear"))
|
|
1917
|
+
}, d(e.clearLabel), 9, Ta)
|
|
1918
|
+
]),
|
|
1919
|
+
s("div", Ba, [
|
|
1920
|
+
s("table", null, [
|
|
1921
|
+
s("thead", null, [
|
|
1922
|
+
s("tr", null, [
|
|
1923
|
+
s("th", Pa, d(e.timeLabel), 1),
|
|
1924
|
+
s("th", Ia, d(e.messageLabel), 1),
|
|
1925
|
+
s("th", Ea, d(e.sourceLabel), 1),
|
|
1926
|
+
n[4] || (n[4] = s("th", { scope: "col" }, null, -1))
|
|
1927
|
+
])
|
|
1928
|
+
]),
|
|
1929
|
+
s("tbody", null, [
|
|
1930
|
+
(a(!0), o(x, null, M(e.entries, (u) => (a(), o("tr", {
|
|
1931
|
+
key: u.id
|
|
1932
|
+
}, [
|
|
1933
|
+
s("td", null, d(u.time), 1),
|
|
1934
|
+
s("td", null, d(u.message), 1),
|
|
1935
|
+
s("td", null, d(u.source), 1),
|
|
1936
|
+
s("td", null, [
|
|
1937
|
+
s("button", {
|
|
1938
|
+
type: "button",
|
|
1939
|
+
onClick: (b) => i.value = u
|
|
1940
|
+
}, d(e.detailsLabel), 9, Fa)
|
|
1941
|
+
])
|
|
1942
|
+
]))), 128)),
|
|
1943
|
+
e.entries.length ? p("", !0) : (a(), o("tr", Na, [
|
|
1944
|
+
s("td", za, d(e.emptyLabel), 1)
|
|
1945
|
+
]))
|
|
1946
|
+
])
|
|
1947
|
+
])
|
|
1948
|
+
]),
|
|
1949
|
+
i.value ? (a(), o("div", {
|
|
1950
|
+
key: 0,
|
|
1951
|
+
class: "dsea-error-log__backdrop",
|
|
1952
|
+
onClick: n[3] || (n[3] = H((u) => i.value = null, ["self"]))
|
|
1953
|
+
}, [
|
|
1954
|
+
s("section", {
|
|
1955
|
+
ref_key: "dialog",
|
|
1956
|
+
ref: l,
|
|
1957
|
+
role: "dialog",
|
|
1958
|
+
"aria-modal": "true",
|
|
1959
|
+
"aria-label": e.detailsLabel,
|
|
1960
|
+
tabindex: "-1",
|
|
1961
|
+
class: "dsea-error-log__dialog",
|
|
1962
|
+
onKeydown: n[2] || (n[2] = J((u) => i.value = null, ["esc"]))
|
|
1963
|
+
}, [
|
|
1964
|
+
s("header", null, [
|
|
1965
|
+
s("h2", null, d(i.value.message), 1),
|
|
1966
|
+
s("button", {
|
|
1967
|
+
type: "button",
|
|
1968
|
+
"aria-label": e.closeLabel,
|
|
1969
|
+
onClick: n[1] || (n[1] = (u) => i.value = null)
|
|
1970
|
+
}, [
|
|
1971
|
+
$(y(w), {
|
|
1972
|
+
icon: "lucide:x",
|
|
1973
|
+
size: 18
|
|
1974
|
+
})
|
|
1975
|
+
], 8, Ka)
|
|
1976
|
+
]),
|
|
1977
|
+
s("dl", null, [
|
|
1978
|
+
s("dt", null, d(e.timeLabel), 1),
|
|
1979
|
+
s("dd", null, d(i.value.time), 1),
|
|
1980
|
+
s("dt", null, d(e.sourceLabel), 1),
|
|
1981
|
+
s("dd", null, d(i.value.source), 1)
|
|
1982
|
+
]),
|
|
1983
|
+
i.value.details ? (a(), o("pre", Va, d(i.value.details), 1)) : p("", !0)
|
|
1984
|
+
], 40, Da)
|
|
1985
|
+
])) : p("", !0)
|
|
1986
|
+
], 8, Ma));
|
|
1987
|
+
}
|
|
1988
|
+
});
|
|
1989
|
+
const vl = /* @__PURE__ */ A(Ra, [["__scopeId", "data-v-c1b52346"]]), Ua = { class: "dsea-about-view" }, qa = { key: 0 }, Wa = { class: "dsea-about-view__info" }, Oa = ["href"], Ha = {
|
|
1990
|
+
key: 0,
|
|
1991
|
+
class: "dsea-about-view__dependencies"
|
|
1992
|
+
}, ja = /* @__PURE__ */ k({
|
|
1993
|
+
__name: "AdminAboutView",
|
|
1994
|
+
props: {
|
|
1995
|
+
title: {},
|
|
1996
|
+
description: {},
|
|
1997
|
+
version: {},
|
|
1998
|
+
builtAt: {},
|
|
1999
|
+
links: { default: () => [] },
|
|
2000
|
+
dependencies: { default: () => ({}) },
|
|
2001
|
+
versionLabel: { default: "Version" },
|
|
2002
|
+
builtAtLabel: { default: "Built at" },
|
|
2003
|
+
dependenciesLabel: { default: "Dependencies" }
|
|
2004
|
+
},
|
|
2005
|
+
setup(e) {
|
|
2006
|
+
const c = e, t = I(() => c.links.filter((l) => X(l.href))), i = I(() => Object.entries(c.dependencies).sort(([l], [r]) => l.localeCompare(r)));
|
|
2007
|
+
return (l, r) => (a(), o("section", Ua, [
|
|
2008
|
+
s("header", null, [
|
|
2009
|
+
s("h1", null, d(e.title), 1),
|
|
2010
|
+
e.description ? (a(), o("p", qa, d(e.description), 1)) : p("", !0)
|
|
2011
|
+
]),
|
|
2012
|
+
s("dl", Wa, [
|
|
2013
|
+
s("dt", null, d(e.versionLabel), 1),
|
|
2014
|
+
s("dd", null, d(e.version), 1),
|
|
2015
|
+
e.builtAt ? (a(), o(x, { key: 0 }, [
|
|
2016
|
+
s("dt", null, d(e.builtAtLabel), 1),
|
|
2017
|
+
s("dd", null, d(e.builtAt), 1)
|
|
2018
|
+
], 64)) : p("", !0),
|
|
2019
|
+
(a(!0), o(x, null, M(t.value, (n) => (a(), o(x, {
|
|
2020
|
+
key: n.label
|
|
2021
|
+
}, [
|
|
2022
|
+
s("dt", null, d(n.label), 1),
|
|
2023
|
+
s("dd", null, [
|
|
2024
|
+
s("a", {
|
|
2025
|
+
href: n.href,
|
|
2026
|
+
target: "_blank",
|
|
2027
|
+
rel: "noopener noreferrer"
|
|
2028
|
+
}, d(n.label), 9, Oa)
|
|
2029
|
+
])
|
|
2030
|
+
], 64))), 128))
|
|
2031
|
+
]),
|
|
2032
|
+
i.value.length ? (a(), o("section", Ha, [
|
|
2033
|
+
s("h2", null, d(e.dependenciesLabel), 1),
|
|
2034
|
+
s("dl", null, [
|
|
2035
|
+
(a(!0), o(x, null, M(i.value, (n) => (a(), o(x, {
|
|
2036
|
+
key: n[0]
|
|
2037
|
+
}, [
|
|
2038
|
+
s("dt", null, d(n[0]), 1),
|
|
2039
|
+
s("dd", null, d(n[1]), 1)
|
|
2040
|
+
], 64))), 128))
|
|
2041
|
+
])
|
|
2042
|
+
])) : p("", !0)
|
|
2043
|
+
]));
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
2046
|
+
const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["aria-label"], Ga = ["title"], Xa = ["aria-label", "onClick"], Ya = /* @__PURE__ */ k({
|
|
2047
|
+
__name: "AgentAttachmentList",
|
|
2048
|
+
props: {
|
|
2049
|
+
attachments: {},
|
|
2050
|
+
label: { default: "Attachments" },
|
|
2051
|
+
removeLabel: { default: "Remove" }
|
|
2052
|
+
},
|
|
2053
|
+
emits: ["remove"],
|
|
2054
|
+
setup(e, { emit: c }) {
|
|
2055
|
+
const t = c;
|
|
2056
|
+
function i(l) {
|
|
2057
|
+
return l < 1024 ? `${l} B` : l < 1048576 ? `${(l / 1024).toFixed(1)} KB` : `${(l / 1048576).toFixed(1)} MB`;
|
|
2058
|
+
}
|
|
2059
|
+
return (l, r) => e.attachments.length ? (a(), o("ul", {
|
|
2060
|
+
key: 0,
|
|
2061
|
+
class: "dsea-agent-attachments",
|
|
2062
|
+
"aria-label": e.label
|
|
2063
|
+
}, [
|
|
2064
|
+
(a(!0), o(x, null, M(e.attachments, (n) => (a(), o("li", {
|
|
2065
|
+
key: n.id
|
|
2066
|
+
}, [
|
|
2067
|
+
$(y(w), {
|
|
2068
|
+
icon: n.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
|
|
2069
|
+
size: 14
|
|
2070
|
+
}, null, 8, ["icon"]),
|
|
2071
|
+
s("span", {
|
|
2072
|
+
class: "dsea-agent-attachments__name",
|
|
2073
|
+
title: n.name
|
|
2074
|
+
}, d(n.name), 9, Ga),
|
|
2075
|
+
s("small", null, d(i(n.size)), 1),
|
|
2076
|
+
n.status !== "uploading" ? (a(), o("button", {
|
|
2077
|
+
key: 0,
|
|
2078
|
+
type: "button",
|
|
2079
|
+
"aria-label": `${e.removeLabel}: ${n.name}`,
|
|
2080
|
+
onClick: (u) => t("remove", n.id)
|
|
2081
|
+
}, [
|
|
2082
|
+
$(y(w), {
|
|
2083
|
+
icon: "lucide:x",
|
|
2084
|
+
size: 14
|
|
2085
|
+
})
|
|
2086
|
+
], 8, Xa)) : p("", !0)
|
|
2087
|
+
]))), 128))
|
|
2088
|
+
], 8, Qa)) : p("", !0);
|
|
2089
|
+
}
|
|
2090
|
+
});
|
|
2091
|
+
const Ja = /* @__PURE__ */ A(Ya, [["__scopeId", "data-v-23c5547e"]]), Za = { class: "dsea-agent-model-select" }, en = { class: "dsea-agent-model-select__label" }, tn = ["value", "disabled"], an = {
|
|
2092
|
+
value: "",
|
|
2093
|
+
disabled: ""
|
|
2094
|
+
}, nn = ["value"], ln = /* @__PURE__ */ k({
|
|
2095
|
+
__name: "AgentModelSelect",
|
|
2096
|
+
props: {
|
|
2097
|
+
model: {},
|
|
2098
|
+
models: {},
|
|
2099
|
+
disabled: { type: Boolean },
|
|
2100
|
+
loading: { type: Boolean },
|
|
2101
|
+
label: { default: "Model" },
|
|
2102
|
+
placeholder: { default: "Select model" },
|
|
2103
|
+
loadingLabel: { default: "Loading models" }
|
|
2104
|
+
},
|
|
2105
|
+
emits: ["update:model"],
|
|
2106
|
+
setup(e, { emit: c }) {
|
|
2107
|
+
const t = c;
|
|
2108
|
+
function i(l) {
|
|
2109
|
+
t("update:model", l.target.value);
|
|
2110
|
+
}
|
|
2111
|
+
return (l, r) => (a(), o("label", Za, [
|
|
2112
|
+
s("span", en, d(e.label), 1),
|
|
2113
|
+
s("select", {
|
|
2114
|
+
value: e.model,
|
|
2115
|
+
disabled: e.disabled || e.loading,
|
|
2116
|
+
onChange: i
|
|
2117
|
+
}, [
|
|
2118
|
+
s("option", an, d(e.loading ? e.loadingLabel : e.placeholder), 1),
|
|
2119
|
+
(a(!0), o(x, null, M(e.models, (n) => (a(), o("option", {
|
|
2120
|
+
key: n.id,
|
|
2121
|
+
value: n.id
|
|
2122
|
+
}, d(n.name) + d(n.provider ? ` · ${n.provider}` : ""), 9, nn))), 128))
|
|
2123
|
+
], 40, tn)
|
|
2124
|
+
]));
|
|
2125
|
+
}
|
|
2126
|
+
});
|
|
2127
|
+
const on = /* @__PURE__ */ A(ln, [["__scopeId", "data-v-bd9414ff"]]), sn = { class: "dsea-agent-composer" }, rn = ["value", "placeholder", "disabled"], dn = { class: "dsea-agent-composer__toolbar" }, cn = ["disabled", "aria-label", "title"], un = ["value", "aria-label", "disabled"], mn = ["value"], bn = ["disabled", "aria-label", "title"], vn = /* @__PURE__ */ k({
|
|
2128
|
+
__name: "AgentComposer",
|
|
2129
|
+
props: {
|
|
2130
|
+
draft: {},
|
|
2131
|
+
loading: { type: Boolean },
|
|
2132
|
+
disabled: { type: Boolean },
|
|
2133
|
+
waitingApproval: { type: Boolean },
|
|
2134
|
+
model: {},
|
|
2135
|
+
models: { default: () => [] },
|
|
2136
|
+
modelsLoading: { type: Boolean },
|
|
2137
|
+
approvalMode: {},
|
|
2138
|
+
approvalModes: { default: () => [] },
|
|
2139
|
+
attachments: { default: () => [] },
|
|
2140
|
+
placeholder: { default: "Write a message" },
|
|
2141
|
+
waitingLabel: { default: "Review the pending request first" },
|
|
2142
|
+
attachLabel: { default: "Attach files" },
|
|
2143
|
+
attachmentsLabel: { default: "Attachments" },
|
|
2144
|
+
approvalLabel: { default: "Approval mode" },
|
|
2145
|
+
modelLabel: { default: "Model" },
|
|
2146
|
+
sendLabel: { default: "Send" },
|
|
2147
|
+
stopLabel: { default: "Stop" }
|
|
2148
|
+
},
|
|
2149
|
+
emits: ["update:draft", "update:model", "update:approvalMode", "files", "removeAttachment", "send", "stop"],
|
|
2150
|
+
setup(e, { emit: c }) {
|
|
2151
|
+
const t = e, i = c, l = S();
|
|
2152
|
+
function r(b) {
|
|
2153
|
+
i("update:draft", b.target.value);
|
|
2154
|
+
}
|
|
2155
|
+
function n(b) {
|
|
2156
|
+
b.key !== "Enter" || b.shiftKey || b.isComposing || (b.preventDefault(), !t.loading && t.draft.trim() && !t.disabled && !t.waitingApproval && i("send"));
|
|
2157
|
+
}
|
|
2158
|
+
function u(b) {
|
|
2159
|
+
const g = b.target, v = Array.from(g.files ?? []);
|
|
2160
|
+
v.length && i("files", v), g.value = "";
|
|
2161
|
+
}
|
|
2162
|
+
return (b, g) => (a(), o("div", sn, [
|
|
2163
|
+
$(Ja, {
|
|
2164
|
+
attachments: e.attachments,
|
|
2165
|
+
label: e.attachmentsLabel,
|
|
2166
|
+
onRemove: g[0] || (g[0] = (v) => i("removeAttachment", v))
|
|
2167
|
+
}, null, 8, ["attachments", "label"]),
|
|
2168
|
+
s("textarea", {
|
|
2169
|
+
value: e.draft,
|
|
2170
|
+
placeholder: e.waitingApproval ? e.waitingLabel : e.placeholder,
|
|
2171
|
+
disabled: e.disabled || e.waitingApproval,
|
|
2172
|
+
rows: "2",
|
|
2173
|
+
onInput: r,
|
|
2174
|
+
onKeydown: n
|
|
2175
|
+
}, null, 40, rn),
|
|
2176
|
+
s("div", dn, [
|
|
2177
|
+
s("input", {
|
|
2178
|
+
ref_key: "fileInput",
|
|
2179
|
+
ref: l,
|
|
2180
|
+
type: "file",
|
|
2181
|
+
multiple: "",
|
|
2182
|
+
class: "dsea-agent-composer__file-input",
|
|
2183
|
+
onChange: u
|
|
2184
|
+
}, null, 544),
|
|
2185
|
+
s("button", {
|
|
2186
|
+
type: "button",
|
|
2187
|
+
class: "dsea-agent-composer__icon",
|
|
2188
|
+
disabled: e.disabled || e.waitingApproval,
|
|
2189
|
+
"aria-label": e.attachLabel,
|
|
2190
|
+
title: e.attachLabel,
|
|
2191
|
+
onClick: g[1] || (g[1] = (v) => {
|
|
2192
|
+
var m;
|
|
2193
|
+
return (m = l.value) == null ? void 0 : m.click();
|
|
2194
|
+
})
|
|
2195
|
+
}, [
|
|
2196
|
+
$(y(w), {
|
|
2197
|
+
icon: "lucide:paperclip",
|
|
2198
|
+
size: 18
|
|
2199
|
+
})
|
|
2200
|
+
], 8, cn),
|
|
2201
|
+
s("select", {
|
|
2202
|
+
value: e.approvalMode,
|
|
2203
|
+
"aria-label": e.approvalLabel,
|
|
2204
|
+
disabled: e.disabled || e.waitingApproval,
|
|
2205
|
+
onChange: g[2] || (g[2] = (v) => i("update:approvalMode", v.target.value))
|
|
2206
|
+
}, [
|
|
2207
|
+
(a(!0), o(x, null, M(e.approvalModes, (v) => (a(), o("option", {
|
|
2208
|
+
key: v.value,
|
|
2209
|
+
value: v.value
|
|
2210
|
+
}, d(v.label), 9, mn))), 128))
|
|
2211
|
+
], 40, un),
|
|
2212
|
+
$(on, {
|
|
2213
|
+
model: e.model,
|
|
2214
|
+
models: e.models,
|
|
2215
|
+
loading: e.modelsLoading,
|
|
2216
|
+
disabled: e.disabled || e.loading || e.waitingApproval,
|
|
2217
|
+
label: e.modelLabel,
|
|
2218
|
+
"onUpdate:model": g[3] || (g[3] = (v) => i("update:model", v))
|
|
2219
|
+
}, null, 8, ["model", "models", "loading", "disabled", "label"]),
|
|
2220
|
+
s("button", {
|
|
2221
|
+
type: "button",
|
|
2222
|
+
class: "dsea-agent-composer__send",
|
|
2223
|
+
disabled: !e.loading && (!e.draft.trim() || e.disabled || e.waitingApproval),
|
|
2224
|
+
"aria-label": e.loading ? e.stopLabel : e.sendLabel,
|
|
2225
|
+
title: e.loading ? e.stopLabel : e.sendLabel,
|
|
2226
|
+
onClick: g[4] || (g[4] = (v) => i(e.loading ? "stop" : "send"))
|
|
2227
|
+
}, [
|
|
2228
|
+
$(y(w), {
|
|
2229
|
+
icon: e.loading ? "lucide:square" : "lucide:send",
|
|
2230
|
+
size: 18
|
|
2231
|
+
}, null, 8, ["icon"])
|
|
2232
|
+
], 8, bn)
|
|
2233
|
+
])
|
|
2234
|
+
]));
|
|
2235
|
+
}
|
|
2236
|
+
});
|
|
2237
|
+
const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key: 0 }, gn = { class: "dsea-agent-approval__status" }, hn = {
|
|
2238
|
+
key: 0,
|
|
2239
|
+
class: "dsea-agent-approval__tool"
|
|
2240
|
+
}, fn = { key: 1 }, yn = {
|
|
2241
|
+
key: 2,
|
|
2242
|
+
class: "dsea-agent-approval__meta"
|
|
2243
|
+
}, kn = {
|
|
2244
|
+
key: 3,
|
|
2245
|
+
class: "dsea-agent-approval__reason"
|
|
2246
|
+
}, _n = { key: 4 }, wn = ["disabled"], $n = ["disabled"], Ln = /* @__PURE__ */ k({
|
|
2247
|
+
__name: "AgentApprovalCard",
|
|
2248
|
+
props: {
|
|
2249
|
+
approval: {},
|
|
2250
|
+
busy: { type: Boolean },
|
|
2251
|
+
labels: {}
|
|
2252
|
+
},
|
|
2253
|
+
emits: ["resolve"],
|
|
2254
|
+
setup(e, { emit: c }) {
|
|
2255
|
+
const t = e, i = c, l = {
|
|
2256
|
+
status: {
|
|
2257
|
+
pending: "Approval needed",
|
|
2258
|
+
approved: "Approved",
|
|
2259
|
+
executing: "Executing",
|
|
2260
|
+
succeeded: "Completed",
|
|
2261
|
+
completed: "Completed",
|
|
2262
|
+
rejected: "Rejected",
|
|
2263
|
+
expired: "Expired",
|
|
2264
|
+
failed: "Failed"
|
|
2265
|
+
},
|
|
2266
|
+
risk: { read: "Read", write: "Write", export: "Export", delete: "Delete", permission: "Permission" },
|
|
2267
|
+
tool: "Tool",
|
|
2268
|
+
details: "Details",
|
|
2269
|
+
expires: "Expires",
|
|
2270
|
+
reject: "Reject",
|
|
2271
|
+
approve: "Approve"
|
|
2272
|
+
}, r = I(() => {
|
|
2273
|
+
var n, u;
|
|
2274
|
+
return {
|
|
2275
|
+
...l,
|
|
2276
|
+
...t.labels,
|
|
2277
|
+
status: { ...l.status, ...(n = t.labels) == null ? void 0 : n.status },
|
|
2278
|
+
risk: { ...l.risk, ...(u = t.labels) == null ? void 0 : u.risk }
|
|
2279
|
+
};
|
|
2280
|
+
});
|
|
2281
|
+
return (n, u) => (a(), o("article", {
|
|
2282
|
+
class: N(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
|
|
2283
|
+
}, [
|
|
2284
|
+
s("header", null, [
|
|
2285
|
+
s("div", null, [
|
|
2286
|
+
s("h2", null, d(r.value.status[e.approval.status] || e.approval.status), 1),
|
|
2287
|
+
e.approval.summary ? (a(), o("p", pn, d(e.approval.summary), 1)) : p("", !0)
|
|
2288
|
+
]),
|
|
2289
|
+
s("span", gn, d(r.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
|
|
2290
|
+
]),
|
|
2291
|
+
e.approval.toolName ? (a(), o("p", hn, [
|
|
2292
|
+
z(d(r.value.tool) + ": ", 1),
|
|
2293
|
+
s("code", null, d(e.approval.toolName), 1)
|
|
2294
|
+
])) : p("", !0),
|
|
2295
|
+
e.approval.details ? (a(), o("details", fn, [
|
|
2296
|
+
s("summary", null, d(r.value.details), 1),
|
|
2297
|
+
s("pre", null, d(e.approval.details), 1)
|
|
2298
|
+
])) : p("", !0),
|
|
2299
|
+
e.approval.expiresAt ? (a(), o("p", yn, d(r.value.expires) + ": " + d(e.approval.expiresAt), 1)) : p("", !0),
|
|
2300
|
+
e.approval.reason ? (a(), o("p", kn, d(e.approval.reason), 1)) : p("", !0),
|
|
2301
|
+
e.approval.status === "pending" ? (a(), o("footer", _n, [
|
|
2302
|
+
s("button", {
|
|
2303
|
+
type: "button",
|
|
2304
|
+
disabled: e.busy,
|
|
2305
|
+
onClick: u[0] || (u[0] = (b) => i("resolve", "reject"))
|
|
2306
|
+
}, d(r.value.reject), 9, wn),
|
|
2307
|
+
s("button", {
|
|
2308
|
+
type: "button",
|
|
2309
|
+
class: "dsea-agent-approval__approve",
|
|
2310
|
+
disabled: e.busy,
|
|
2311
|
+
onClick: u[1] || (u[1] = (b) => i("resolve", "approve"))
|
|
2312
|
+
}, d(r.value.approve), 9, $n)
|
|
2313
|
+
])) : p("", !0)
|
|
2314
|
+
], 2));
|
|
2315
|
+
}
|
|
2316
|
+
});
|
|
2317
|
+
const hl = /* @__PURE__ */ A(Ln, [["__scopeId", "data-v-88695aee"]]), Cn = { class: "dsea-admin-tabs" }, Sn = {
|
|
2318
|
+
class: "dsea-admin-tabs__list",
|
|
2319
|
+
role: "tablist"
|
|
2320
|
+
}, xn = ["aria-selected", "onClick"], An = ["aria-label", "onClick"], Mn = {
|
|
2321
|
+
key: 0,
|
|
2322
|
+
class: "dsea-admin-tabs__tools"
|
|
2323
|
+
}, Tn = ["aria-label"], Bn = ["aria-label"], fl = /* @__PURE__ */ k({
|
|
2324
|
+
__name: "AdminTabs",
|
|
2325
|
+
props: {
|
|
2326
|
+
tabs: {},
|
|
2327
|
+
activeKey: {},
|
|
2328
|
+
labels: {},
|
|
2329
|
+
navigateOnSelect: { type: Boolean, default: !0 }
|
|
2330
|
+
},
|
|
2331
|
+
emits: ["select", "close", "refresh", "closeAction"],
|
|
2332
|
+
setup(e, { emit: c }) {
|
|
2333
|
+
const t = e, i = c, { ports: l } = q(), r = I(() => [
|
|
2334
|
+
{ event: "left", text: t.labels.closeLeft },
|
|
2335
|
+
{ event: "right", text: t.labels.closeRight },
|
|
2336
|
+
{ event: "others", text: t.labels.closeOthers },
|
|
2337
|
+
{ event: "all", text: t.labels.closeAll }
|
|
2338
|
+
]);
|
|
2339
|
+
function n(g) {
|
|
2340
|
+
i("select", g), t.navigateOnSelect && l.navigation.go(g);
|
|
2341
|
+
}
|
|
2342
|
+
function u(g) {
|
|
2343
|
+
i("close", g);
|
|
2344
|
+
}
|
|
2345
|
+
function b(g) {
|
|
2346
|
+
g && i("closeAction", g.event, t.activeKey);
|
|
2347
|
+
}
|
|
2348
|
+
return (g, v) => (a(), o("div", Cn, [
|
|
2349
|
+
s("div", Sn, [
|
|
2350
|
+
(a(!0), o(x, null, M(e.tabs, (m) => (a(), o("div", {
|
|
2351
|
+
key: m.key,
|
|
2352
|
+
class: N(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": m.key === e.activeKey }])
|
|
2353
|
+
}, [
|
|
2354
|
+
s("button", {
|
|
2355
|
+
type: "button",
|
|
2356
|
+
role: "tab",
|
|
2357
|
+
"aria-selected": m.key === e.activeKey,
|
|
2358
|
+
class: "dsea-admin-tabs__select",
|
|
2359
|
+
onClick: (L) => n(m.key)
|
|
2360
|
+
}, [
|
|
2361
|
+
m.icon ? (a(), P(y(w), {
|
|
2362
|
+
key: 0,
|
|
2363
|
+
icon: m.icon,
|
|
2364
|
+
size: 14
|
|
2365
|
+
}, null, 8, ["icon"])) : p("", !0),
|
|
2366
|
+
s("span", null, d(m.label), 1)
|
|
2367
|
+
], 8, xn),
|
|
2368
|
+
m.affix ? p("", !0) : (a(), o("button", {
|
|
2369
|
+
key: 0,
|
|
2370
|
+
type: "button",
|
|
2371
|
+
class: "dsea-admin-tabs__close",
|
|
2372
|
+
"aria-label": `${e.labels.close}: ${m.label}`,
|
|
2373
|
+
onClick: (L) => u(m.key)
|
|
2374
|
+
}, [
|
|
2375
|
+
$(y(w), {
|
|
2376
|
+
icon: "lucide:x",
|
|
2377
|
+
size: 14
|
|
2378
|
+
})
|
|
2379
|
+
], 8, An))
|
|
2380
|
+
], 2))), 128))
|
|
2381
|
+
]),
|
|
2382
|
+
e.tabs.length ? (a(), o("div", Mn, [
|
|
2383
|
+
s("button", {
|
|
2384
|
+
type: "button",
|
|
2385
|
+
"aria-label": e.labels.refresh,
|
|
2386
|
+
onClick: v[0] || (v[0] = (m) => i("refresh", e.activeKey))
|
|
2387
|
+
}, [
|
|
2388
|
+
$(y(w), {
|
|
2389
|
+
icon: "lucide:refresh-cw",
|
|
2390
|
+
size: 16
|
|
2391
|
+
})
|
|
2392
|
+
], 8, Tn),
|
|
2393
|
+
$(y(re), {
|
|
2394
|
+
"drop-menu-list": r.value,
|
|
2395
|
+
trigger: ["click"],
|
|
2396
|
+
onMenuEvent: b
|
|
2397
|
+
}, {
|
|
2398
|
+
default: j(() => [
|
|
2399
|
+
s("button", {
|
|
2400
|
+
type: "button",
|
|
2401
|
+
"aria-label": e.labels.actions
|
|
2402
|
+
}, [
|
|
2403
|
+
$(y(w), {
|
|
2404
|
+
icon: "lucide:chevron-down",
|
|
2405
|
+
size: 16
|
|
2406
|
+
})
|
|
2407
|
+
], 8, Bn)
|
|
2408
|
+
]),
|
|
2409
|
+
_: 1
|
|
2410
|
+
}, 8, ["drop-menu-list"])
|
|
2411
|
+
])) : p("", !0)
|
|
2412
|
+
]));
|
|
2413
|
+
}
|
|
2414
|
+
});
|
|
2415
|
+
function yl(e, c, t) {
|
|
2416
|
+
const i = e.findIndex((l) => l.key === c);
|
|
2417
|
+
return i < 0 && t !== "all" ? [...e] : e.filter((l, r) => {
|
|
2418
|
+
if (l.affix)
|
|
2419
|
+
return !0;
|
|
2420
|
+
switch (t) {
|
|
2421
|
+
case "current":
|
|
2422
|
+
return l.key !== c;
|
|
2423
|
+
case "left":
|
|
2424
|
+
return r >= i;
|
|
2425
|
+
case "right":
|
|
2426
|
+
return r <= i;
|
|
2427
|
+
case "others":
|
|
2428
|
+
return l.key === c;
|
|
2429
|
+
case "all":
|
|
2430
|
+
return !1;
|
|
2431
|
+
}
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
function kl(e, c) {
|
|
2435
|
+
var t;
|
|
2436
|
+
return e.some((i) => i.key === c) ? c : (t = e[e.length - 1]) == null ? void 0 : t.key;
|
|
2437
|
+
}
|
|
2438
|
+
const Pn = { class: "dsea-settings-panel" }, In = ["for"], En = { key: 1 }, Fn = ["aria-label"], Nn = ["aria-label", "aria-pressed", "disabled", "onClick"], zn = ["aria-label"], Dn = ["aria-pressed", "disabled", "onClick"], Kn = /* @__PURE__ */ k({
|
|
2439
|
+
__name: "SettingsPanel",
|
|
2440
|
+
props: {
|
|
2441
|
+
sections: {}
|
|
2442
|
+
},
|
|
2443
|
+
emits: ["change"],
|
|
2444
|
+
setup(e, { emit: c }) {
|
|
2445
|
+
const t = c;
|
|
2446
|
+
function i(u, b) {
|
|
2447
|
+
t("change", u, b);
|
|
2448
|
+
}
|
|
2449
|
+
function l(u, b) {
|
|
2450
|
+
typeof b == "boolean" && i(u, b);
|
|
2451
|
+
}
|
|
2452
|
+
function r(u, b) {
|
|
2453
|
+
(typeof b == "string" || typeof b == "number") && i(u, b);
|
|
2454
|
+
}
|
|
2455
|
+
function n(u, b) {
|
|
2456
|
+
typeof b == "number" && Number.isFinite(b) && i(u, b);
|
|
2457
|
+
}
|
|
2458
|
+
return (u, b) => (a(), o("div", Pn, [
|
|
2459
|
+
(a(!0), o(x, null, M(e.sections, (g) => (a(), o("section", {
|
|
2460
|
+
key: g.title,
|
|
2461
|
+
class: "dsea-settings-panel__section"
|
|
2462
|
+
}, [
|
|
2463
|
+
s("h3", null, d(g.title), 1),
|
|
2464
|
+
(a(!0), o(x, null, M(g.items, (v) => (a(), o("div", {
|
|
2465
|
+
key: v.key,
|
|
2466
|
+
class: N(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": v.type === "color" || v.type === "mode" }])
|
|
2467
|
+
}, [
|
|
2468
|
+
v.type === "switch" || v.type === "select" || v.type === "number" ? (a(), o("label", {
|
|
2469
|
+
key: 0,
|
|
2470
|
+
for: v.key
|
|
2471
|
+
}, d(v.label), 9, In)) : (a(), o("span", En, d(v.label), 1)),
|
|
2472
|
+
v.type === "switch" ? (a(), P(y(ye), {
|
|
2473
|
+
key: 2,
|
|
2474
|
+
id: v.key,
|
|
2475
|
+
checked: v.value,
|
|
2476
|
+
disabled: v.disabled,
|
|
2477
|
+
onChange: (m) => l(v.key, m)
|
|
2478
|
+
}, null, 8, ["id", "checked", "disabled", "onChange"])) : v.type === "select" ? (a(), P(y(ke), {
|
|
2479
|
+
key: 3,
|
|
2480
|
+
id: v.key,
|
|
2481
|
+
value: v.value,
|
|
2482
|
+
options: v.options,
|
|
2483
|
+
disabled: v.disabled,
|
|
2484
|
+
class: "dsea-settings-panel__select",
|
|
2485
|
+
onChange: (m) => r(v.key, m)
|
|
2486
|
+
}, null, 8, ["id", "value", "options", "disabled", "onChange"])) : v.type === "number" ? (a(), P(y(_e), {
|
|
2487
|
+
key: 4,
|
|
2488
|
+
id: v.key,
|
|
2489
|
+
value: v.value,
|
|
2490
|
+
min: v.min,
|
|
2491
|
+
max: v.max,
|
|
2492
|
+
step: v.step,
|
|
2493
|
+
disabled: v.disabled,
|
|
2494
|
+
class: "dsea-settings-panel__number",
|
|
2495
|
+
onChange: (m) => n(v.key, m)
|
|
2496
|
+
}, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : v.type === "color" ? (a(), o("div", {
|
|
2497
|
+
key: 5,
|
|
2498
|
+
class: "dsea-settings-panel__colors",
|
|
2499
|
+
role: "group",
|
|
2500
|
+
"aria-label": v.label
|
|
2501
|
+
}, [
|
|
2502
|
+
(a(!0), o(x, null, M(v.colors, (m) => (a(), o("button", {
|
|
2503
|
+
key: m,
|
|
2504
|
+
type: "button",
|
|
2505
|
+
class: N(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": v.value === m }]),
|
|
2506
|
+
style: ie({ backgroundColor: m }),
|
|
2507
|
+
"aria-label": m,
|
|
2508
|
+
"aria-pressed": v.value === m,
|
|
2509
|
+
disabled: v.disabled,
|
|
2510
|
+
onClick: (L) => i(v.key, m)
|
|
2511
|
+
}, [
|
|
2512
|
+
v.value === m ? (a(), P(y(w), {
|
|
2513
|
+
key: 0,
|
|
2514
|
+
icon: "lucide:check",
|
|
2515
|
+
size: 14
|
|
2516
|
+
})) : p("", !0)
|
|
2517
|
+
], 14, Nn))), 128))
|
|
2518
|
+
], 8, Fn)) : v.type === "mode" ? (a(), o("div", {
|
|
2519
|
+
key: 6,
|
|
2520
|
+
class: "dsea-settings-panel__modes",
|
|
2521
|
+
role: "group",
|
|
2522
|
+
"aria-label": v.label
|
|
2523
|
+
}, [
|
|
2524
|
+
(a(!0), o(x, null, M(v.options, (m) => (a(), o("button", {
|
|
2525
|
+
key: m.value,
|
|
2526
|
+
type: "button",
|
|
2527
|
+
class: N({ active: v.value === m.value }),
|
|
2528
|
+
"aria-pressed": v.value === m.value,
|
|
2529
|
+
disabled: v.disabled,
|
|
2530
|
+
onClick: (L) => i(v.key, m.value)
|
|
2531
|
+
}, [
|
|
2532
|
+
m.icon ? (a(), P(y(w), {
|
|
2533
|
+
key: 0,
|
|
2534
|
+
icon: m.icon,
|
|
2535
|
+
size: 16
|
|
2536
|
+
}, null, 8, ["icon"])) : p("", !0),
|
|
2537
|
+
z(" " + d(m.label), 1)
|
|
2538
|
+
], 10, Dn))), 128))
|
|
2539
|
+
], 8, zn)) : p("", !0)
|
|
2540
|
+
], 2))), 128))
|
|
2541
|
+
]))), 128))
|
|
2542
|
+
]));
|
|
2543
|
+
}
|
|
2544
|
+
});
|
|
2545
|
+
const _l = /* @__PURE__ */ k({
|
|
2546
|
+
__name: "AdminSettingsDrawer",
|
|
2547
|
+
props: {
|
|
2548
|
+
open: { type: Boolean },
|
|
2549
|
+
title: {},
|
|
2550
|
+
sections: {},
|
|
2551
|
+
width: { default: 340 },
|
|
2552
|
+
resetLabel: {}
|
|
2553
|
+
},
|
|
2554
|
+
emits: ["update:open", "change", "reset"],
|
|
2555
|
+
setup(e, { emit: c }) {
|
|
2556
|
+
const t = c;
|
|
2557
|
+
return (i, l) => (a(), P(y(we), {
|
|
2558
|
+
visible: e.open,
|
|
2559
|
+
title: e.title,
|
|
2560
|
+
placement: "right",
|
|
2561
|
+
width: e.width,
|
|
2562
|
+
onClose: l[2] || (l[2] = (r) => t("update:open", !1))
|
|
2563
|
+
}, fe({
|
|
2564
|
+
default: j(() => [
|
|
2565
|
+
$(Kn, {
|
|
2566
|
+
sections: e.sections,
|
|
2567
|
+
onChange: l[0] || (l[0] = (r, n) => t("change", r, n))
|
|
2568
|
+
}, null, 8, ["sections"])
|
|
2569
|
+
]),
|
|
2570
|
+
_: 2
|
|
2571
|
+
}, [
|
|
2572
|
+
i.$slots.footer || e.resetLabel ? {
|
|
2573
|
+
name: "footer",
|
|
2574
|
+
fn: j(() => [
|
|
2575
|
+
B(i.$slots, "footer", {}, () => [
|
|
2576
|
+
s("button", {
|
|
2577
|
+
type: "button",
|
|
2578
|
+
class: "dsea-settings-drawer__reset",
|
|
2579
|
+
onClick: l[1] || (l[1] = (r) => t("reset"))
|
|
2580
|
+
}, d(e.resetLabel), 1)
|
|
2581
|
+
])
|
|
2582
|
+
]),
|
|
2583
|
+
key: "0"
|
|
2584
|
+
} : void 0
|
|
2585
|
+
]), 1032, ["visible", "title", "width"]));
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
export {
|
|
2589
|
+
pl as AdminAboutView,
|
|
2590
|
+
Jn as AdminAppSwitcher,
|
|
2591
|
+
ol as AdminBreadcrumb,
|
|
2592
|
+
vl as AdminErrorLogView,
|
|
2593
|
+
dl as AdminExceptionView,
|
|
2594
|
+
Yn as AdminFullscreenButton,
|
|
2595
|
+
sl as AdminIframeView,
|
|
2596
|
+
ll as AdminLayout,
|
|
2597
|
+
rl as AdminLockView,
|
|
2598
|
+
il as AdminLoginView,
|
|
2599
|
+
nl as AdminNotificationCenter,
|
|
2600
|
+
ml as AdminPasswordForm,
|
|
2601
|
+
ul as AdminProfileForm,
|
|
2602
|
+
cl as AdminProfileTabs,
|
|
2603
|
+
bl as AdminSecuritySettings,
|
|
2604
|
+
_l as AdminSettingsDrawer,
|
|
2605
|
+
fl as AdminTabs,
|
|
2606
|
+
al as AdminUserMenu,
|
|
2607
|
+
hl as AgentApprovalCard,
|
|
2608
|
+
Ja as AgentAttachmentList,
|
|
2609
|
+
gl as AgentComposer,
|
|
2610
|
+
on as AgentModelSelect,
|
|
2611
|
+
Xn as AppDarkModeToggle,
|
|
2612
|
+
Gn as AppLocalePicker,
|
|
2613
|
+
Ce as AppLogo,
|
|
2614
|
+
el as AppProvider,
|
|
2615
|
+
tl as AppSearch,
|
|
2616
|
+
te as BasicMenu,
|
|
2617
|
+
Kn as SettingsPanel,
|
|
2618
|
+
jn as SimpleMenu,
|
|
2619
|
+
Qn as SimpleMenuTag,
|
|
2620
|
+
de as adminMenuKey,
|
|
2621
|
+
ne as adminShellMessages,
|
|
2622
|
+
me as appProviderKey,
|
|
2623
|
+
yl as closeTabs,
|
|
2624
|
+
Hn as createAdminMenuPlugin,
|
|
2625
|
+
be as createAppProviderContext,
|
|
2626
|
+
Wn as getAdminShellMessage,
|
|
2627
|
+
ee as getAllParentPath,
|
|
2628
|
+
On as legacyAdminMessages,
|
|
2629
|
+
kl as nextActiveTab,
|
|
2630
|
+
ce as useAdminMenuPort,
|
|
2631
|
+
Zn as useAppProviderContext
|
|
2632
|
+
};
|