@morningfast/platform 0.0.15 → 1.0.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/dist/chunks/{main-CX2uCPdt.js → main-CDJQvDTg.js} +132 -121
- package/dist/index.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -724,14 +724,14 @@ var Zt = "data:image/svg+xml,%3csvg%20viewBox='0%200%2064%2048'%20fill='none'%20
|
|
|
724
724
|
}), _n = { class: "settings-section" }, vn = { class: "settings-inline-setting settings-inline-setting--compact" }, yn = /* @__PURE__ */ P({
|
|
725
725
|
__name: "GeneralSettings",
|
|
726
726
|
setup(e) {
|
|
727
|
-
let t = z(
|
|
727
|
+
let t = z(na(!0));
|
|
728
728
|
function n(e) {
|
|
729
729
|
let n = !!e;
|
|
730
|
-
if (t.value = n,
|
|
731
|
-
|
|
730
|
+
if (t.value = n, ra(n), n) {
|
|
731
|
+
va();
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
|
-
|
|
734
|
+
_a();
|
|
735
735
|
}
|
|
736
736
|
return (e, r) => {
|
|
737
737
|
let i = V("el-switch");
|
|
@@ -2362,7 +2362,7 @@ function Di() {
|
|
|
2362
2362
|
entry: e.entry,
|
|
2363
2363
|
container: e.container,
|
|
2364
2364
|
activeRule: e.activeRule,
|
|
2365
|
-
props:
|
|
2365
|
+
props: Ni(e)
|
|
2366
2366
|
})), {
|
|
2367
2367
|
beforeLoad: [async (e) => {
|
|
2368
2368
|
_i(window.location.pathname), fi(e.name);
|
|
@@ -2371,16 +2371,18 @@ function Di() {
|
|
|
2371
2371
|
_i(window.location.pathname), pi(e.name);
|
|
2372
2372
|
}]
|
|
2373
2373
|
}), He((t) => {
|
|
2374
|
-
let n = t
|
|
2375
|
-
if (r &&
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2374
|
+
let n = Ai(t), r = ki(n) || ki(t);
|
|
2375
|
+
if (!(!r && ji(t, n))) {
|
|
2376
|
+
if (r && hi(r, n)) {
|
|
2377
|
+
let t = e.find((e) => e.name === r);
|
|
2378
|
+
t && gi(t, window.location.pathname, n);
|
|
2379
|
+
return;
|
|
2380
|
+
}
|
|
2381
|
+
e.forEach((e) => {
|
|
2382
|
+
(window.location.pathname === e.activeRule || window.location.pathname.startsWith(`${e.activeRule}/`)) && (mi(e, n), gi(e, window.location.pathname, n));
|
|
2383
|
+
});
|
|
2379
2384
|
}
|
|
2380
|
-
|
|
2381
|
-
(window.location.pathname === e.activeRule || window.location.pathname.startsWith(`${e.activeRule}/`)) && (mi(e, n), gi(e, window.location.pathname, n));
|
|
2382
|
-
});
|
|
2383
|
-
}), Oi(), ji();
|
|
2385
|
+
}), Oi(), Pi();
|
|
2384
2386
|
}
|
|
2385
2387
|
function Oi() {
|
|
2386
2388
|
Ei || document.querySelector("#micro-app-container") && (Ei = !0, We({
|
|
@@ -2393,6 +2395,15 @@ function ki(e) {
|
|
|
2393
2395
|
return (e instanceof Error ? e.message : String(e || "")).match(/application ['"]?([^'"\s]+)['"]?/i)?.[1];
|
|
2394
2396
|
}
|
|
2395
2397
|
function Ai(e) {
|
|
2398
|
+
return e instanceof ErrorEvent ? e.error || e.message : e instanceof PromiseRejectionEvent ? e.reason : e;
|
|
2399
|
+
}
|
|
2400
|
+
function ji(e, t) {
|
|
2401
|
+
return e instanceof ErrorEvent && Mi(e.filename) ? !0 : t instanceof Error && t.message.includes("Cannot read properties of undefined (reading 'app')") && !!(t.stack && /(?:^|[/(@])prepare\.js(?::\d+:\d+)?/i.test(t.stack));
|
|
2402
|
+
}
|
|
2403
|
+
function Mi(e) {
|
|
2404
|
+
return /^(?:chrome|moz|safari-web)-extension:\/\//i.test(e);
|
|
2405
|
+
}
|
|
2406
|
+
function Ni(e) {
|
|
2396
2407
|
let t = X();
|
|
2397
2408
|
return {
|
|
2398
2409
|
basePath: e.activeRule,
|
|
@@ -2401,11 +2412,11 @@ function Ai(e) {
|
|
|
2401
2412
|
env: "production",
|
|
2402
2413
|
apiBaseUrl: "/api"
|
|
2403
2414
|
},
|
|
2404
|
-
theme:
|
|
2405
|
-
getRuntimeProps: () => ({ theme:
|
|
2415
|
+
theme: Ii(t.isDark),
|
|
2416
|
+
getRuntimeProps: () => ({ theme: Ii(t.isDark) })
|
|
2406
2417
|
};
|
|
2407
2418
|
}
|
|
2408
|
-
function
|
|
2419
|
+
function Pi() {
|
|
2409
2420
|
let e = X();
|
|
2410
2421
|
G(() => [
|
|
2411
2422
|
e.isDark,
|
|
@@ -2413,14 +2424,14 @@ function ji() {
|
|
|
2413
2424
|
e.themeColorPosition
|
|
2414
2425
|
], () => {
|
|
2415
2426
|
window.setTimeout(() => {
|
|
2416
|
-
|
|
2427
|
+
Fi(Ii(e.isDark));
|
|
2417
2428
|
}, 0);
|
|
2418
2429
|
});
|
|
2419
2430
|
}
|
|
2420
|
-
function
|
|
2431
|
+
function Fi(e) {
|
|
2421
2432
|
window.dispatchEvent(new CustomEvent(wi, { detail: e }));
|
|
2422
2433
|
}
|
|
2423
|
-
function
|
|
2434
|
+
function Ii(e) {
|
|
2424
2435
|
let t = getComputedStyle(document.documentElement);
|
|
2425
2436
|
return {
|
|
2426
2437
|
colorPrimary: $(t, "--el-color-primary", "#409EFF"),
|
|
@@ -2438,10 +2449,10 @@ function $(e, t, n) {
|
|
|
2438
2449
|
}
|
|
2439
2450
|
//#endregion
|
|
2440
2451
|
//#region src/main/pages/micro/MicroAppView.vue?vue&type=script&setup=true&lang.ts
|
|
2441
|
-
var
|
|
2452
|
+
var Li = { class: "micro-app-page" }, Ri = {
|
|
2442
2453
|
key: 0,
|
|
2443
2454
|
class: "micro-app-page__state micro-app-page__state--error"
|
|
2444
|
-
},
|
|
2455
|
+
}, zi = { class: "micro-app-page__body" }, Bi = { class: "micro-app-page__meta" }, Vi = { key: 0 }, Hi = { key: 1 }, Ui = { class: "micro-app-page__actions" }, Wi = ["id"], Gi = /* @__PURE__ */ u(/* @__PURE__ */ P({
|
|
2445
2456
|
name: "MicroAppView",
|
|
2446
2457
|
__name: "MicroAppView",
|
|
2447
2458
|
setup(e) {
|
|
@@ -2479,17 +2490,17 @@ var Pi = { class: "micro-app-page" }, Fi = {
|
|
|
2479
2490
|
}
|
|
2480
2491
|
return (e, t) => {
|
|
2481
2492
|
let n = V("el-icon"), r = V("el-button");
|
|
2482
|
-
return R(), A("div",
|
|
2493
|
+
return R(), A("div", Li, [d.value ? (R(), A("div", Ri, [N(n, { class: "micro-app-page__icon" }, {
|
|
2483
2494
|
default: K(() => [N(W(Be))]),
|
|
2484
2495
|
_: 1
|
|
2485
|
-
}), j("div",
|
|
2496
|
+
}), j("div", zi, [
|
|
2486
2497
|
t[5] ||= j("p", { class: "micro-app-page__title" }, "子应用加载失败", -1),
|
|
2487
|
-
j("dl",
|
|
2498
|
+
j("dl", Bi, [
|
|
2488
2499
|
j("div", null, [t[0] ||= j("dt", null, "应用", -1), j("dd", null, U(c.value), 1)]),
|
|
2489
|
-
W(!1) ? (R(), A("div",
|
|
2490
|
-
u.value ? (R(), A("div",
|
|
2500
|
+
W(!1) ? (R(), A("div", Vi, [t[1] ||= j("dt", null, "入口", -1), j("dd", null, U(l.value), 1)])) : k("", !0),
|
|
2501
|
+
u.value ? (R(), A("div", Hi, [t[2] ||= j("dt", null, "原因", -1), j("dd", null, U(u.value), 1)])) : k("", !0)
|
|
2491
2502
|
]),
|
|
2492
|
-
j("div",
|
|
2503
|
+
j("div", Ui, [N(r, {
|
|
2493
2504
|
type: "primary",
|
|
2494
2505
|
icon: W(Me),
|
|
2495
2506
|
onClick: h
|
|
@@ -2507,33 +2518,33 @@ var Pi = { class: "micro-app-page" }, Fi = {
|
|
|
2507
2518
|
])])) : k("", !0), j("section", {
|
|
2508
2519
|
id: W(m),
|
|
2509
2520
|
class: "micro-app-page__container"
|
|
2510
|
-
}, null, 8,
|
|
2521
|
+
}, null, 8, Wi)]);
|
|
2511
2522
|
};
|
|
2512
2523
|
}
|
|
2513
2524
|
}), [["__scopeId", "data-v-944de23f"]]);
|
|
2514
2525
|
//#endregion
|
|
2515
2526
|
//#region src/main/router/route-items.ts
|
|
2516
|
-
function
|
|
2517
|
-
return h(e, t, (e) => e.microApp ?
|
|
2527
|
+
function Ki(e, t) {
|
|
2528
|
+
return h(e, t, (e) => e.microApp ? Gi : void 0);
|
|
2518
2529
|
}
|
|
2519
2530
|
//#endregion
|
|
2520
2531
|
//#region src/main/app/AppUpdateDialog.vue?vue&type=script&setup=true&lang.ts
|
|
2521
|
-
var
|
|
2532
|
+
var qi = {
|
|
2522
2533
|
key: 0,
|
|
2523
2534
|
class: "app-update-dialog",
|
|
2524
2535
|
role: "presentation"
|
|
2525
|
-
},
|
|
2536
|
+
}, Ji = {
|
|
2526
2537
|
class: "app-update-dialog__panel",
|
|
2527
2538
|
role: "dialog",
|
|
2528
2539
|
"aria-modal": "true",
|
|
2529
2540
|
"aria-labelledby": "app-update-dialog-title"
|
|
2530
|
-
},
|
|
2541
|
+
}, Yi = { class: "app-update-dialog__icon" }, Xi = { class: "app-update-dialog__content" }, Zi = {
|
|
2531
2542
|
key: 0,
|
|
2532
2543
|
class: "app-update-dialog__version"
|
|
2533
|
-
},
|
|
2544
|
+
}, Qi = {
|
|
2534
2545
|
key: 1,
|
|
2535
2546
|
class: "app-update-dialog__changelog"
|
|
2536
|
-
},
|
|
2547
|
+
}, $i = { class: "app-update-dialog__actions" }, ea = /* @__PURE__ */ u(/* @__PURE__ */ P({
|
|
2537
2548
|
__name: "AppUpdateDialog",
|
|
2538
2549
|
props: {
|
|
2539
2550
|
changelog: {},
|
|
@@ -2558,18 +2569,18 @@ var Wi = {
|
|
|
2558
2569
|
return (t, i) => {
|
|
2559
2570
|
let a = V("el-icon"), o = V("el-button"), s = V("el-dropdown-item"), c = V("el-dropdown-menu"), l = V("el-dropdown");
|
|
2560
2571
|
return R(), O(C, { to: "body" }, [N(w, { name: "app-update-dialog-fade" }, {
|
|
2561
|
-
default: K(() => [e.modelValue ? (R(), A("section",
|
|
2562
|
-
j("div",
|
|
2572
|
+
default: K(() => [e.modelValue ? (R(), A("section", qi, [j("div", Ji, [
|
|
2573
|
+
j("div", Yi, [N(a, null, {
|
|
2563
2574
|
default: K(() => [N(W(je))]),
|
|
2564
2575
|
_: 1
|
|
2565
2576
|
})]),
|
|
2566
|
-
j("div",
|
|
2577
|
+
j("div", Xi, [
|
|
2567
2578
|
i[2] ||= j("h2", { id: "app-update-dialog-title" }, "发现新版本", -1),
|
|
2568
2579
|
i[3] ||= j("p", null, "系统已发布更新,刷新后即可使用最新功能和修复。", -1),
|
|
2569
|
-
e.versionLabel ? (R(), A("span",
|
|
2570
|
-
e.changelog?.length ? (R(), A("div",
|
|
2580
|
+
e.versionLabel ? (R(), A("span", Zi, U(e.versionLabel), 1)) : k("", !0),
|
|
2581
|
+
e.changelog?.length ? (R(), A("div", Qi, [i[1] ||= j("span", null, "更新要点", -1), j("ul", null, [(R(!0), A(S, null, B(e.changelog, (e) => (R(), A("li", { key: e }, U(e), 1))), 128))])])) : k("", !0)
|
|
2571
2582
|
]),
|
|
2572
|
-
j("div",
|
|
2583
|
+
j("div", $i, [N(o, {
|
|
2573
2584
|
type: "primary",
|
|
2574
2585
|
onClick: i[0] ||= (e) => n("refresh")
|
|
2575
2586
|
}, {
|
|
@@ -2618,75 +2629,75 @@ var Wi = {
|
|
|
2618
2629
|
})]);
|
|
2619
2630
|
};
|
|
2620
2631
|
}
|
|
2621
|
-
}), [["__scopeId", "data-v-118283a1"]]),
|
|
2622
|
-
function
|
|
2623
|
-
let t = localStorage.getItem(
|
|
2632
|
+
}), [["__scopeId", "data-v-118283a1"]]), ta = "app-update:check-enabled";
|
|
2633
|
+
function na(e = !0) {
|
|
2634
|
+
let t = localStorage.getItem(ta);
|
|
2624
2635
|
return t === "true" ? !0 : t === "false" ? !1 : e;
|
|
2625
2636
|
}
|
|
2626
|
-
function
|
|
2627
|
-
localStorage.setItem(
|
|
2637
|
+
function ra(e) {
|
|
2638
|
+
localStorage.setItem(ta, String(e));
|
|
2628
2639
|
}
|
|
2629
2640
|
//#endregion
|
|
2630
2641
|
//#region src/main/app/update-checker.ts
|
|
2631
|
-
var
|
|
2632
|
-
function
|
|
2633
|
-
|
|
2634
|
-
...
|
|
2642
|
+
var ia = "/app-manifest.json", aa = 300 * 1e3, oa = "app-update:snooze", sa, ca, la, ua = "", da = !1, fa = {}, pa, ma;
|
|
2643
|
+
function ha(e = {}) {
|
|
2644
|
+
fa = {
|
|
2645
|
+
...fa,
|
|
2635
2646
|
...e
|
|
2636
|
-
}, !(
|
|
2647
|
+
}, !(da || fa.enabled === !1 || typeof window > "u" || !na(!0)) && (da = !0, !Oa() && ga());
|
|
2637
2648
|
}
|
|
2638
|
-
function
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
},
|
|
2649
|
+
function ga() {
|
|
2650
|
+
Sa(), ya(), sa = window.setInterval(() => {
|
|
2651
|
+
ya();
|
|
2652
|
+
}, Ta());
|
|
2642
2653
|
}
|
|
2643
|
-
function
|
|
2644
|
-
|
|
2654
|
+
function _a() {
|
|
2655
|
+
Sa(), Ca(), xa(), da = !1, ua = "";
|
|
2645
2656
|
}
|
|
2646
|
-
function
|
|
2647
|
-
|
|
2648
|
-
...
|
|
2657
|
+
function va(e = {}) {
|
|
2658
|
+
_a(), ha({
|
|
2659
|
+
...fa,
|
|
2649
2660
|
...e
|
|
2650
2661
|
});
|
|
2651
2662
|
}
|
|
2652
|
-
async function
|
|
2653
|
-
if (
|
|
2654
|
-
|
|
2663
|
+
async function ya() {
|
|
2664
|
+
if (!na(!0)) {
|
|
2665
|
+
_a();
|
|
2655
2666
|
return;
|
|
2656
2667
|
}
|
|
2657
|
-
if (
|
|
2658
|
-
let e = await
|
|
2668
|
+
if (Oa()) return;
|
|
2669
|
+
let e = await wa(fa.manifestUrl || ia);
|
|
2659
2670
|
if (!e?.label) return;
|
|
2660
|
-
if (!
|
|
2661
|
-
|
|
2671
|
+
if (!la) {
|
|
2672
|
+
la = e;
|
|
2662
2673
|
return;
|
|
2663
2674
|
}
|
|
2664
|
-
let t =
|
|
2665
|
-
!t || t.label ===
|
|
2675
|
+
let t = Na(la, e);
|
|
2676
|
+
!t || t.label === ua || Ea(t.label) || (ua = t.label, ba(t));
|
|
2666
2677
|
}
|
|
2667
|
-
function
|
|
2668
|
-
|
|
2678
|
+
function ba(e) {
|
|
2679
|
+
xa(), ma = document.createElement("div"), document.body.appendChild(ma), pa = D(ea, {
|
|
2669
2680
|
changelog: e.changelog,
|
|
2670
2681
|
modelValue: !0,
|
|
2671
|
-
versionLabel:
|
|
2682
|
+
versionLabel: Fa(e.displayVersion),
|
|
2672
2683
|
onRefresh: () => {
|
|
2673
2684
|
window.location.reload();
|
|
2674
2685
|
},
|
|
2675
2686
|
onRemindLater: (t) => {
|
|
2676
|
-
|
|
2687
|
+
Da(e.label, t), ua = "", xa(), Sa(), Oa();
|
|
2677
2688
|
}
|
|
2678
|
-
}),
|
|
2689
|
+
}), pa.use(x, { locale: Ge }), pa.mount(ma);
|
|
2679
2690
|
}
|
|
2680
|
-
function
|
|
2681
|
-
|
|
2691
|
+
function xa() {
|
|
2692
|
+
pa?.unmount(), ma?.remove(), pa = void 0, ma = void 0;
|
|
2682
2693
|
}
|
|
2683
|
-
function
|
|
2684
|
-
|
|
2694
|
+
function Sa() {
|
|
2695
|
+
sa !== void 0 && (window.clearInterval(sa), sa = void 0);
|
|
2685
2696
|
}
|
|
2686
|
-
function
|
|
2687
|
-
|
|
2697
|
+
function Ca() {
|
|
2698
|
+
ca !== void 0 && (window.clearTimeout(ca), ca = void 0);
|
|
2688
2699
|
}
|
|
2689
|
-
async function
|
|
2700
|
+
async function wa(e) {
|
|
2690
2701
|
try {
|
|
2691
2702
|
let t = new URL(e, window.location.origin);
|
|
2692
2703
|
t.searchParams.set("_t", String(Date.now()));
|
|
@@ -2699,49 +2710,49 @@ async function xa(e) {
|
|
|
2699
2710
|
});
|
|
2700
2711
|
if (!n.ok) return null;
|
|
2701
2712
|
let r = n.headers.get("content-type");
|
|
2702
|
-
return r && !r.includes("application/json") ? null :
|
|
2713
|
+
return r && !r.includes("application/json") ? null : ja(await n.json());
|
|
2703
2714
|
} catch {
|
|
2704
2715
|
return null;
|
|
2705
2716
|
}
|
|
2706
2717
|
}
|
|
2707
|
-
function
|
|
2708
|
-
return Math.max(
|
|
2718
|
+
function Ta() {
|
|
2719
|
+
return Math.max(fa.interval ?? aa, 30 * 1e3);
|
|
2709
2720
|
}
|
|
2710
|
-
function
|
|
2711
|
-
let t =
|
|
2721
|
+
function Ea(e) {
|
|
2722
|
+
let t = ka();
|
|
2712
2723
|
return !!(t && t.version === e);
|
|
2713
2724
|
}
|
|
2714
|
-
function
|
|
2725
|
+
function Da(e, t) {
|
|
2715
2726
|
let n = Date.now() + Math.max(t, 60 * 1e3);
|
|
2716
|
-
localStorage.setItem(
|
|
2727
|
+
localStorage.setItem(oa, JSON.stringify({
|
|
2717
2728
|
version: e,
|
|
2718
2729
|
until: n
|
|
2719
2730
|
}));
|
|
2720
2731
|
}
|
|
2721
|
-
function
|
|
2722
|
-
let e =
|
|
2723
|
-
return e?.until ? (
|
|
2724
|
-
|
|
2725
|
-
}, Math.max(e.until - Date.now(), 1e3)), !0) : (
|
|
2732
|
+
function Oa() {
|
|
2733
|
+
let e = ka();
|
|
2734
|
+
return e?.until ? (Sa(), Ca(), ca = window.setTimeout(() => {
|
|
2735
|
+
ca = void 0, da && na(!0) && ga();
|
|
2736
|
+
}, Math.max(e.until - Date.now(), 1e3)), !0) : (Ca(), !1);
|
|
2726
2737
|
}
|
|
2727
|
-
function
|
|
2728
|
-
let e =
|
|
2738
|
+
function ka() {
|
|
2739
|
+
let e = Aa();
|
|
2729
2740
|
return !e?.until || e.until <= Date.now() ? null : e;
|
|
2730
2741
|
}
|
|
2731
|
-
function
|
|
2742
|
+
function Aa() {
|
|
2732
2743
|
try {
|
|
2733
|
-
let e = localStorage.getItem(
|
|
2744
|
+
let e = localStorage.getItem(oa);
|
|
2734
2745
|
return e ? JSON.parse(e) : null;
|
|
2735
2746
|
} catch {
|
|
2736
|
-
return localStorage.removeItem(
|
|
2747
|
+
return localStorage.removeItem(oa), null;
|
|
2737
2748
|
}
|
|
2738
2749
|
}
|
|
2739
|
-
function
|
|
2740
|
-
let t = {}, n = {}, r = [], i =
|
|
2741
|
-
i && (t.main = e.main ?? {}, n.main = i), e.main?.changelog && r.push(...
|
|
2750
|
+
function ja(e) {
|
|
2751
|
+
let t = {}, n = {}, r = [], i = Ma(e.main);
|
|
2752
|
+
i && (t.main = e.main ?? {}, n.main = i), e.main?.changelog && r.push(...Pa(e.main.changelog));
|
|
2742
2753
|
for (let [i, a] of Object.entries(e.apps ?? {})) {
|
|
2743
|
-
let e =
|
|
2744
|
-
e && (t[i] = a, n[i] = e), a.changelog && r.push(...
|
|
2754
|
+
let e = Ma(a);
|
|
2755
|
+
e && (t[i] = a, n[i] = e), a.changelog && r.push(...Pa(a.changelog));
|
|
2745
2756
|
}
|
|
2746
2757
|
return {
|
|
2747
2758
|
changelog: r,
|
|
@@ -2751,10 +2762,10 @@ function Oa(e) {
|
|
|
2751
2762
|
versions: n
|
|
2752
2763
|
};
|
|
2753
2764
|
}
|
|
2754
|
-
function
|
|
2765
|
+
function Ma(e) {
|
|
2755
2766
|
return [e?.version, e?.buildTime].filter(Boolean).join("@");
|
|
2756
2767
|
}
|
|
2757
|
-
function
|
|
2768
|
+
function Na(e, t) {
|
|
2758
2769
|
let n = Object.entries(t.versions).filter(([t, n]) => e.versions[t] !== n).map(([e]) => [e, t.entries[e]]).filter((e) => !!e[1]), r = Object.keys(e.versions).filter((e) => !t.versions[e]);
|
|
2759
2770
|
if (!n.length && !r.length) return null;
|
|
2760
2771
|
let i = {};
|
|
@@ -2763,32 +2774,32 @@ function Aa(e, t) {
|
|
|
2763
2774
|
n && (i[e] = n);
|
|
2764
2775
|
}
|
|
2765
2776
|
return {
|
|
2766
|
-
changelog: n.flatMap(([, e]) =>
|
|
2777
|
+
changelog: n.flatMap(([, e]) => Pa(e.changelog)),
|
|
2767
2778
|
displayVersion: i.main || Object.values(i)[0] || "",
|
|
2768
2779
|
entries: Object.fromEntries(n),
|
|
2769
2780
|
label: [...n.map(([e]) => `${e}:${t.versions[e]}`), ...r.map((e) => `${e}:removed`)].join("|"),
|
|
2770
2781
|
versions: i
|
|
2771
2782
|
};
|
|
2772
2783
|
}
|
|
2773
|
-
function
|
|
2784
|
+
function Pa(e) {
|
|
2774
2785
|
return Array.isArray(e) ? e.map((e) => String(e).trim()).filter(Boolean) : [];
|
|
2775
2786
|
}
|
|
2776
|
-
function
|
|
2787
|
+
function Fa(e) {
|
|
2777
2788
|
let [t, n] = e.split("@");
|
|
2778
2789
|
return t && n ? `版本 ${t} · ${n}` : t || n || "";
|
|
2779
2790
|
}
|
|
2780
2791
|
//#endregion
|
|
2781
2792
|
//#region src/main/directives/index.ts
|
|
2782
|
-
var
|
|
2793
|
+
var Ia = {
|
|
2783
2794
|
mounted(e, t) {
|
|
2784
|
-
|
|
2795
|
+
La(e, t.value);
|
|
2785
2796
|
},
|
|
2786
2797
|
updated(e, t) {
|
|
2787
|
-
|
|
2798
|
+
La(e, t.value);
|
|
2788
2799
|
}
|
|
2789
2800
|
};
|
|
2790
|
-
function
|
|
2791
|
-
let n = a(), r =
|
|
2801
|
+
function La(e, t) {
|
|
2802
|
+
let n = a(), r = Ra(t), i = typeof t == "object" && !Array.isArray(t) && t.mode || "all", o = typeof t == "object" && !Array.isArray(t) ? !!t.disabled : !1, s = i === "any" ? r.some((e) => n.hasPermission(e)) : r.every((e) => n.hasPermission(e));
|
|
2792
2803
|
if (!r.length || s) {
|
|
2793
2804
|
e.style.display = "", e.hidden = !1, o && (e.removeAttribute("disabled"), e.classList.remove("is-disabled"));
|
|
2794
2805
|
return;
|
|
@@ -2799,15 +2810,15 @@ function Pa(e, t) {
|
|
|
2799
2810
|
}
|
|
2800
2811
|
e.style.display = "none", e.hidden = !0;
|
|
2801
2812
|
}
|
|
2802
|
-
function
|
|
2813
|
+
function Ra(e) {
|
|
2803
2814
|
return typeof e == "string" ? e ? [e] : [] : Array.isArray(e) ? e : e.permissions ?? [];
|
|
2804
2815
|
}
|
|
2805
|
-
function
|
|
2806
|
-
e.directive("permission",
|
|
2816
|
+
function za(e) {
|
|
2817
|
+
e.directive("permission", Ia);
|
|
2807
2818
|
}
|
|
2808
2819
|
//#endregion
|
|
2809
2820
|
//#region src/main/app/create-app.ts
|
|
2810
|
-
async function
|
|
2821
|
+
async function Ba(e) {
|
|
2811
2822
|
Je(e.appConfig), $e();
|
|
2812
2823
|
let t = oi({
|
|
2813
2824
|
businessRoutes: e.businessRoutes,
|
|
@@ -2821,9 +2832,9 @@ async function La(e) {
|
|
|
2821
2832
|
http: Xe,
|
|
2822
2833
|
requestManager: Qe
|
|
2823
2834
|
};
|
|
2824
|
-
de(), n.use(x, { locale: Ge }), n.use(r), n.use(t),
|
|
2835
|
+
de(), n.use(x, { locale: Ge }), n.use(r), n.use(t), za(n), Ke(t), await e.setupApp?.(i), await e.beforePlatformInit?.(i);
|
|
2825
2836
|
let a = X(r), o = l(r), s = dt(r);
|
|
2826
|
-
a.initializePreferences(),
|
|
2837
|
+
a.initializePreferences(), ha(e.appConfig.updateChecker);
|
|
2827
2838
|
let c = ue({ fullscreen: !0 });
|
|
2828
2839
|
try {
|
|
2829
2840
|
await Promise.all([o.initializeSystemConfig(), s.initializeTabs()]);
|
|
@@ -2838,4 +2849,4 @@ async function La(e) {
|
|
|
2838
2849
|
return await e.afterMount?.(d), n;
|
|
2839
2850
|
}
|
|
2840
2851
|
//#endregion
|
|
2841
|
-
export { Ze as _,
|
|
2852
|
+
export { Ze as _, na as a, Ke as b, Gi as c, Gr as d, Ht as f, $e as g, dt as h, _a as i, oi as l, J as m, va as n, ra as o, X as p, ha as r, Ki as s, Ba as t, ai as u, Xe as v, Qe as y };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MICRO_AUTH_EXPIRED_EVENT as e } from "./micro-contract.js";
|
|
2
|
-
import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, y as b } from "./chunks/main-
|
|
2
|
+
import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, y as b } from "./chunks/main-CDJQvDTg.js";
|
|
3
3
|
import { ApiError as x, RequestManager as S, createRequestClient as C, formatErrorMessage as w } from "./request.js";
|
|
4
4
|
import { a as T, i as E, n as D, r as O, t as k } from "./chunks/auth-C3RvRgcW.js";
|
|
5
5
|
import { i as A, n as j, r as M, t as N } from "./chunks/system-DZaKDrG6.js";
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "./chunks/main-
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "./chunks/main-CDJQvDTg.js";
|
|
2
2
|
import { a as b, i as x, n as S, r as C, t as w } from "./chunks/auth-C3RvRgcW.js";
|
|
3
3
|
import { i as T, n as E, r as D, t as O } from "./chunks/system-DZaKDrG6.js";
|
|
4
4
|
import { o as k } from "./chunks/config-CJOAan9n.js";
|