@huyooo/ui 0.4.90 → 0.5.1
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/{AuthkitAuthModal-4u1nye5k.js → AuthkitAuthModal-cEi5Hm14.js} +13 -15
- package/dist/{useAuthkitAppsAuthPageInfo-Dy0Snk6O.js → AuthkitAuthModal.vue_vue_type_style_index_1_lang-B-QKS_BT.js} +1 -1
- package/dist/{AuthkitAuthorize-ScwqrsOC.js → AuthkitAuthorize-DksJZktr.js} +9 -8
- package/dist/{Clipboard-Bful1lNJ.js → Clipboard-CGm0G1dN.js} +1 -1
- package/dist/{CustomTable-JflAYS8i.js → CustomTable-kfI18phy.js} +16 -17
- package/dist/{FeedbackItem-B_EUApFA.js → FeedbackItem-Day3rfSw.js} +14 -15
- package/dist/{FeedbackModal-D1htK7xY.js → FeedbackModal-CsRXm-MY.js} +8 -11
- package/dist/{Menu-Cxo8Rpu3.js → Menu-BKBnsDJ8.js} +6 -5
- package/dist/{MessageHandle-DkNum5-u.js → MessageHandle-DqH_478k.js} +18 -20
- package/dist/{PaySubscriptions-l6VlqvBy.js → PaySubscriptions-Dp8y1fdJ.js} +10 -11
- package/dist/{ReferrerReferees-BclAtmgX.js → ReferrerReferees-xIXZglpy.js} +19 -20
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-CDyUt05d.js → Upload.vue_vue_type_script_setup_true_lang-CxGZSDoo.js} +10 -11
- package/dist/UserAccountMenu-DD3zoOBd.js +40 -0
- package/dist/UserPanel-C1NGdsFk.js +580 -0
- package/dist/WidthContainer-D9JWjdkk.js +376 -0
- package/dist/authkit.js +4 -4
- package/dist/common.d.ts +2 -0
- package/dist/common.js +14 -12
- package/dist/components/DefaultLayout.vue.d.ts +9 -0
- package/dist/components/Header.vue.d.ts +9 -0
- package/dist/composables/Authkit/useAuthMenu.d.ts +13 -0
- package/dist/composables/Authkit/useRoutePermission.d.ts +5 -0
- package/dist/composables.d.ts +2 -0
- package/dist/composables.js +19 -15
- package/dist/feedback.js +3 -3
- package/dist/index.js +180 -173
- package/dist/message.js +2 -2
- package/dist/pay.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/styles.d.ts +0 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitUsersProfile-DNOB_Kuk.js → useAuthkitUsersProfile-D2UZf7n0.js} +1 -1
- package/dist/useDownloads-CHe228Vf.js +87 -0
- package/dist/{useMessageNotifications-DOH1MS61.js → useMessageNotifications-BahKMcby.js} +1 -1
- package/dist/useRoutePermission-Uxu5S3m1.js +119 -0
- package/dist/{useUploadCos-B5P_PDcy.js → useUploadCos-DNKp_9xt.js} +2 -2
- package/dist/user.js +7 -6
- package/package.json +3 -2
- package/dist/UserAccountMenu-DDyh3Rjo.js +0 -615
- package/dist/WidthContainer-CfR77puD.js +0 -263
- package/dist/useDownloads-BkDo_wOR.js +0 -103
- /package/dist/{globalConfig-DZIhLe1R.js → index-DZIhLe1R.js} +0 -0
- /package/dist/{_commonjsHelpers-DaMA6jEr.js → index-DaMA6jEr.js} +0 -0
package/dist/styles.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/upload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { u as s } from "./useUploadCos-
|
|
1
|
+
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-CxGZSDoo.js";
|
|
2
|
+
import { u as s } from "./useUploadCos-DNKp_9xt.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Upload,
|
|
5
5
|
s as useUploadCos
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as u, readonly as S, computed as A } from "vue";
|
|
2
2
|
import { api as a } from "@huyooo/api";
|
|
3
|
-
import { g as n } from "./
|
|
3
|
+
import { g as n } from "./index-DZIhLe1R.js";
|
|
4
4
|
function b(e) {
|
|
5
5
|
return a({
|
|
6
6
|
url: `${n.authPrefixUrl}/restfulApi/auth/signIn`,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Message as h } from "@arco-design/web-vue";
|
|
4
|
+
import { ref as n } from "vue";
|
|
5
|
+
function D(a) {
|
|
6
|
+
const s = n(!1), t = n(), l = n(!1), i = n(""), f = n("");
|
|
7
|
+
function e(o) {
|
|
8
|
+
h.success(o), l.value = !1, s.value = !1, a("confirm");
|
|
9
|
+
}
|
|
10
|
+
function c() {
|
|
11
|
+
l.value = !1, console.log("handleClose"), a("cancel");
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
loading: s,
|
|
15
|
+
formRef: t,
|
|
16
|
+
submitSuccess: e,
|
|
17
|
+
modelType: i,
|
|
18
|
+
changeType: f,
|
|
19
|
+
show: l,
|
|
20
|
+
handleCancel: c
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const d = n({
|
|
24
|
+
key: "",
|
|
25
|
+
name: ""
|
|
26
|
+
});
|
|
27
|
+
function y() {
|
|
28
|
+
function a(s, t) {
|
|
29
|
+
d.value.key = s, d.value.name = t;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
activeDoc: d,
|
|
33
|
+
setActiveDoc: a
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
let u = null, v = "", r = null;
|
|
37
|
+
function b() {
|
|
38
|
+
const a = n([]), s = n(!1), t = n(""), l = n("");
|
|
39
|
+
async function i({
|
|
40
|
+
versionApi: f
|
|
41
|
+
}) {
|
|
42
|
+
if (u) {
|
|
43
|
+
a.value = u, l.value = v;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (r) {
|
|
47
|
+
await r, a.value = u || [], l.value = v;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
s.value = !0, t.value = "", r = fetch(f).then((e) => {
|
|
51
|
+
if (!e.ok)
|
|
52
|
+
throw new Error(`HTTP error! status: ${e.status}`);
|
|
53
|
+
return e.json();
|
|
54
|
+
}).then((e) => {
|
|
55
|
+
const c = e.downloads.map((o) => ({
|
|
56
|
+
id: o.id,
|
|
57
|
+
name: o.name,
|
|
58
|
+
description: o.description,
|
|
59
|
+
version: o.version,
|
|
60
|
+
updateDate: o.updateDate,
|
|
61
|
+
icon: "",
|
|
62
|
+
// 将在组件中动态设置
|
|
63
|
+
downloadUrl: o.downloadUrl,
|
|
64
|
+
platform: o.platform,
|
|
65
|
+
requirements: o.requirements,
|
|
66
|
+
badge: o.badge
|
|
67
|
+
}));
|
|
68
|
+
u = c, v = e.version, a.value = c, l.value = e.version;
|
|
69
|
+
}).catch((e) => {
|
|
70
|
+
t.value = e.message || "获取版本信息失败", console.error("Failed to fetch downloads:", e);
|
|
71
|
+
}).finally(() => {
|
|
72
|
+
s.value = !1, r = null;
|
|
73
|
+
}), await r;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
downloads: a,
|
|
77
|
+
loading: s,
|
|
78
|
+
error: t,
|
|
79
|
+
version: l,
|
|
80
|
+
fetchDownloads: i
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
y as a,
|
|
85
|
+
b,
|
|
86
|
+
D as u
|
|
87
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as a, computed as x } from "vue";
|
|
2
2
|
import { api as c } from "@huyooo/api";
|
|
3
|
-
import { g } from "./
|
|
3
|
+
import { g } from "./index-DZIhLe1R.js";
|
|
4
4
|
function z(t) {
|
|
5
5
|
return c({
|
|
6
6
|
url: `${g.prefixUrl}/restfulApi/messageCenter/messageNotifications/find`,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { computed as f, ref as R, watch as b } from "vue";
|
|
2
|
+
import { useRouter as h, useRoute as y } from "vue-router";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "./index-DZIhLe1R.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import "@arco-design/web-vue";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import "./useUploadCos-DNKp_9xt.js";
|
|
10
|
+
import "@huyooo/api";
|
|
11
|
+
import { u as v } from "./AuthkitAuthModal.vue_vue_type_style_index_1_lang-B-QKS_BT.js";
|
|
12
|
+
import { a as d } from "./useAuthkitUsersProfile-D2UZf7n0.js";
|
|
13
|
+
import "@iconify/vue";
|
|
14
|
+
/* empty css */
|
|
15
|
+
/* empty css */
|
|
16
|
+
/* empty css */
|
|
17
|
+
/* empty css */
|
|
18
|
+
import "./index-DaMA6jEr.js";
|
|
19
|
+
function q(n, r = "default") {
|
|
20
|
+
const o = document;
|
|
21
|
+
if (o && typeof o.startViewTransition == "function") {
|
|
22
|
+
const i = document.body;
|
|
23
|
+
i.classList.add(`vt-${r}`), o.startViewTransition(() => {
|
|
24
|
+
try {
|
|
25
|
+
n();
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
}).finished.finally(() => {
|
|
29
|
+
i.classList.remove(`vt-${r}`);
|
|
30
|
+
});
|
|
31
|
+
} else
|
|
32
|
+
n();
|
|
33
|
+
}
|
|
34
|
+
function z(n, r, o) {
|
|
35
|
+
const i = n.find((a) => {
|
|
36
|
+
var c;
|
|
37
|
+
return ((c = a.meta) == null ? void 0 : c.menuType) === r;
|
|
38
|
+
});
|
|
39
|
+
return (i == null ? void 0 : i.path) || o;
|
|
40
|
+
}
|
|
41
|
+
function B(n) {
|
|
42
|
+
const r = h(), {
|
|
43
|
+
appsData: o
|
|
44
|
+
} = v(), {
|
|
45
|
+
isLoggedIn: i,
|
|
46
|
+
userProfile: a
|
|
47
|
+
} = d(), c = f(() => {
|
|
48
|
+
var t;
|
|
49
|
+
return !i.value || !a.value ? [] : ((t = a.value.permissions) == null ? void 0 : t.map((e) => e.permissionKey)) || [];
|
|
50
|
+
});
|
|
51
|
+
function u(t) {
|
|
52
|
+
return (o.value.publicRoutes || []).some((s) => s.permissionKey === t);
|
|
53
|
+
}
|
|
54
|
+
function m(t) {
|
|
55
|
+
return i.value ? c.value.includes(t) : !1;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
menus: f(() => r.getRoutes().filter((e) => {
|
|
59
|
+
const s = e.meta;
|
|
60
|
+
return n ? s.menuType === n : !!s.menuType;
|
|
61
|
+
}).filter((e) => {
|
|
62
|
+
const s = e.path;
|
|
63
|
+
return u(s) ? !0 : m(s);
|
|
64
|
+
}).map((e) => {
|
|
65
|
+
const s = e.meta;
|
|
66
|
+
return {
|
|
67
|
+
name: s.menuName || e.path,
|
|
68
|
+
path: e.path,
|
|
69
|
+
key: e.path,
|
|
70
|
+
icon: s.menuIcon || s.icon || "Header/Help"
|
|
71
|
+
};
|
|
72
|
+
})),
|
|
73
|
+
isRoutePublic: u,
|
|
74
|
+
hasPermission: (t) => u(t) ? !0 : m(t),
|
|
75
|
+
isLoggedIn: i
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function E() {
|
|
79
|
+
const n = h(), r = y(), {
|
|
80
|
+
appsAuthPageInfoApi: o,
|
|
81
|
+
appsData: i
|
|
82
|
+
} = v(), {
|
|
83
|
+
isLoggedIn: a,
|
|
84
|
+
userProfile: c
|
|
85
|
+
} = d(), u = R(!1);
|
|
86
|
+
function m(e) {
|
|
87
|
+
return (i.value.publicRoutes || []).some((p) => p.permissionKey === e);
|
|
88
|
+
}
|
|
89
|
+
function l(e) {
|
|
90
|
+
var p;
|
|
91
|
+
return !a.value || !c.value ? !1 : (((p = c.value.permissions) == null ? void 0 : p.map((P) => P.permissionKey)) || []).includes(e);
|
|
92
|
+
}
|
|
93
|
+
function t(e) {
|
|
94
|
+
if (u.value = !0, m(e)) {
|
|
95
|
+
u.value = !1;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (!a.value) {
|
|
99
|
+
n.replace("/"), u.value = !1;
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
l(e) || n.replace("/"), u.value = !1;
|
|
103
|
+
}
|
|
104
|
+
return o(() => {
|
|
105
|
+
t(r.path), b(() => r.path, (e) => {
|
|
106
|
+
t(e);
|
|
107
|
+
});
|
|
108
|
+
}), {
|
|
109
|
+
isChecking: u,
|
|
110
|
+
isRoutePublic: m,
|
|
111
|
+
hasPermission: l
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
E as a,
|
|
116
|
+
z as f,
|
|
117
|
+
B as u,
|
|
118
|
+
q as w
|
|
119
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as _t, g as Ht } from "./
|
|
1
|
+
import { c as _t, g as Ht } from "./index-DaMA6jEr.js";
|
|
2
2
|
import { api as bt } from "@huyooo/api";
|
|
3
|
-
import { g as it } from "./
|
|
3
|
+
import { g as it } from "./index-DZIhLe1R.js";
|
|
4
4
|
var Nt = { exports: {} };
|
|
5
5
|
(function(_, fe) {
|
|
6
6
|
(function(Y, A) {
|
package/dist/user.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as r, a as e, b as o, c as n, S as t } from "./UserPanel-C1NGdsFk.js";
|
|
2
|
+
import { U as c } from "./UserAccountMenu-DD3zoOBd.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
c as UserAccountMenu,
|
|
5
|
+
r as UserAvatar,
|
|
6
|
+
e as UserBasicInformation,
|
|
6
7
|
o as UserButton,
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
n as UserPanel,
|
|
9
|
+
t as UserSubscriptionBaseInformation
|
|
9
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huyooo/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"@iconify/vue": ">=4.1.2",
|
|
82
82
|
"@vueuse/core": ">=11.3.0",
|
|
83
83
|
"ant-design-x-vue": ">=1.2.6",
|
|
84
|
-
"vue": ">=3.4.37"
|
|
84
|
+
"vue": ">=3.4.37",
|
|
85
|
+
"vue-router": ">=4.0.0"
|
|
85
86
|
},
|
|
86
87
|
"dependencies": {
|
|
87
88
|
"cos-js-sdk-v5": "^1.10.1",
|