@huyooo/ui 0.4.34 → 0.4.36

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.
Files changed (64) hide show
  1. package/dist/{AuthkitAppSetting-DqhUivnU.js → AuthkitAppSetting-D6PAh-ZI.js} +216 -215
  2. package/dist/{AuthkitAuthorize-f_yAVn7e.js → AuthkitAuthorize-DKG7JGSV.js} +4 -4
  3. package/dist/{FeedbackItem-DJiIQBMe.js → FeedbackItem-BO8dYYKo.js} +3 -7
  4. package/dist/FeedbackModal-B_W_RWec.js +1061 -0
  5. package/dist/{LandingPageToc-BkL7mxo7.js → LandingPageToc-BrUxyH80.js} +257 -269
  6. package/dist/MessageHandle-Dt6rb0rg.js +830 -0
  7. package/dist/{PaySubscriptions-foEcT6VN.js → PaySubscriptions-B42IdT-5.js} +59 -58
  8. package/dist/ReferrerReferees-CvuUodDZ.js +116 -0
  9. package/dist/{Upload.vue_vue_type_script_setup_true_lang-C2OaTrku.js → Upload.vue_vue_type_script_setup_true_lang-Bw3IlEUj.js} +4 -4
  10. package/dist/{UserPanel-CA3roDgH.js → UserPanel-BIKWssEY.js} +169 -174
  11. package/dist/api/Authkit/apps.d.ts +1 -1
  12. package/dist/api/Buckets/Files.d.ts +7 -7
  13. package/dist/api/Buckets.d.ts +2 -2
  14. package/dist/api/Message/ChangelogNotifications.d.ts +2 -2
  15. package/dist/api/Message/EventNotifications.d.ts +2 -2
  16. package/dist/api/Message/MessageNotifications.d.ts +5 -5
  17. package/dist/api/Message/NoticeNotifications.d.ts +2 -2
  18. package/dist/api/Messages.d.ts +2 -2
  19. package/dist/api/Referrer.d.ts +1 -1
  20. package/dist/api/index.d.ts +8 -8
  21. package/dist/authkit.js +4 -4
  22. package/dist/common/globalConfig.d.ts +15 -0
  23. package/dist/common.d.ts +1 -1
  24. package/dist/common.js +21 -19
  25. package/dist/components/Feedback/FeedbackContainer.vue.d.ts +0 -8
  26. package/dist/components/Feedback/FeedbackDetails.vue.d.ts +1 -1
  27. package/dist/components/Feedback/FeedbackForm.vue.d.ts +2 -20
  28. package/dist/components/LandingPage/LandingPageFooterLayout.vue.d.ts +3 -3
  29. package/dist/components/Message/MessageAppMessage.vue.d.ts +1 -24
  30. package/dist/components/Message/MessageChangelogNotifications.vue.d.ts +1 -11
  31. package/dist/components/Message/MessageChangelogNotificationsDetails.vue.d.ts +0 -8
  32. package/dist/components/Message/MessageEventNotifications.vue.d.ts +1 -11
  33. package/dist/components/Message/MessageEventNotificationsDetails.vue.d.ts +0 -8
  34. package/dist/components/Message/MessageHandle.vue.d.ts +28 -88
  35. package/dist/components/Message/MessageNoticeNotifications.vue.d.ts +1 -11
  36. package/dist/components/Message/MessageNoticeNotificationsDetails.vue.d.ts +0 -8
  37. package/dist/components/Message/MessageNotifications.vue.d.ts +1 -11
  38. package/dist/components/Referrer/ReferrerReferees.vue.d.ts +2 -12
  39. package/dist/components/User/UserPanel.vue.d.ts +30 -100
  40. package/dist/composables/useMessageNotifications.d.ts +1 -1
  41. package/dist/composables.d.ts +1 -1
  42. package/dist/composables.js +16 -15
  43. package/dist/feedback.js +2 -2
  44. package/dist/globalConfig-dtNQA0ZH.js +15 -0
  45. package/dist/index.js +28 -26
  46. package/dist/landingPage.js +1 -1
  47. package/dist/message.js +2 -2
  48. package/dist/pay.js +1 -1
  49. package/dist/referrer.js +1 -1
  50. package/dist/style.css +1 -1
  51. package/dist/upload.js +2 -2
  52. package/dist/{useAuthkitAuthModal-OkUKCIWR.js → useAuthkitAuthModal-C153ZpNb.js} +14 -13
  53. package/dist/useAuthkitUsersProfile-CT2MN1S5.js +228 -0
  54. package/dist/useMessageNotifications-DkKSVkdt.js +106 -0
  55. package/dist/{useUploadCos-uerXQY3P.js → useUploadCos-C3ts0Gpa.js} +1481 -1499
  56. package/dist/user.d.ts +0 -1
  57. package/dist/user.js +4 -6
  58. package/package.json +1 -1
  59. package/dist/FeedbackModal-D7gtWqMr.js +0 -1077
  60. package/dist/MessageHandle-DN_JsQb2.js +0 -885
  61. package/dist/ReferrerReferees-DxNJ2ETq.js +0 -121
  62. package/dist/composables/useGlobalConfig.d.ts +0 -20
  63. package/dist/useAuthkitUsersProfile-Diituvy1.js +0 -227
  64. package/dist/useMessageNotifications-lmP0vJDM.js +0 -105
@@ -1,121 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- /* empty css */
4
- import { defineComponent as A, ref as v, createBlock as g, openBlock as _, unref as a, withCtx as C, createElementVNode as n, createVNode as U, createCommentVNode as V, toDisplayString as h, createTextVNode as w } from "vue";
5
- import { Modal as y } from "@arco-design/web-vue";
6
- import { api as T } from "@huyooo/api";
7
- import { u as B } from "./useTableHandle-DKUIdSSh.js";
8
- import { C as D } from "./CustomTable-JflAYS8i.js";
9
- import { C as q } from "./Clipboard-Bful1lNJ.js";
10
- import { a as E } from "./useAuthkitUsersProfile-Diituvy1.js";
11
- import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- function M(s, u) {
13
- return T({
14
- url: `${s}/restfulApi/referrer/referees`,
15
- method: "post",
16
- data: u
17
- });
18
- }
19
- const $ = {
20
- class: "invite-code-section"
21
- }, j = {
22
- class: "invite-code-value"
23
- }, F = /* @__PURE__ */ A({
24
- __name: "ReferrerReferees",
25
- props: {
26
- prefixUrl: {
27
- type: String,
28
- required: !0
29
- }
30
- },
31
- emits: ["cancel"],
32
- setup(s, {
33
- expose: u,
34
- emit: x
35
- }) {
36
- const b = s, S = x, {
37
- pagination: t,
38
- dataSource: p,
39
- setPage: m
40
- } = B("被邀请人"), {
41
- userProfile: c
42
- } = E(), k = [{
43
- dataIndex: "email",
44
- slotName: "email",
45
- title: "被邀请人邮箱",
46
- ellipsis: !0,
47
- tooltip: !0
48
- }, {
49
- dataIndex: "createAt",
50
- slotName: "createAt",
51
- title: "创建日期",
52
- ellipsis: !0,
53
- tooltip: !0
54
- }], r = v(!1);
55
- function f() {
56
- r.value = !0, M(b.prefixUrl, {
57
- current: t.value.current,
58
- pageSize: t.value.pageSize
59
- }).then(({
60
- data: e
61
- }) => {
62
- r.value = !1, p.value = e.items, t.value.total = e.count;
63
- }).catch(() => {
64
- r.value = !1;
65
- });
66
- }
67
- function I(e) {
68
- m(e, t.value.pageSize), f();
69
- }
70
- function N(e) {
71
- m(t.value.current, e), f();
72
- }
73
- const o = v(!1);
74
- function P() {
75
- o.value = !1, S("cancel");
76
- }
77
- function R(e) {
78
- o.value = e, f();
79
- }
80
- return u({
81
- setData: R
82
- }), (e, i) => (_(), g(a(y), {
83
- visible: o.value,
84
- "onUpdate:visible": i[0] || (i[0] = (l) => o.value = l),
85
- title: "被邀请人详情",
86
- width: "60%",
87
- "ok-loading": r.value,
88
- footer: !1,
89
- "mask-closable": !1,
90
- "unmount-on-close": "",
91
- onCancel: P
92
- }, {
93
- default: C(() => {
94
- var l, d;
95
- return [n("div", $, [i[1] || (i[1] = n("div", {
96
- class: "invite-code-label"
97
- }, "我的邀请码:", -1)), n("div", j, [n("span", null, h(((l = a(c)) == null ? void 0 : l.referrerId) || "-"), 1), (d = a(c)) != null && d.referrerId ? (_(), g(q, {
98
- key: 0,
99
- value: a(c).referrerId,
100
- message: "邀请码复制成功"
101
- }, null, 8, ["value"])) : V("", !0)])]), U(D, {
102
- columns: k,
103
- data: a(p),
104
- loading: r.value,
105
- pagination: a(t),
106
- onPageChange: I,
107
- onPageSizeChange: N
108
- }, {
109
- email: C(({
110
- record: z
111
- }) => [w(h(z.refereeInfo.email || "-"), 1)]),
112
- _: 1
113
- }, 8, ["data", "loading", "pagination"])];
114
- }),
115
- _: 1
116
- }, 8, ["visible", "ok-loading"]));
117
- }
118
- }), te = /* @__PURE__ */ H(F, [["__scopeId", "data-v-45010e4b"]]);
119
- export {
120
- te as R
121
- };
@@ -1,20 +0,0 @@
1
- export interface HuyoooUIConfig {
2
- /** 应用ID - 必填 */
3
- appId: string;
4
- /** 存储桶ID - 必填 */
5
- bucketId: string;
6
- /** API前缀 - 默认 '/api' */
7
- prefixUrl: string;
8
- /** 存储桶名称 - 必填 */
9
- bucket: string;
10
- /** 地域 - 默认 'ap-beijing' */
11
- region: string;
12
- }
13
- export declare function useGlobalConfig(): {
14
- appId: import('vue').Ref<string, string>;
15
- bucketId: import('vue').Ref<string, string>;
16
- prefixUrl: import('vue').Ref<string, string>;
17
- bucket: import('vue').Ref<string, string>;
18
- region: import('vue').Ref<string, string>;
19
- setConfig: (newConfig: HuyoooUIConfig) => void;
20
- };
@@ -1,227 +0,0 @@
1
- import { ref as u, readonly as A, computed as U } from "vue";
2
- import { api as r } from "@huyooo/api";
3
- function P(e) {
4
- return r({
5
- url: "/restfulApi/auth/signIn",
6
- method: "post",
7
- data: e
8
- });
9
- }
10
- function T(e) {
11
- return r({
12
- url: "/restfulApi/auth/resetPassword",
13
- method: "post",
14
- data: e
15
- });
16
- }
17
- function b(e) {
18
- return r({
19
- url: "/restfulApi/auth/signUp",
20
- method: "post",
21
- data: e
22
- });
23
- }
24
- function D(e) {
25
- return r({
26
- url: "/restfulApi/oauth2/authorize",
27
- method: "post",
28
- data: e
29
- });
30
- }
31
- const i = u("signIn"), p = [], g = [], m = [], l = u(null);
32
- function y() {
33
- try {
34
- const e = localStorage.getItem("jwtToken");
35
- if (e)
36
- return l.value = e, !0;
37
- } catch (e) {
38
- console.warn("Failed to access localStorage:", e);
39
- }
40
- return !1;
41
- }
42
- function j() {
43
- if (l.value)
44
- return l.value;
45
- try {
46
- const e = localStorage.getItem("jwtToken");
47
- return e && (l.value = e), e;
48
- } catch (e) {
49
- return console.warn("Failed to access localStorage:", e), null;
50
- }
51
- }
52
- function h(e) {
53
- l.value = e;
54
- try {
55
- localStorage.setItem("jwtToken", e);
56
- } catch (a) {
57
- console.warn("Failed to save token to localStorage:", a);
58
- }
59
- }
60
- function C() {
61
- l.value = null;
62
- try {
63
- localStorage.removeItem("jwtToken");
64
- } catch (e) {
65
- console.warn("Failed to clear localStorage:", e);
66
- }
67
- }
68
- function E(e) {
69
- p.push(e);
70
- }
71
- function V(e) {
72
- g.push(e);
73
- }
74
- function F(e) {
75
- m.push(e);
76
- }
77
- function L() {
78
- const e = u(!1), a = u(!1), c = u(!1);
79
- function f(n) {
80
- e.value = !0, P({
81
- email: n.email,
82
- password: n.password
83
- }).then(({
84
- data: t
85
- }) => {
86
- e.value = !1, h(t.jwtToken), p.forEach((S) => S(t));
87
- }).catch((t) => {
88
- e.value = !1, console.error("登录失败:", t);
89
- });
90
- }
91
- function o(n) {
92
- a.value = !0, b({
93
- email: n.email,
94
- userToken: n.userToken,
95
- emailVerifyId: n.emailVerifyId,
96
- password: n.password,
97
- referrerId: n.referrerId
98
- }).then(() => {
99
- a.value = !1, i.value = "signIn", g.forEach((t) => t());
100
- }).catch((t) => {
101
- a.value = !1, console.error("注册失败:", t);
102
- });
103
- }
104
- function w(n) {
105
- c.value = !0, T({
106
- email: n.email,
107
- userToken: n.userToken,
108
- emailVerifyId: n.emailVerifyId,
109
- password: n.password
110
- }).then(() => {
111
- c.value = !1, i.value = "signIn", m.forEach((t) => t());
112
- }).catch((t) => {
113
- c.value = !1, console.error("重置密码失败:", t);
114
- });
115
- }
116
- function v() {
117
- i.value = "signUp";
118
- }
119
- function k() {
120
- i.value = "resetPassword";
121
- }
122
- function I() {
123
- i.value = "signIn";
124
- }
125
- return {
126
- signInSubmit: f,
127
- signUpSubmit: o,
128
- resetPasswordSubmit: w,
129
- currentView: i,
130
- authSignInLoading: e,
131
- authSignUpLoading: a,
132
- resetPasswordLoading: c,
133
- switchSignUp: v,
134
- switchResetPassword: k,
135
- switchSignIn: I,
136
- addSignInCallback: E,
137
- addSignUpCallback: V,
138
- addResetPasswordCallback: F,
139
- // 简化的token管理
140
- jwtToken: A(l),
141
- getToken: j,
142
- setToken: h,
143
- initializeAuth: y,
144
- clearAuth: C
145
- };
146
- }
147
- function z(e) {
148
- return r({
149
- url: "/restfulApi/users/profile",
150
- method: "post",
151
- data: e
152
- });
153
- }
154
- function G(e) {
155
- return r({
156
- url: "/restfulApi/users/update/baseInfo",
157
- method: "post",
158
- data: e
159
- });
160
- }
161
- function H(e) {
162
- return r({
163
- url: "/restfulApi/users/update/email",
164
- method: "post",
165
- data: e
166
- });
167
- }
168
- function J(e) {
169
- return r({
170
- url: "/restfulApi/users/update/password",
171
- method: "post",
172
- data: e
173
- });
174
- }
175
- function K() {
176
- return r({
177
- url: "/restfulApi/users//unbind/email",
178
- method: "post"
179
- });
180
- }
181
- const s = u(null), d = u(!1), R = U(() => !!s.value);
182
- async function x() {
183
- var f;
184
- const {
185
- getToken: e,
186
- clearAuth: a
187
- } = L();
188
- if (!e()) {
189
- console.warn("No authentication token found"), s.value = null;
190
- return;
191
- }
192
- d.value = !0;
193
- try {
194
- const {
195
- data: o
196
- } = await z();
197
- o ? s.value = o : (console.warn("获取用户资料返回空数据"), s.value = null);
198
- } catch (o) {
199
- console.error("获取用户资料失败:", o), ((f = o == null ? void 0 : o.response) == null ? void 0 : f.status) === 401 && (console.warn("认证已过期,清除认证状态"), a()), s.value = null;
200
- } finally {
201
- d.value = !1;
202
- }
203
- }
204
- function B() {
205
- s.value = null;
206
- }
207
- function M() {
208
- return {
209
- userProfile: s,
210
- loading: d,
211
- isLoggedIn: R,
212
- // 新增:基于userProfile的登录状态
213
- fetchUserProfile: x,
214
- clearUserProfile: B
215
- // 新增:清除用户信息的方法
216
- };
217
- }
218
- export {
219
- M as a,
220
- z as b,
221
- G as c,
222
- J as d,
223
- H as e,
224
- K as f,
225
- D as o,
226
- L as u
227
- };
@@ -1,105 +0,0 @@
1
- import { ref as t, computed as C } from "vue";
2
- import { api as d } from "@huyooo/api";
3
- function R(a, s) {
4
- return d({
5
- url: `${a}/restfulApi/messageCenter/messageNotifications/find`,
6
- method: "post",
7
- data: s
8
- });
9
- }
10
- function S(a, s) {
11
- return d({
12
- url: `${a}/restfulApi/messageCenter/messageNotifications/read`,
13
- method: "post",
14
- data: s
15
- });
16
- }
17
- function y(a, s) {
18
- return d({
19
- url: `${a}/restfulApi/messageCenter/messageNotifications/readAll`,
20
- method: "post",
21
- data: s
22
- });
23
- }
24
- function D(a, s = "system") {
25
- const r = t(!0), g = t(""), i = t(!1), v = t(!1), c = t([]), n = t({
26
- total: 0,
27
- current: 1,
28
- pageSize: 10
29
- }), o = t(!1), u = t(!1), f = t("unread"), A = [{
30
- label: "未读消息",
31
- key: "unread"
32
- }, {
33
- label: "已读消息",
34
- key: "read"
35
- }], m = C(() => f.value === "read");
36
- function N() {
37
- r.value = !0;
38
- }
39
- function b(e) {
40
- f.value = e, n.value.current = 1, l();
41
- }
42
- function p(e) {
43
- o.value = !0, S(a, {
44
- messageId: e
45
- }).then(() => {
46
- o.value = !1;
47
- }).catch(() => {
48
- o.value = !1;
49
- });
50
- }
51
- function h(e) {
52
- u.value = !0, y(a, {
53
- type: e
54
- }).then(() => {
55
- u.value = !1, l();
56
- }).catch(() => {
57
- u.value = !1;
58
- });
59
- }
60
- function L() {
61
- c.value.length !== 0 && h(s);
62
- }
63
- function l() {
64
- i.value = !0, R(a, {
65
- current: n.value.current,
66
- pageSize: n.value.pageSize,
67
- where: {
68
- read: m.value,
69
- type: s
70
- }
71
- }).then(({
72
- data: e
73
- }) => {
74
- i.value = !1, c.value = e.items, n.value.total = e.count, v.value = e.items.length < n.value.pageSize;
75
- }).catch(() => {
76
- i.value = !1;
77
- });
78
- }
79
- function z(e) {
80
- g.value = e.id, r.value = !1, p(e.id);
81
- }
82
- return l(), {
83
- isList: r,
84
- id: g,
85
- loading: i,
86
- finished: v,
87
- messageList: c,
88
- pagination: n,
89
- readLoading: o,
90
- readAllLoading: u,
91
- activeTab: f,
92
- tabs: A,
93
- read: m,
94
- toList: N,
95
- onTabChange: b,
96
- messageNotificationsReadApi: p,
97
- messageNotificationsReadAllApi: h,
98
- readAll: L,
99
- getData: l,
100
- openDetails: z
101
- };
102
- }
103
- export {
104
- D as u
105
- };