@huyooo/ui 0.10.7 → 0.11.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/AuthkitAppSetting-BCrLMpLg.js +1322 -0
- package/dist/AuthkitSignInPhone-DmCQ2fWs.js +1721 -0
- package/dist/{Clipboard-CK_nROjb.js → Clipboard---tG2Zxz.js} +1 -1
- package/dist/{Contact-CpHU1bJ7.js → Contact-BEUbBGiB.js} +2 -2
- package/dist/{CustomTable-1W5byjgJ.js → CustomTable-CVZ4mFzi.js} +2 -3
- package/dist/FeedbackItem-CN041vTm.js +495 -0
- package/dist/FeedbackModal-aI28o-w5.js +1053 -0
- package/dist/MessageHandle-BV1nKlxs.js +1147 -0
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-F6neJUg3.js +142 -0
- package/dist/{PaySubscriptions-C4Een__-.js → PaySubscriptions-B3gI1Eme.js} +5 -6
- package/dist/{ReferrerReferees-DIassvGO.js → ReferrerReferees-DJzPo7X5.js} +7 -7
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-DA8VZBrl.js → Upload.vue_vue_type_script_setup_true_lang-D_-oMTOo.js} +1 -1
- package/dist/UserAccountMenu-CJ9KKVYa.js +371 -0
- package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-ClAXNSgl.js +81 -0
- package/dist/{WidthContainer-TXsvW1ut.js → WidthContainer-BG10rumn.js} +248 -252
- package/dist/{apiClients-ANEApCyY.js → apiClients-9b4zNZ2S.js} +2 -2
- package/dist/authkit.js +41 -40
- package/dist/common.js +2 -2
- package/dist/components/Authkit/AuthkitAppSetting.vue.d.ts +1 -1
- package/dist/components/Referrer/ReferrerReferees.vue.d.ts +1 -1
- package/dist/components/{User → UserMenu}/UserAccountMenu.vue.d.ts +1 -5
- package/dist/components/{User/UserPanel.vue.d.ts → UserMenu/UserMenu.vue.d.ts} +5 -12
- package/dist/components/UserMenu/UserMenuDivider.vue.d.ts +2 -0
- package/dist/components/UserMenu/UserMenuHeader.vue.d.ts +13 -0
- package/dist/components/{User/UserPanelItem.vue.d.ts → UserMenu/UserMenuItem.vue.d.ts} +6 -10
- package/dist/components/UserMenu/UserMenuModals.vue.d.ts +137 -0
- package/dist/components/UserMenu/items/UserMenuFeedbackItem.vue.d.ts +2 -0
- package/dist/components/UserMenu/items/UserMenuInvitationsItem.vue.d.ts +2 -0
- package/dist/components/UserMenu/items/UserMenuMessageItem.vue.d.ts +2 -0
- package/dist/components/UserMenu/items/UserMenuSettingItem.vue.d.ts +2 -0
- package/dist/components/UserMenu/items/UserMenuSubscriptionItem.vue.d.ts +2 -0
- package/dist/components/UserMenu/parts/UserAvatar.vue.d.ts +9 -0
- package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +13 -0
- package/dist/components/UserMenu/parts/UserSubscriptionBaseInformation.vue.d.ts +15 -0
- package/dist/composables/UserMenu/useUserMenu.d.ts +20 -0
- package/dist/composables.d.ts +1 -0
- package/dist/composables.js +19 -17
- package/dist/feedback.js +16 -15
- package/dist/main.js +193 -180
- package/dist/message.js +10 -9
- package/dist/pay.js +1 -1
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-Da2yJTT-.js → useAuthkitAppsAuthPageInfo-494yLvsu.js} +1 -1
- package/dist/{useAuthkitCreateAndUpdate-BLs5vQOu.js → useAuthkitCreateAndUpdate-DyRtFxZS.js} +1 -1
- package/dist/{useAuthkitUsersProfile-Cx8NXjlt.js → useAuthkitUsersProfile-lGlQP54m.js} +1 -1
- package/dist/{useDownloads-DT5W2af6.js → useDownloads-DaeIY0E9.js} +1 -1
- package/dist/{useLegalLinks-BIF45kUt.js → useLegalLinks-CPbWqlu6.js} +2 -2
- package/dist/{useMessageNotifications-CavBmgO7.js → useMessageNotifications-Dg5q-C_o.js} +1 -1
- package/dist/{useSEO-MPXQf0dn.js → useSEO-CXX9dcBx.js} +2 -2
- package/dist/{useTableHandle--NSbZ-57.js → useTableHandle-Cjq4gcC0.js} +1 -1
- package/dist/{cos-js-sdk-v5-BJ5AlBRu.js → useUploadCos-DiJmmbRf.js} +2469 -2232
- package/dist/useUserMenu-B3HKZKJ4.js +43 -0
- package/dist/user.d.ts +15 -7
- package/dist/user.js +17 -9
- package/package.json +1 -1
- package/dist/AuthkitSignInPhone-BWPCpUie.js +0 -3034
- package/dist/FeedbackModal-qAJLL3V3.js +0 -1535
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-D109kT8_.js +0 -1282
- package/dist/UserAccountMenu-BIRTtjLb.js +0 -266
- package/dist/UserSubscriptionBaseInformation-BUs3qiHd.js +0 -60
- package/dist/components/User/UserAvatar.vue.d.ts +0 -23
- package/dist/components/User/UserBasicInformation.vue.d.ts +0 -41
- package/dist/components/User/UserSubscriptionBaseInformation.vue.d.ts +0 -32
- package/dist/useUploadCos-D6y0INvP.js +0 -242
- /package/dist/components/{User/UserButton.vue.d.ts → UserMenu/parts/UserSignInButton.vue.d.ts} +0 -0
package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-D109kT8_.js
DELETED
|
@@ -1,1282 +0,0 @@
|
|
|
1
|
-
import { ref as f, defineComponent as L, openBlock as a, createBlock as y, unref as l, withCtx as p, createVNode as $, createCommentVNode as A, createElementBlock as h, normalizeClass as F, createElementVNode as I, renderSlot as q, toDisplayString as z, createTextVNode as S, Fragment as K, renderList as j, createSlots as se, mergeProps as U, watch as ne, computed as Q, useModel as ie, isRef as oe, mergeModels as X } from "vue";
|
|
2
|
-
import { Icon as W } from "@iconify/vue";
|
|
3
|
-
import { _ as x } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
/* empty css */
|
|
6
|
-
/* empty css */
|
|
7
|
-
/* empty css */
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { Spin as Z, Empty as ee, Tag as D, Button as le, Breadcrumb as P, BreadcrumbItem as V, Modal as re } from "@arco-design/web-vue";
|
|
10
|
-
import { o as T } from "./apiClients-ANEApCyY.js";
|
|
11
|
-
/* empty css */
|
|
12
|
-
import { useIntersectionObserver as ue } from "@vueuse/core";
|
|
13
|
-
import { u as ce } from "./useAuthkitCreateAndUpdate-BLs5vQOu.js";
|
|
14
|
-
import { M as de } from "./Menu-Cy2ZPeaz.js";
|
|
15
|
-
import { TiptapEditor as fe, TiptapTitle as pe } from "@huyooo/vue-tiptap";
|
|
16
|
-
function te(i, n = {}) {
|
|
17
|
-
const {
|
|
18
|
-
pageSize: t = 10,
|
|
19
|
-
where: u = {}
|
|
20
|
-
} = n, r = f(!0), s = f(""), o = f(!1), e = f(!1), c = f([]), d = f({
|
|
21
|
-
current: 1,
|
|
22
|
-
pageSize: t,
|
|
23
|
-
total: 0
|
|
24
|
-
});
|
|
25
|
-
async function w() {
|
|
26
|
-
if (!o.value) {
|
|
27
|
-
o.value = !0;
|
|
28
|
-
try {
|
|
29
|
-
const {
|
|
30
|
-
data: N
|
|
31
|
-
} = await i({
|
|
32
|
-
current: d.value.current,
|
|
33
|
-
pageSize: d.value.pageSize,
|
|
34
|
-
where: u
|
|
35
|
-
});
|
|
36
|
-
c.value = N.items, d.value.total = N.count, e.value = N.items.length < d.value.pageSize;
|
|
37
|
-
} finally {
|
|
38
|
-
o.value = !1;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
async function b() {
|
|
43
|
-
if (!(o.value || e.value)) {
|
|
44
|
-
d.value.current += 1, o.value = !0;
|
|
45
|
-
try {
|
|
46
|
-
const {
|
|
47
|
-
data: N
|
|
48
|
-
} = await i({
|
|
49
|
-
current: d.value.current,
|
|
50
|
-
pageSize: d.value.pageSize,
|
|
51
|
-
where: u
|
|
52
|
-
});
|
|
53
|
-
c.value = [...c.value, ...N.items], d.value.total = N.count, e.value = N.items.length < d.value.pageSize;
|
|
54
|
-
} finally {
|
|
55
|
-
o.value = !1;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async function g() {
|
|
60
|
-
d.value.current = 1, e.value = !1, await w();
|
|
61
|
-
}
|
|
62
|
-
function k() {
|
|
63
|
-
r.value = !0, s.value = "";
|
|
64
|
-
}
|
|
65
|
-
function B(N) {
|
|
66
|
-
s.value = N.id, r.value = !1, R(N.id);
|
|
67
|
-
}
|
|
68
|
-
function R(N) {
|
|
69
|
-
const C = c.value.find((m) => m.id === N);
|
|
70
|
-
C && C.read !== void 0 && (C.read = !0);
|
|
71
|
-
}
|
|
72
|
-
function O(N) {
|
|
73
|
-
const C = c.value.find((m) => m.id === N);
|
|
74
|
-
C && C.read !== void 0 && (C.read = !1);
|
|
75
|
-
}
|
|
76
|
-
return w(), {
|
|
77
|
-
// 状态
|
|
78
|
-
isList: r,
|
|
79
|
-
detailId: s,
|
|
80
|
-
loading: o,
|
|
81
|
-
finished: e,
|
|
82
|
-
messageList: c,
|
|
83
|
-
pagination: d,
|
|
84
|
-
// 方法
|
|
85
|
-
loadData: w,
|
|
86
|
-
loadMore: b,
|
|
87
|
-
refresh: g,
|
|
88
|
-
toList: k,
|
|
89
|
-
openDetail: B,
|
|
90
|
-
markAsRead: R,
|
|
91
|
-
markAsUnread: O
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
const ge = /* @__PURE__ */ L({
|
|
95
|
-
__name: "MessageDetails",
|
|
96
|
-
props: {
|
|
97
|
-
content: {
|
|
98
|
-
type: Object,
|
|
99
|
-
default: null
|
|
100
|
-
},
|
|
101
|
-
title: {
|
|
102
|
-
type: String,
|
|
103
|
-
required: !0
|
|
104
|
-
},
|
|
105
|
-
loading: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: !1
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
emits: ["itemClick", "tableOfContentsUpdate", "update:title", "update:content"],
|
|
111
|
-
setup(i, {
|
|
112
|
-
emit: n
|
|
113
|
-
}) {
|
|
114
|
-
const t = f([]), u = i, r = f(!1), s = n, o = f();
|
|
115
|
-
function e(c) {
|
|
116
|
-
t.value = c, s("tableOfContentsUpdate", c);
|
|
117
|
-
}
|
|
118
|
-
return (c, d) => (a(), y(l(Z), {
|
|
119
|
-
loading: u.loading,
|
|
120
|
-
tip: "文档加载中...",
|
|
121
|
-
class: "Spin",
|
|
122
|
-
dot: ""
|
|
123
|
-
}, {
|
|
124
|
-
default: p(() => [$(l(fe), {
|
|
125
|
-
ref_key: "TiptapEditorRef",
|
|
126
|
-
ref: o,
|
|
127
|
-
"model-value": u.content,
|
|
128
|
-
editable: r.value,
|
|
129
|
-
"tiptap-editor-content-class": "tiptapEditorContentClass",
|
|
130
|
-
onTableOfContentsUpdate: e
|
|
131
|
-
}, {
|
|
132
|
-
title: p(() => [$(l(pe), {
|
|
133
|
-
"model-value": u.title,
|
|
134
|
-
editable: r.value
|
|
135
|
-
}, null, 8, ["model-value", "editable"])]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["model-value", "editable"]), A("", !0)]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["loading"]));
|
|
140
|
-
}
|
|
141
|
-
}), H = /* @__PURE__ */ x(ge, [["__scopeId", "data-v-6ccdedc3"]]), ve = /* @__PURE__ */ L({
|
|
142
|
-
__name: "MessageChangelogNotificationsDetails",
|
|
143
|
-
props: {
|
|
144
|
-
id: {
|
|
145
|
-
type: String,
|
|
146
|
-
required: !0
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
setup(i) {
|
|
150
|
-
const n = f(!1), t = f(null), u = f(""), r = i;
|
|
151
|
-
async function s() {
|
|
152
|
-
n.value = !0;
|
|
153
|
-
const {
|
|
154
|
-
data: o
|
|
155
|
-
} = await T.messageCenter.changelogNotifications.findOne.post({
|
|
156
|
-
id: r.id
|
|
157
|
-
});
|
|
158
|
-
n.value = !1, o && (t.value = o.content, u.value = o.title);
|
|
159
|
-
}
|
|
160
|
-
return s(), (o, e) => (a(), y(H, {
|
|
161
|
-
content: t.value,
|
|
162
|
-
title: u.value,
|
|
163
|
-
loading: n.value
|
|
164
|
-
}, null, 8, ["content", "title", "loading"]));
|
|
165
|
-
}
|
|
166
|
-
}), me = {
|
|
167
|
-
key: 0,
|
|
168
|
-
class: "loading"
|
|
169
|
-
}, ye = {
|
|
170
|
-
key: 1,
|
|
171
|
-
class: "none"
|
|
172
|
-
}, _e = /* @__PURE__ */ L({
|
|
173
|
-
__name: "InfiniteLoading",
|
|
174
|
-
props: {
|
|
175
|
-
loading: {
|
|
176
|
-
type: Boolean,
|
|
177
|
-
default: !1
|
|
178
|
-
},
|
|
179
|
-
finished: {
|
|
180
|
-
type: Boolean,
|
|
181
|
-
default: !1
|
|
182
|
-
},
|
|
183
|
-
loadingText: {
|
|
184
|
-
type: String,
|
|
185
|
-
default: "数据加载中..."
|
|
186
|
-
},
|
|
187
|
-
finishedText: {
|
|
188
|
-
type: String,
|
|
189
|
-
default: "亲,没有更多了!"
|
|
190
|
-
},
|
|
191
|
-
showFinishedText: {
|
|
192
|
-
type: Boolean,
|
|
193
|
-
default: !0
|
|
194
|
-
},
|
|
195
|
-
threshold: {
|
|
196
|
-
type: Number,
|
|
197
|
-
default: 0
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
emits: ["infinite"],
|
|
201
|
-
setup(i, {
|
|
202
|
-
emit: n
|
|
203
|
-
}) {
|
|
204
|
-
const t = i, u = n, r = f(null);
|
|
205
|
-
return ue(r, ([{
|
|
206
|
-
isIntersecting: s
|
|
207
|
-
}]) => {
|
|
208
|
-
s && // 当loading和finished的值都为false时,就通知父组件调用方法继续向后台请求数据
|
|
209
|
-
!t.loading && !t.finished && u("infinite");
|
|
210
|
-
}, {
|
|
211
|
-
threshold: t.threshold
|
|
212
|
-
}), (s, o) => (a(), h("div", {
|
|
213
|
-
ref_key: "container",
|
|
214
|
-
ref: r,
|
|
215
|
-
class: "infinite-loading"
|
|
216
|
-
}, [i.loading ? (a(), h("div", me, [$(l(Z), {
|
|
217
|
-
tip: i.loadingText
|
|
218
|
-
}, null, 8, ["tip"])])) : A("", !0), i.finished && i.showFinishedText ? (a(), h("div", ye, [$(l(ee), {
|
|
219
|
-
description: i.finishedText
|
|
220
|
-
}, null, 8, ["description"])])) : A("", !0)], 512));
|
|
221
|
-
}
|
|
222
|
-
}), he = /* @__PURE__ */ x(_e, [["__scopeId", "data-v-8be68707"]]), ke = {
|
|
223
|
-
class: "message-item__content"
|
|
224
|
-
}, be = {
|
|
225
|
-
class: "message-item__header"
|
|
226
|
-
}, Ce = {
|
|
227
|
-
class: "message-item__title"
|
|
228
|
-
}, Ae = {
|
|
229
|
-
class: "message-item__tags"
|
|
230
|
-
}, $e = {
|
|
231
|
-
class: "message-item__description"
|
|
232
|
-
}, we = {
|
|
233
|
-
class: "message-item__footer"
|
|
234
|
-
}, Me = {
|
|
235
|
-
class: "message-item__time"
|
|
236
|
-
}, Se = {
|
|
237
|
-
class: "message-item__actions"
|
|
238
|
-
}, Ne = /* @__PURE__ */ L({
|
|
239
|
-
__name: "MessageItem",
|
|
240
|
-
props: {
|
|
241
|
-
item: {},
|
|
242
|
-
showReadStatus: {
|
|
243
|
-
type: Boolean
|
|
244
|
-
},
|
|
245
|
-
showViewButton: {
|
|
246
|
-
type: Boolean
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
emits: ["click"],
|
|
250
|
-
setup(i) {
|
|
251
|
-
return (n, t) => (a(), h("div", {
|
|
252
|
-
class: F(["message-item", {
|
|
253
|
-
"message-item--unread": i.showReadStatus && !i.item.read
|
|
254
|
-
}]),
|
|
255
|
-
onClick: t[0] || (t[0] = (u) => n.$emit("click", i.item))
|
|
256
|
-
}, [I("div", ke, [I("div", be, [i.showReadStatus ? (a(), h("span", {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: F(["message-item__dot", {
|
|
259
|
-
"message-item__dot--unread": !i.item.read
|
|
260
|
-
}])
|
|
261
|
-
}, null, 2)) : A("", !0), q(n.$slots, "prefix", {
|
|
262
|
-
item: i.item
|
|
263
|
-
}, void 0, !0), I("span", Ce, z(i.item.title), 1), I("div", Ae, [i.item.pinned ? (a(), y(l(D), {
|
|
264
|
-
key: 0,
|
|
265
|
-
color: "arcoblue",
|
|
266
|
-
size: "small"
|
|
267
|
-
}, {
|
|
268
|
-
default: p(() => [...t[1] || (t[1] = [S("置顶", -1)])]),
|
|
269
|
-
_: 1
|
|
270
|
-
})) : A("", !0), q(n.$slots, "tags", {
|
|
271
|
-
item: i.item
|
|
272
|
-
}, () => [i.item.priority === "urgent" ? (a(), y(l(D), {
|
|
273
|
-
key: 0,
|
|
274
|
-
color: "red",
|
|
275
|
-
size: "small"
|
|
276
|
-
}, {
|
|
277
|
-
default: p(() => [...t[2] || (t[2] = [S("紧急", -1)])]),
|
|
278
|
-
_: 1
|
|
279
|
-
})) : i.item.priority === "important" ? (a(), y(l(D), {
|
|
280
|
-
key: 1,
|
|
281
|
-
color: "orange",
|
|
282
|
-
size: "small"
|
|
283
|
-
}, {
|
|
284
|
-
default: p(() => [...t[3] || (t[3] = [S("重要", -1)])]),
|
|
285
|
-
_: 1
|
|
286
|
-
})) : i.item.priority === "high" ? (a(), y(l(D), {
|
|
287
|
-
key: 2,
|
|
288
|
-
color: "orange",
|
|
289
|
-
size: "small"
|
|
290
|
-
}, {
|
|
291
|
-
default: p(() => [...t[4] || (t[4] = [S("高", -1)])]),
|
|
292
|
-
_: 1
|
|
293
|
-
})) : A("", !0)], !0)])]), I("div", $e, [q(n.$slots, "description", {
|
|
294
|
-
item: i.item
|
|
295
|
-
}, () => [S(z(i.item.description), 1)], !0)]), I("div", we, [I("span", Me, z(i.item.createAt), 1), q(n.$slots, "footer", {
|
|
296
|
-
item: i.item
|
|
297
|
-
}, void 0, !0)])]), I("div", Se, [q(n.$slots, "actions", {
|
|
298
|
-
item: i.item
|
|
299
|
-
}, () => [i.showViewButton ? (a(), y(l(le), {
|
|
300
|
-
key: 0,
|
|
301
|
-
type: "text",
|
|
302
|
-
size: "small"
|
|
303
|
-
}, {
|
|
304
|
-
default: p(() => [...t[5] || (t[5] = [S("查看", -1)])]),
|
|
305
|
-
_: 1
|
|
306
|
-
})) : A("", !0)], !0)])], 2));
|
|
307
|
-
}
|
|
308
|
-
}), Le = /* @__PURE__ */ x(Ne, [["__scopeId", "data-v-2a7ba671"]]), Ie = {
|
|
309
|
-
class: "message-list"
|
|
310
|
-
}, Te = {
|
|
311
|
-
key: 0,
|
|
312
|
-
class: "message-list__empty"
|
|
313
|
-
}, ze = /* @__PURE__ */ L({
|
|
314
|
-
__name: "MessageList",
|
|
315
|
-
props: {
|
|
316
|
-
messageList: {},
|
|
317
|
-
loading: {
|
|
318
|
-
type: Boolean
|
|
319
|
-
},
|
|
320
|
-
finished: {
|
|
321
|
-
type: Boolean
|
|
322
|
-
},
|
|
323
|
-
showReadStatus: {
|
|
324
|
-
type: Boolean
|
|
325
|
-
},
|
|
326
|
-
showViewButton: {
|
|
327
|
-
type: Boolean
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
emits: ["itemClick", "loadMore"],
|
|
331
|
-
setup(i, {
|
|
332
|
-
emit: n
|
|
333
|
-
}) {
|
|
334
|
-
const t = i, u = n;
|
|
335
|
-
function r(s) {
|
|
336
|
-
u("itemClick", s);
|
|
337
|
-
}
|
|
338
|
-
return (s, o) => (a(), h("div", Ie, [t.messageList.length === 0 && !t.loading ? (a(), h("div", Te, [$(l(ee), {
|
|
339
|
-
description: "暂无消息"
|
|
340
|
-
})])) : (a(), h(K, {
|
|
341
|
-
key: 1
|
|
342
|
-
}, [(a(!0), h(K, null, j(t.messageList, (e) => (a(), y(Le, {
|
|
343
|
-
key: e.id,
|
|
344
|
-
item: e,
|
|
345
|
-
"show-read-status": t.showReadStatus,
|
|
346
|
-
"show-view-button": t.showViewButton,
|
|
347
|
-
onClick: (c) => r(e)
|
|
348
|
-
}, se({
|
|
349
|
-
_: 2
|
|
350
|
-
}, [s.$slots.prefix ? {
|
|
351
|
-
name: "prefix",
|
|
352
|
-
fn: p((c) => [q(s.$slots, "prefix", U({
|
|
353
|
-
ref_for: !0
|
|
354
|
-
}, c), void 0, !0)]),
|
|
355
|
-
key: "0"
|
|
356
|
-
} : void 0, s.$slots.tags ? {
|
|
357
|
-
name: "tags",
|
|
358
|
-
fn: p((c) => [q(s.$slots, "tags", U({
|
|
359
|
-
ref_for: !0
|
|
360
|
-
}, c), void 0, !0)]),
|
|
361
|
-
key: "1"
|
|
362
|
-
} : void 0, s.$slots.description ? {
|
|
363
|
-
name: "description",
|
|
364
|
-
fn: p((c) => [q(s.$slots, "description", U({
|
|
365
|
-
ref_for: !0
|
|
366
|
-
}, c), void 0, !0)]),
|
|
367
|
-
key: "2"
|
|
368
|
-
} : void 0, s.$slots.footer ? {
|
|
369
|
-
name: "footer",
|
|
370
|
-
fn: p((c) => [q(s.$slots, "footer", U({
|
|
371
|
-
ref_for: !0
|
|
372
|
-
}, c), void 0, !0)]),
|
|
373
|
-
key: "3"
|
|
374
|
-
} : void 0, s.$slots.actions ? {
|
|
375
|
-
name: "actions",
|
|
376
|
-
fn: p((c) => [q(s.$slots, "actions", U({
|
|
377
|
-
ref_for: !0
|
|
378
|
-
}, c), void 0, !0)]),
|
|
379
|
-
key: "4"
|
|
380
|
-
} : void 0]), 1032, ["item", "show-read-status", "show-view-button", "onClick"]))), 128)), $(he, {
|
|
381
|
-
loading: t.loading,
|
|
382
|
-
finished: t.finished,
|
|
383
|
-
onInfinite: o[0] || (o[0] = (e) => s.$emit("loadMore"))
|
|
384
|
-
}, null, 8, ["loading", "finished"])], 64))]));
|
|
385
|
-
}
|
|
386
|
-
}), G = /* @__PURE__ */ x(ze, [["__scopeId", "data-v-991c4730"]]), xe = {
|
|
387
|
-
class: "message-panel"
|
|
388
|
-
}, Be = {
|
|
389
|
-
class: "version-prefix"
|
|
390
|
-
}, De = {
|
|
391
|
-
key: 0,
|
|
392
|
-
class: "publish-time"
|
|
393
|
-
}, qe = {
|
|
394
|
-
key: 2,
|
|
395
|
-
class: "message-panel__detail"
|
|
396
|
-
}, Re = /* @__PURE__ */ L({
|
|
397
|
-
__name: "MessageChangelogNotifications",
|
|
398
|
-
setup(i) {
|
|
399
|
-
const {
|
|
400
|
-
isList: n,
|
|
401
|
-
detailId: t,
|
|
402
|
-
loading: u,
|
|
403
|
-
finished: r,
|
|
404
|
-
messageList: s,
|
|
405
|
-
loadMore: o,
|
|
406
|
-
toList: e,
|
|
407
|
-
openDetail: c
|
|
408
|
-
} = te((b) => T.messageCenter.changelogNotifications.find.post(b));
|
|
409
|
-
function d(b) {
|
|
410
|
-
return {
|
|
411
|
-
feature: "green",
|
|
412
|
-
improvement: "blue",
|
|
413
|
-
fix: "orange",
|
|
414
|
-
security: "red",
|
|
415
|
-
breaking: "magenta"
|
|
416
|
-
}[b] || "blue";
|
|
417
|
-
}
|
|
418
|
-
function w(b) {
|
|
419
|
-
return {
|
|
420
|
-
feature: "新功能",
|
|
421
|
-
improvement: "优化",
|
|
422
|
-
fix: "修复",
|
|
423
|
-
security: "安全",
|
|
424
|
-
breaking: "重大变更"
|
|
425
|
-
}[b] || "更新";
|
|
426
|
-
}
|
|
427
|
-
return (b, g) => (a(), h("div", xe, [l(n) ? A("", !0) : (a(), y(l(P), {
|
|
428
|
-
key: 0,
|
|
429
|
-
class: "message-panel__breadcrumb"
|
|
430
|
-
}, {
|
|
431
|
-
default: p(() => [$(l(V), {
|
|
432
|
-
onClick: l(e)
|
|
433
|
-
}, {
|
|
434
|
-
default: p(() => [...g[0] || (g[0] = [S("更新日志", -1)])]),
|
|
435
|
-
_: 1
|
|
436
|
-
}, 8, ["onClick"]), $(l(V), null, {
|
|
437
|
-
default: p(() => [...g[1] || (g[1] = [S("详情", -1)])]),
|
|
438
|
-
_: 1
|
|
439
|
-
})]),
|
|
440
|
-
_: 1
|
|
441
|
-
})), l(n) ? (a(), y(G, {
|
|
442
|
-
key: 1,
|
|
443
|
-
"message-list": l(s),
|
|
444
|
-
loading: l(u),
|
|
445
|
-
finished: l(r),
|
|
446
|
-
onItemClick: l(c),
|
|
447
|
-
onLoadMore: l(o)
|
|
448
|
-
}, {
|
|
449
|
-
prefix: p(({
|
|
450
|
-
item: k
|
|
451
|
-
}) => [I("span", Be, z(k.version), 1)]),
|
|
452
|
-
tags: p(({
|
|
453
|
-
item: k
|
|
454
|
-
}) => [$(l(D), {
|
|
455
|
-
color: d(k.changeType),
|
|
456
|
-
size: "small"
|
|
457
|
-
}, {
|
|
458
|
-
default: p(() => [S(z(w(k.changeType)), 1)]),
|
|
459
|
-
_: 2
|
|
460
|
-
}, 1032, ["color"])]),
|
|
461
|
-
footer: p(({
|
|
462
|
-
item: k
|
|
463
|
-
}) => [k.publishedAt ? (a(), h("span", De, " 发布于 " + z(k.publishedAt), 1)) : A("", !0)]),
|
|
464
|
-
_: 1
|
|
465
|
-
}, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (a(), h("div", qe, [$(ve, {
|
|
466
|
-
id: l(t)
|
|
467
|
-
}, null, 8, ["id"])]))]));
|
|
468
|
-
}
|
|
469
|
-
}), Ve = /* @__PURE__ */ x(Re, [["__scopeId", "data-v-5fd47205"]]), Ke = /* @__PURE__ */ L({
|
|
470
|
-
__name: "MessageEventNotificationsDetails",
|
|
471
|
-
props: {
|
|
472
|
-
id: {
|
|
473
|
-
type: String,
|
|
474
|
-
required: !0
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
setup(i) {
|
|
478
|
-
const n = f(!1), t = f(null), u = f(""), r = i;
|
|
479
|
-
async function s() {
|
|
480
|
-
n.value = !0;
|
|
481
|
-
const {
|
|
482
|
-
data: o
|
|
483
|
-
} = await T.messageCenter.eventNotifications.findOne.post({
|
|
484
|
-
id: r.id
|
|
485
|
-
});
|
|
486
|
-
n.value = !1, o && (t.value = o.content, u.value = o.title);
|
|
487
|
-
}
|
|
488
|
-
return s(), (o, e) => (a(), y(H, {
|
|
489
|
-
content: t.value,
|
|
490
|
-
title: u.value,
|
|
491
|
-
loading: n.value
|
|
492
|
-
}, null, 8, ["content", "title", "loading"]));
|
|
493
|
-
}
|
|
494
|
-
}), Oe = {
|
|
495
|
-
class: "message-panel"
|
|
496
|
-
}, Ee = {
|
|
497
|
-
key: 0,
|
|
498
|
-
class: "time-range"
|
|
499
|
-
}, Ue = {
|
|
500
|
-
key: 2,
|
|
501
|
-
class: "message-panel__detail"
|
|
502
|
-
}, Fe = /* @__PURE__ */ L({
|
|
503
|
-
__name: "MessageEventNotifications",
|
|
504
|
-
setup(i) {
|
|
505
|
-
const {
|
|
506
|
-
isList: n,
|
|
507
|
-
detailId: t,
|
|
508
|
-
loading: u,
|
|
509
|
-
finished: r,
|
|
510
|
-
messageList: s,
|
|
511
|
-
loadMore: o,
|
|
512
|
-
toList: e,
|
|
513
|
-
openDetail: c
|
|
514
|
-
} = te((b) => T.messageCenter.eventNotifications.find.post({
|
|
515
|
-
...b,
|
|
516
|
-
where: {
|
|
517
|
-
status: "published"
|
|
518
|
-
}
|
|
519
|
-
}));
|
|
520
|
-
function d(b) {
|
|
521
|
-
return {
|
|
522
|
-
upcoming: "blue",
|
|
523
|
-
ongoing: "green",
|
|
524
|
-
ended: "gray",
|
|
525
|
-
published: "arcoblue"
|
|
526
|
-
}[b] || "gray";
|
|
527
|
-
}
|
|
528
|
-
function w(b) {
|
|
529
|
-
return {
|
|
530
|
-
upcoming: "即将开始",
|
|
531
|
-
ongoing: "进行中",
|
|
532
|
-
ended: "已结束",
|
|
533
|
-
published: "已发布"
|
|
534
|
-
}[b] || "未知";
|
|
535
|
-
}
|
|
536
|
-
return (b, g) => (a(), h("div", Oe, [l(n) ? A("", !0) : (a(), y(l(P), {
|
|
537
|
-
key: 0,
|
|
538
|
-
class: "message-panel__breadcrumb"
|
|
539
|
-
}, {
|
|
540
|
-
default: p(() => [$(l(V), {
|
|
541
|
-
onClick: l(e)
|
|
542
|
-
}, {
|
|
543
|
-
default: p(() => [...g[0] || (g[0] = [S("活动通知", -1)])]),
|
|
544
|
-
_: 1
|
|
545
|
-
}, 8, ["onClick"]), $(l(V), null, {
|
|
546
|
-
default: p(() => [...g[1] || (g[1] = [S("详情", -1)])]),
|
|
547
|
-
_: 1
|
|
548
|
-
})]),
|
|
549
|
-
_: 1
|
|
550
|
-
})), l(n) ? (a(), y(G, {
|
|
551
|
-
key: 1,
|
|
552
|
-
"message-list": l(s),
|
|
553
|
-
loading: l(u),
|
|
554
|
-
finished: l(r),
|
|
555
|
-
onItemClick: l(c),
|
|
556
|
-
onLoadMore: l(o)
|
|
557
|
-
}, {
|
|
558
|
-
tags: p(({
|
|
559
|
-
item: k
|
|
560
|
-
}) => [$(l(D), {
|
|
561
|
-
color: d(k.displayStatus),
|
|
562
|
-
size: "small"
|
|
563
|
-
}, {
|
|
564
|
-
default: p(() => [S(z(w(k.displayStatus)), 1)]),
|
|
565
|
-
_: 2
|
|
566
|
-
}, 1032, ["color"])]),
|
|
567
|
-
footer: p(({
|
|
568
|
-
item: k
|
|
569
|
-
}) => [k.startAt || k.endAt ? (a(), h("span", Ee, z(k.startAt || "无") + " ~ " + z(k.endAt || "无"), 1)) : A("", !0)]),
|
|
570
|
-
_: 1
|
|
571
|
-
}, 8, ["message-list", "loading", "finished", "onItemClick", "onLoadMore"])) : (a(), h("div", Ue, [$(Ke, {
|
|
572
|
-
id: l(t)
|
|
573
|
-
}, null, 8, ["id"])]))]));
|
|
574
|
-
}
|
|
575
|
-
}), He = /* @__PURE__ */ x(Fe, [["__scopeId", "data-v-345bc6c1"]]), je = {
|
|
576
|
-
style: {
|
|
577
|
-
display: "flex",
|
|
578
|
-
gap: "16px"
|
|
579
|
-
}
|
|
580
|
-
}, Pe = ["onClick"], Ge = /* @__PURE__ */ L({
|
|
581
|
-
__name: "MessageCustomTabs",
|
|
582
|
-
props: {
|
|
583
|
-
modelValue: {
|
|
584
|
-
type: String,
|
|
585
|
-
default: "1"
|
|
586
|
-
},
|
|
587
|
-
tabs: {
|
|
588
|
-
type: Array,
|
|
589
|
-
default: () => [{
|
|
590
|
-
label: "未读消息",
|
|
591
|
-
key: "1"
|
|
592
|
-
}, {
|
|
593
|
-
label: "已读消息",
|
|
594
|
-
key: "2"
|
|
595
|
-
}]
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
emits: ["update:modelValue", "change"],
|
|
599
|
-
setup(i, {
|
|
600
|
-
emit: n
|
|
601
|
-
}) {
|
|
602
|
-
const t = i, u = n;
|
|
603
|
-
function r(s) {
|
|
604
|
-
s !== t.modelValue && (u("update:modelValue", s), u("change", s));
|
|
605
|
-
}
|
|
606
|
-
return (s, o) => (a(), h("div", je, [(a(!0), h(K, null, j(i.tabs, (e) => (a(), h("span", {
|
|
607
|
-
key: e.key,
|
|
608
|
-
class: F(["custom-tab", [{
|
|
609
|
-
active: i.modelValue === e.key
|
|
610
|
-
}]]),
|
|
611
|
-
onClick: (c) => r(e.key)
|
|
612
|
-
}, z(e.label), 11, Pe))), 128))]));
|
|
613
|
-
}
|
|
614
|
-
}), Je = /* @__PURE__ */ x(Ge, [["__scopeId", "data-v-d7edaca7"]]), Qe = {
|
|
615
|
-
class: "tabs"
|
|
616
|
-
}, We = /* @__PURE__ */ L({
|
|
617
|
-
__name: "MessageTabs",
|
|
618
|
-
props: {
|
|
619
|
-
tabs: {
|
|
620
|
-
type: Array,
|
|
621
|
-
required: !0
|
|
622
|
-
},
|
|
623
|
-
messageList: {
|
|
624
|
-
type: Array,
|
|
625
|
-
required: !0
|
|
626
|
-
},
|
|
627
|
-
activeTab: {
|
|
628
|
-
type: String,
|
|
629
|
-
required: !0
|
|
630
|
-
}
|
|
631
|
-
},
|
|
632
|
-
emits: ["update:activeTab", "change", "readAll"],
|
|
633
|
-
setup(i, {
|
|
634
|
-
emit: n
|
|
635
|
-
}) {
|
|
636
|
-
const t = i, u = n, r = f(t.activeTab);
|
|
637
|
-
ne(() => t.activeTab, (e) => {
|
|
638
|
-
r.value = e;
|
|
639
|
-
});
|
|
640
|
-
function s(e) {
|
|
641
|
-
r.value = e, u("update:activeTab", e), u("change", e);
|
|
642
|
-
}
|
|
643
|
-
function o() {
|
|
644
|
-
t.messageList.length !== 0 && u("readAll");
|
|
645
|
-
}
|
|
646
|
-
return (e, c) => (a(), h("div", Qe, [$(Je, {
|
|
647
|
-
modelValue: r.value,
|
|
648
|
-
"onUpdate:modelValue": c[0] || (c[0] = (d) => r.value = d),
|
|
649
|
-
tabs: i.tabs,
|
|
650
|
-
onChange: s
|
|
651
|
-
}, null, 8, ["modelValue", "tabs"]), r.value === "unread" ? (a(), h("div", {
|
|
652
|
-
key: 0,
|
|
653
|
-
class: F(["readAll", {
|
|
654
|
-
disabled: i.messageList.length === 0
|
|
655
|
-
}]),
|
|
656
|
-
onClick: o
|
|
657
|
-
}, [$(l(W), {
|
|
658
|
-
class: "icon",
|
|
659
|
-
icon: "icon-park-outline:clear"
|
|
660
|
-
}), c[1] || (c[1] = I("span", null, " 全部已读", -1))], 2)) : A("", !0)]));
|
|
661
|
-
}
|
|
662
|
-
}), ae = /* @__PURE__ */ x(We, [["__scopeId", "data-v-47f7fce5"]]), Xe = {
|
|
663
|
-
class: "message-panel"
|
|
664
|
-
}, Ye = {
|
|
665
|
-
key: 3,
|
|
666
|
-
class: "message-panel__detail"
|
|
667
|
-
}, J = "system", Ze = /* @__PURE__ */ L({
|
|
668
|
-
__name: "MessageNotifications",
|
|
669
|
-
setup(i) {
|
|
670
|
-
const n = f(!0), t = f(""), u = f(!1), r = f({
|
|
671
|
-
title: "",
|
|
672
|
-
content: null
|
|
673
|
-
}), s = f(!1), o = f(!1), e = f([]), c = f("unread"), d = f({
|
|
674
|
-
current: 1,
|
|
675
|
-
pageSize: 10,
|
|
676
|
-
total: 0
|
|
677
|
-
}), w = [{
|
|
678
|
-
label: "未读消息",
|
|
679
|
-
key: "unread"
|
|
680
|
-
}, {
|
|
681
|
-
label: "已读消息",
|
|
682
|
-
key: "read"
|
|
683
|
-
}], b = Q(() => c.value === "read");
|
|
684
|
-
async function g() {
|
|
685
|
-
s.value = !0;
|
|
686
|
-
const {
|
|
687
|
-
data: C
|
|
688
|
-
} = await T.messageCenter.messageNotifications.own.post({
|
|
689
|
-
current: d.value.current,
|
|
690
|
-
pageSize: d.value.pageSize,
|
|
691
|
-
where: {
|
|
692
|
-
type: J,
|
|
693
|
-
read: b.value
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
s.value = !1, C && (e.value = C.items.map((m) => ({
|
|
697
|
-
id: m.id,
|
|
698
|
-
title: m.title,
|
|
699
|
-
description: m.description,
|
|
700
|
-
createAt: m.createAt,
|
|
701
|
-
updateAt: m.updateAt,
|
|
702
|
-
type: m.type,
|
|
703
|
-
priority: m.priority,
|
|
704
|
-
read: m.read ?? !1,
|
|
705
|
-
readAt: m.readAt ?? null
|
|
706
|
-
})), d.value.total = C.count, o.value = C.items.length < d.value.pageSize);
|
|
707
|
-
}
|
|
708
|
-
async function k() {
|
|
709
|
-
if (s.value || o.value) return;
|
|
710
|
-
d.value.current += 1, s.value = !0;
|
|
711
|
-
const {
|
|
712
|
-
data: C
|
|
713
|
-
} = await T.messageCenter.messageNotifications.own.post({
|
|
714
|
-
current: d.value.current,
|
|
715
|
-
pageSize: d.value.pageSize,
|
|
716
|
-
where: {
|
|
717
|
-
type: J,
|
|
718
|
-
read: b.value
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
if (s.value = !1, C) {
|
|
722
|
-
const m = C.items.map((v) => ({
|
|
723
|
-
id: v.id,
|
|
724
|
-
title: v.title,
|
|
725
|
-
description: v.description,
|
|
726
|
-
createAt: v.createAt,
|
|
727
|
-
updateAt: v.updateAt,
|
|
728
|
-
type: v.type,
|
|
729
|
-
priority: v.priority,
|
|
730
|
-
read: v.read ?? !1,
|
|
731
|
-
readAt: v.readAt ?? null
|
|
732
|
-
}));
|
|
733
|
-
e.value = [...e.value, ...m], o.value = C.items.length < d.value.pageSize;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
function B() {
|
|
737
|
-
d.value.current = 1, o.value = !1, g();
|
|
738
|
-
}
|
|
739
|
-
async function R() {
|
|
740
|
-
e.value.length !== 0 && (await T.messageCenter.messageNotifications.readAll.post({
|
|
741
|
-
type: J
|
|
742
|
-
}), g());
|
|
743
|
-
}
|
|
744
|
-
function O() {
|
|
745
|
-
n.value = !0, t.value = "", r.value = {
|
|
746
|
-
title: "",
|
|
747
|
-
content: null
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
async function N(C) {
|
|
751
|
-
u.value = !0;
|
|
752
|
-
const {
|
|
753
|
-
data: m
|
|
754
|
-
} = await T.messageCenter.messageNotifications.findOne.post({
|
|
755
|
-
id: C
|
|
756
|
-
});
|
|
757
|
-
u.value = !1, m && (r.value = {
|
|
758
|
-
title: m.title,
|
|
759
|
-
content: m.content
|
|
760
|
-
});
|
|
761
|
-
}
|
|
762
|
-
async function E(C) {
|
|
763
|
-
t.value = C.id, n.value = !1, C.read || (await T.messageCenter.messageNotifications.read.post({
|
|
764
|
-
messageId: C.id
|
|
765
|
-
}), b.value || (e.value = e.value.filter((m) => m.id !== C.id))), N(C.id);
|
|
766
|
-
}
|
|
767
|
-
return g(), (C, m) => (a(), h("div", Xe, [n.value ? A("", !0) : (a(), y(l(P), {
|
|
768
|
-
key: 0,
|
|
769
|
-
class: "message-panel__breadcrumb"
|
|
770
|
-
}, {
|
|
771
|
-
default: p(() => [$(l(V), {
|
|
772
|
-
onClick: O
|
|
773
|
-
}, {
|
|
774
|
-
default: p(() => [...m[1] || (m[1] = [S("消息通知", -1)])]),
|
|
775
|
-
_: 1
|
|
776
|
-
}), $(l(V), null, {
|
|
777
|
-
default: p(() => [...m[2] || (m[2] = [S("详情", -1)])]),
|
|
778
|
-
_: 1
|
|
779
|
-
})]),
|
|
780
|
-
_: 1
|
|
781
|
-
})), n.value ? (a(), y(ae, {
|
|
782
|
-
key: 1,
|
|
783
|
-
"active-tab": c.value,
|
|
784
|
-
"onUpdate:activeTab": m[0] || (m[0] = (v) => c.value = v),
|
|
785
|
-
tabs: w,
|
|
786
|
-
"message-list": e.value,
|
|
787
|
-
onChange: B,
|
|
788
|
-
onReadAll: R
|
|
789
|
-
}, null, 8, ["active-tab", "message-list"])) : A("", !0), n.value ? (a(), y(G, {
|
|
790
|
-
key: 2,
|
|
791
|
-
"message-list": e.value,
|
|
792
|
-
loading: s.value,
|
|
793
|
-
finished: o.value,
|
|
794
|
-
"show-read-status": !0,
|
|
795
|
-
"show-view-button": !1,
|
|
796
|
-
onItemClick: E,
|
|
797
|
-
onLoadMore: k
|
|
798
|
-
}, {
|
|
799
|
-
tags: p(({
|
|
800
|
-
item: v
|
|
801
|
-
}) => [v.priority === "urgent" ? (a(), y(l(D), {
|
|
802
|
-
key: 0,
|
|
803
|
-
color: "red",
|
|
804
|
-
size: "small"
|
|
805
|
-
}, {
|
|
806
|
-
default: p(() => [...m[3] || (m[3] = [S("紧急", -1)])]),
|
|
807
|
-
_: 1
|
|
808
|
-
})) : v.priority === "high" ? (a(), y(l(D), {
|
|
809
|
-
key: 1,
|
|
810
|
-
color: "orange",
|
|
811
|
-
size: "small"
|
|
812
|
-
}, {
|
|
813
|
-
default: p(() => [...m[4] || (m[4] = [S("高", -1)])]),
|
|
814
|
-
_: 1
|
|
815
|
-
})) : A("", !0)]),
|
|
816
|
-
_: 1
|
|
817
|
-
}, 8, ["message-list", "loading", "finished"])) : (a(), h("div", Ye, [$(H, {
|
|
818
|
-
title: r.value.title,
|
|
819
|
-
content: r.value.content,
|
|
820
|
-
loading: u.value
|
|
821
|
-
}, null, 8, ["title", "content", "loading"])]))]));
|
|
822
|
-
}
|
|
823
|
-
}), et = /* @__PURE__ */ x(Ze, [["__scopeId", "data-v-2b7ded4a"]]), tt = {
|
|
824
|
-
class: "message-panel"
|
|
825
|
-
}, at = {
|
|
826
|
-
key: 0,
|
|
827
|
-
class: "expire-time"
|
|
828
|
-
}, st = {
|
|
829
|
-
key: 3,
|
|
830
|
-
class: "message-panel__detail"
|
|
831
|
-
}, nt = /* @__PURE__ */ L({
|
|
832
|
-
__name: "MessageNoticeNotifications",
|
|
833
|
-
setup(i) {
|
|
834
|
-
const n = f(!0), t = f(""), u = f(!1), r = f({
|
|
835
|
-
title: "",
|
|
836
|
-
content: null
|
|
837
|
-
}), s = f(!1), o = f(!1), e = f([]), c = f("unread"), d = f({
|
|
838
|
-
current: 1,
|
|
839
|
-
pageSize: 10,
|
|
840
|
-
total: 0
|
|
841
|
-
}), w = [{
|
|
842
|
-
label: "未读公告",
|
|
843
|
-
key: "unread"
|
|
844
|
-
}, {
|
|
845
|
-
label: "已读公告",
|
|
846
|
-
key: "read"
|
|
847
|
-
}], b = Q(() => c.value === "read");
|
|
848
|
-
async function g() {
|
|
849
|
-
s.value = !0;
|
|
850
|
-
const {
|
|
851
|
-
data: v
|
|
852
|
-
} = await T.messageCenter.noticeNotifications.own.post({
|
|
853
|
-
current: d.value.current,
|
|
854
|
-
pageSize: d.value.pageSize,
|
|
855
|
-
where: {
|
|
856
|
-
read: b.value
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
s.value = !1, v && (e.value = v.items.map((_) => ({
|
|
860
|
-
id: _.id,
|
|
861
|
-
title: _.title,
|
|
862
|
-
description: _.description,
|
|
863
|
-
createAt: _.createAt,
|
|
864
|
-
updateAt: _.updateAt,
|
|
865
|
-
pinned: _.pinned,
|
|
866
|
-
priority: _.priority,
|
|
867
|
-
displayStatus: _.displayStatus,
|
|
868
|
-
expireAt: _.expireAt,
|
|
869
|
-
requireConfirm: _.requireConfirm,
|
|
870
|
-
read: _.read ?? !1,
|
|
871
|
-
readAt: _.readAt ?? null
|
|
872
|
-
})), d.value.total = v.count, o.value = v.items.length < d.value.pageSize);
|
|
873
|
-
}
|
|
874
|
-
async function k() {
|
|
875
|
-
if (s.value || o.value) return;
|
|
876
|
-
d.value.current += 1, s.value = !0;
|
|
877
|
-
const {
|
|
878
|
-
data: v
|
|
879
|
-
} = await T.messageCenter.noticeNotifications.own.post({
|
|
880
|
-
current: d.value.current,
|
|
881
|
-
pageSize: d.value.pageSize,
|
|
882
|
-
where: {
|
|
883
|
-
read: b.value
|
|
884
|
-
}
|
|
885
|
-
});
|
|
886
|
-
if (s.value = !1, v) {
|
|
887
|
-
const _ = v.items.map((M) => ({
|
|
888
|
-
id: M.id,
|
|
889
|
-
title: M.title,
|
|
890
|
-
description: M.description,
|
|
891
|
-
createAt: M.createAt,
|
|
892
|
-
updateAt: M.updateAt,
|
|
893
|
-
pinned: M.pinned,
|
|
894
|
-
priority: M.priority,
|
|
895
|
-
displayStatus: M.displayStatus,
|
|
896
|
-
expireAt: M.expireAt,
|
|
897
|
-
requireConfirm: M.requireConfirm,
|
|
898
|
-
read: M.read ?? !1,
|
|
899
|
-
readAt: M.readAt ?? null
|
|
900
|
-
}));
|
|
901
|
-
e.value = [...e.value, ..._], o.value = v.items.length < d.value.pageSize;
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
function B() {
|
|
905
|
-
d.value.current = 1, o.value = !1, g();
|
|
906
|
-
}
|
|
907
|
-
async function R() {
|
|
908
|
-
e.value.length !== 0 && (await T.messageCenter.noticeNotifications.readAll.post({}), g());
|
|
909
|
-
}
|
|
910
|
-
function O() {
|
|
911
|
-
n.value = !0, t.value = "", r.value = {
|
|
912
|
-
title: "",
|
|
913
|
-
content: null
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
async function N(v) {
|
|
917
|
-
u.value = !0;
|
|
918
|
-
const {
|
|
919
|
-
data: _
|
|
920
|
-
} = await T.messageCenter.noticeNotifications.findOne.post({
|
|
921
|
-
id: v
|
|
922
|
-
});
|
|
923
|
-
u.value = !1, _ && (r.value = {
|
|
924
|
-
title: _.title,
|
|
925
|
-
content: _.content
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
async function E(v) {
|
|
929
|
-
t.value = v.id, n.value = !1, v.read || (await T.messageCenter.noticeNotifications.read.post({
|
|
930
|
-
noticeId: v.id
|
|
931
|
-
}), b.value || (e.value = e.value.filter((_) => _.id !== v.id))), N(v.id);
|
|
932
|
-
}
|
|
933
|
-
function C(v) {
|
|
934
|
-
return {
|
|
935
|
-
published: "green",
|
|
936
|
-
expired: "gray"
|
|
937
|
-
}[v] || "gray";
|
|
938
|
-
}
|
|
939
|
-
function m(v) {
|
|
940
|
-
return {
|
|
941
|
-
published: "有效",
|
|
942
|
-
expired: "已过期"
|
|
943
|
-
}[v] || "未知";
|
|
944
|
-
}
|
|
945
|
-
return g(), (v, _) => (a(), h("div", tt, [n.value ? A("", !0) : (a(), y(l(P), {
|
|
946
|
-
key: 0,
|
|
947
|
-
class: "message-panel__breadcrumb"
|
|
948
|
-
}, {
|
|
949
|
-
default: p(() => [$(l(V), {
|
|
950
|
-
onClick: O
|
|
951
|
-
}, {
|
|
952
|
-
default: p(() => [..._[1] || (_[1] = [S("公告通知", -1)])]),
|
|
953
|
-
_: 1
|
|
954
|
-
}), $(l(V), null, {
|
|
955
|
-
default: p(() => [..._[2] || (_[2] = [S("详情", -1)])]),
|
|
956
|
-
_: 1
|
|
957
|
-
})]),
|
|
958
|
-
_: 1
|
|
959
|
-
})), n.value ? (a(), y(ae, {
|
|
960
|
-
key: 1,
|
|
961
|
-
"active-tab": c.value,
|
|
962
|
-
"onUpdate:activeTab": _[0] || (_[0] = (M) => c.value = M),
|
|
963
|
-
tabs: w,
|
|
964
|
-
"message-list": e.value,
|
|
965
|
-
onChange: B,
|
|
966
|
-
onReadAll: R
|
|
967
|
-
}, null, 8, ["active-tab", "message-list"])) : A("", !0), n.value ? (a(), y(G, {
|
|
968
|
-
key: 2,
|
|
969
|
-
"message-list": e.value,
|
|
970
|
-
loading: s.value,
|
|
971
|
-
finished: o.value,
|
|
972
|
-
"show-read-status": !0,
|
|
973
|
-
"show-view-button": !1,
|
|
974
|
-
onItemClick: E,
|
|
975
|
-
onLoadMore: k
|
|
976
|
-
}, {
|
|
977
|
-
tags: p(({
|
|
978
|
-
item: M
|
|
979
|
-
}) => [M.priority === "urgent" ? (a(), y(l(D), {
|
|
980
|
-
key: 0,
|
|
981
|
-
color: "red",
|
|
982
|
-
size: "small"
|
|
983
|
-
}, {
|
|
984
|
-
default: p(() => [..._[3] || (_[3] = [S("紧急", -1)])]),
|
|
985
|
-
_: 1
|
|
986
|
-
})) : M.priority === "important" ? (a(), y(l(D), {
|
|
987
|
-
key: 1,
|
|
988
|
-
color: "orange",
|
|
989
|
-
size: "small"
|
|
990
|
-
}, {
|
|
991
|
-
default: p(() => [..._[4] || (_[4] = [S("重要", -1)])]),
|
|
992
|
-
_: 1
|
|
993
|
-
})) : A("", !0), $(l(D), {
|
|
994
|
-
color: C(M.displayStatus),
|
|
995
|
-
size: "small"
|
|
996
|
-
}, {
|
|
997
|
-
default: p(() => [S(z(m(M.displayStatus)), 1)]),
|
|
998
|
-
_: 2
|
|
999
|
-
}, 1032, ["color"])]),
|
|
1000
|
-
footer: p(({
|
|
1001
|
-
item: M
|
|
1002
|
-
}) => [M.expireAt ? (a(), h("span", at, z(M.displayStatus === "expired" ? "已过期" : `过期时间: ${M.expireAt}`), 1)) : A("", !0)]),
|
|
1003
|
-
_: 1
|
|
1004
|
-
}, 8, ["message-list", "loading", "finished"])) : (a(), h("div", st, [$(H, {
|
|
1005
|
-
title: r.value.title,
|
|
1006
|
-
content: r.value.content,
|
|
1007
|
-
loading: u.value
|
|
1008
|
-
}, null, 8, ["title", "content", "loading"])]))]));
|
|
1009
|
-
}
|
|
1010
|
-
}), it = /* @__PURE__ */ x(nt, [["__scopeId", "data-v-ce6c2679"]]), ot = {
|
|
1011
|
-
class: "content"
|
|
1012
|
-
}, lt = {
|
|
1013
|
-
class: "left"
|
|
1014
|
-
}, rt = /* @__PURE__ */ L({
|
|
1015
|
-
__name: "MessageAppMessage",
|
|
1016
|
-
props: /* @__PURE__ */ X({
|
|
1017
|
-
menus: {
|
|
1018
|
-
type: Array,
|
|
1019
|
-
required: !0
|
|
1020
|
-
}
|
|
1021
|
-
}, {
|
|
1022
|
-
selectedKeys: {
|
|
1023
|
-
default: ["ChangelogNotifications"]
|
|
1024
|
-
},
|
|
1025
|
-
selectedKeysModifiers: {}
|
|
1026
|
-
}),
|
|
1027
|
-
emits: /* @__PURE__ */ X(["cancel", "change"], ["update:selectedKeys"]),
|
|
1028
|
-
setup(i, {
|
|
1029
|
-
expose: n,
|
|
1030
|
-
emit: t
|
|
1031
|
-
}) {
|
|
1032
|
-
const u = i, r = t, s = ie(i, "selectedKeys"), o = Q(() => s.value.length !== 0 ? s.value[0] : "");
|
|
1033
|
-
function e() {
|
|
1034
|
-
r("cancel");
|
|
1035
|
-
}
|
|
1036
|
-
function c(g) {
|
|
1037
|
-
const k = g.path;
|
|
1038
|
-
s.value = [k], r("change", g);
|
|
1039
|
-
}
|
|
1040
|
-
const {
|
|
1041
|
-
changeType: d,
|
|
1042
|
-
show: w
|
|
1043
|
-
} = ce(r);
|
|
1044
|
-
function b(g) {
|
|
1045
|
-
w.value = g, d.value = "编辑";
|
|
1046
|
-
}
|
|
1047
|
-
return n({
|
|
1048
|
-
setData: b
|
|
1049
|
-
}), (g, k) => (a(), y(l(re), {
|
|
1050
|
-
visible: l(w),
|
|
1051
|
-
"onUpdate:visible": k[1] || (k[1] = (B) => oe(w) ? w.value = B : null),
|
|
1052
|
-
loading: !1,
|
|
1053
|
-
"body-class": "AppMessagebodyClass",
|
|
1054
|
-
"mask-closable": !1,
|
|
1055
|
-
footer: !1,
|
|
1056
|
-
"hide-title": !1,
|
|
1057
|
-
width: "880px",
|
|
1058
|
-
onCancel: e
|
|
1059
|
-
}, {
|
|
1060
|
-
default: p(() => [I("div", ot, [I("div", lt, [$(de, {
|
|
1061
|
-
"selected-keys": s.value,
|
|
1062
|
-
"onUpdate:selectedKeys": k[0] || (k[0] = (B) => s.value = B),
|
|
1063
|
-
menus: u.menus,
|
|
1064
|
-
onChange: c
|
|
1065
|
-
}, null, 8, ["selected-keys", "menus"])]), l(w) ? (a(), h(K, {
|
|
1066
|
-
key: 0
|
|
1067
|
-
}, [o.value === "ChangelogNotifications" ? (a(), y(Ve, {
|
|
1068
|
-
key: 0
|
|
1069
|
-
})) : A("", !0), o.value === "EventNotifications" ? (a(), y(He, {
|
|
1070
|
-
key: 1
|
|
1071
|
-
})) : A("", !0), o.value === "MessageNotifications" ? (a(), y(et, {
|
|
1072
|
-
key: 2
|
|
1073
|
-
})) : A("", !0), o.value === "NoticeNotifications" ? (a(), y(it, {
|
|
1074
|
-
key: 3
|
|
1075
|
-
})) : A("", !0)], 64)) : A("", !0)])]),
|
|
1076
|
-
_: 1
|
|
1077
|
-
}, 8, ["visible"]));
|
|
1078
|
-
}
|
|
1079
|
-
}), ut = /* @__PURE__ */ x(rt, [["__scopeId", "data-v-5ac30050"]]), ct = /* @__PURE__ */ L({
|
|
1080
|
-
__name: "MessageMenuItem",
|
|
1081
|
-
props: {
|
|
1082
|
-
hidden: {
|
|
1083
|
-
type: Boolean,
|
|
1084
|
-
required: !0
|
|
1085
|
-
},
|
|
1086
|
-
path: {
|
|
1087
|
-
type: String,
|
|
1088
|
-
required: !0
|
|
1089
|
-
},
|
|
1090
|
-
icon: {
|
|
1091
|
-
type: String,
|
|
1092
|
-
required: !0
|
|
1093
|
-
},
|
|
1094
|
-
name: {
|
|
1095
|
-
type: String,
|
|
1096
|
-
required: !0
|
|
1097
|
-
},
|
|
1098
|
-
active: {
|
|
1099
|
-
type: Boolean,
|
|
1100
|
-
required: !0
|
|
1101
|
-
}
|
|
1102
|
-
},
|
|
1103
|
-
setup(i) {
|
|
1104
|
-
const n = i, t = f(!1);
|
|
1105
|
-
function u() {
|
|
1106
|
-
t.value = !0;
|
|
1107
|
-
}
|
|
1108
|
-
function r() {
|
|
1109
|
-
t.value = !1;
|
|
1110
|
-
}
|
|
1111
|
-
return (s, o) => n.hidden ? A("", !0) : (a(), h("div", {
|
|
1112
|
-
key: 0,
|
|
1113
|
-
class: F(["List", {
|
|
1114
|
-
Active: n.active,
|
|
1115
|
-
Hover: t.value && !n.active
|
|
1116
|
-
}]),
|
|
1117
|
-
onMouseover: u,
|
|
1118
|
-
onMouseout: r
|
|
1119
|
-
}, [n.icon ? (a(), y(l(W), {
|
|
1120
|
-
key: 0,
|
|
1121
|
-
class: "icon",
|
|
1122
|
-
icon: n.icon
|
|
1123
|
-
}, null, 8, ["icon"])) : A("", !0), I("span", null, z(n.name), 1)], 34));
|
|
1124
|
-
}
|
|
1125
|
-
}), Y = /* @__PURE__ */ x(ct, [["__scopeId", "data-v-e1a181b9"]]), dt = {
|
|
1126
|
-
class: "Menu"
|
|
1127
|
-
}, ft = {
|
|
1128
|
-
class: "TitleContent"
|
|
1129
|
-
}, pt = {
|
|
1130
|
-
class: "Title"
|
|
1131
|
-
}, gt = {
|
|
1132
|
-
class: "MenuItem2"
|
|
1133
|
-
}, vt = /* @__PURE__ */ L({
|
|
1134
|
-
__name: "MessageMenu",
|
|
1135
|
-
props: {
|
|
1136
|
-
menus: {
|
|
1137
|
-
type: Array,
|
|
1138
|
-
required: !0
|
|
1139
|
-
},
|
|
1140
|
-
selectedKeys: {
|
|
1141
|
-
type: Array,
|
|
1142
|
-
required: !0
|
|
1143
|
-
}
|
|
1144
|
-
},
|
|
1145
|
-
emits: ["update:selectedKeys", "change"],
|
|
1146
|
-
setup(i, {
|
|
1147
|
-
emit: n
|
|
1148
|
-
}) {
|
|
1149
|
-
const t = i, u = n;
|
|
1150
|
-
function r(s, o) {
|
|
1151
|
-
u("change", s, o);
|
|
1152
|
-
}
|
|
1153
|
-
return (s, o) => (a(), h("div", dt, [(a(!0), h(K, null, j(t.menus, (e, c) => {
|
|
1154
|
-
var d, w, b;
|
|
1155
|
-
return a(), h("div", {
|
|
1156
|
-
key: c
|
|
1157
|
-
}, [e.children && e.children.length !== 0 ? (a(), h(K, {
|
|
1158
|
-
key: 0
|
|
1159
|
-
}, [I("span", ft, [(d = e == null ? void 0 : e.meta) != null && d.icon ? (a(), y(l(W), {
|
|
1160
|
-
key: 0,
|
|
1161
|
-
class: "icon",
|
|
1162
|
-
icon: e.meta.icon
|
|
1163
|
-
}, null, 8, ["icon"])) : A("", !0), I("span", pt, z(e.name), 1)]), I("span", gt, [(a(!0), h(K, null, j(e.children, (g, k) => {
|
|
1164
|
-
var B, R;
|
|
1165
|
-
return a(), y(Y, {
|
|
1166
|
-
key: k,
|
|
1167
|
-
hidden: ((B = g.meta) == null ? void 0 : B.hidden) || !1,
|
|
1168
|
-
path: g.path,
|
|
1169
|
-
icon: (R = g.meta) == null ? void 0 : R.icon,
|
|
1170
|
-
name: g.name,
|
|
1171
|
-
active: t.selectedKeys.includes(g.path),
|
|
1172
|
-
onClick: (O) => r(g, k)
|
|
1173
|
-
}, null, 8, ["hidden", "path", "icon", "name", "active", "onClick"]);
|
|
1174
|
-
}), 128))])], 64)) : (a(), y(Y, {
|
|
1175
|
-
key: 1,
|
|
1176
|
-
hidden: ((w = e.meta) == null ? void 0 : w.hidden) || !1,
|
|
1177
|
-
path: e.path,
|
|
1178
|
-
icon: (b = e.meta) == null ? void 0 : b.icon,
|
|
1179
|
-
name: e.name,
|
|
1180
|
-
active: t.selectedKeys.includes(e.path),
|
|
1181
|
-
onClick: (g) => r(e, c)
|
|
1182
|
-
}, null, 8, ["hidden", "path", "icon", "name", "active", "onClick"]))]);
|
|
1183
|
-
}), 128))]));
|
|
1184
|
-
}
|
|
1185
|
-
}), zt = /* @__PURE__ */ x(vt, [["__scopeId", "data-v-bc22aac1"]]), mt = /* @__PURE__ */ L({
|
|
1186
|
-
__name: "MessageHandle",
|
|
1187
|
-
setup(i, {
|
|
1188
|
-
expose: n
|
|
1189
|
-
}) {
|
|
1190
|
-
const t = f(["ChangelogNotifications"]), u = f(), r = f(Symbol("key"));
|
|
1191
|
-
function s() {
|
|
1192
|
-
u.value.setData(!0);
|
|
1193
|
-
}
|
|
1194
|
-
function o() {
|
|
1195
|
-
r.value = Symbol("key");
|
|
1196
|
-
}
|
|
1197
|
-
function e() {
|
|
1198
|
-
r.value = Symbol("key");
|
|
1199
|
-
}
|
|
1200
|
-
const c = f([{
|
|
1201
|
-
name: "功能变更",
|
|
1202
|
-
path: "ChangelogNotifications",
|
|
1203
|
-
meta: {
|
|
1204
|
-
icon: "mingcute:cube-3d-fill"
|
|
1205
|
-
}
|
|
1206
|
-
}, {
|
|
1207
|
-
name: "活动通知",
|
|
1208
|
-
path: "EventNotifications",
|
|
1209
|
-
meta: {
|
|
1210
|
-
icon: "mingcute:receive-money-fill"
|
|
1211
|
-
}
|
|
1212
|
-
}, {
|
|
1213
|
-
name: "消息通知",
|
|
1214
|
-
path: "MessageNotifications",
|
|
1215
|
-
meta: {
|
|
1216
|
-
icon: "mingcute:message-1-fill"
|
|
1217
|
-
}
|
|
1218
|
-
}, {
|
|
1219
|
-
name: "公告",
|
|
1220
|
-
path: "NoticeNotifications",
|
|
1221
|
-
meta: {
|
|
1222
|
-
icon: "mingcute:announcement-fill"
|
|
1223
|
-
}
|
|
1224
|
-
}]);
|
|
1225
|
-
return n({
|
|
1226
|
-
openNotification: s
|
|
1227
|
-
}), (d, w) => (a(), y(ut, {
|
|
1228
|
-
ref_key: "MessageNotificationsRef",
|
|
1229
|
-
ref: u,
|
|
1230
|
-
key: r.value,
|
|
1231
|
-
"selected-keys": t.value,
|
|
1232
|
-
"onUpdate:selectedKeys": w[0] || (w[0] = (b) => t.value = b),
|
|
1233
|
-
menus: c.value,
|
|
1234
|
-
title: "消息中心",
|
|
1235
|
-
onConfirm: e,
|
|
1236
|
-
onCancel: o
|
|
1237
|
-
}, null, 8, ["selected-keys", "menus"]));
|
|
1238
|
-
}
|
|
1239
|
-
}), xt = /* @__PURE__ */ x(mt, [["__scopeId", "data-v-2e2a72d0"]]), Bt = /* @__PURE__ */ L({
|
|
1240
|
-
__name: "MessageNoticeNotificationsDetails",
|
|
1241
|
-
props: {
|
|
1242
|
-
id: {
|
|
1243
|
-
type: String,
|
|
1244
|
-
required: !0
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
setup(i) {
|
|
1248
|
-
const n = f(!1), t = f(null), u = f(""), r = i;
|
|
1249
|
-
async function s() {
|
|
1250
|
-
n.value = !0;
|
|
1251
|
-
const {
|
|
1252
|
-
data: o
|
|
1253
|
-
} = await T.messageCenter.noticeNotifications.findOne.post({
|
|
1254
|
-
id: r.id
|
|
1255
|
-
});
|
|
1256
|
-
n.value = !1, o && (t.value = o.content, u.value = o.title);
|
|
1257
|
-
}
|
|
1258
|
-
return s(), (o, e) => (a(), y(H, {
|
|
1259
|
-
content: t.value,
|
|
1260
|
-
title: u.value,
|
|
1261
|
-
loading: n.value
|
|
1262
|
-
}, null, 8, ["content", "title", "loading"]));
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
export {
|
|
1266
|
-
ut as A,
|
|
1267
|
-
Ve as C,
|
|
1268
|
-
H as D,
|
|
1269
|
-
He as E,
|
|
1270
|
-
he as I,
|
|
1271
|
-
xt as M,
|
|
1272
|
-
it as N,
|
|
1273
|
-
ve as _,
|
|
1274
|
-
Je as a,
|
|
1275
|
-
Ke as b,
|
|
1276
|
-
G as c,
|
|
1277
|
-
zt as d,
|
|
1278
|
-
Y as e,
|
|
1279
|
-
Bt as f,
|
|
1280
|
-
et as g,
|
|
1281
|
-
ae as h
|
|
1282
|
-
};
|