x-essential-lib 0.10.16 → 0.10.18
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.
|
@@ -4,6 +4,7 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
|
|
|
4
4
|
var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
|
|
5
5
|
var en_default = {
|
|
6
6
|
"dlg": { common: {
|
|
7
|
+
ask: "Do you want {verb} {objet} '{name}'",
|
|
7
8
|
cancel: "Cancel",
|
|
8
9
|
confirm: "Confirm",
|
|
9
10
|
responding: "Responding..."
|
|
@@ -4,6 +4,7 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
|
|
|
4
4
|
var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
|
|
5
5
|
var zhHans_default = {
|
|
6
6
|
"dlg": { common: {
|
|
7
|
+
ask: "你想要{verb}{objet}'{name}'",
|
|
7
8
|
cancel: "取消",
|
|
8
9
|
confirm: "确定",
|
|
9
10
|
responding: "响应中..."
|
package/dist/index.d.ts
CHANGED
|
@@ -339,6 +339,7 @@ declare function useViewStack(name: string, hook?: (params: unknown) => void): {
|
|
|
339
339
|
declare function loadLocaleMessageEssential(locale: string): Promise<{
|
|
340
340
|
dlg: {
|
|
341
341
|
common: {
|
|
342
|
+
ask: string;
|
|
342
343
|
cancel: string;
|
|
343
344
|
confirm: string;
|
|
344
345
|
responding: string;
|
package/dist/index.js
CHANGED
|
@@ -517,42 +517,36 @@ const routeMetas = [
|
|
|
517
517
|
{
|
|
518
518
|
app: "x-mine-mf",
|
|
519
519
|
path: "/mine/personalInfo",
|
|
520
|
-
back: "/mine",
|
|
521
520
|
level: 1,
|
|
522
521
|
requireAuth: true
|
|
523
522
|
},
|
|
524
523
|
{
|
|
525
524
|
app: "x-mine-mf",
|
|
526
|
-
path: "/mine/
|
|
527
|
-
|
|
528
|
-
level: 2,
|
|
525
|
+
path: "/mine/settings",
|
|
526
|
+
level: 1,
|
|
529
527
|
requireAuth: true
|
|
530
528
|
},
|
|
531
529
|
{
|
|
532
530
|
app: "x-mine-mf",
|
|
533
|
-
path: "/mine/
|
|
534
|
-
|
|
535
|
-
level: 1,
|
|
531
|
+
path: "/mine/accountSecurity",
|
|
532
|
+
level: 2,
|
|
536
533
|
requireAuth: true
|
|
537
534
|
},
|
|
538
535
|
{
|
|
539
536
|
app: "x-mine-mf",
|
|
540
537
|
path: "/mine/general",
|
|
541
|
-
back: "/mine/settings",
|
|
542
538
|
level: 2,
|
|
543
539
|
requireAuth: true
|
|
544
540
|
},
|
|
545
541
|
{
|
|
546
542
|
app: "x-mine-mf",
|
|
547
|
-
path: "/mine/
|
|
548
|
-
back: "/mine/general",
|
|
543
|
+
path: "/mine/darkMode",
|
|
549
544
|
level: 3,
|
|
550
545
|
requireAuth: true
|
|
551
546
|
},
|
|
552
547
|
{
|
|
553
548
|
app: "x-mine-mf",
|
|
554
|
-
path: "/mine/
|
|
555
|
-
back: "/mine/general",
|
|
549
|
+
path: "/mine/language",
|
|
556
550
|
level: 3,
|
|
557
551
|
requireAuth: true
|
|
558
552
|
},
|
|
@@ -822,34 +816,6 @@ function useMicroApp(globalStates, base, customBack) {
|
|
|
822
816
|
syncStatusBar();
|
|
823
817
|
}, { immediate: true });
|
|
824
818
|
}
|
|
825
|
-
async function handleBack() {
|
|
826
|
-
if (!isEmpty(views)) {
|
|
827
|
-
if (!hasView(views, "waitDlg")) popView(views);
|
|
828
|
-
return;
|
|
829
|
-
}
|
|
830
|
-
const routeMeta = matchRouteMeta(route.path);
|
|
831
|
-
if (!routeMeta) return;
|
|
832
|
-
if (routeMeta.level === 0) navigator?.Backbutton?.goHome(() => {}, () => {});
|
|
833
|
-
else if (customBack) customBack(routeMeta);
|
|
834
|
-
else if (routeMeta.back) await router.replace({
|
|
835
|
-
path: routeMeta.back,
|
|
836
|
-
query: { orgId: activeOrg.value }
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
async function onKeyDown(e) {
|
|
840
|
-
if (e.key === "Escape") {
|
|
841
|
-
await handleBack();
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
if (base) {
|
|
846
|
-
onMounted(() => {
|
|
847
|
-
window.addEventListener("keydown", onKeyDown);
|
|
848
|
-
});
|
|
849
|
-
onBeforeUnmount(() => {
|
|
850
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
819
|
let handle;
|
|
854
820
|
async function syncPermission() {
|
|
855
821
|
if (!running.value) return;
|
|
@@ -884,6 +850,35 @@ function useMicroApp(globalStates, base, customBack) {
|
|
|
884
850
|
stopTimer();
|
|
885
851
|
});
|
|
886
852
|
}
|
|
853
|
+
async function handleBack() {
|
|
854
|
+
if (!isEmpty(views)) {
|
|
855
|
+
if (!hasView(views, "waitDlg")) popView(views);
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
const routeMeta = matchRouteMeta(route.path);
|
|
859
|
+
if (!routeMeta) return;
|
|
860
|
+
if (routeMeta.level === 0) navigator?.Backbutton?.goHome(() => {}, () => {});
|
|
861
|
+
else if (customBack) customBack(routeMeta);
|
|
862
|
+
else if (routeMeta.back) router.replace({
|
|
863
|
+
path: routeMeta.back,
|
|
864
|
+
query: { orgId: activeOrg.value }
|
|
865
|
+
});
|
|
866
|
+
else router.back();
|
|
867
|
+
}
|
|
868
|
+
async function onKeyDown(e) {
|
|
869
|
+
if (e.key === "Escape") {
|
|
870
|
+
await handleBack();
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
if (!base) {
|
|
875
|
+
onMounted(() => {
|
|
876
|
+
window.addEventListener("keydown", onKeyDown);
|
|
877
|
+
});
|
|
878
|
+
onBeforeUnmount(() => {
|
|
879
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
880
|
+
});
|
|
881
|
+
}
|
|
887
882
|
function onUpdateDark(val) {
|
|
888
883
|
dark.value = val;
|
|
889
884
|
}
|
|
@@ -1682,8 +1677,8 @@ const install = (app) => {
|
|
|
1682
1677
|
//#endregion
|
|
1683
1678
|
//#region src/i18n/index.ts
|
|
1684
1679
|
async function loadLocaleMessageEssential(locale) {
|
|
1685
|
-
if (locale === "en") return (await import("./i18n-en.
|
|
1686
|
-
else if (locale === "zhHans") return (await import("./i18n-zhHans.
|
|
1680
|
+
if (locale === "en") return (await import("./i18n-en.go5xopo5.js").then((n) => n.t)).default;
|
|
1681
|
+
else if (locale === "zhHans") return (await import("./i18n-zhHans.i1hcjh5z.js").then((n) => n.t)).default;
|
|
1687
1682
|
else throw new Error(`invalid locale=${locale}`);
|
|
1688
1683
|
}
|
|
1689
1684
|
|