@huyooo/ui 1.0.6 → 2.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/AuthkitAppSetting-rtYZcSAR.js +2677 -0
- package/dist/{Contact-BWuVR9ho.js → Contact-CcWf3UEZ.js} +9 -9
- package/dist/{CustomTable-BzGfaAVH.js → CustomTable-HDwqEcmB.js} +1 -1
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DpOmbAg-.js +1491 -0
- package/dist/{LegalDocViewer-DM8FYBpf.js → LegalDocViewer-C0tsIbz9.js} +747 -748
- package/dist/MessageHandle-BUufez4S.js +1233 -0
- package/dist/{MessageList-Ce-_LNTk.js → MessageList-rttvPmxV.js} +4 -4
- package/dist/PaySubscriptions-p75aBnHm.js +1331 -0
- package/dist/{PricingPlans-CV97ck9p.js → PricingPlans-CQ0qk9Hb.js} +99 -105
- package/dist/{ReferrerReferees-DgygiIiE.js → ReferrerReferees-BU9IEQgz.js} +47 -46
- package/dist/Upload.vue_vue_type_script_setup_true_lang-bh0NFq9E.js +78 -0
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DG4AuHiO.js} +64 -65
- package/dist/WidthContainer-DSE4QbW0.js +717 -0
- package/dist/api/billingSubscriptionApi.d.ts +4 -1
- package/dist/apiClients-Ctcq8NZs.js +245 -0
- package/dist/authkit.js +10 -10
- package/dist/common/globalConfig.d.ts +36 -18
- package/dist/common.js +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
- package/dist/components/Authkit/AuthkitProvider.vue.d.ts +0 -5
- package/dist/components/Feedback/FeedbackDetails.vue.d.ts +30 -0
- package/dist/components/Upload/Upload.vue.d.ts +6 -6
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -0
- package/dist/composables/Billing/usePaymentReturn.d.ts +1 -0
- package/dist/composables/uploadFeedbackAttachment.d.ts +2 -1
- package/dist/composables/useMessageList.d.ts +2 -1
- package/dist/composables.d.ts +2 -2
- package/dist/composables.js +46 -46
- package/dist/feedback.js +2 -2
- package/dist/{fetchAuthPageAboutUs-dzTSwRsB.js → fetchAuthPageAboutUs-DiCqMUX3.js} +4 -4
- package/dist/{index-BkLvw1PU.js → index-Cn6LcfZO.js} +1 -1
- package/dist/legalDocs/resolveAppId.d.ts +1 -1
- package/dist/main.d.ts +4 -3
- package/dist/main.js +464 -469
- package/dist/message.js +53 -52
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{useUploadCos-C8BqFPkx.js → runtime-BzCSCUNv.js} +2712 -2609
- package/dist/runtime.d.ts +18 -0
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +0 -10
- package/dist/upload/browserCosTransport.d.ts +25 -0
- package/dist/upload/browserUploadService.d.ts +20 -0
- package/dist/upload.d.ts +2 -1
- package/dist/upload.js +5 -4
- package/dist/{useAuthkitAppsAuthPageInfo-CNudJd04.js → useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js} +18 -21
- package/dist/useAuthkitAuth-BPTZUSkM.js +272 -0
- package/dist/{useAuthkitCreateAndUpdate-BsINsI-E.js → useAuthkitCreateAndUpdate-Bbv7vZZn.js} +1 -1
- package/dist/useAuthkitUsersProfile-CW_exa7E.js +39 -0
- package/dist/useBillingStatusOptions-Br-iL77Z.js +61 -0
- package/dist/{useEnsureAuthenticated-DNkCCy_Y.js → useEnsureAuthenticated-CncOvj2H.js} +2 -2
- package/dist/{useLegalDocs-DQP_Yq6B.js → useLegalDocs-D44qU_q0.js} +25 -25
- package/dist/useMessageNotifications-D9uikt21.js +80 -0
- package/dist/{useRoutePermission-CEiya9AM.js → useRoutePermission-BrQX7NTq.js} +2 -2
- package/dist/{useSEO-CDWxbk8B.js → useSEO-_TNouXE_.js} +89 -86
- package/dist/useSubscriptionCheckout-BDDCRxSs.js +353 -0
- package/dist/user.js +1 -1
- package/dist/utils/apiClients.d.ts +20 -12
- package/dist/utils/apiMiddlewares.d.ts +9 -23
- package/package.json +1 -1
- package/dist/AuthkitAppSetting-BN8-xgNq.js +0 -2674
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +0 -1480
- package/dist/MessageHandle-mEkCsv9e.js +0 -1173
- package/dist/PaySubscriptions-CXkEjqr2.js +0 -1326
- package/dist/Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js +0 -76
- package/dist/WidthContainer-PeWkCK0p.js +0 -721
- package/dist/apiClients-BcXOLuYu.js +0 -272
- package/dist/composables/Upload/useUploadCos.d.ts +0 -12
- package/dist/useAuthkitAuth-3m0yW6uP.js +0 -267
- package/dist/useAuthkitUsersProfile-DJlMsftY.js +0 -40
- package/dist/useBillingStatusOptions-CfHQOFNw.js +0 -71
- package/dist/useMessageNotifications-CAphguOm.js +0 -75
- package/dist/useSubscriptionCheckout-d_M_rKRa.js +0 -368
- package/dist/utils/billingFetch.d.ts +0 -1
|
@@ -1,1173 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, computed as L, openBlock as d, createElementBlock as S, toDisplayString as D, createBlock as _, unref as m, ref as f, withCtx as v, createVNode as C, createCommentVNode as h, Fragment as Y, renderList as ne, normalizeClass as Z, watch as ee, createElementVNode as K, createTextVNode as z, resolveDynamicComponent as se, useModel as ie, isRef as le, mergeModels as G } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { U as oe } from "./userMenuModal-D-nDaYqM.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import { M as j, a as V, u as re } from "./MessageList-Ce-_LNTk.js";
|
|
7
|
-
import { Descriptions as ue, Spin as te, Breadcrumb as q, BreadcrumbItem as R, Tag as U, Modal as ce } from "@arco-design/web-vue";
|
|
8
|
-
import { o as A } from "./apiClients-BcXOLuYu.js";
|
|
9
|
-
import { TiptapEditor as de, TiptapTitle as pe } from "@huyooo/vue-tiptap";
|
|
10
|
-
import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
import { Icon as fe } from "@iconify/vue";
|
|
12
|
-
import { u as ge } from "./useAuthkitCreateAndUpdate-BsINsI-E.js";
|
|
13
|
-
import { M as ve } from "./Menu-uCexrsKP.js";
|
|
14
|
-
function W(a, t, r) {
|
|
15
|
-
if (a == null || a === "")
|
|
16
|
-
return "—";
|
|
17
|
-
if (typeof a == "boolean") {
|
|
18
|
-
if (t && (r != null && r[t])) {
|
|
19
|
-
const [i, l] = r[t];
|
|
20
|
-
return a ? i : l;
|
|
21
|
-
}
|
|
22
|
-
return a ? "是" : "否";
|
|
23
|
-
}
|
|
24
|
-
if (Array.isArray(a))
|
|
25
|
-
return a.map((i) => W(i)).join("、") || "—";
|
|
26
|
-
if (typeof a == "object")
|
|
27
|
-
try {
|
|
28
|
-
return JSON.stringify(a, null, 2);
|
|
29
|
-
} catch {
|
|
30
|
-
return String(a);
|
|
31
|
-
}
|
|
32
|
-
return String(a);
|
|
33
|
-
}
|
|
34
|
-
function ye(a, t = {}) {
|
|
35
|
-
const r = new Set(t.hiddenKeys ?? []), i = t.fieldLabels ?? {}, l = [];
|
|
36
|
-
for (const [c, s] of Object.entries(a))
|
|
37
|
-
r.has(c) || c === t.nestedKey || l.push({
|
|
38
|
-
label: i[c] ?? c,
|
|
39
|
-
value: W(s, c, t.booleanLabels)
|
|
40
|
-
});
|
|
41
|
-
const o = t.nestedKey ? a[t.nestedKey] : void 0;
|
|
42
|
-
if (o && typeof o == "object" && !Array.isArray(o))
|
|
43
|
-
for (const [c, s] of Object.entries(o))
|
|
44
|
-
r.has(c) || l.push({
|
|
45
|
-
label: i[c] ?? c,
|
|
46
|
-
value: W(s, c, t.booleanLabels)
|
|
47
|
-
});
|
|
48
|
-
return l;
|
|
49
|
-
}
|
|
50
|
-
const me = {
|
|
51
|
-
class: "json-message-body-fallback"
|
|
52
|
-
}, _e = {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: "json-message-body-fallback__text"
|
|
55
|
-
}, be = {
|
|
56
|
-
key: 2,
|
|
57
|
-
class: "json-message-body-fallback__raw"
|
|
58
|
-
}, he = /* @__PURE__ */ $({
|
|
59
|
-
__name: "JsonMessageBodyFallback",
|
|
60
|
-
props: {
|
|
61
|
-
data: {},
|
|
62
|
-
title: {},
|
|
63
|
-
description: {},
|
|
64
|
-
type: {}
|
|
65
|
-
},
|
|
66
|
-
setup(a) {
|
|
67
|
-
const t = a, r = L(() => typeof t.data.text == "string" && Object.keys(t.data).length === 1 ? t.data.text : ""), i = L(() => ye(t.data)), l = L(() => {
|
|
68
|
-
try {
|
|
69
|
-
return JSON.stringify(t.data, null, 2);
|
|
70
|
-
} catch {
|
|
71
|
-
return String(t.data);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
return (o, c) => (d(), S("div", me, [r.value ? (d(), S("p", _e, D(r.value), 1)) : i.value.length > 0 ? (d(), _(m(ue), {
|
|
75
|
-
key: 1,
|
|
76
|
-
column: 1,
|
|
77
|
-
bordered: "",
|
|
78
|
-
size: "medium",
|
|
79
|
-
data: i.value
|
|
80
|
-
}, null, 8, ["data"])) : (d(), S("pre", be, D(l.value), 1))]));
|
|
81
|
-
}
|
|
82
|
-
}), Q = /* @__PURE__ */ O(he, [["__scopeId", "data-v-e61c87e4"]]), F = /* @__PURE__ */ new Map();
|
|
83
|
-
function _t(a, t) {
|
|
84
|
-
const r = a.trim();
|
|
85
|
-
r && F.set(r, t);
|
|
86
|
-
}
|
|
87
|
-
function bt(a) {
|
|
88
|
-
return F.has(a.trim());
|
|
89
|
-
}
|
|
90
|
-
function Ae(a) {
|
|
91
|
-
const t = a.trim();
|
|
92
|
-
return t ? F.get(t) ?? Q : Q;
|
|
93
|
-
}
|
|
94
|
-
function ht() {
|
|
95
|
-
return [...F.keys()];
|
|
96
|
-
}
|
|
97
|
-
const Ce = /* @__PURE__ */ $({
|
|
98
|
-
__name: "MessageDetails",
|
|
99
|
-
props: {
|
|
100
|
-
content: {
|
|
101
|
-
default: null
|
|
102
|
-
},
|
|
103
|
-
title: {},
|
|
104
|
-
loading: {
|
|
105
|
-
type: Boolean,
|
|
106
|
-
default: !1
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
emits: ["itemClick", "tableOfContentsUpdate", "update:title", "update:content"],
|
|
110
|
-
setup(a, {
|
|
111
|
-
emit: t
|
|
112
|
-
}) {
|
|
113
|
-
const r = f([]), i = a, l = f(!1), o = t, c = f();
|
|
114
|
-
function s(y) {
|
|
115
|
-
r.value = y, o("tableOfContentsUpdate", y);
|
|
116
|
-
}
|
|
117
|
-
return (y, g) => (d(), _(m(te), {
|
|
118
|
-
loading: i.loading,
|
|
119
|
-
tip: "文档加载中...",
|
|
120
|
-
class: "Spin",
|
|
121
|
-
dot: ""
|
|
122
|
-
}, {
|
|
123
|
-
default: v(() => [C(m(de), {
|
|
124
|
-
ref_key: "TiptapEditorRef",
|
|
125
|
-
ref: c,
|
|
126
|
-
"model-value": i.content,
|
|
127
|
-
editable: l.value,
|
|
128
|
-
"tiptap-editor-content-class": "tiptapEditorContentClass",
|
|
129
|
-
onTableOfContentsUpdate: s
|
|
130
|
-
}, {
|
|
131
|
-
title: v(() => [C(m(pe), {
|
|
132
|
-
"model-value": i.title,
|
|
133
|
-
editable: l.value
|
|
134
|
-
}, null, 8, ["model-value", "editable"])]),
|
|
135
|
-
_: 1
|
|
136
|
-
}, 8, ["model-value", "editable"]), h("", !0)]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["loading"]));
|
|
139
|
-
}
|
|
140
|
-
}), P = /* @__PURE__ */ O(Ce, [["__scopeId", "data-v-2149941c"]]), Se = /* @__PURE__ */ $({
|
|
141
|
-
__name: "MessageChangelogNotificationsDetails",
|
|
142
|
-
props: {
|
|
143
|
-
id: {
|
|
144
|
-
type: String,
|
|
145
|
-
required: !0
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
setup(a) {
|
|
149
|
-
const t = f(!1), r = f(null), i = f(""), l = a;
|
|
150
|
-
async function o() {
|
|
151
|
-
t.value = !0;
|
|
152
|
-
const {
|
|
153
|
-
data: c
|
|
154
|
-
} = await A.messageCenter.changelogNotifications.findOne.post({
|
|
155
|
-
id: l.id
|
|
156
|
-
});
|
|
157
|
-
t.value = !1, c && (r.value = c.content, i.value = c.title);
|
|
158
|
-
}
|
|
159
|
-
return o(), (c, s) => (d(), _(P, {
|
|
160
|
-
content: r.value,
|
|
161
|
-
title: i.value,
|
|
162
|
-
loading: t.value
|
|
163
|
-
}, null, 8, ["content", "title", "loading"]));
|
|
164
|
-
}
|
|
165
|
-
}), ke = {
|
|
166
|
-
style: {
|
|
167
|
-
display: "flex",
|
|
168
|
-
gap: "16px"
|
|
169
|
-
}
|
|
170
|
-
}, Ne = ["onClick"], we = /* @__PURE__ */ $({
|
|
171
|
-
__name: "MessageCustomTabs",
|
|
172
|
-
props: {
|
|
173
|
-
modelValue: {
|
|
174
|
-
type: String,
|
|
175
|
-
default: "1"
|
|
176
|
-
},
|
|
177
|
-
tabs: {
|
|
178
|
-
type: Array,
|
|
179
|
-
default: () => [{
|
|
180
|
-
label: "未读消息",
|
|
181
|
-
key: "1"
|
|
182
|
-
}, {
|
|
183
|
-
label: "已读消息",
|
|
184
|
-
key: "2"
|
|
185
|
-
}]
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
emits: ["update:modelValue", "change"],
|
|
189
|
-
setup(a, {
|
|
190
|
-
emit: t
|
|
191
|
-
}) {
|
|
192
|
-
const r = a, i = t;
|
|
193
|
-
function l(o) {
|
|
194
|
-
o !== r.modelValue && (i("update:modelValue", o), i("change", o));
|
|
195
|
-
}
|
|
196
|
-
return (o, c) => (d(), S("div", ke, [(d(!0), S(Y, null, ne(a.tabs, (s) => (d(), S("span", {
|
|
197
|
-
key: s.key,
|
|
198
|
-
class: Z(["custom-tab", [{
|
|
199
|
-
active: a.modelValue === s.key
|
|
200
|
-
}]]),
|
|
201
|
-
onClick: (y) => l(s.key)
|
|
202
|
-
}, D(s.label), 11, Ne))), 128))]));
|
|
203
|
-
}
|
|
204
|
-
}), Me = /* @__PURE__ */ O(we, [["__scopeId", "data-v-d7edaca7"]]), Te = {
|
|
205
|
-
class: "tabs"
|
|
206
|
-
}, ze = /* @__PURE__ */ $({
|
|
207
|
-
__name: "MessageTabs",
|
|
208
|
-
props: {
|
|
209
|
-
tabs: {
|
|
210
|
-
type: Array,
|
|
211
|
-
required: !0
|
|
212
|
-
},
|
|
213
|
-
messageList: {
|
|
214
|
-
type: Array,
|
|
215
|
-
required: !0
|
|
216
|
-
},
|
|
217
|
-
activeTab: {
|
|
218
|
-
type: String,
|
|
219
|
-
required: !0
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
emits: ["update:activeTab", "change", "readAll"],
|
|
223
|
-
setup(a, {
|
|
224
|
-
emit: t
|
|
225
|
-
}) {
|
|
226
|
-
const r = a, i = t, l = f(r.activeTab);
|
|
227
|
-
ee(() => r.activeTab, (s) => {
|
|
228
|
-
l.value = s;
|
|
229
|
-
});
|
|
230
|
-
function o(s) {
|
|
231
|
-
l.value = s, i("update:activeTab", s), i("change", s);
|
|
232
|
-
}
|
|
233
|
-
function c() {
|
|
234
|
-
r.messageList.length !== 0 && i("readAll");
|
|
235
|
-
}
|
|
236
|
-
return (s, y) => (d(), S("div", Te, [C(Me, {
|
|
237
|
-
modelValue: l.value,
|
|
238
|
-
"onUpdate:modelValue": y[0] || (y[0] = (g) => l.value = g),
|
|
239
|
-
tabs: a.tabs,
|
|
240
|
-
onChange: o
|
|
241
|
-
}, null, 8, ["modelValue", "tabs"]), l.value === "unread" ? (d(), S("div", {
|
|
242
|
-
key: 0,
|
|
243
|
-
class: Z(["readAll", {
|
|
244
|
-
disabled: a.messageList.length === 0
|
|
245
|
-
}]),
|
|
246
|
-
onClick: c
|
|
247
|
-
}, [C(m(fe), {
|
|
248
|
-
class: "icon",
|
|
249
|
-
icon: "icon-park-outline:clear"
|
|
250
|
-
}), y[1] || (y[1] = K("span", null, " 全部已读", -1))], 2)) : h("", !0)]));
|
|
251
|
-
}
|
|
252
|
-
}), J = /* @__PURE__ */ O(ze, [["__scopeId", "data-v-47f7fce5"]]), xe = {
|
|
253
|
-
class: "message-panel"
|
|
254
|
-
}, $e = {
|
|
255
|
-
class: "version-prefix"
|
|
256
|
-
}, Ie = {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: "publish-time"
|
|
259
|
-
}, Le = {
|
|
260
|
-
key: 3,
|
|
261
|
-
class: "message-panel__detail"
|
|
262
|
-
}, De = /* @__PURE__ */ $({
|
|
263
|
-
__name: "MessageChangelogNotifications",
|
|
264
|
-
setup(a) {
|
|
265
|
-
const t = f(!0), r = f(""), i = f(!1), l = f(!1), o = f([]), c = f("unread"), s = f({
|
|
266
|
-
current: 1,
|
|
267
|
-
pageSize: 10,
|
|
268
|
-
total: 0
|
|
269
|
-
}), y = [{
|
|
270
|
-
label: "未读更新",
|
|
271
|
-
key: "unread"
|
|
272
|
-
}, {
|
|
273
|
-
label: "已读更新",
|
|
274
|
-
key: "read"
|
|
275
|
-
}], g = L(() => c.value === "read");
|
|
276
|
-
function x(n) {
|
|
277
|
-
return {
|
|
278
|
-
id: String(n.id),
|
|
279
|
-
title: String(n.title ?? ""),
|
|
280
|
-
description: String(n.description ?? ""),
|
|
281
|
-
createAt: String(n.createAt ?? ""),
|
|
282
|
-
updateAt: String(n.updateAt ?? ""),
|
|
283
|
-
version: String(n.version ?? ""),
|
|
284
|
-
changeType: String(n.changeType ?? "feature"),
|
|
285
|
-
publishedAt: n.publishedAt ? String(n.publishedAt) : null,
|
|
286
|
-
read: !!n.read,
|
|
287
|
-
readAt: n.readAt ? String(n.readAt) : null
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
async function k() {
|
|
291
|
-
var e;
|
|
292
|
-
i.value = !0;
|
|
293
|
-
const {
|
|
294
|
-
data: n
|
|
295
|
-
} = await A.messageCenter.changelogNotifications.own.post({
|
|
296
|
-
current: s.value.current,
|
|
297
|
-
pageSize: s.value.pageSize,
|
|
298
|
-
where: {
|
|
299
|
-
read: g.value
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
if (i.value = !1, !n)
|
|
303
|
-
return;
|
|
304
|
-
const u = n;
|
|
305
|
-
o.value = (u.items ?? []).map(x), s.value.total = u.count ?? 0, l.value = (((e = u.items) == null ? void 0 : e.length) ?? 0) < s.value.pageSize;
|
|
306
|
-
}
|
|
307
|
-
async function I() {
|
|
308
|
-
if (i.value || l.value)
|
|
309
|
-
return;
|
|
310
|
-
s.value.current += 1, i.value = !0;
|
|
311
|
-
const {
|
|
312
|
-
data: n
|
|
313
|
-
} = await A.messageCenter.changelogNotifications.own.post({
|
|
314
|
-
current: s.value.current,
|
|
315
|
-
pageSize: s.value.pageSize,
|
|
316
|
-
where: {
|
|
317
|
-
read: g.value
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
if (i.value = !1, !n)
|
|
321
|
-
return;
|
|
322
|
-
const e = (n.items ?? []).map(x);
|
|
323
|
-
o.value = [...o.value, ...e], l.value = e.length < s.value.pageSize;
|
|
324
|
-
}
|
|
325
|
-
function w() {
|
|
326
|
-
s.value.current = 1, l.value = !1, k();
|
|
327
|
-
}
|
|
328
|
-
async function B() {
|
|
329
|
-
o.value.length !== 0 && (await A.messageCenter.changelogNotifications.readAll.post({}), V(), k());
|
|
330
|
-
}
|
|
331
|
-
function N() {
|
|
332
|
-
t.value = !0, r.value = "";
|
|
333
|
-
}
|
|
334
|
-
async function M(n) {
|
|
335
|
-
r.value = n.id, t.value = !1, n.read || (await A.messageCenter.changelogNotifications.read.post({
|
|
336
|
-
changelogId: n.id
|
|
337
|
-
}), V(), g.value || (o.value = o.value.filter((u) => u.id !== n.id)));
|
|
338
|
-
}
|
|
339
|
-
function T(n) {
|
|
340
|
-
return {
|
|
341
|
-
feature: "green",
|
|
342
|
-
improvement: "blue",
|
|
343
|
-
fix: "orange",
|
|
344
|
-
security: "red",
|
|
345
|
-
breaking: "magenta"
|
|
346
|
-
}[n] || "blue";
|
|
347
|
-
}
|
|
348
|
-
function E(n) {
|
|
349
|
-
return {
|
|
350
|
-
feature: "新功能",
|
|
351
|
-
improvement: "优化",
|
|
352
|
-
fix: "修复",
|
|
353
|
-
security: "安全",
|
|
354
|
-
breaking: "重大变更"
|
|
355
|
-
}[n] || "更新";
|
|
356
|
-
}
|
|
357
|
-
return k(), (n, u) => (d(), S("div", xe, [t.value ? h("", !0) : (d(), _(m(q), {
|
|
358
|
-
key: 0,
|
|
359
|
-
class: "message-panel__breadcrumb"
|
|
360
|
-
}, {
|
|
361
|
-
default: v(() => [C(m(R), {
|
|
362
|
-
onClick: N
|
|
363
|
-
}, {
|
|
364
|
-
default: v(() => [...u[1] || (u[1] = [z("更新日志", -1)])]),
|
|
365
|
-
_: 1
|
|
366
|
-
}), C(m(R), null, {
|
|
367
|
-
default: v(() => [...u[2] || (u[2] = [z("详情", -1)])]),
|
|
368
|
-
_: 1
|
|
369
|
-
})]),
|
|
370
|
-
_: 1
|
|
371
|
-
})), t.value ? (d(), _(J, {
|
|
372
|
-
key: 1,
|
|
373
|
-
"active-tab": c.value,
|
|
374
|
-
"onUpdate:activeTab": u[0] || (u[0] = (e) => c.value = e),
|
|
375
|
-
tabs: y,
|
|
376
|
-
"message-list": o.value,
|
|
377
|
-
onChange: w,
|
|
378
|
-
onReadAll: B
|
|
379
|
-
}, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
|
|
380
|
-
key: 2,
|
|
381
|
-
"message-list": o.value,
|
|
382
|
-
loading: i.value,
|
|
383
|
-
finished: l.value,
|
|
384
|
-
"show-read-status": !0,
|
|
385
|
-
"show-view-button": !1,
|
|
386
|
-
onItemClick: M,
|
|
387
|
-
onLoadMore: I
|
|
388
|
-
}, {
|
|
389
|
-
prefix: v(({
|
|
390
|
-
item: e
|
|
391
|
-
}) => [K("span", $e, D(e.version), 1)]),
|
|
392
|
-
tags: v(({
|
|
393
|
-
item: e
|
|
394
|
-
}) => [C(m(U), {
|
|
395
|
-
color: T(e.changeType),
|
|
396
|
-
size: "small"
|
|
397
|
-
}, {
|
|
398
|
-
default: v(() => [z(D(E(e.changeType)), 1)]),
|
|
399
|
-
_: 2
|
|
400
|
-
}, 1032, ["color"])]),
|
|
401
|
-
footer: v(({
|
|
402
|
-
item: e
|
|
403
|
-
}) => [e.publishedAt ? (d(), S("span", Ie, " 发布于 " + D(e.publishedAt), 1)) : h("", !0)]),
|
|
404
|
-
_: 1
|
|
405
|
-
}, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Le, [C(Se, {
|
|
406
|
-
id: r.value
|
|
407
|
-
}, null, 8, ["id"])]))]));
|
|
408
|
-
}
|
|
409
|
-
}), Be = /* @__PURE__ */ O(De, [["__scopeId", "data-v-cb38ea42"]]), Oe = /* @__PURE__ */ $({
|
|
410
|
-
__name: "MessageEventNotificationsDetails",
|
|
411
|
-
props: {
|
|
412
|
-
id: {
|
|
413
|
-
type: String,
|
|
414
|
-
required: !0
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
setup(a) {
|
|
418
|
-
const t = f(!1), r = f(null), i = f(""), l = a;
|
|
419
|
-
async function o() {
|
|
420
|
-
t.value = !0;
|
|
421
|
-
const {
|
|
422
|
-
data: c
|
|
423
|
-
} = await A.messageCenter.eventNotifications.findOne.post({
|
|
424
|
-
id: l.id
|
|
425
|
-
});
|
|
426
|
-
t.value = !1, c && (r.value = c.content, i.value = c.title);
|
|
427
|
-
}
|
|
428
|
-
return o(), (c, s) => (d(), _(P, {
|
|
429
|
-
content: r.value,
|
|
430
|
-
title: i.value,
|
|
431
|
-
loading: t.value
|
|
432
|
-
}, null, 8, ["content", "title", "loading"]));
|
|
433
|
-
}
|
|
434
|
-
}), Re = {
|
|
435
|
-
class: "message-panel"
|
|
436
|
-
}, Ee = {
|
|
437
|
-
key: 0,
|
|
438
|
-
class: "time-range"
|
|
439
|
-
}, Ue = {
|
|
440
|
-
key: 3,
|
|
441
|
-
class: "message-panel__detail"
|
|
442
|
-
}, Ke = /* @__PURE__ */ $({
|
|
443
|
-
__name: "MessageEventNotifications",
|
|
444
|
-
setup(a) {
|
|
445
|
-
const t = f(!0), r = f(""), i = f(!1), l = f(!1), o = f([]), c = f("unread"), s = f({
|
|
446
|
-
current: 1,
|
|
447
|
-
pageSize: 10,
|
|
448
|
-
total: 0
|
|
449
|
-
}), y = [{
|
|
450
|
-
label: "未读活动",
|
|
451
|
-
key: "unread"
|
|
452
|
-
}, {
|
|
453
|
-
label: "已读活动",
|
|
454
|
-
key: "read"
|
|
455
|
-
}], g = L(() => c.value === "read");
|
|
456
|
-
function x(n) {
|
|
457
|
-
return {
|
|
458
|
-
id: String(n.id),
|
|
459
|
-
title: String(n.title ?? ""),
|
|
460
|
-
description: String(n.description ?? ""),
|
|
461
|
-
createAt: String(n.createAt ?? ""),
|
|
462
|
-
updateAt: String(n.updateAt ?? ""),
|
|
463
|
-
pinned: !!n.pinned,
|
|
464
|
-
status: String(n.status ?? ""),
|
|
465
|
-
displayStatus: String(n.displayStatus ?? ""),
|
|
466
|
-
startAt: n.startAt ? String(n.startAt) : null,
|
|
467
|
-
endAt: n.endAt ? String(n.endAt) : null,
|
|
468
|
-
read: !!n.read,
|
|
469
|
-
readAt: n.readAt ? String(n.readAt) : null
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
async function k() {
|
|
473
|
-
var e;
|
|
474
|
-
i.value = !0;
|
|
475
|
-
const {
|
|
476
|
-
data: n
|
|
477
|
-
} = await A.messageCenter.eventNotifications.own.post({
|
|
478
|
-
current: s.value.current,
|
|
479
|
-
pageSize: s.value.pageSize,
|
|
480
|
-
where: {
|
|
481
|
-
read: g.value
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
if (i.value = !1, !n)
|
|
485
|
-
return;
|
|
486
|
-
const u = n;
|
|
487
|
-
o.value = (u.items ?? []).map(x), s.value.total = u.count ?? 0, l.value = (((e = u.items) == null ? void 0 : e.length) ?? 0) < s.value.pageSize;
|
|
488
|
-
}
|
|
489
|
-
async function I() {
|
|
490
|
-
if (i.value || l.value)
|
|
491
|
-
return;
|
|
492
|
-
s.value.current += 1, i.value = !0;
|
|
493
|
-
const {
|
|
494
|
-
data: n
|
|
495
|
-
} = await A.messageCenter.eventNotifications.own.post({
|
|
496
|
-
current: s.value.current,
|
|
497
|
-
pageSize: s.value.pageSize,
|
|
498
|
-
where: {
|
|
499
|
-
read: g.value
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
if (i.value = !1, !n)
|
|
503
|
-
return;
|
|
504
|
-
const e = (n.items ?? []).map(x);
|
|
505
|
-
o.value = [...o.value, ...e], l.value = e.length < s.value.pageSize;
|
|
506
|
-
}
|
|
507
|
-
function w() {
|
|
508
|
-
s.value.current = 1, l.value = !1, k();
|
|
509
|
-
}
|
|
510
|
-
async function B() {
|
|
511
|
-
o.value.length !== 0 && (await A.messageCenter.eventNotifications.readAll.post({}), V(), k());
|
|
512
|
-
}
|
|
513
|
-
function N() {
|
|
514
|
-
t.value = !0, r.value = "";
|
|
515
|
-
}
|
|
516
|
-
async function M(n) {
|
|
517
|
-
r.value = n.id, t.value = !1, n.read || (await A.messageCenter.eventNotifications.read.post({
|
|
518
|
-
eventId: n.id
|
|
519
|
-
}), V(), g.value || (o.value = o.value.filter((u) => u.id !== n.id)));
|
|
520
|
-
}
|
|
521
|
-
function T(n) {
|
|
522
|
-
return {
|
|
523
|
-
upcoming: "blue",
|
|
524
|
-
ongoing: "green",
|
|
525
|
-
ended: "gray",
|
|
526
|
-
published: "arcoblue"
|
|
527
|
-
}[n] || "gray";
|
|
528
|
-
}
|
|
529
|
-
function E(n) {
|
|
530
|
-
return {
|
|
531
|
-
upcoming: "即将开始",
|
|
532
|
-
ongoing: "进行中",
|
|
533
|
-
ended: "已结束",
|
|
534
|
-
published: "已发布"
|
|
535
|
-
}[n] || "未知";
|
|
536
|
-
}
|
|
537
|
-
return k(), (n, u) => (d(), S("div", Re, [t.value ? h("", !0) : (d(), _(m(q), {
|
|
538
|
-
key: 0,
|
|
539
|
-
class: "message-panel__breadcrumb"
|
|
540
|
-
}, {
|
|
541
|
-
default: v(() => [C(m(R), {
|
|
542
|
-
onClick: N
|
|
543
|
-
}, {
|
|
544
|
-
default: v(() => [...u[1] || (u[1] = [z("活动通知", -1)])]),
|
|
545
|
-
_: 1
|
|
546
|
-
}), C(m(R), null, {
|
|
547
|
-
default: v(() => [...u[2] || (u[2] = [z("详情", -1)])]),
|
|
548
|
-
_: 1
|
|
549
|
-
})]),
|
|
550
|
-
_: 1
|
|
551
|
-
})), t.value ? (d(), _(J, {
|
|
552
|
-
key: 1,
|
|
553
|
-
"active-tab": c.value,
|
|
554
|
-
"onUpdate:activeTab": u[0] || (u[0] = (e) => c.value = e),
|
|
555
|
-
tabs: y,
|
|
556
|
-
"message-list": o.value,
|
|
557
|
-
onChange: w,
|
|
558
|
-
onReadAll: B
|
|
559
|
-
}, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
|
|
560
|
-
key: 2,
|
|
561
|
-
"message-list": o.value,
|
|
562
|
-
loading: i.value,
|
|
563
|
-
finished: l.value,
|
|
564
|
-
"show-read-status": !0,
|
|
565
|
-
"show-view-button": !1,
|
|
566
|
-
onItemClick: M,
|
|
567
|
-
onLoadMore: I
|
|
568
|
-
}, {
|
|
569
|
-
tags: v(({
|
|
570
|
-
item: e
|
|
571
|
-
}) => [C(m(U), {
|
|
572
|
-
color: T(e.displayStatus),
|
|
573
|
-
size: "small"
|
|
574
|
-
}, {
|
|
575
|
-
default: v(() => [z(D(E(e.displayStatus)), 1)]),
|
|
576
|
-
_: 2
|
|
577
|
-
}, 1032, ["color"])]),
|
|
578
|
-
footer: v(({
|
|
579
|
-
item: e
|
|
580
|
-
}) => [e.startAt || e.endAt ? (d(), S("span", Ee, D(e.startAt || "无") + " ~ " + D(e.endAt || "无"), 1)) : h("", !0)]),
|
|
581
|
-
_: 1
|
|
582
|
-
}, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Ue, [C(Oe, {
|
|
583
|
-
id: r.value
|
|
584
|
-
}, null, 8, ["id"])]))]));
|
|
585
|
-
}
|
|
586
|
-
}), Ve = /* @__PURE__ */ O(Ke, [["__scopeId", "data-v-755daae9"]]);
|
|
587
|
-
function X(a) {
|
|
588
|
-
return !!a && typeof a == "object" && !Array.isArray(a);
|
|
589
|
-
}
|
|
590
|
-
function je(a) {
|
|
591
|
-
return a.type === "doc" && Array.isArray(a.content);
|
|
592
|
-
}
|
|
593
|
-
function ae(a, t) {
|
|
594
|
-
if (X(a))
|
|
595
|
-
return je(a) ? H(t) : a;
|
|
596
|
-
if (typeof a == "string") {
|
|
597
|
-
const r = a.trim();
|
|
598
|
-
if (!r)
|
|
599
|
-
return H(t);
|
|
600
|
-
try {
|
|
601
|
-
const i = JSON.parse(r);
|
|
602
|
-
if (X(i))
|
|
603
|
-
return ae(i, t);
|
|
604
|
-
} catch {
|
|
605
|
-
return {
|
|
606
|
-
text: r
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
return H(t);
|
|
611
|
-
}
|
|
612
|
-
function H(a) {
|
|
613
|
-
const t = a == null ? void 0 : a.trim();
|
|
614
|
-
return t ? {
|
|
615
|
-
text: t
|
|
616
|
-
} : {};
|
|
617
|
-
}
|
|
618
|
-
const qe = {
|
|
619
|
-
class: "message-notification-detail"
|
|
620
|
-
}, Fe = {
|
|
621
|
-
class: "message-notification-detail__title"
|
|
622
|
-
}, Je = /* @__PURE__ */ $({
|
|
623
|
-
__name: "MessageNotificationDetails",
|
|
624
|
-
props: {
|
|
625
|
-
title: {},
|
|
626
|
-
type: {
|
|
627
|
-
default: ""
|
|
628
|
-
},
|
|
629
|
-
content: {},
|
|
630
|
-
description: {
|
|
631
|
-
default: ""
|
|
632
|
-
},
|
|
633
|
-
loading: {
|
|
634
|
-
type: Boolean,
|
|
635
|
-
default: !1
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
setup(a) {
|
|
639
|
-
const t = a, r = L(() => t.type.trim()), i = L(() => ae(t.content, t.description)), l = L(() => Ae(r.value));
|
|
640
|
-
return (o, c) => (d(), _(m(te), {
|
|
641
|
-
loading: a.loading,
|
|
642
|
-
tip: "加载中...",
|
|
643
|
-
class: "Spin",
|
|
644
|
-
dot: ""
|
|
645
|
-
}, {
|
|
646
|
-
default: v(() => [K("div", qe, [K("h1", Fe, D(a.title), 1), (d(), _(se(l.value), {
|
|
647
|
-
data: i.value,
|
|
648
|
-
title: a.title,
|
|
649
|
-
description: a.description,
|
|
650
|
-
type: r.value
|
|
651
|
-
}, null, 8, ["data", "title", "description", "type"]))])]),
|
|
652
|
-
_: 1
|
|
653
|
-
}, 8, ["loading"]));
|
|
654
|
-
}
|
|
655
|
-
}), He = /* @__PURE__ */ O(Je, [["__scopeId", "data-v-5772f5d1"]]), We = {
|
|
656
|
-
class: "message-panel"
|
|
657
|
-
}, Pe = {
|
|
658
|
-
key: 3,
|
|
659
|
-
class: "message-panel__detail"
|
|
660
|
-
}, Ge = /* @__PURE__ */ $({
|
|
661
|
-
__name: "MessageNotifications",
|
|
662
|
-
setup(a) {
|
|
663
|
-
const t = f(!0), r = f(""), i = f(!1), l = f({
|
|
664
|
-
title: "",
|
|
665
|
-
type: "",
|
|
666
|
-
description: "",
|
|
667
|
-
content: null
|
|
668
|
-
}), o = f(!1), c = f(!1), s = f([]), y = f("unread"), g = f({
|
|
669
|
-
current: 1,
|
|
670
|
-
pageSize: 10,
|
|
671
|
-
total: 0
|
|
672
|
-
}), x = [{
|
|
673
|
-
label: "未读消息",
|
|
674
|
-
key: "unread"
|
|
675
|
-
}, {
|
|
676
|
-
label: "已读消息",
|
|
677
|
-
key: "read"
|
|
678
|
-
}], k = L(() => y.value === "read");
|
|
679
|
-
function I(u) {
|
|
680
|
-
return {
|
|
681
|
-
read: u
|
|
682
|
-
};
|
|
683
|
-
}
|
|
684
|
-
async function w() {
|
|
685
|
-
o.value = !0;
|
|
686
|
-
const {
|
|
687
|
-
data: u
|
|
688
|
-
} = await A.messageCenter.messageNotifications.own.post({
|
|
689
|
-
current: g.value.current,
|
|
690
|
-
pageSize: g.value.pageSize,
|
|
691
|
-
where: I(k.value)
|
|
692
|
-
});
|
|
693
|
-
o.value = !1, u && (s.value = u.items.map((e) => ({
|
|
694
|
-
id: e.id,
|
|
695
|
-
title: e.title,
|
|
696
|
-
description: e.description,
|
|
697
|
-
createAt: e.createAt,
|
|
698
|
-
updateAt: e.updateAt,
|
|
699
|
-
priority: e.priority,
|
|
700
|
-
read: e.read ?? !1,
|
|
701
|
-
readAt: e.readAt ?? null
|
|
702
|
-
})), g.value.total = u.count, c.value = u.items.length < g.value.pageSize);
|
|
703
|
-
}
|
|
704
|
-
async function B() {
|
|
705
|
-
if (o.value || c.value) return;
|
|
706
|
-
g.value.current += 1, o.value = !0;
|
|
707
|
-
const {
|
|
708
|
-
data: u
|
|
709
|
-
} = await A.messageCenter.messageNotifications.own.post({
|
|
710
|
-
current: g.value.current,
|
|
711
|
-
pageSize: g.value.pageSize,
|
|
712
|
-
where: I(k.value)
|
|
713
|
-
});
|
|
714
|
-
if (o.value = !1, u) {
|
|
715
|
-
const e = u.items.map((p) => ({
|
|
716
|
-
id: p.id,
|
|
717
|
-
title: p.title,
|
|
718
|
-
description: p.description,
|
|
719
|
-
createAt: p.createAt,
|
|
720
|
-
updateAt: p.updateAt,
|
|
721
|
-
priority: p.priority,
|
|
722
|
-
read: p.read ?? !1,
|
|
723
|
-
readAt: p.readAt ?? null
|
|
724
|
-
}));
|
|
725
|
-
s.value = [...s.value, ...e], c.value = u.items.length < g.value.pageSize;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
function N() {
|
|
729
|
-
g.value.current = 1, c.value = !1, w();
|
|
730
|
-
}
|
|
731
|
-
async function M() {
|
|
732
|
-
s.value.length !== 0 && (await A.messageCenter.messageNotifications.readAll.post({}), w());
|
|
733
|
-
}
|
|
734
|
-
function T() {
|
|
735
|
-
t.value = !0, r.value = "", l.value = {
|
|
736
|
-
title: "",
|
|
737
|
-
type: "",
|
|
738
|
-
description: "",
|
|
739
|
-
content: null
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
async function E(u) {
|
|
743
|
-
i.value = !0;
|
|
744
|
-
const {
|
|
745
|
-
data: e
|
|
746
|
-
} = await A.messageCenter.messageNotifications.findOne.post({
|
|
747
|
-
id: u
|
|
748
|
-
});
|
|
749
|
-
i.value = !1, e && (l.value = {
|
|
750
|
-
title: e.title,
|
|
751
|
-
type: e.type ?? "",
|
|
752
|
-
description: e.description ?? "",
|
|
753
|
-
content: e.content ?? null
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
async function n(u) {
|
|
757
|
-
r.value = u.id, t.value = !1, u.read || (await A.messageCenter.messageNotifications.read.post({
|
|
758
|
-
messageId: u.id
|
|
759
|
-
}), k.value || (s.value = s.value.filter((e) => e.id !== u.id))), E(u.id);
|
|
760
|
-
}
|
|
761
|
-
return w(), (u, e) => (d(), S("div", We, [t.value ? h("", !0) : (d(), _(m(q), {
|
|
762
|
-
key: 0,
|
|
763
|
-
class: "message-panel__breadcrumb"
|
|
764
|
-
}, {
|
|
765
|
-
default: v(() => [C(m(R), {
|
|
766
|
-
onClick: T
|
|
767
|
-
}, {
|
|
768
|
-
default: v(() => [...e[1] || (e[1] = [z("消息通知", -1)])]),
|
|
769
|
-
_: 1
|
|
770
|
-
}), C(m(R), null, {
|
|
771
|
-
default: v(() => [...e[2] || (e[2] = [z("详情", -1)])]),
|
|
772
|
-
_: 1
|
|
773
|
-
})]),
|
|
774
|
-
_: 1
|
|
775
|
-
})), t.value ? (d(), _(J, {
|
|
776
|
-
key: 1,
|
|
777
|
-
"active-tab": y.value,
|
|
778
|
-
"onUpdate:activeTab": e[0] || (e[0] = (p) => y.value = p),
|
|
779
|
-
tabs: x,
|
|
780
|
-
"message-list": s.value,
|
|
781
|
-
onChange: N,
|
|
782
|
-
onReadAll: M
|
|
783
|
-
}, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
|
|
784
|
-
key: 2,
|
|
785
|
-
"message-list": s.value,
|
|
786
|
-
loading: o.value,
|
|
787
|
-
finished: c.value,
|
|
788
|
-
"show-read-status": !0,
|
|
789
|
-
"show-view-button": !1,
|
|
790
|
-
onItemClick: n,
|
|
791
|
-
onLoadMore: B
|
|
792
|
-
}, {
|
|
793
|
-
tags: v(({
|
|
794
|
-
item: p
|
|
795
|
-
}) => [p.priority === "urgent" ? (d(), _(m(U), {
|
|
796
|
-
key: 0,
|
|
797
|
-
color: "red",
|
|
798
|
-
size: "small"
|
|
799
|
-
}, {
|
|
800
|
-
default: v(() => [...e[3] || (e[3] = [z("紧急", -1)])]),
|
|
801
|
-
_: 1
|
|
802
|
-
})) : p.priority === "high" ? (d(), _(m(U), {
|
|
803
|
-
key: 1,
|
|
804
|
-
color: "orange",
|
|
805
|
-
size: "small"
|
|
806
|
-
}, {
|
|
807
|
-
default: v(() => [...e[4] || (e[4] = [z("高", -1)])]),
|
|
808
|
-
_: 1
|
|
809
|
-
})) : h("", !0)]),
|
|
810
|
-
_: 1
|
|
811
|
-
}, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Pe, [C(He, {
|
|
812
|
-
title: l.value.title,
|
|
813
|
-
type: l.value.type,
|
|
814
|
-
content: l.value.content,
|
|
815
|
-
description: l.value.description,
|
|
816
|
-
loading: i.value
|
|
817
|
-
}, null, 8, ["title", "type", "content", "description", "loading"])]))]));
|
|
818
|
-
}
|
|
819
|
-
}), Qe = {
|
|
820
|
-
class: "message-panel"
|
|
821
|
-
}, Xe = {
|
|
822
|
-
key: 0,
|
|
823
|
-
class: "expire-time"
|
|
824
|
-
}, Ye = {
|
|
825
|
-
key: 3,
|
|
826
|
-
class: "message-panel__detail"
|
|
827
|
-
}, Ze = /* @__PURE__ */ $({
|
|
828
|
-
__name: "MessageNoticeNotifications",
|
|
829
|
-
setup(a) {
|
|
830
|
-
const t = f(!0), r = f(""), i = f(!1), l = f({
|
|
831
|
-
title: "",
|
|
832
|
-
content: null
|
|
833
|
-
}), o = f(!1), c = f(!1), s = f([]), y = f("unread"), g = f({
|
|
834
|
-
current: 1,
|
|
835
|
-
pageSize: 10,
|
|
836
|
-
total: 0
|
|
837
|
-
}), x = [{
|
|
838
|
-
label: "未读公告",
|
|
839
|
-
key: "unread"
|
|
840
|
-
}, {
|
|
841
|
-
label: "已读公告",
|
|
842
|
-
key: "read"
|
|
843
|
-
}], k = L(() => y.value === "read");
|
|
844
|
-
async function I() {
|
|
845
|
-
o.value = !0;
|
|
846
|
-
const {
|
|
847
|
-
data: e
|
|
848
|
-
} = await A.messageCenter.noticeNotifications.own.post({
|
|
849
|
-
current: g.value.current,
|
|
850
|
-
pageSize: g.value.pageSize,
|
|
851
|
-
where: {
|
|
852
|
-
read: k.value
|
|
853
|
-
}
|
|
854
|
-
});
|
|
855
|
-
o.value = !1, e && (s.value = e.items.map((p) => ({
|
|
856
|
-
id: p.id,
|
|
857
|
-
title: p.title,
|
|
858
|
-
description: p.description,
|
|
859
|
-
createAt: p.createAt,
|
|
860
|
-
updateAt: p.updateAt,
|
|
861
|
-
pinned: p.pinned,
|
|
862
|
-
priority: p.priority,
|
|
863
|
-
displayStatus: p.displayStatus,
|
|
864
|
-
expireAt: p.expireAt,
|
|
865
|
-
requireConfirm: p.requireConfirm,
|
|
866
|
-
read: p.read ?? !1,
|
|
867
|
-
readAt: p.readAt ?? null
|
|
868
|
-
})), g.value.total = e.count, c.value = e.items.length < g.value.pageSize);
|
|
869
|
-
}
|
|
870
|
-
async function w() {
|
|
871
|
-
if (o.value || c.value) return;
|
|
872
|
-
g.value.current += 1, o.value = !0;
|
|
873
|
-
const {
|
|
874
|
-
data: e
|
|
875
|
-
} = await A.messageCenter.noticeNotifications.own.post({
|
|
876
|
-
current: g.value.current,
|
|
877
|
-
pageSize: g.value.pageSize,
|
|
878
|
-
where: {
|
|
879
|
-
read: k.value
|
|
880
|
-
}
|
|
881
|
-
});
|
|
882
|
-
if (o.value = !1, e) {
|
|
883
|
-
const p = e.items.map((b) => ({
|
|
884
|
-
id: b.id,
|
|
885
|
-
title: b.title,
|
|
886
|
-
description: b.description,
|
|
887
|
-
createAt: b.createAt,
|
|
888
|
-
updateAt: b.updateAt,
|
|
889
|
-
pinned: b.pinned,
|
|
890
|
-
priority: b.priority,
|
|
891
|
-
displayStatus: b.displayStatus,
|
|
892
|
-
expireAt: b.expireAt,
|
|
893
|
-
requireConfirm: b.requireConfirm,
|
|
894
|
-
read: b.read ?? !1,
|
|
895
|
-
readAt: b.readAt ?? null
|
|
896
|
-
}));
|
|
897
|
-
s.value = [...s.value, ...p], c.value = e.items.length < g.value.pageSize;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
function B() {
|
|
901
|
-
g.value.current = 1, c.value = !1, I();
|
|
902
|
-
}
|
|
903
|
-
async function N() {
|
|
904
|
-
s.value.length !== 0 && (await A.messageCenter.noticeNotifications.readAll.post({}), I());
|
|
905
|
-
}
|
|
906
|
-
function M() {
|
|
907
|
-
t.value = !0, r.value = "", l.value = {
|
|
908
|
-
title: "",
|
|
909
|
-
content: null
|
|
910
|
-
};
|
|
911
|
-
}
|
|
912
|
-
async function T(e) {
|
|
913
|
-
i.value = !0;
|
|
914
|
-
const {
|
|
915
|
-
data: p
|
|
916
|
-
} = await A.messageCenter.noticeNotifications.findOne.post({
|
|
917
|
-
id: e
|
|
918
|
-
});
|
|
919
|
-
i.value = !1, p && (l.value = {
|
|
920
|
-
title: p.title,
|
|
921
|
-
content: p.content
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
async function E(e) {
|
|
925
|
-
r.value = e.id, t.value = !1, e.read || (await A.messageCenter.noticeNotifications.read.post({
|
|
926
|
-
noticeId: e.id
|
|
927
|
-
}), k.value || (s.value = s.value.filter((p) => p.id !== e.id))), T(e.id);
|
|
928
|
-
}
|
|
929
|
-
function n(e) {
|
|
930
|
-
return {
|
|
931
|
-
published: "green",
|
|
932
|
-
expired: "gray"
|
|
933
|
-
}[e] || "gray";
|
|
934
|
-
}
|
|
935
|
-
function u(e) {
|
|
936
|
-
return {
|
|
937
|
-
published: "有效",
|
|
938
|
-
expired: "已过期"
|
|
939
|
-
}[e] || "未知";
|
|
940
|
-
}
|
|
941
|
-
return I(), (e, p) => (d(), S("div", Qe, [t.value ? h("", !0) : (d(), _(m(q), {
|
|
942
|
-
key: 0,
|
|
943
|
-
class: "message-panel__breadcrumb"
|
|
944
|
-
}, {
|
|
945
|
-
default: v(() => [C(m(R), {
|
|
946
|
-
onClick: M
|
|
947
|
-
}, {
|
|
948
|
-
default: v(() => [...p[1] || (p[1] = [z("公告通知", -1)])]),
|
|
949
|
-
_: 1
|
|
950
|
-
}), C(m(R), null, {
|
|
951
|
-
default: v(() => [...p[2] || (p[2] = [z("详情", -1)])]),
|
|
952
|
-
_: 1
|
|
953
|
-
})]),
|
|
954
|
-
_: 1
|
|
955
|
-
})), t.value ? (d(), _(J, {
|
|
956
|
-
key: 1,
|
|
957
|
-
"active-tab": y.value,
|
|
958
|
-
"onUpdate:activeTab": p[0] || (p[0] = (b) => y.value = b),
|
|
959
|
-
tabs: x,
|
|
960
|
-
"message-list": s.value,
|
|
961
|
-
onChange: B,
|
|
962
|
-
onReadAll: N
|
|
963
|
-
}, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
|
|
964
|
-
key: 2,
|
|
965
|
-
"message-list": s.value,
|
|
966
|
-
loading: o.value,
|
|
967
|
-
finished: c.value,
|
|
968
|
-
"show-read-status": !0,
|
|
969
|
-
"show-view-button": !1,
|
|
970
|
-
onItemClick: E,
|
|
971
|
-
onLoadMore: w
|
|
972
|
-
}, {
|
|
973
|
-
tags: v(({
|
|
974
|
-
item: b
|
|
975
|
-
}) => [b.priority === "urgent" ? (d(), _(m(U), {
|
|
976
|
-
key: 0,
|
|
977
|
-
color: "red",
|
|
978
|
-
size: "small"
|
|
979
|
-
}, {
|
|
980
|
-
default: v(() => [...p[3] || (p[3] = [z("紧急", -1)])]),
|
|
981
|
-
_: 1
|
|
982
|
-
})) : b.priority === "important" ? (d(), _(m(U), {
|
|
983
|
-
key: 1,
|
|
984
|
-
color: "orange",
|
|
985
|
-
size: "small"
|
|
986
|
-
}, {
|
|
987
|
-
default: v(() => [...p[4] || (p[4] = [z("重要", -1)])]),
|
|
988
|
-
_: 1
|
|
989
|
-
})) : h("", !0), C(m(U), {
|
|
990
|
-
color: n(b.displayStatus),
|
|
991
|
-
size: "small"
|
|
992
|
-
}, {
|
|
993
|
-
default: v(() => [z(D(u(b.displayStatus)), 1)]),
|
|
994
|
-
_: 2
|
|
995
|
-
}, 1032, ["color"])]),
|
|
996
|
-
footer: v(({
|
|
997
|
-
item: b
|
|
998
|
-
}) => [b.expireAt ? (d(), S("span", Xe, D(b.displayStatus === "expired" ? "已过期" : `过期时间: ${b.expireAt}`), 1)) : h("", !0)]),
|
|
999
|
-
_: 1
|
|
1000
|
-
}, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Ye, [C(P, {
|
|
1001
|
-
title: l.value.title,
|
|
1002
|
-
content: l.value.content,
|
|
1003
|
-
loading: i.value
|
|
1004
|
-
}, null, 8, ["title", "content", "loading"])]))]));
|
|
1005
|
-
}
|
|
1006
|
-
}), et = /* @__PURE__ */ O(Ze, [["__scopeId", "data-v-d16f47e2"]]), tt = {
|
|
1007
|
-
class: "user-menu-modal-content"
|
|
1008
|
-
}, at = {
|
|
1009
|
-
class: "left"
|
|
1010
|
-
}, nt = /* @__PURE__ */ $({
|
|
1011
|
-
__name: "MessageAppMessage",
|
|
1012
|
-
props: /* @__PURE__ */ G({
|
|
1013
|
-
title: {
|
|
1014
|
-
type: String,
|
|
1015
|
-
default: "消息中心"
|
|
1016
|
-
},
|
|
1017
|
-
menus: {
|
|
1018
|
-
type: Array,
|
|
1019
|
-
required: !0
|
|
1020
|
-
}
|
|
1021
|
-
}, {
|
|
1022
|
-
selectedKeys: {
|
|
1023
|
-
default: ["ChangelogNotifications"]
|
|
1024
|
-
},
|
|
1025
|
-
selectedKeysModifiers: {}
|
|
1026
|
-
}),
|
|
1027
|
-
emits: /* @__PURE__ */ G(["cancel", "change"], ["update:selectedKeys"]),
|
|
1028
|
-
setup(a, {
|
|
1029
|
-
expose: t,
|
|
1030
|
-
emit: r
|
|
1031
|
-
}) {
|
|
1032
|
-
const i = a, l = r, {
|
|
1033
|
-
counts: o,
|
|
1034
|
-
refreshMessageCenterBadgeCounts: c
|
|
1035
|
-
} = re(), s = L(() => {
|
|
1036
|
-
const N = o.value, M = {
|
|
1037
|
-
ChangelogNotifications: N.changelog,
|
|
1038
|
-
EventNotifications: N.event,
|
|
1039
|
-
MessageNotifications: N.message,
|
|
1040
|
-
NoticeNotifications: N.notice
|
|
1041
|
-
};
|
|
1042
|
-
return i.menus.map((T) => ({
|
|
1043
|
-
...T,
|
|
1044
|
-
meta: {
|
|
1045
|
-
...T.meta,
|
|
1046
|
-
badge: M[T.path] ?? 0
|
|
1047
|
-
}
|
|
1048
|
-
}));
|
|
1049
|
-
}), y = ie(a, "selectedKeys"), g = L(() => y.value.length !== 0 ? y.value[0] : "");
|
|
1050
|
-
function x() {
|
|
1051
|
-
l("cancel");
|
|
1052
|
-
}
|
|
1053
|
-
function k(N) {
|
|
1054
|
-
const M = N.path;
|
|
1055
|
-
y.value = [M], l("change", N);
|
|
1056
|
-
}
|
|
1057
|
-
const {
|
|
1058
|
-
changeType: I,
|
|
1059
|
-
show: w
|
|
1060
|
-
} = ge(l);
|
|
1061
|
-
function B(N) {
|
|
1062
|
-
w.value = N, I.value = "编辑", N && c();
|
|
1063
|
-
}
|
|
1064
|
-
return ee(y, () => {
|
|
1065
|
-
w.value && window.setTimeout(() => {
|
|
1066
|
-
c();
|
|
1067
|
-
}, 1500);
|
|
1068
|
-
}), t({
|
|
1069
|
-
setData: B
|
|
1070
|
-
}), (N, M) => (d(), _(m(ce), {
|
|
1071
|
-
visible: m(w),
|
|
1072
|
-
"onUpdate:visible": M[1] || (M[1] = (T) => le(w) ? w.value = T : null),
|
|
1073
|
-
loading: !1,
|
|
1074
|
-
"body-class": "AppMessagebodyClass",
|
|
1075
|
-
"mask-closable": !1,
|
|
1076
|
-
footer: !1,
|
|
1077
|
-
"hide-title": !1,
|
|
1078
|
-
title: i.title,
|
|
1079
|
-
width: m(oe),
|
|
1080
|
-
onCancel: x
|
|
1081
|
-
}, {
|
|
1082
|
-
default: v(() => [K("div", tt, [K("div", at, [C(ve, {
|
|
1083
|
-
"selected-keys": y.value,
|
|
1084
|
-
"onUpdate:selectedKeys": M[0] || (M[0] = (T) => y.value = T),
|
|
1085
|
-
menus: s.value,
|
|
1086
|
-
onChange: k
|
|
1087
|
-
}, null, 8, ["selected-keys", "menus"])]), m(w) ? (d(), S(Y, {
|
|
1088
|
-
key: 0
|
|
1089
|
-
}, [g.value === "ChangelogNotifications" ? (d(), _(Be, {
|
|
1090
|
-
key: 0
|
|
1091
|
-
})) : h("", !0), g.value === "EventNotifications" ? (d(), _(Ve, {
|
|
1092
|
-
key: 1
|
|
1093
|
-
})) : h("", !0), g.value === "MessageNotifications" ? (d(), _(Ge, {
|
|
1094
|
-
key: 2
|
|
1095
|
-
})) : h("", !0), g.value === "NoticeNotifications" ? (d(), _(et, {
|
|
1096
|
-
key: 3
|
|
1097
|
-
})) : h("", !0)], 64)) : h("", !0)])]),
|
|
1098
|
-
_: 1
|
|
1099
|
-
}, 8, ["visible", "title", "width"]));
|
|
1100
|
-
}
|
|
1101
|
-
}), st = /* @__PURE__ */ $({
|
|
1102
|
-
__name: "MessageHandle",
|
|
1103
|
-
setup(a, {
|
|
1104
|
-
expose: t
|
|
1105
|
-
}) {
|
|
1106
|
-
const r = f(["ChangelogNotifications"]), i = f(), l = f(Symbol("key"));
|
|
1107
|
-
function o() {
|
|
1108
|
-
i.value.setData(!0);
|
|
1109
|
-
}
|
|
1110
|
-
function c() {
|
|
1111
|
-
l.value = Symbol("key");
|
|
1112
|
-
}
|
|
1113
|
-
function s() {
|
|
1114
|
-
l.value = Symbol("key");
|
|
1115
|
-
}
|
|
1116
|
-
const y = f([{
|
|
1117
|
-
name: "功能变更",
|
|
1118
|
-
path: "ChangelogNotifications",
|
|
1119
|
-
meta: {
|
|
1120
|
-
icon: "mingcute:cube-3d-fill"
|
|
1121
|
-
}
|
|
1122
|
-
}, {
|
|
1123
|
-
name: "活动通知",
|
|
1124
|
-
path: "EventNotifications",
|
|
1125
|
-
meta: {
|
|
1126
|
-
icon: "mingcute:receive-money-fill"
|
|
1127
|
-
}
|
|
1128
|
-
}, {
|
|
1129
|
-
name: "消息通知",
|
|
1130
|
-
path: "MessageNotifications",
|
|
1131
|
-
meta: {
|
|
1132
|
-
icon: "mingcute:message-1-fill"
|
|
1133
|
-
}
|
|
1134
|
-
}, {
|
|
1135
|
-
name: "公告",
|
|
1136
|
-
path: "NoticeNotifications",
|
|
1137
|
-
meta: {
|
|
1138
|
-
icon: "mingcute:announcement-fill"
|
|
1139
|
-
}
|
|
1140
|
-
}]);
|
|
1141
|
-
return t({
|
|
1142
|
-
openNotification: o
|
|
1143
|
-
}), (g, x) => (d(), _(nt, {
|
|
1144
|
-
ref_key: "MessageNotificationsRef",
|
|
1145
|
-
ref: i,
|
|
1146
|
-
key: l.value,
|
|
1147
|
-
"selected-keys": r.value,
|
|
1148
|
-
"onUpdate:selectedKeys": x[0] || (x[0] = (k) => r.value = k),
|
|
1149
|
-
menus: y.value,
|
|
1150
|
-
title: "消息中心",
|
|
1151
|
-
onConfirm: s,
|
|
1152
|
-
onCancel: c
|
|
1153
|
-
}, null, 8, ["selected-keys", "menus"]));
|
|
1154
|
-
}
|
|
1155
|
-
}), At = /* @__PURE__ */ O(st, [["__scopeId", "data-v-2e2a72d0"]]);
|
|
1156
|
-
export {
|
|
1157
|
-
Be as C,
|
|
1158
|
-
P as D,
|
|
1159
|
-
Ve as E,
|
|
1160
|
-
At as M,
|
|
1161
|
-
et as N,
|
|
1162
|
-
nt as _,
|
|
1163
|
-
Se as a,
|
|
1164
|
-
Me as b,
|
|
1165
|
-
Oe as c,
|
|
1166
|
-
He as d,
|
|
1167
|
-
Ge as e,
|
|
1168
|
-
J as f,
|
|
1169
|
-
Ae as g,
|
|
1170
|
-
bt as h,
|
|
1171
|
-
ht as l,
|
|
1172
|
-
_t as r
|
|
1173
|
-
};
|