x-essential-lib 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +63 -66
- package/dist/store/global.d.ts +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { ref as
|
|
3
|
-
import {
|
|
2
|
+
import { ref as i, computed as g, onMounted as V, onBeforeUnmount as O, defineComponent as M, watch as J, resolveComponent as h, openBlock as R, createBlock as B, unref as W, isRef as X, withKeys as z, withModifiers as K, withCtx as w, createVNode as k, createTextVNode as A, toDisplayString as T, createElementBlock as F, normalizeStyle as ve, pushScopeId as me, popScopeId as he, createElementVNode as m, reactive as we, Fragment as ye, renderList as xe, createCommentVNode as ke } from "vue";
|
|
3
|
+
import { useLocale as G, useTheme as Q, useDisplay as be } from "vuetify";
|
|
4
4
|
import { defineStore as re } from "pinia";
|
|
5
5
|
import Ce from "axios";
|
|
6
6
|
import { useRouter as le, useRoute as De } from "vue-router";
|
|
7
7
|
const ne = re(
|
|
8
8
|
"global",
|
|
9
9
|
() => {
|
|
10
|
-
const e =
|
|
11
|
-
F(
|
|
12
|
-
t,
|
|
13
|
-
(l) => {
|
|
14
|
-
e.global.name.value = l ? "dark" : "light";
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
immediate: !0
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
const r = f("en"), o = f({}), n = f("");
|
|
10
|
+
const e = i(!0), a = i(1), t = i(), r = i("en"), o = i({}), n = i("");
|
|
21
11
|
return {
|
|
22
|
-
running:
|
|
12
|
+
running: e,
|
|
13
|
+
mainActive: a,
|
|
23
14
|
dark: t,
|
|
24
15
|
locale: r,
|
|
25
16
|
permissionObjects: o,
|
|
@@ -30,12 +21,18 @@ const ne = re(
|
|
|
30
21
|
persist: [
|
|
31
22
|
{
|
|
32
23
|
storage: localStorage,
|
|
33
|
-
paths: [
|
|
24
|
+
paths: [
|
|
25
|
+
"mainActive",
|
|
26
|
+
"dark",
|
|
27
|
+
"locale",
|
|
28
|
+
"permissionObjects",
|
|
29
|
+
"permissionChecksum"
|
|
30
|
+
]
|
|
34
31
|
}
|
|
35
32
|
]
|
|
36
33
|
}
|
|
37
34
|
), ce = re("viewMgr", () => {
|
|
38
|
-
const e =
|
|
35
|
+
const e = i([]);
|
|
39
36
|
function a() {
|
|
40
37
|
return e.value.length <= 0;
|
|
41
38
|
}
|
|
@@ -91,7 +88,7 @@ var Se = {
|
|
|
91
88
|
);
|
|
92
89
|
}
|
|
93
90
|
};
|
|
94
|
-
function
|
|
91
|
+
function H(e, a) {
|
|
95
92
|
function t(o, n, l) {
|
|
96
93
|
if (!(typeof document > "u")) {
|
|
97
94
|
l = L({}, a, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
@@ -129,10 +126,10 @@ function X(e, a) {
|
|
|
129
126
|
);
|
|
130
127
|
},
|
|
131
128
|
withAttributes: function(o) {
|
|
132
|
-
return
|
|
129
|
+
return H(this.converter, L({}, this.attributes, o));
|
|
133
130
|
},
|
|
134
131
|
withConverter: function(o) {
|
|
135
|
-
return
|
|
132
|
+
return H(L({}, this.converter, o), this.attributes);
|
|
136
133
|
}
|
|
137
134
|
},
|
|
138
135
|
{
|
|
@@ -141,7 +138,7 @@ function X(e, a) {
|
|
|
141
138
|
}
|
|
142
139
|
);
|
|
143
140
|
}
|
|
144
|
-
var
|
|
141
|
+
var E = H(Se, { path: "/" });
|
|
145
142
|
function rt(e) {
|
|
146
143
|
const a = Ce.create({
|
|
147
144
|
timeout: 6e3
|
|
@@ -157,7 +154,7 @@ function rt(e) {
|
|
|
157
154
|
), a;
|
|
158
155
|
}
|
|
159
156
|
function qe(e) {
|
|
160
|
-
const a =
|
|
157
|
+
const a = E.get("accessToken") ?? "";
|
|
161
158
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
162
159
|
}
|
|
163
160
|
function Ve(e, a) {
|
|
@@ -179,7 +176,7 @@ function Oe(e, a) {
|
|
|
179
176
|
}), a(r), Promise.reject(e);
|
|
180
177
|
}
|
|
181
178
|
function Te() {
|
|
182
|
-
|
|
179
|
+
E.remove("accessToken"), E.remove("refreshToken"), E.remove("activeOrg"), le().replace({ path: "/passport/login" });
|
|
183
180
|
}
|
|
184
181
|
function je(e) {
|
|
185
182
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
@@ -268,7 +265,7 @@ function ft(e) {
|
|
|
268
265
|
t.add("app-reset");
|
|
269
266
|
}, 0));
|
|
270
267
|
}
|
|
271
|
-
var
|
|
268
|
+
var Ae = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Ae || {});
|
|
272
269
|
function te(e, a) {
|
|
273
270
|
if (!e)
|
|
274
271
|
return !1;
|
|
@@ -282,7 +279,7 @@ function te(e, a) {
|
|
|
282
279
|
return !1;
|
|
283
280
|
}), Object.keys(t).length <= 0);
|
|
284
281
|
}
|
|
285
|
-
const
|
|
282
|
+
const Ee = [
|
|
286
283
|
{ path: "/passport/login", level: 0 },
|
|
287
284
|
{ path: "/passport/loginAccount", level: 1 },
|
|
288
285
|
{ path: "/passport/register", level: 1 },
|
|
@@ -304,7 +301,7 @@ const Ae = [
|
|
|
304
301
|
function N(e) {
|
|
305
302
|
let a, t = 0;
|
|
306
303
|
const r = e.split("/").filter((o) => o.trim() !== "");
|
|
307
|
-
return
|
|
304
|
+
return Ee.forEach((o) => {
|
|
308
305
|
const n = o.path.split("/").filter((c) => c.trim() !== "");
|
|
309
306
|
let l = 0;
|
|
310
307
|
for (let c = 0; c < r.length && !(c >= n.length || r[c] !== n[c]); c++)
|
|
@@ -321,7 +318,7 @@ function ae(e) {
|
|
|
321
318
|
const t = e.split("/");
|
|
322
319
|
return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
|
|
323
320
|
}
|
|
324
|
-
const oe =
|
|
321
|
+
const oe = i("");
|
|
325
322
|
function q(e, a) {
|
|
326
323
|
const t = ae(e), r = ae(a), o = t.app === r.app, n = t.path === r.path, l = t.level >= r.level;
|
|
327
324
|
console.info(
|
|
@@ -329,10 +326,10 @@ function q(e, a) {
|
|
|
329
326
|
), o ? n ? oe.value = "" : oe.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
|
|
330
327
|
}
|
|
331
328
|
function Be() {
|
|
332
|
-
return !!
|
|
329
|
+
return !!E.get("accessToken");
|
|
333
330
|
}
|
|
334
331
|
function Me() {
|
|
335
|
-
return !!
|
|
332
|
+
return !!E.get("activeOrg");
|
|
336
333
|
}
|
|
337
334
|
function gt(e, a, t) {
|
|
338
335
|
const r = Be(), o = Me(), n = N(e.path);
|
|
@@ -394,7 +391,7 @@ function Z(e, a) {
|
|
|
394
391
|
const Ue = /* @__PURE__ */ M({
|
|
395
392
|
__name: "index",
|
|
396
393
|
setup(e) {
|
|
397
|
-
const a =
|
|
394
|
+
const a = G(), { open: t } = Z("confirmDlg"), r = i(""), o = i(""), n = i(), l = i(), c = g(() => {
|
|
398
395
|
var p;
|
|
399
396
|
return ((p = n.value) == null ? void 0 : p.color) ?? "primary";
|
|
400
397
|
}), u = g(() => {
|
|
@@ -416,19 +413,19 @@ const Ue = /* @__PURE__ */ M({
|
|
|
416
413
|
}), O(() => {
|
|
417
414
|
s.off("confirmDlg", j);
|
|
418
415
|
});
|
|
419
|
-
const
|
|
416
|
+
const f = () => {
|
|
420
417
|
t.value = !1, b || (s.emit("confirmDlgResult" + D, !0), b = !0);
|
|
421
418
|
};
|
|
422
|
-
return
|
|
419
|
+
return J(t, (p) => {
|
|
423
420
|
!p && !b && (s.emit("confirmDlgResult" + D, !1), b = !0);
|
|
424
421
|
}), (p, y) => {
|
|
425
422
|
const C = h("v-card-text"), S = h("v-btn"), I = h("v-card-actions"), d = h("v-card"), x = h("v-dialog");
|
|
426
423
|
return R(), B(x, {
|
|
427
424
|
modelValue: W(t),
|
|
428
|
-
"onUpdate:modelValue": y[1] || (y[1] = (U) =>
|
|
425
|
+
"onUpdate:modelValue": y[1] || (y[1] = (U) => X(t) ? t.value = U : null),
|
|
429
426
|
onKeydown: [
|
|
430
427
|
y[2] || (y[2] = z(K((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
431
|
-
z(K(
|
|
428
|
+
z(K(f, ["stop", "prevent"]), ["enter"])
|
|
432
429
|
],
|
|
433
430
|
transition: "dialog-top-transition",
|
|
434
431
|
"max-width": "600px"
|
|
@@ -438,7 +435,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
438
435
|
default: w(() => [
|
|
439
436
|
k(C, null, {
|
|
440
437
|
default: w(() => [
|
|
441
|
-
|
|
438
|
+
A(T(o.value), 1)
|
|
442
439
|
]),
|
|
443
440
|
_: 1
|
|
444
441
|
}),
|
|
@@ -450,17 +447,17 @@ const Ue = /* @__PURE__ */ M({
|
|
|
450
447
|
variant: "text"
|
|
451
448
|
}, {
|
|
452
449
|
default: w(() => [
|
|
453
|
-
|
|
450
|
+
A(T(u.value), 1)
|
|
454
451
|
]),
|
|
455
452
|
_: 1
|
|
456
453
|
}, 8, ["color"]),
|
|
457
454
|
k(S, {
|
|
458
|
-
onClick:
|
|
455
|
+
onClick: f,
|
|
459
456
|
color: _.value,
|
|
460
457
|
variant: "text"
|
|
461
458
|
}, {
|
|
462
459
|
default: w(() => [
|
|
463
|
-
|
|
460
|
+
A(T(v.value), 1)
|
|
464
461
|
]),
|
|
465
462
|
_: 1
|
|
466
463
|
}, 8, ["color"])
|
|
@@ -499,11 +496,11 @@ const Ue = /* @__PURE__ */ M({
|
|
|
499
496
|
}
|
|
500
497
|
},
|
|
501
498
|
setup(e) {
|
|
502
|
-
const a =
|
|
499
|
+
const a = Q(), t = e, r = g(() => ({
|
|
503
500
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
504
501
|
zIndex: t.zIndex
|
|
505
502
|
}));
|
|
506
|
-
return (o, n) => (R(),
|
|
503
|
+
return (o, n) => (R(), F("div", {
|
|
507
504
|
class: "x-cont",
|
|
508
505
|
style: ve(r.value)
|
|
509
506
|
}, Le, 4));
|
|
@@ -535,7 +532,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
535
532
|
},
|
|
536
533
|
emits: ["timeout"],
|
|
537
534
|
setup(e, { emit: a }) {
|
|
538
|
-
const t = e, r =
|
|
535
|
+
const t = e, r = i(!0), o = a, n = g(() => {
|
|
539
536
|
let l = "";
|
|
540
537
|
switch (t.type) {
|
|
541
538
|
case "error":
|
|
@@ -557,7 +554,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
557
554
|
setTimeout(() => {
|
|
558
555
|
o("timeout", t.id);
|
|
559
556
|
}, t.timeout);
|
|
560
|
-
}),
|
|
557
|
+
}), J(r, (l) => {
|
|
561
558
|
l || o("timeout", t.id);
|
|
562
559
|
}), (l, c) => {
|
|
563
560
|
const u = h("v-alert");
|
|
@@ -598,12 +595,12 @@ const Ue = /* @__PURE__ */ M({
|
|
|
598
595
|
const u = a.items.findIndex((_) => _.id === c);
|
|
599
596
|
u >= 0 && a.items.splice(u, 1);
|
|
600
597
|
};
|
|
601
|
-
return (c, u) => (R(),
|
|
598
|
+
return (c, u) => (R(), F("div", {
|
|
602
599
|
onClick: u[0] || (u[0] = K(() => {
|
|
603
600
|
}, ["stop"])),
|
|
604
601
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
605
602
|
}, [
|
|
606
|
-
(R(!0),
|
|
603
|
+
(R(!0), F(ye, null, xe(a.items, (_) => (R(), B(Ne, {
|
|
607
604
|
onTimeout: r,
|
|
608
605
|
id: _.id,
|
|
609
606
|
type: _.type,
|
|
@@ -616,7 +613,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
616
613
|
}), He = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-70ed4b89"]]), Je = /* @__PURE__ */ M({
|
|
617
614
|
__name: "index",
|
|
618
615
|
setup(e) {
|
|
619
|
-
const a =
|
|
616
|
+
const a = G(), { open: t } = Z("promptDlg"), r = i(""), o = i(""), n = i(), l = i(), c = i(), u = i(""), _ = i(), v = i(), D = g(() => {
|
|
620
617
|
var d;
|
|
621
618
|
return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
|
|
622
619
|
}), b = g(() => {
|
|
@@ -625,10 +622,10 @@ const Ue = /* @__PURE__ */ M({
|
|
|
625
622
|
}), j = g(() => {
|
|
626
623
|
var d;
|
|
627
624
|
return ((d = v.value) == null ? void 0 : d.color) ?? "primary";
|
|
628
|
-
}),
|
|
625
|
+
}), f = g(() => {
|
|
629
626
|
var d;
|
|
630
627
|
return ((d = v.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
631
|
-
}), p =
|
|
628
|
+
}), p = i();
|
|
632
629
|
let y = 0, C = !1;
|
|
633
630
|
const S = async (d) => {
|
|
634
631
|
var x;
|
|
@@ -642,13 +639,13 @@ const Ue = /* @__PURE__ */ M({
|
|
|
642
639
|
const I = () => {
|
|
643
640
|
t.value = !1, C || (s.emit("promptDlgResult" + y, u.value ?? ""), C = !0);
|
|
644
641
|
};
|
|
645
|
-
return
|
|
642
|
+
return J(t, (d) => {
|
|
646
643
|
!d && !C && (s.emit("promptDlgResult" + y, void 0), C = !0);
|
|
647
644
|
}), (d, x) => {
|
|
648
645
|
const U = h("v-card-text"), _e = h("v-text-field"), de = h("v-form"), P = h("v-btn"), ie = h("v-card-actions"), fe = h("v-card"), ge = h("v-dialog");
|
|
649
646
|
return R(), B(ge, {
|
|
650
647
|
modelValue: W(t),
|
|
651
|
-
"onUpdate:modelValue": x[2] || (x[2] = ($) =>
|
|
648
|
+
"onUpdate:modelValue": x[2] || (x[2] = ($) => X(t) ? t.value = $ : null),
|
|
652
649
|
onKeydown: [
|
|
653
650
|
x[3] || (x[3] = z(K(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
654
651
|
z(K(I, ["stop", "prevent"]), ["enter"])
|
|
@@ -661,7 +658,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
661
658
|
default: w(() => [
|
|
662
659
|
o.value ? (R(), B(U, { key: 0 }, {
|
|
663
660
|
default: w(() => [
|
|
664
|
-
|
|
661
|
+
A(T(o.value), 1)
|
|
665
662
|
]),
|
|
666
663
|
_: 1
|
|
667
664
|
})) : ke("", !0),
|
|
@@ -687,7 +684,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
687
684
|
variant: "text"
|
|
688
685
|
}, {
|
|
689
686
|
default: w(() => [
|
|
690
|
-
|
|
687
|
+
A(T(b.value), 1)
|
|
691
688
|
]),
|
|
692
689
|
_: 1
|
|
693
690
|
}, 8, ["color"]),
|
|
@@ -697,7 +694,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
697
694
|
variant: "text"
|
|
698
695
|
}, {
|
|
699
696
|
default: w(() => [
|
|
700
|
-
|
|
697
|
+
A(T(f.value), 1)
|
|
701
698
|
]),
|
|
702
699
|
_: 1
|
|
703
700
|
}, 8, ["color"])
|
|
@@ -715,7 +712,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
715
712
|
}), Xe = { class: "mx-auto my-auto" }, Ge = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ M({
|
|
716
713
|
__name: "index",
|
|
717
714
|
setup(e) {
|
|
718
|
-
const a =
|
|
715
|
+
const a = G(), { open: t } = Z("waitDlg"), r = () => {
|
|
719
716
|
t.value = !0;
|
|
720
717
|
}, o = () => {
|
|
721
718
|
t.value = !1;
|
|
@@ -728,7 +725,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
728
725
|
const c = h("v-card"), u = h("v-dialog");
|
|
729
726
|
return R(), B(u, {
|
|
730
727
|
modelValue: W(t),
|
|
731
|
-
"onUpdate:modelValue": l[0] || (l[0] = (_) =>
|
|
728
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => X(t) ? t.value = _ : null),
|
|
732
729
|
persistent: "",
|
|
733
730
|
"no-click-animation": "",
|
|
734
731
|
fullscreen: ""
|
|
@@ -757,7 +754,7 @@ const Ue = /* @__PURE__ */ M({
|
|
|
757
754
|
e.component("x-confirm-dlg", Ue), e.component("x-loading", ze), e.component("x-message", He), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Qe);
|
|
758
755
|
};
|
|
759
756
|
function vt() {
|
|
760
|
-
const e =
|
|
757
|
+
const e = Q(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), r = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
761
758
|
return {
|
|
762
759
|
primaryColor: a,
|
|
763
760
|
secondaryColor: t,
|
|
@@ -782,8 +779,8 @@ function mt(e, a) {
|
|
|
782
779
|
n.hasView("waitDlg") || n.popView();
|
|
783
780
|
return;
|
|
784
781
|
}
|
|
785
|
-
const
|
|
786
|
-
(
|
|
782
|
+
const f = N(t.path);
|
|
783
|
+
(f == null ? void 0 : f.level) === 0 ? (p = navigator == null ? void 0 : navigator.Backbutton) == null || p.goHome(
|
|
787
784
|
() => {
|
|
788
785
|
},
|
|
789
786
|
() => {
|
|
@@ -795,16 +792,16 @@ function mt(e, a) {
|
|
|
795
792
|
}), O(() => {
|
|
796
793
|
s.off("pause", l), s.off("resume", c), s.off("backbutton", u);
|
|
797
794
|
});
|
|
798
|
-
const _ = (
|
|
799
|
-
if (
|
|
795
|
+
const _ = (f) => {
|
|
796
|
+
if (f.key === "Escape") {
|
|
800
797
|
u();
|
|
801
798
|
return;
|
|
802
799
|
}
|
|
803
|
-
if (!e &&
|
|
800
|
+
if (!e && f.ctrlKey && f.shiftKey && f.key.toLowerCase() === "d") {
|
|
804
801
|
o.dark = !o.dark;
|
|
805
802
|
return;
|
|
806
803
|
}
|
|
807
|
-
if (!e &&
|
|
804
|
+
if (!e && f.ctrlKey && f.shiftKey && f.key.toLowerCase() === "l") {
|
|
808
805
|
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
809
806
|
return;
|
|
810
807
|
}
|
|
@@ -818,8 +815,8 @@ function mt(e, a) {
|
|
|
818
815
|
const D = async () => {
|
|
819
816
|
if (!o.running)
|
|
820
817
|
return;
|
|
821
|
-
const
|
|
822
|
-
if (!(!
|
|
818
|
+
const f = N(t.path);
|
|
819
|
+
if (!(!f || f.requiredState !== "org"))
|
|
823
820
|
try {
|
|
824
821
|
const { update: p, permissions: y } = await Ze(a, {
|
|
825
822
|
checksum: o.permissionChecksum
|
|
@@ -837,8 +834,8 @@ function mt(e, a) {
|
|
|
837
834
|
} catch (p) {
|
|
838
835
|
console.error(p);
|
|
839
836
|
}
|
|
840
|
-
}, b = async (
|
|
841
|
-
|
|
837
|
+
}, b = async (f) => {
|
|
838
|
+
f && await D(), clearTimeout(v), v = setTimeout(async () => {
|
|
842
839
|
await D(), v && b();
|
|
843
840
|
}, 3e3);
|
|
844
841
|
}, j = () => {
|
|
@@ -859,12 +856,12 @@ function ht() {
|
|
|
859
856
|
return { verifyPermission: a };
|
|
860
857
|
}
|
|
861
858
|
function wt() {
|
|
862
|
-
const e =
|
|
859
|
+
const e = Q(), a = be(), t = g(() => e.current.value.dark), r = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
863
860
|
return { dark: t, sysBarAvail: r, compactWidth: o };
|
|
864
861
|
}
|
|
865
862
|
const yt = { install: Ye };
|
|
866
863
|
export {
|
|
867
|
-
|
|
864
|
+
Ae as Permission,
|
|
868
865
|
ft as appAppear,
|
|
869
866
|
st as closeWaitDlg,
|
|
870
867
|
rt as createAxios,
|
package/dist/store/global.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { PermissionObjects } from '../utils/permission';
|
|
2
2
|
export declare const useGlobalStore: import("pinia").StoreDefinition<"global", import("pinia")._UnwrapAll<Pick<{
|
|
3
3
|
running: import("vue").Ref<boolean>;
|
|
4
|
+
mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
|
|
4
5
|
dark: import("vue").Ref<boolean | undefined>;
|
|
5
6
|
locale: import("vue").Ref<string>;
|
|
6
7
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
7
8
|
permissionChecksum: import("vue").Ref<string>;
|
|
8
|
-
}, "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
|
|
9
|
+
}, "mainActive" | "dark" | "locale" | "permissionObjects" | "permissionChecksum" | "running">>, Pick<{
|
|
9
10
|
running: import("vue").Ref<boolean>;
|
|
11
|
+
mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
|
|
10
12
|
dark: import("vue").Ref<boolean | undefined>;
|
|
11
13
|
locale: import("vue").Ref<string>;
|
|
12
14
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|
|
13
15
|
permissionChecksum: import("vue").Ref<string>;
|
|
14
16
|
}, never>, Pick<{
|
|
15
17
|
running: import("vue").Ref<boolean>;
|
|
18
|
+
mainActive: import("vue").Ref<0 | 1 | 2 | 3 | 4>;
|
|
16
19
|
dark: import("vue").Ref<boolean | undefined>;
|
|
17
20
|
locale: import("vue").Ref<string>;
|
|
18
21
|
permissionObjects: import("vue").Ref<PermissionObjects>;
|