@huyooo/ui 0.15.1 → 0.16.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-Ds7mYFV5.js → AuthkitAppSetting-v80fEiq0.js} +1 -1
- package/dist/{AuthkitGithubBinding-LVDS1PNQ.js → AuthkitGithubBinding-CVhCM6AX.js} +1 -1
- package/dist/{FeedbackItem-DkvSQT33.js → FeedbackItem-BP-SiJ2u.js} +98 -184
- package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-CAGBbiZD.js +1396 -0
- package/dist/{MessageHandle-CEQtGyVZ.js → MessageHandle-BMhGWVHD.js} +54 -54
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-87v_RIQa.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-ByB_YaVb.js} +1 -1
- package/dist/{PricingPlans-ClKLdoVv.js → PricingPlans-DXea7rl0.js} +76 -77
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-DLKSHzxG.js → Upload.vue_vue_type_script_setup_true_lang-CXr8D4VG.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-C7mV8kGe.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-6xQNhFk3.js} +16 -16
- package/dist/{WidthContainer-DKasAIgU.js → WidthContainer-DVZQV6sM.js} +2 -2
- package/dist/authkit.js +2 -2
- package/dist/common.js +1 -1
- package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +11 -14
- package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +11 -14
- package/dist/components/Feedback/FeedbackDetails.vue.d.ts +1 -0
- package/dist/components/Feedback/FeedbackForm.vue.d.ts +1 -0
- package/dist/components/Feedback/FeedbackMessageAttachments.vue.d.ts +15 -0
- package/dist/components/Feedback/FeedbackVideoPreview.vue.d.ts +33 -0
- package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +1 -1
- package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +1 -1
- package/dist/composables/Billing/useBillingPlans.d.ts +1 -19
- package/dist/composables/feedbackAttachmentPolicy.d.ts +6 -0
- package/dist/composables/uploadFeedbackAttachment.d.ts +9 -0
- package/dist/composables/useFeedbackPendingAttachments.d.ts +98 -0
- package/dist/composables.js +2 -2
- package/dist/feedback.d.ts +0 -1
- package/dist/feedback.js +8 -9
- package/dist/main.js +119 -120
- package/dist/message.js +3 -3
- package/dist/pay.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/api/billing.generated.d.ts +0 -4
- package/dist/types/api/ones.generated.d.ts +46 -8
- package/dist/types/feedback.d.ts +12 -44
- package/dist/upload.js +2 -2
- package/dist/{useSubscriptionCheckout-CfFdAhTR.js → useSubscriptionCheckout-BjPiHSjA.js} +103 -104
- package/dist/{useUploadCos-CvG6EL5Q.js → useUploadCos-DOHnz2MP.js} +5 -3
- package/dist/user.js +1 -1
- package/dist/utils/feedbackMessage.d.ts +8 -0
- package/package.json +1 -1
- package/dist/FeedbackModal-C45pNoiw.js +0 -1050
- package/dist/components/Feedback/FeedbackScreenshots.vue.d.ts +0 -19
|
@@ -366,7 +366,6 @@ export type Api = {
|
|
|
366
366
|
body: {
|
|
367
367
|
priceId: string;
|
|
368
368
|
featureKey: string;
|
|
369
|
-
name: string;
|
|
370
369
|
description?: string;
|
|
371
370
|
limit: number;
|
|
372
371
|
period: "day" | "week" | "month" | "year" | "lifetime";
|
|
@@ -389,7 +388,6 @@ export type Api = {
|
|
|
389
388
|
post: {
|
|
390
389
|
body: {
|
|
391
390
|
id: string;
|
|
392
|
-
name?: string;
|
|
393
391
|
description?: string;
|
|
394
392
|
limit?: number;
|
|
395
393
|
period?: "day" | "week" | "month" | "year" | "lifetime";
|
|
@@ -3375,7 +3373,6 @@ export interface ApiClient {
|
|
|
3375
3373
|
post: (body: {
|
|
3376
3374
|
priceId: string;
|
|
3377
3375
|
featureKey: string;
|
|
3378
|
-
name: string;
|
|
3379
3376
|
description?: string;
|
|
3380
3377
|
limit: number;
|
|
3381
3378
|
period: "day" | "week" | "month" | "year" | "lifetime";
|
|
@@ -3392,7 +3389,6 @@ export interface ApiClient {
|
|
|
3392
3389
|
/** 更新配额定义 */
|
|
3393
3390
|
post: (body: {
|
|
3394
3391
|
id: string;
|
|
3395
|
-
name?: string;
|
|
3396
3392
|
description?: string;
|
|
3397
3393
|
limit?: number;
|
|
3398
3394
|
period?: "day" | "week" | "month" | "year" | "lifetime";
|
|
@@ -760,6 +760,13 @@ export type Api = {
|
|
|
760
760
|
type: "bugReports" | "featureSuggestions" | "technicalSupportRequests" | "generalOpinions";
|
|
761
761
|
description: string;
|
|
762
762
|
priority?: "urgent" | "high" | "normal" | "low";
|
|
763
|
+
attachments?: {
|
|
764
|
+
key: string;
|
|
765
|
+
name: string;
|
|
766
|
+
size: number;
|
|
767
|
+
mimeType: string;
|
|
768
|
+
kind: "image" | "video" | "file";
|
|
769
|
+
}[];
|
|
763
770
|
};
|
|
764
771
|
return: any;
|
|
765
772
|
};
|
|
@@ -800,9 +807,15 @@ export type Api = {
|
|
|
800
807
|
body: {
|
|
801
808
|
id: string;
|
|
802
809
|
message: {
|
|
803
|
-
type: "text"
|
|
810
|
+
type: "text";
|
|
804
811
|
content?: string;
|
|
805
|
-
|
|
812
|
+
attachments?: {
|
|
813
|
+
key: string;
|
|
814
|
+
name: string;
|
|
815
|
+
size: number;
|
|
816
|
+
mimeType: string;
|
|
817
|
+
kind: "image" | "video" | "file";
|
|
818
|
+
}[];
|
|
806
819
|
senderRole: "user" | "support" | "system";
|
|
807
820
|
};
|
|
808
821
|
};
|
|
@@ -892,9 +905,15 @@ export type Api = {
|
|
|
892
905
|
body: {
|
|
893
906
|
conversationId: string;
|
|
894
907
|
message: {
|
|
895
|
-
type: "text"
|
|
908
|
+
type: "text";
|
|
896
909
|
content?: string;
|
|
897
|
-
|
|
910
|
+
attachments?: {
|
|
911
|
+
key: string;
|
|
912
|
+
name: string;
|
|
913
|
+
size: number;
|
|
914
|
+
mimeType: string;
|
|
915
|
+
kind: "image" | "video" | "file";
|
|
916
|
+
}[];
|
|
898
917
|
senderRole: "user" | "support" | "system";
|
|
899
918
|
};
|
|
900
919
|
};
|
|
@@ -1782,6 +1801,13 @@ export interface ApiClient {
|
|
|
1782
1801
|
type: "bugReports" | "featureSuggestions" | "technicalSupportRequests" | "generalOpinions";
|
|
1783
1802
|
description: string;
|
|
1784
1803
|
priority?: "urgent" | "high" | "normal" | "low";
|
|
1804
|
+
attachments?: {
|
|
1805
|
+
key: string;
|
|
1806
|
+
name: string;
|
|
1807
|
+
size: number;
|
|
1808
|
+
mimeType: string;
|
|
1809
|
+
kind: "image" | "video" | "file";
|
|
1810
|
+
}[];
|
|
1785
1811
|
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
1786
1812
|
};
|
|
1787
1813
|
delete: {
|
|
@@ -1810,9 +1836,15 @@ export interface ApiClient {
|
|
|
1810
1836
|
post: (body: {
|
|
1811
1837
|
id: string;
|
|
1812
1838
|
message: {
|
|
1813
|
-
type: "text"
|
|
1839
|
+
type: "text";
|
|
1814
1840
|
content?: string;
|
|
1815
|
-
|
|
1841
|
+
attachments?: {
|
|
1842
|
+
key: string;
|
|
1843
|
+
name: string;
|
|
1844
|
+
size: number;
|
|
1845
|
+
mimeType: string;
|
|
1846
|
+
kind: "image" | "video" | "file";
|
|
1847
|
+
}[];
|
|
1816
1848
|
senderRole: "user" | "support" | "system";
|
|
1817
1849
|
};
|
|
1818
1850
|
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
|
@@ -1879,9 +1911,15 @@ export interface ApiClient {
|
|
|
1879
1911
|
post: (body: {
|
|
1880
1912
|
conversationId: string;
|
|
1881
1913
|
message: {
|
|
1882
|
-
type: "text"
|
|
1914
|
+
type: "text";
|
|
1883
1915
|
content?: string;
|
|
1884
|
-
|
|
1916
|
+
attachments?: {
|
|
1917
|
+
key: string;
|
|
1918
|
+
name: string;
|
|
1919
|
+
size: number;
|
|
1920
|
+
mimeType: string;
|
|
1921
|
+
kind: "image" | "video" | "file";
|
|
1922
|
+
}[];
|
|
1885
1923
|
senderRole: "user" | "support" | "system";
|
|
1886
1924
|
};
|
|
1887
1925
|
}, config?: RequestConfig) => Promise<ApiResponse<any>>;
|
package/dist/types/feedback.d.ts
CHANGED
|
@@ -22,55 +22,23 @@ export interface ShouldShowProps {
|
|
|
22
22
|
from?: number;
|
|
23
23
|
to?: number;
|
|
24
24
|
}
|
|
25
|
-
type
|
|
26
|
-
|
|
27
|
-
senderRole: string;
|
|
28
|
-
type: 'text';
|
|
29
|
-
content: string;
|
|
30
|
-
ext?: any;
|
|
31
|
-
senderInfo?: any;
|
|
32
|
-
};
|
|
33
|
-
type MessageImage = {
|
|
34
|
-
messageId: string;
|
|
35
|
-
senderRole: string;
|
|
36
|
-
type: 'image';
|
|
37
|
-
key: string;
|
|
38
|
-
url?: string;
|
|
39
|
-
thumbUrl?: string;
|
|
40
|
-
ext?: any;
|
|
41
|
-
senderInfo?: any;
|
|
42
|
-
};
|
|
43
|
-
type MessageFile = {
|
|
44
|
-
messageId: string;
|
|
45
|
-
senderRole: string;
|
|
46
|
-
type: 'file';
|
|
47
|
-
key: string;
|
|
48
|
-
url?: string;
|
|
49
|
-
fileName: string;
|
|
50
|
-
fileSize: number;
|
|
51
|
-
ext?: any;
|
|
52
|
-
senderInfo?: any;
|
|
53
|
-
};
|
|
54
|
-
type MessageAudio = {
|
|
55
|
-
messageId: string;
|
|
56
|
-
senderRole: string;
|
|
57
|
-
type: 'audio';
|
|
25
|
+
export type FeedbackAttachmentKind = 'image' | 'video' | 'file';
|
|
26
|
+
export type FeedbackMessageAttachment = {
|
|
58
27
|
key: string;
|
|
28
|
+
name: string;
|
|
29
|
+
size: number;
|
|
30
|
+
mimeType: string;
|
|
31
|
+
kind: FeedbackAttachmentKind;
|
|
59
32
|
url?: string;
|
|
60
|
-
duration: number;
|
|
61
|
-
ext?: any;
|
|
62
|
-
senderInfo?: any;
|
|
63
33
|
};
|
|
64
|
-
type
|
|
34
|
+
export type MessageType = {
|
|
65
35
|
messageId: string;
|
|
66
36
|
senderRole: string;
|
|
67
|
-
type: '
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
37
|
+
type: 'text';
|
|
38
|
+
content: string;
|
|
39
|
+
attachments?: FeedbackMessageAttachment[];
|
|
40
|
+
seq?: number;
|
|
41
|
+
createAt?: string;
|
|
72
42
|
ext?: any;
|
|
73
43
|
senderInfo?: any;
|
|
74
44
|
};
|
|
75
|
-
export type MessageType = MessageText | MessageImage | MessageFile | MessageAudio | MessageVideo;
|
|
76
|
-
export {};
|
package/dist/upload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { u as s } from "./useUploadCos-
|
|
1
|
+
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-CXr8D4VG.js";
|
|
2
|
+
import { u as s } from "./useUploadCos-DOHnz2MP.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Upload,
|
|
5
5
|
s as useUploadCos
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as y, computed as
|
|
2
|
-
import { d as
|
|
3
|
-
import { h as
|
|
1
|
+
import { ref as y, computed as L } from "vue";
|
|
2
|
+
import { d as H } from "./useBillingStatusOptions-CAsu1hrf.js";
|
|
3
|
+
import { h as $ } from "./apiClients-DT7o0IpO.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { Message as g } from "@arco-design/web-vue";
|
|
6
|
-
import { u as
|
|
7
|
-
function
|
|
6
|
+
import { u as J } from "./useEnsureAuthenticated-BEKhtQAl.js";
|
|
7
|
+
function M(e) {
|
|
8
8
|
var i;
|
|
9
9
|
const r = (i = e == null ? void 0 : e.metadata) == null ? void 0 : i.originalPrice;
|
|
10
10
|
return typeof r == "number" ? r : void 0;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const r =
|
|
12
|
+
function N(e) {
|
|
13
|
+
const r = M(e);
|
|
14
14
|
return !e || r === void 0 || r <= e.unitAmount ? 0 : Math.round((1 - e.unitAmount / r) * 100);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function W(e) {
|
|
17
17
|
var l, f;
|
|
18
18
|
const r = (l = e == null ? void 0 : e.metadata) == null ? void 0 : l.discountLabel;
|
|
19
19
|
if (typeof r == "string" && r.trim())
|
|
@@ -21,10 +21,10 @@ function X(e) {
|
|
|
21
21
|
const i = (f = e == null ? void 0 : e.metadata) == null ? void 0 : f.savingMonths;
|
|
22
22
|
return typeof i == "number" && i > 0 ? `买 ${12 - i} 个月送 ${i} 个月` : "";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function q(e) {
|
|
25
25
|
return e === void 0 ? 0 : Math.floor(e / 100);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function X(e, r = 1) {
|
|
28
28
|
const i = r > 1 ? `每 ${r} ` : "按";
|
|
29
29
|
switch (e) {
|
|
30
30
|
case "month":
|
|
@@ -39,7 +39,7 @@ function Y(e, r = 1) {
|
|
|
39
39
|
return "";
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Y(e) {
|
|
43
43
|
const r = e != null && e.intervalCount && e.intervalCount > 1 ? `${e.intervalCount} ` : "";
|
|
44
44
|
switch (e == null ? void 0 : e.interval) {
|
|
45
45
|
case "month":
|
|
@@ -54,7 +54,7 @@ function Z(e) {
|
|
|
54
54
|
return "";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function I(e) {
|
|
58
58
|
switch (e) {
|
|
59
59
|
case "day":
|
|
60
60
|
return "每天";
|
|
@@ -70,25 +70,25 @@ function w(e) {
|
|
|
70
70
|
return "";
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function S(e) {
|
|
74
74
|
if (e.type === "quota" && e.value !== void 0) {
|
|
75
|
-
const r =
|
|
75
|
+
const r = I(e.quotaPeriod), i = r ? ` / ${r}` : "";
|
|
76
76
|
return `${e.name}: ${e.value === -1 ? "无限" : e.value}${i}`;
|
|
77
77
|
}
|
|
78
78
|
if (e.type === "unlimited") {
|
|
79
|
-
const r =
|
|
79
|
+
const r = I(e.quotaPeriod);
|
|
80
80
|
return r ? `${e.name}: 不限 / ${r}` : `${e.name}不限`;
|
|
81
81
|
}
|
|
82
82
|
return e.type === "boolean" && e.value === !1 ? `${e.name}(不支持)` : e.name;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function w(e) {
|
|
85
85
|
return e.type !== "recurring" || !e.interval ? null : {
|
|
86
86
|
key: `${e.interval}:${e.intervalCount ?? 1}`,
|
|
87
87
|
interval: e.interval,
|
|
88
88
|
intervalCount: e.intervalCount ?? 1
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Z(e, r) {
|
|
92
92
|
const i = {
|
|
93
93
|
day: 1,
|
|
94
94
|
week: 2,
|
|
@@ -97,58 +97,57 @@ function ee(e, r) {
|
|
|
97
97
|
};
|
|
98
98
|
return i[e.interval] - i[r.interval] || e.intervalCount - r.intervalCount;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ee(e, r) {
|
|
101
101
|
let i = 0;
|
|
102
102
|
for (const l of e)
|
|
103
103
|
for (const f of l.prices) {
|
|
104
|
-
const s =
|
|
105
|
-
(s == null ? void 0 : s.key) === r && (i = Math.max(i,
|
|
104
|
+
const s = w(f);
|
|
105
|
+
(s == null ? void 0 : s.key) === r && (i = Math.max(i, N(f)));
|
|
106
106
|
}
|
|
107
107
|
return i > 0 ? `省 ${i}%` : void 0;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function te(e) {
|
|
110
110
|
return e.includes(":") ? e : `${e}:1`;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function B() {
|
|
113
113
|
return !!localStorage.getItem("jwtToken");
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const r = y([]), i = y(null), l = y(null), f = y(!1), s = y(!1), d = y(
|
|
115
|
+
function fe(e = "month") {
|
|
116
|
+
const r = y([]), i = y(null), l = y(null), f = y(!1), s = y(!1), d = y(te(e)), a = L(() => {
|
|
117
117
|
const t = /* @__PURE__ */ new Map();
|
|
118
118
|
for (const n of r.value)
|
|
119
119
|
for (const u of n.prices) {
|
|
120
|
-
const c =
|
|
120
|
+
const c = w(u);
|
|
121
121
|
c && t.set(c.key, c);
|
|
122
122
|
}
|
|
123
|
-
return [...t.values()].sort(
|
|
123
|
+
return [...t.values()].sort(Z).map((n) => ({
|
|
124
124
|
value: n.key,
|
|
125
|
-
label:
|
|
126
|
-
badge:
|
|
125
|
+
label: X(n.interval, n.intervalCount),
|
|
126
|
+
badge: ee(r.value, n.key)
|
|
127
127
|
}));
|
|
128
|
-
}),
|
|
129
|
-
var n;
|
|
128
|
+
}), p = L(() => {
|
|
130
129
|
const t = [];
|
|
131
|
-
for (const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
return (
|
|
135
|
-
}),
|
|
136
|
-
|
|
137
|
-
...
|
|
138
|
-
features:
|
|
139
|
-
selectedPrice:
|
|
130
|
+
for (const n of r.value) {
|
|
131
|
+
const u = n.prices.find((o) => {
|
|
132
|
+
const h = w(o);
|
|
133
|
+
return (h == null ? void 0 : h.key) === d.value;
|
|
134
|
+
}), c = n.prices.find((o) => o.type === "free"), m = u ?? (c && n.prices.every((o) => o.type === "free") ? c : void 0);
|
|
135
|
+
m && t.push({
|
|
136
|
+
...n,
|
|
137
|
+
features: m.features ?? [],
|
|
138
|
+
selectedPrice: m
|
|
140
139
|
});
|
|
141
140
|
}
|
|
142
141
|
return t;
|
|
143
142
|
});
|
|
144
|
-
function
|
|
143
|
+
function x(t) {
|
|
145
144
|
d.value = t;
|
|
146
145
|
}
|
|
147
146
|
function P(t) {
|
|
148
147
|
const n = i.value, u = l.value;
|
|
149
148
|
return n != null && n.priceId && t.selectedPrice ? n.priceId === t.selectedPrice.id : n ? n.productId === t.id : u != null && u.priceId && t.selectedPrice ? u.priceId === t.selectedPrice.id : u ? u.productId === t.id : !1;
|
|
150
149
|
}
|
|
151
|
-
function
|
|
150
|
+
function C(t) {
|
|
152
151
|
var n;
|
|
153
152
|
return ((n = i.value) == null ? void 0 : n.productId) === t.id;
|
|
154
153
|
}
|
|
@@ -156,39 +155,39 @@ function de(e = "month") {
|
|
|
156
155
|
var n;
|
|
157
156
|
return ((n = t.selectedPrice) == null ? void 0 : n.type) === "free";
|
|
158
157
|
}
|
|
159
|
-
function
|
|
158
|
+
function F() {
|
|
160
159
|
return !!i.value;
|
|
161
160
|
}
|
|
162
|
-
function
|
|
163
|
-
return !!(!t.selectedPrice || P(t) || v(t) &&
|
|
161
|
+
function U(t) {
|
|
162
|
+
return !!(!t.selectedPrice || P(t) || v(t) && F());
|
|
164
163
|
}
|
|
165
|
-
function
|
|
164
|
+
function b(t) {
|
|
166
165
|
var n;
|
|
167
166
|
return ((n = t.metadata) == null ? void 0 : n.recommended) === !0;
|
|
168
167
|
}
|
|
169
|
-
function
|
|
168
|
+
function T(t) {
|
|
170
169
|
var n;
|
|
171
|
-
return
|
|
170
|
+
return q((n = t.selectedPrice) == null ? void 0 : n.unitAmount);
|
|
171
|
+
}
|
|
172
|
+
function j(t) {
|
|
173
|
+
const n = M(t.selectedPrice);
|
|
174
|
+
return n === void 0 ? void 0 : q(n);
|
|
172
175
|
}
|
|
173
176
|
function G(t) {
|
|
174
|
-
|
|
175
|
-
return n === void 0 ? void 0 : S(n);
|
|
177
|
+
return v(t) ? "" : Y(t.selectedPrice);
|
|
176
178
|
}
|
|
177
179
|
function O(t) {
|
|
178
|
-
return v(t) ? "" : Z(t.selectedPrice);
|
|
179
|
-
}
|
|
180
|
-
function R(t) {
|
|
181
180
|
var n;
|
|
182
181
|
if (v(t)) {
|
|
183
182
|
const u = (n = t.selectedPrice) == null ? void 0 : n.trialPeriodDays;
|
|
184
183
|
return u ? `${u} 天免费体验` : "免费体验";
|
|
185
184
|
}
|
|
186
|
-
return
|
|
185
|
+
return W(t.selectedPrice);
|
|
187
186
|
}
|
|
188
|
-
function
|
|
189
|
-
return P(t) ? "当前方案" :
|
|
187
|
+
function R(t) {
|
|
188
|
+
return P(t) ? "当前方案" : b(t) ? "最受欢迎" : "";
|
|
190
189
|
}
|
|
191
|
-
function
|
|
190
|
+
function E(t) {
|
|
192
191
|
const n = [];
|
|
193
192
|
return P(t) ? n.push({
|
|
194
193
|
label: "当前方案",
|
|
@@ -196,32 +195,32 @@ function de(e = "month") {
|
|
|
196
195
|
}) : v(t) ? n.push({
|
|
197
196
|
label: "免费体验",
|
|
198
197
|
type: "trial"
|
|
199
|
-
}) :
|
|
198
|
+
}) : b(t) && n.push({
|
|
200
199
|
label: "最受欢迎",
|
|
201
200
|
type: "recommended"
|
|
202
201
|
}), n;
|
|
203
202
|
}
|
|
204
|
-
function
|
|
203
|
+
function K(t) {
|
|
205
204
|
const n = i.value;
|
|
206
|
-
return P(t) ? "当前方案" : v(t) ? n ? "已订阅付费方案" :
|
|
205
|
+
return P(t) ? "当前方案" : v(t) ? n ? "已订阅付费方案" : B() ? "免费开通" : "免费注册" : n ? C(t) ? "切换周期" : typeof n.unitAmount == "number" && t.selectedPrice.unitAmount > n.unitAmount ? "升级方案" : "切换方案" : "立即订阅";
|
|
207
206
|
}
|
|
208
|
-
function
|
|
207
|
+
function Q(t, n) {
|
|
209
208
|
const u = t.features.find((c) => c.type === "quota" && c.value !== void 0);
|
|
210
209
|
if (u) {
|
|
211
|
-
const c =
|
|
210
|
+
const c = I(u.quotaPeriod), m = u.value === -1 ? "不限量" : u.value;
|
|
212
211
|
return `${u.name} ${c ? `${m} / ${c}` : m},覆盖核心使用场景。`;
|
|
213
212
|
}
|
|
214
213
|
return v(t) ? "注册后自动开通免费权益,适合先体验核心能力。" : n === 1 ? "为正式团队准备的高配能力组合。" : "包含入门所需的核心能力。";
|
|
215
214
|
}
|
|
216
|
-
function
|
|
215
|
+
function V(t) {
|
|
217
216
|
return t.filter((n) => n.highlight !== !1).map((n) => ({
|
|
218
|
-
title:
|
|
217
|
+
title: S(n),
|
|
219
218
|
description: n.description || ""
|
|
220
219
|
}));
|
|
221
220
|
}
|
|
222
|
-
function
|
|
221
|
+
function _(t) {
|
|
223
222
|
const n = t.filter((o) => o.highlight !== !1), u = n.filter((o) => o.type === "quota" || o.type === "unlimited").map((o) => ({
|
|
224
|
-
title:
|
|
223
|
+
title: S(o),
|
|
225
224
|
description: o.description || ""
|
|
226
225
|
})), c = n.filter((o) => o.type === "boolean" && o.value !== !1).map((o) => ({
|
|
227
226
|
title: o.name,
|
|
@@ -235,17 +234,17 @@ function de(e = "month") {
|
|
|
235
234
|
items: u
|
|
236
235
|
}), m;
|
|
237
236
|
}
|
|
238
|
-
async function
|
|
237
|
+
async function k() {
|
|
239
238
|
f.value = !0;
|
|
240
239
|
try {
|
|
241
|
-
const t = await
|
|
240
|
+
const t = await H.productOptions();
|
|
242
241
|
r.value = Array.isArray(t) ? t : [], !a.value.some((u) => u.value === d.value) && a.value[0] && (d.value = a.value[0].value);
|
|
243
242
|
} finally {
|
|
244
243
|
f.value = !1;
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
|
-
async function
|
|
248
|
-
if (!
|
|
246
|
+
async function A() {
|
|
247
|
+
if (!B()) {
|
|
249
248
|
i.value = null, l.value = null;
|
|
250
249
|
return;
|
|
251
250
|
}
|
|
@@ -254,7 +253,7 @@ function de(e = "month") {
|
|
|
254
253
|
const {
|
|
255
254
|
data: t,
|
|
256
255
|
error: n
|
|
257
|
-
} = await
|
|
256
|
+
} = await $.subscriptions.summary.post();
|
|
258
257
|
if (n) {
|
|
259
258
|
console.error("加载当前订阅失败", n);
|
|
260
259
|
return;
|
|
@@ -264,55 +263,55 @@ function de(e = "month") {
|
|
|
264
263
|
s.value = !1;
|
|
265
264
|
}
|
|
266
265
|
}
|
|
267
|
-
async function
|
|
268
|
-
await Promise.all([
|
|
266
|
+
async function z() {
|
|
267
|
+
await Promise.all([k(), A()]);
|
|
269
268
|
}
|
|
270
269
|
return {
|
|
271
270
|
products: r,
|
|
272
|
-
plans:
|
|
271
|
+
plans: p,
|
|
273
272
|
currentSubscription: i,
|
|
274
273
|
currentTrial: l,
|
|
275
274
|
listLoading: f,
|
|
276
275
|
currentLoading: s,
|
|
277
276
|
billingInterval: d,
|
|
278
277
|
billingIntervalTabs: a,
|
|
279
|
-
setBillingInterval:
|
|
278
|
+
setBillingInterval: x,
|
|
280
279
|
isCurrentPlan: P,
|
|
281
|
-
isSameProduct:
|
|
282
|
-
isRecommendedPlan:
|
|
280
|
+
isSameProduct: C,
|
|
281
|
+
isRecommendedPlan: b,
|
|
283
282
|
isFreePlan: v,
|
|
284
|
-
isPlanActionDisabled:
|
|
285
|
-
getDisplayPrice:
|
|
286
|
-
getDisplayOriginalPrice:
|
|
287
|
-
getDisplayCycle:
|
|
288
|
-
getPromotionLabel:
|
|
289
|
-
getBadgeLabel:
|
|
290
|
-
getBadgeLabels:
|
|
291
|
-
getButtonLabel:
|
|
292
|
-
getPlanSummary:
|
|
293
|
-
getFeatureItems:
|
|
294
|
-
getFeatureGroups:
|
|
295
|
-
loadProducts:
|
|
296
|
-
loadCurrentSubscription:
|
|
297
|
-
refresh:
|
|
283
|
+
isPlanActionDisabled: U,
|
|
284
|
+
getDisplayPrice: T,
|
|
285
|
+
getDisplayOriginalPrice: j,
|
|
286
|
+
getDisplayCycle: G,
|
|
287
|
+
getPromotionLabel: O,
|
|
288
|
+
getBadgeLabel: R,
|
|
289
|
+
getBadgeLabels: E,
|
|
290
|
+
getButtonLabel: K,
|
|
291
|
+
getPlanSummary: Q,
|
|
292
|
+
getFeatureItems: V,
|
|
293
|
+
getFeatureGroups: _,
|
|
294
|
+
loadProducts: k,
|
|
295
|
+
loadCurrentSubscription: A,
|
|
296
|
+
refresh: z
|
|
298
297
|
};
|
|
299
298
|
}
|
|
300
|
-
function
|
|
299
|
+
function ne(e) {
|
|
301
300
|
window.open(e, "_blank", "noopener,noreferrer");
|
|
302
301
|
}
|
|
303
|
-
function
|
|
302
|
+
function D(e) {
|
|
304
303
|
return e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "";
|
|
305
304
|
}
|
|
306
|
-
function
|
|
305
|
+
function re(e) {
|
|
307
306
|
return e && typeof e == "object" && "alipayUrl" in e && typeof e.alipayUrl == "string" ? e.alipayUrl : "";
|
|
308
307
|
}
|
|
309
|
-
function
|
|
308
|
+
function ie(e) {
|
|
310
309
|
return e && typeof e == "object" && "status" in e && e.status === "trialing";
|
|
311
310
|
}
|
|
312
|
-
function
|
|
311
|
+
function de(e) {
|
|
313
312
|
const r = y(null), {
|
|
314
313
|
ensureAuthenticated: i
|
|
315
|
-
} =
|
|
314
|
+
} = J();
|
|
316
315
|
async function l(s) {
|
|
317
316
|
if (!s.selectedPrice) {
|
|
318
317
|
g.warning("当前方案暂无可购买价格");
|
|
@@ -328,23 +327,23 @@ function me(e) {
|
|
|
328
327
|
try {
|
|
329
328
|
if (s.selectedPrice.type === "free")
|
|
330
329
|
return;
|
|
331
|
-
const a = d ? await
|
|
330
|
+
const a = d ? await $.subscriptions.change.post({
|
|
332
331
|
subscriptionId: d.id,
|
|
333
332
|
newPriceId: s.selectedPrice.id,
|
|
334
333
|
proration: !0
|
|
335
|
-
}) : await
|
|
334
|
+
}) : await $.subscriptions.create.post({
|
|
336
335
|
priceId: s.selectedPrice.id
|
|
337
336
|
});
|
|
338
337
|
if (a.error) {
|
|
339
338
|
g.error(a.error.message || "订阅操作失败");
|
|
340
339
|
return;
|
|
341
340
|
}
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
344
|
-
|
|
341
|
+
const p = re(a.data);
|
|
342
|
+
if (p) {
|
|
343
|
+
ne(p);
|
|
345
344
|
return;
|
|
346
345
|
}
|
|
347
|
-
|
|
346
|
+
ie(a.data) ? g.success(D(a.data) || "试用已开始") : g.success(D(a.data) || "订阅已更新"), await e.refreshCurrentSubscription();
|
|
348
347
|
} catch (a) {
|
|
349
348
|
console.error("订阅操作失败", a), g.error("订阅操作失败,请稍后重试");
|
|
350
349
|
} finally {
|
|
@@ -361,6 +360,6 @@ function me(e) {
|
|
|
361
360
|
};
|
|
362
361
|
}
|
|
363
362
|
export {
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
de as a,
|
|
364
|
+
fe as u
|
|
366
365
|
};
|
|
@@ -7323,6 +7323,7 @@ function Mt(je, ot) {
|
|
|
7323
7323
|
function Kt(je) {
|
|
7324
7324
|
return je.type && je.type !== "application/octet-stream" && je.type !== "" ? je.type : Mt(je.name);
|
|
7325
7325
|
}
|
|
7326
|
+
const _t = 1024 * 1024 * 5;
|
|
7326
7327
|
function At(je, ot, H) {
|
|
7327
7328
|
je && je({
|
|
7328
7329
|
code: "501",
|
|
@@ -7332,7 +7333,7 @@ function At(je, ot, H) {
|
|
|
7332
7333
|
method: "post"
|
|
7333
7334
|
});
|
|
7334
7335
|
}
|
|
7335
|
-
function
|
|
7336
|
+
function Vt() {
|
|
7336
7337
|
let je;
|
|
7337
7338
|
async function ot({
|
|
7338
7339
|
file: H,
|
|
@@ -7376,7 +7377,7 @@ function zt() {
|
|
|
7376
7377
|
Key: C,
|
|
7377
7378
|
// 使用服务端返回的 Key
|
|
7378
7379
|
Body: H,
|
|
7379
|
-
SliceSize:
|
|
7380
|
+
SliceSize: _t,
|
|
7380
7381
|
onProgress(f) {
|
|
7381
7382
|
se && se(f);
|
|
7382
7383
|
},
|
|
@@ -7413,5 +7414,6 @@ function zt() {
|
|
|
7413
7414
|
};
|
|
7414
7415
|
}
|
|
7415
7416
|
export {
|
|
7416
|
-
|
|
7417
|
+
Kt as g,
|
|
7418
|
+
Vt as u
|
|
7417
7419
|
};
|
package/dist/user.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-6xQNhFk3.js";
|
|
2
2
|
export {
|
|
3
3
|
a as UserAccountMenu,
|
|
4
4
|
n as UserAvatar,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FeedbackMessageAttachment, MessageType } from '../types/feedback';
|
|
2
|
+
export type MessageDisplay = {
|
|
3
|
+
text: string;
|
|
4
|
+
attachments: FeedbackMessageAttachment[];
|
|
5
|
+
};
|
|
6
|
+
/** 将消息结构统一为气泡展示所需的文本与图片 URL 列表 */
|
|
7
|
+
export declare function getMessageDisplay(message: MessageType): MessageDisplay;
|
|
8
|
+
export declare function hasMessageContent(display: MessageDisplay): boolean;
|