@24city/web-console 0.1.0 → 0.1.2
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/CHANGELOG.md +15 -0
- package/README.md +6 -0
- package/dist/account/index.js +2 -2
- package/dist/chunks/{console-layout-CcUiJPf0.js → console-layout-BibioK5M.js} +33 -33
- package/dist/chunks/{error-boundary-BgTZsJA_.js → error-boundary-D3qiD7ov.js} +1 -1
- package/dist/chunks/page-BaitnD--.js +89 -0
- package/dist/chunks/{stale-build-D4N21gap.js → stale-build-DUKkQHuu.js} +1 -1
- package/dist/chunks/{text-link-7A--UEc3.js → text-link-FTsBp_QU.js} +1 -1
- package/dist/chunks/{upgrade-modal-BbsM2VE2.js → upgrade-modal-_psMAWRK.js} +236 -236
- package/dist/chunks/wallet-badge-CnyMLpUO.js +565 -0
- package/dist/index.js +7 -7
- package/dist/layout/index.js +1 -1
- package/dist/page/index.js +3 -3
- package/dist/runtime/index.js +1 -1
- package/dist/styles.css +288 -254
- package/package.json +1 -1
- package/dist/chunks/page-BhfOrziX.js +0 -89
- package/dist/chunks/wallet-badge-D7AFqTLx.js +0 -565
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as
|
|
2
|
-
import { Card as
|
|
3
|
-
import { IconExternalOpen as
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { Card as x, Button as w, Typography as W, Tag as ye, Skeleton as H, Banner as Ee, RadioGroup as Fe, Avatar as Ue, Space as le, Modal as Re } from "@douyinfe/semi-ui";
|
|
3
|
+
import { IconExternalOpen as ge, IconGift as Me, IconRefresh as fe, IconLock as Oe, IconDesktop as De, IconUserGroup as Ne, IconShield as Be, IconTick as ne, IconMinus as Ve, IconCrown as ze, IconUser as de, IconChevronRight as He, IconExit as Ge } from "@douyinfe/semi-icons";
|
|
4
4
|
import { useParams as qe, useNavigate as ae, useLocation as se, Navigate as ie } from "react-router";
|
|
5
|
-
import { S as je, F as Z, c as
|
|
6
|
-
import { u as j, a as
|
|
7
|
-
import { q as
|
|
8
|
-
import { H as Q, I as Se, q as Y, l as Ke, J as we, m as ee, O as Ce, i as ke, r as re, g as G, n as Pe, z as
|
|
5
|
+
import { S as je, F as Z, c as z, b as Qe } from "./page-BaitnD--.js";
|
|
6
|
+
import { u as j, a as O, b as D } from "./context-CaVim6ZO.js";
|
|
7
|
+
import { q as E, m as Ye, u as be, C as ve, i as Je, d as he, r as pe } from "./logout-signal-CiD_zY5M.js";
|
|
8
|
+
import { H as Q, I as Se, q as Y, l as Ke, J as we, m as ee, O as Ce, i as ke, r as re, g as G, n as Pe, z as Le, y as Xe, k as We, B as Ze, w as et, L as tt, M as nt, p as at, h as st, F as it, D as rt, G as ct, N as ot, x as lt } from "./wallet-badge-CnyMLpUO.js";
|
|
9
9
|
import { L as ce } from "./link-button-giJEcTmG.js";
|
|
10
|
-
import { useState as dt, useRef as
|
|
10
|
+
import { useState as dt, useRef as _e, useEffect as $e } from "react";
|
|
11
11
|
const ht = {
|
|
12
12
|
/** 统一资料(显示名称)、修改登录密码、登录设备与导出个人数据 */
|
|
13
13
|
settings: "/app/settings",
|
|
@@ -17,7 +17,7 @@ const ht = {
|
|
|
17
17
|
orders: "/app/orders",
|
|
18
18
|
/** 加入的空间、团队成员与邀请 */
|
|
19
19
|
spaces: "/app/spaces"
|
|
20
|
-
},
|
|
20
|
+
}, Ie = (t) => {
|
|
21
21
|
const a = (t == null ? void 0 : t.trim()) ?? "";
|
|
22
22
|
if (!a) return null;
|
|
23
23
|
try {
|
|
@@ -27,21 +27,21 @@ const ht = {
|
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
}, q = (t, a) => {
|
|
30
|
-
const r =
|
|
30
|
+
const r = Ie(t);
|
|
31
31
|
return r ? `${r}${ht[a]}` : null;
|
|
32
32
|
}, te = (t, a) => {
|
|
33
|
-
const r =
|
|
33
|
+
const r = Ie(t);
|
|
34
34
|
if (!r) return null;
|
|
35
35
|
const i = new URLSearchParams();
|
|
36
36
|
return a.productCode && i.set("product_code", a.productCode), i.set("return_url", a.returnUrl), a.spaceId && i.set("space_id", a.spaceId), a.spaceType && i.set("space_type", a.spaceType), a.priceCode && i.set("price_code", a.priceCode), `${r}/plans?${i.toString()}`;
|
|
37
|
-
},
|
|
38
|
-
center:
|
|
39
|
-
aside:
|
|
40
|
-
identityCard:
|
|
41
|
-
identity:
|
|
42
|
-
identityAvatar:
|
|
43
|
-
identityText:
|
|
44
|
-
identityName:
|
|
37
|
+
}, pt = "_center_1y6np_7", _t = "_aside_1y6np_21", mt = "_identityCard_1y6np_27", ut = "_identity_1y6np_27", yt = "_identityAvatar_1y6np_42", gt = "_identityText_1y6np_55", ft = "_identityName_1y6np_64", Nt = "_identitySpace_1y6np_76", bt = "_identitySpaceName_1y6np_91", vt = "_identityRole_1y6np_98", St = "_identityStats_1y6np_108", wt = "_identityStat_1y6np_108", Ct = "_identityStatLabel_1y6np_129", kt = "_identityStatValue_1y6np_135", Pt = "_nav_1y6np_147", Lt = "_navItem_1y6np_156", $t = "_navIcon_1y6np_191", It = "_navLabel_1y6np_202", Tt = "_navArrow_1y6np_207", xt = "_asideFoot_1y6np_223", At = "_logout_1y6np_228", Et = "_main_1y6np_249", Ft = "_head_1y6np_262", Ut = "_title_1y6np_268", Rt = "_description_1y6np_277", Mt = "_card_1y6np_286", Ot = "_usage_1y6np_285", Dt = "_fields_1y6np_318", Bt = "_field_1y6np_318", Vt = "_fieldLabel_1y6np_331", zt = "_fieldValue_1y6np_337", Ht = "_fieldText_1y6np_345", Gt = "_fieldMuted_1y6np_358", qt = "_fieldHint_1y6np_364", jt = "_mono_1y6np_370", Qt = "_inlineTag_1y6np_379", Yt = "_settingList_1y6np_384", Jt = "_settingRow_1y6np_389", Kt = "_settingIcon_1y6np_405", Xt = "_settingText_1y6np_418", Wt = "_settingTitle_1y6np_426", Zt = "_settingDescription_1y6np_433", en = "_settingAction_1y6np_439", tn = "_note_1y6np_443", nn = "_centerLink_1y6np_463", an = "_centerLinkIcon_1y6np_469", sn = "_heroCard_1y6np_477", rn = "_hero_1y6np_477", cn = "_heroMain_1y6np_501", on = "_heroEyebrow_1y6np_510", ln = "_heroEyebrowText_1y6np_525", dn = "_heroValue_1y6np_536", hn = "_heroMeta_1y6np_546", pn = "_heroActions_1y6np_560", _n = "_heroFoot_1y6np_569", mn = "_ownerOnly_1y6np_587", un = "_heroSkeleton_1y6np_709", n = {
|
|
38
|
+
center: pt,
|
|
39
|
+
aside: _t,
|
|
40
|
+
identityCard: mt,
|
|
41
|
+
identity: ut,
|
|
42
|
+
identityAvatar: yt,
|
|
43
|
+
identityText: gt,
|
|
44
|
+
identityName: ft,
|
|
45
45
|
identitySpace: Nt,
|
|
46
46
|
identitySpaceName: bt,
|
|
47
47
|
identityRole: vt,
|
|
@@ -50,22 +50,22 @@ const ht = {
|
|
|
50
50
|
identityStatLabel: Ct,
|
|
51
51
|
identityStatValue: kt,
|
|
52
52
|
nav: Pt,
|
|
53
|
-
navItem:
|
|
54
|
-
navIcon:
|
|
55
|
-
navLabel:
|
|
56
|
-
navArrow:
|
|
57
|
-
asideFoot:
|
|
58
|
-
logout:
|
|
59
|
-
main:
|
|
60
|
-
head:
|
|
61
|
-
title:
|
|
62
|
-
description:
|
|
63
|
-
card:
|
|
64
|
-
usage:
|
|
65
|
-
fields:
|
|
66
|
-
field:
|
|
67
|
-
fieldLabel:
|
|
68
|
-
fieldValue:
|
|
53
|
+
navItem: Lt,
|
|
54
|
+
navIcon: $t,
|
|
55
|
+
navLabel: It,
|
|
56
|
+
navArrow: Tt,
|
|
57
|
+
asideFoot: xt,
|
|
58
|
+
logout: At,
|
|
59
|
+
main: Et,
|
|
60
|
+
head: Ft,
|
|
61
|
+
title: Ut,
|
|
62
|
+
description: Rt,
|
|
63
|
+
card: Mt,
|
|
64
|
+
usage: Ot,
|
|
65
|
+
fields: Dt,
|
|
66
|
+
field: Bt,
|
|
67
|
+
fieldLabel: Vt,
|
|
68
|
+
fieldValue: zt,
|
|
69
69
|
fieldText: Ht,
|
|
70
70
|
fieldMuted: Gt,
|
|
71
71
|
fieldHint: qt,
|
|
@@ -88,11 +88,11 @@ const ht = {
|
|
|
88
88
|
heroEyebrowText: ln,
|
|
89
89
|
heroValue: dn,
|
|
90
90
|
heroMeta: hn,
|
|
91
|
-
heroActions:
|
|
92
|
-
heroFoot:
|
|
93
|
-
ownerOnly:
|
|
94
|
-
heroSkeleton:
|
|
95
|
-
},
|
|
91
|
+
heroActions: pn,
|
|
92
|
+
heroFoot: _n,
|
|
93
|
+
ownerOnly: mn,
|
|
94
|
+
heroSkeleton: un
|
|
95
|
+
}, F = ({
|
|
96
96
|
href: t,
|
|
97
97
|
children: a,
|
|
98
98
|
type: r = "secondary",
|
|
@@ -110,7 +110,7 @@ const ht = {
|
|
|
110
110
|
className: n.centerLink,
|
|
111
111
|
children: [
|
|
112
112
|
a,
|
|
113
|
-
/* @__PURE__ */ e(
|
|
113
|
+
/* @__PURE__ */ e(ge, { className: n.centerLinkIcon, "aria-hidden": "true" })
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
116
|
) : null, K = ({
|
|
@@ -125,73 +125,73 @@ const ht = {
|
|
|
125
125
|
/* @__PURE__ */ e("span", { className: n.settingDescription, children: r })
|
|
126
126
|
] }),
|
|
127
127
|
i ? /* @__PURE__ */ e("div", { className: n.settingAction, children: i }) : null
|
|
128
|
-
] }),
|
|
129
|
-
var
|
|
130
|
-
const a = j(), { PointsDetail: r } =
|
|
131
|
-
return /* @__PURE__ */ s(
|
|
132
|
-
/* @__PURE__ */ s(
|
|
128
|
+
] }), yn = ({ data: t }) => {
|
|
129
|
+
var y;
|
|
130
|
+
const a = j(), { PointsDetail: r } = O(), { session: i, activeSpace: c, activeSpaceId: l, globalUserId: o, wallet: d } = t, u = q(i == null ? void 0 : i.accountCenterUrl, "points"), _ = c ? Q(c) : "当前空间", m = (y = d.data) == null ? void 0 : y.availablePoints;
|
|
131
|
+
return /* @__PURE__ */ s($, { children: [
|
|
132
|
+
/* @__PURE__ */ s(x, { className: n.heroCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
133
133
|
/* @__PURE__ */ s("div", { className: n.hero, "data-tone": "primary", children: [
|
|
134
134
|
/* @__PURE__ */ s("div", { className: n.heroMain, children: [
|
|
135
|
-
/* @__PURE__ */ s("span", { className: n.heroEyebrow, title:
|
|
136
|
-
/* @__PURE__ */ e(
|
|
135
|
+
/* @__PURE__ */ s("span", { className: n.heroEyebrow, title: _, children: [
|
|
136
|
+
/* @__PURE__ */ e(Me, { "aria-hidden": "true" }),
|
|
137
137
|
/* @__PURE__ */ s("span", { className: n.heroEyebrowText, children: [
|
|
138
138
|
"可用积分 · ",
|
|
139
|
-
|
|
139
|
+
_
|
|
140
140
|
] })
|
|
141
141
|
] }),
|
|
142
|
-
/* @__PURE__ */ e("span", { className: n.heroValue, "aria-live": "polite", children: d.isPending ? "读取中" : d.isError ||
|
|
142
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, "aria-live": "polite", children: d.isPending ? "读取中" : d.isError || m === void 0 ? "暂不可用" : E(m) }),
|
|
143
143
|
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "积分属于当前空间,24.city 各产品共用。" })
|
|
144
144
|
] }),
|
|
145
145
|
/* @__PURE__ */ s("div", { className: n.heroActions, children: [
|
|
146
|
-
/* @__PURE__ */ e(w, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(
|
|
147
|
-
/* @__PURE__ */ e(
|
|
146
|
+
/* @__PURE__ */ e(w, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(fe, { "aria-hidden": "true" }), disabled: d.isFetching, onClick: () => void d.refetch(), children: "刷新" }),
|
|
147
|
+
/* @__PURE__ */ e(F, { type: "primary", href: u, label: "全部积分消耗(在统一账号中心打开)", children: "全部积分消耗" })
|
|
148
148
|
] })
|
|
149
149
|
] }),
|
|
150
150
|
/* @__PURE__ */ e("div", { className: n.heroFoot, children: /* @__PURE__ */ e("span", { children: r ? `下面是你本人在 ${a.shortName} 里的扣费明细;当前空间在 24.city 各产品里的全部积分消耗,请到统一账号中心查看。` : "当前空间在 24.city 各产品里的全部积分消耗,请到统一账号中心查看。" }) })
|
|
151
151
|
] }),
|
|
152
152
|
r ? /* @__PURE__ */ e("div", { className: n.usage, children: /* @__PURE__ */ e(r, { activeSpaceId: l, globalUserId: o }) }) : null
|
|
153
153
|
] });
|
|
154
|
-
},
|
|
154
|
+
}, V = ({ label: t, children: a, hint: r }) => /* @__PURE__ */ s("div", { className: n.field, children: [
|
|
155
155
|
/* @__PURE__ */ e("span", { className: n.fieldLabel, children: t }),
|
|
156
156
|
/* @__PURE__ */ s("div", { className: n.fieldValue, children: [
|
|
157
157
|
a,
|
|
158
158
|
r ? /* @__PURE__ */ e("span", { className: n.fieldHint, children: r }) : null
|
|
159
159
|
] })
|
|
160
|
-
] }),
|
|
161
|
-
var
|
|
162
|
-
const a = j(), { session: r, activeSpace: i, profile: c, globalUserId: l } = t, o = r == null ? void 0 : r.accountCenterUrl, d = ((
|
|
163
|
-
return /* @__PURE__ */ s(
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
/* @__PURE__ */ e(
|
|
166
|
-
/* @__PURE__ */ e(
|
|
167
|
-
/* @__PURE__ */ e(
|
|
160
|
+
] }), gn = ({ data: t }) => {
|
|
161
|
+
var y;
|
|
162
|
+
const a = j(), { session: r, activeSpace: i, profile: c, globalUserId: l } = t, o = r == null ? void 0 : r.accountCenterUrl, d = ((y = c.data) == null ? void 0 : y.nickName) ?? "", u = Se(i == null ? void 0 : i.role), _ = q(o, "settings"), m = q(o, "spaces");
|
|
163
|
+
return /* @__PURE__ */ s($, { children: [
|
|
164
|
+
/* @__PURE__ */ e(x, { title: "账号信息", className: n.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ s("div", { className: n.fields, children: [
|
|
165
|
+
/* @__PURE__ */ e(V, { label: "昵称", hint: `首次登录 ${a.shortName} 时从统一账号带来`, children: /* @__PURE__ */ e("span", { className: n.fieldText, children: d || (c.isPending ? "读取中" : "未设置") }) }),
|
|
166
|
+
/* @__PURE__ */ e(V, { label: "统一账号 ID", hint: "联系客服时可以提供", children: /* @__PURE__ */ e(W.Text, { copyable: { copyTip: "复制", successTip: "已复制" }, className: n.mono, children: l }) }),
|
|
167
|
+
/* @__PURE__ */ e(V, { label: "当前空间", children: /* @__PURE__ */ s("span", { className: n.fieldText, children: [
|
|
168
168
|
i ? Q(i) : "暂不可用",
|
|
169
|
-
i && Y(i) ? /* @__PURE__ */ e(
|
|
170
|
-
|
|
169
|
+
i && Y(i) ? /* @__PURE__ */ e(ye, { size: "small", color: "blue", className: n.inlineTag, children: "团队" }) : null,
|
|
170
|
+
u ? /* @__PURE__ */ s("span", { className: n.fieldMuted, children: [
|
|
171
171
|
"· 我是",
|
|
172
|
-
|
|
172
|
+
u
|
|
173
173
|
] }) : null
|
|
174
174
|
] }) }),
|
|
175
|
-
/* @__PURE__ */ e(
|
|
175
|
+
/* @__PURE__ */ e(V, { label: "本次登录有效至", hint: "到期后重新登录即可", children: /* @__PURE__ */ e("span", { className: n.fieldText, children: r ? Ye(r.absoluteExpiresAt) : "暂无" }) })
|
|
176
176
|
] }) }),
|
|
177
|
-
/* @__PURE__ */ s(
|
|
177
|
+
/* @__PURE__ */ s(x, { title: "登录与安全", className: n.card, bordered: !1, headerLine: !1, children: [
|
|
178
178
|
/* @__PURE__ */ s("div", { className: n.settingList, children: [
|
|
179
179
|
/* @__PURE__ */ e(
|
|
180
180
|
K,
|
|
181
181
|
{
|
|
182
|
-
icon: /* @__PURE__ */ e(
|
|
182
|
+
icon: /* @__PURE__ */ e(Oe, {}),
|
|
183
183
|
title: "登录密码",
|
|
184
184
|
description: "验证已绑定的手机号后修改。改完后,24.city 所有产品都用新密码登录。",
|
|
185
|
-
action: /* @__PURE__ */ e(
|
|
185
|
+
action: /* @__PURE__ */ e(F, { href: _, label: "修改密码(在统一账号中心打开)", children: "修改密码" })
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
188
|
/* @__PURE__ */ e(
|
|
189
189
|
K,
|
|
190
190
|
{
|
|
191
|
-
icon: /* @__PURE__ */ e(
|
|
191
|
+
icon: /* @__PURE__ */ e(De, {}),
|
|
192
192
|
title: "登录设备与个人数据",
|
|
193
193
|
description: "查看登录过的设备,导出你的个人数据。",
|
|
194
|
-
action: /* @__PURE__ */ e(
|
|
194
|
+
action: /* @__PURE__ */ e(F, { href: _, label: "查看登录设备(在统一账号中心打开)", children: "前往查看" })
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
/* @__PURE__ */ e(
|
|
@@ -200,13 +200,13 @@ const ht = {
|
|
|
200
200
|
icon: /* @__PURE__ */ e(Ne, {}),
|
|
201
201
|
title: "空间与成员",
|
|
202
202
|
description: "查看你加入的空间;团队所有者和管理员在这里邀请、管理成员。",
|
|
203
|
-
action: /* @__PURE__ */ e(
|
|
203
|
+
action: /* @__PURE__ */ e(F, { href: m, label: "管理空间与成员(在统一账号中心打开)", children: "前往管理" })
|
|
204
204
|
}
|
|
205
205
|
)
|
|
206
206
|
] }),
|
|
207
207
|
/* @__PURE__ */ s("div", { className: n.note, children: [
|
|
208
|
-
/* @__PURE__ */ e(
|
|
209
|
-
/* @__PURE__ */ e("span", { children:
|
|
208
|
+
/* @__PURE__ */ e(Be, { "aria-hidden": "true" }),
|
|
209
|
+
/* @__PURE__ */ e("span", { children: _ ? `${a.shortName} 使用 24.city 统一账号登录,不保存你的密码和验证码。以上设置在统一账号中心修改,所有产品同步生效。` : "统一账号中心的地址暂时不可用,请稍后刷新页面再试。" })
|
|
210
210
|
] })
|
|
211
211
|
] })
|
|
212
212
|
] });
|
|
@@ -214,52 +214,52 @@ const ht = {
|
|
|
214
214
|
free: { tone: "basic", tagline: "先免费体验", benefits: [] },
|
|
215
215
|
standard: { tone: "standard", badge: "推荐", tagline: "个人用户的常用之选", benefits: ["按积分扣费,用多少扣多少"] },
|
|
216
216
|
pro: { tone: "pro", tagline: "高频使用,积分更充足", benefits: ["每月积分更多,适合批量使用"] }
|
|
217
|
-
},
|
|
217
|
+
}, fn = {
|
|
218
218
|
tone: "team",
|
|
219
219
|
tagline: "团队一起用,套餐和积分共用",
|
|
220
220
|
benefits: ["成员共用套餐和积分"]
|
|
221
|
-
}, Nn = (t, a) => t.spaceType === "team" ? a.teamPlanCopy ??
|
|
221
|
+
}, Nn = (t, a) => t.spaceType === "team" ? a.teamPlanCopy ?? fn : t.isDefault || t.tier <= 0 ? X.free : t.tier === 1 ? X.standard : X.pro, Te = (t, a = {}) => {
|
|
222
222
|
var r;
|
|
223
223
|
return ((r = a.planCopy) == null ? void 0 : r[t.code]) ?? Nn(t, a);
|
|
224
|
-
},
|
|
224
|
+
}, xe = (t, a = [], r = {}) => {
|
|
225
225
|
const i = [], c = (l, o = !0) => {
|
|
226
226
|
i.some((d) => d.text === l) || i.push({ text: l, included: o });
|
|
227
227
|
};
|
|
228
|
-
t.monthlyPoints > 0 && c(t.isDefault ? `每月赠送 ${
|
|
228
|
+
t.monthlyPoints > 0 && c(t.isDefault ? `每月赠送 ${E(t.monthlyPoints)} 积分` : `每月 ${E(t.monthlyPoints)} 积分`), t.spaceType === "team" && t.includedSeats > 0 && c(`含 ${E(t.includedSeats)} 个成员席位`);
|
|
229
229
|
for (const l of Ke(t, a, r)) c(l.text, l.included);
|
|
230
|
-
for (const l of
|
|
230
|
+
for (const l of Te(t, r).benefits) c(l);
|
|
231
231
|
return i;
|
|
232
232
|
}, bn = (t, a) => t.prices.filter((c) => c.billingPeriod === a && c.amountCents > 0).reduce((c, l) => !c || l.amountCents < c.amountCents ? l : c, null) ?? we(t), vn = (t, a) => {
|
|
233
233
|
if (a.billingPeriod !== "year") return "";
|
|
234
234
|
const r = ee({ amountCents: Math.round(a.amountCents / 12), currency: a.currency }), i = t.prices.find((l) => l.billingPeriod === "month" && l.currency === a.currency && l.amountCents > 0), c = i ? i.amountCents * 12 - a.amountCents : 0;
|
|
235
235
|
return c > 0 ? `约 ${r}/月 · 比月付省 ${ee({ amountCents: c, currency: a.currency })}` : `约 ${r}/月`;
|
|
236
|
-
}, Sn = "_subtitle_1rvtt_7", wn = "_grid_1rvtt_16", Cn = "_skeleton_1rvtt_22", kn = "_card_1rvtt_30", Pn = "_section_1rvtt_62",
|
|
236
|
+
}, Sn = "_subtitle_1rvtt_7", wn = "_grid_1rvtt_16", Cn = "_skeleton_1rvtt_22", kn = "_card_1rvtt_30", Pn = "_section_1rvtt_62", Ln = "_badge_1rvtt_90", $n = "_top_1rvtt_108", In = "_art_1rvtt_138", Tn = "_name_1rvtt_159", xn = "_tagline_1rvtt_177", An = "_price_1rvtt_194", En = "_amount_1rvtt_201", Fn = "_period_1rvtt_217", Un = "_priceNote_1rvtt_226", Rn = "_body_1rvtt_243", Mn = "_benefits_1rvtt_251", On = "_benefit_1rvtt_251", Dn = "_check_1rvtt_267", Bn = "_action_1rvtt_303", Vn = "_cta_1rvtt_303", zn = "_ctaCurrent_1rvtt_344", Hn = "_ctaNote_1rvtt_353", p = {
|
|
237
237
|
subtitle: Sn,
|
|
238
238
|
grid: wn,
|
|
239
239
|
skeleton: Cn,
|
|
240
240
|
card: kn,
|
|
241
241
|
section: Pn,
|
|
242
|
-
badge:
|
|
243
|
-
top:
|
|
244
|
-
art:
|
|
245
|
-
name:
|
|
246
|
-
tagline:
|
|
247
|
-
price:
|
|
248
|
-
amount:
|
|
249
|
-
period:
|
|
250
|
-
priceNote:
|
|
251
|
-
body:
|
|
252
|
-
benefits:
|
|
253
|
-
benefit:
|
|
254
|
-
check:
|
|
255
|
-
action:
|
|
256
|
-
cta:
|
|
257
|
-
ctaCurrent:
|
|
242
|
+
badge: Ln,
|
|
243
|
+
top: $n,
|
|
244
|
+
art: In,
|
|
245
|
+
name: Tn,
|
|
246
|
+
tagline: xn,
|
|
247
|
+
price: An,
|
|
248
|
+
amount: En,
|
|
249
|
+
period: Fn,
|
|
250
|
+
priceNote: Un,
|
|
251
|
+
body: Rn,
|
|
252
|
+
benefits: Mn,
|
|
253
|
+
benefit: On,
|
|
254
|
+
check: Dn,
|
|
255
|
+
action: Bn,
|
|
256
|
+
cta: Vn,
|
|
257
|
+
ctaCurrent: zn,
|
|
258
258
|
ctaNote: Hn
|
|
259
259
|
}, Gn = { month: "/月", year: "/年", one_time: "" }, qn = [
|
|
260
260
|
{ label: "按月付", value: "month" },
|
|
261
261
|
{ label: "按年付", value: "year" }
|
|
262
|
-
],
|
|
262
|
+
], me = (t, a) => t.some((r) => r.prices.some((i) => i.billingPeriod === a && i.amountCents > 0)), jn = ({
|
|
263
263
|
plan: t,
|
|
264
264
|
price: a,
|
|
265
265
|
catalog: r,
|
|
@@ -268,87 +268,87 @@ const ht = {
|
|
|
268
268
|
action: l,
|
|
269
269
|
custom: o
|
|
270
270
|
}) => {
|
|
271
|
-
const d =
|
|
271
|
+
const d = Te(t, o), u = a ? vn(t, a) : "长期有效", _ = d.badge ?? (c ? "推荐升级" : void 0);
|
|
272
272
|
return /* @__PURE__ */ s(
|
|
273
273
|
"div",
|
|
274
274
|
{
|
|
275
|
-
className:
|
|
275
|
+
className: p.card,
|
|
276
276
|
"data-tone": d.tone,
|
|
277
277
|
"data-current": i ? "true" : "false",
|
|
278
278
|
"data-focus": c && !i ? "true" : "false",
|
|
279
279
|
role: "group",
|
|
280
280
|
"aria-label": t.name,
|
|
281
281
|
children: [
|
|
282
|
-
i ? /* @__PURE__ */ e("span", { className:
|
|
283
|
-
/* @__PURE__ */ s("div", { className:
|
|
284
|
-
/* @__PURE__ */ e("span", { className:
|
|
285
|
-
/* @__PURE__ */ e("span", { className:
|
|
286
|
-
/* @__PURE__ */ e("span", { className:
|
|
287
|
-
/* @__PURE__ */ e("span", { className:
|
|
288
|
-
/* @__PURE__ */ e("span", { className:
|
|
289
|
-
/* @__PURE__ */ e("span", { className:
|
|
290
|
-
] }) : /* @__PURE__ */ e("span", { className:
|
|
291
|
-
/* @__PURE__ */ e("span", { className:
|
|
282
|
+
i ? /* @__PURE__ */ e("span", { className: p.badge, "data-kind": "current", children: "当前套餐" }) : _ ? /* @__PURE__ */ e("span", { className: p.badge, children: _ }) : null,
|
|
283
|
+
/* @__PURE__ */ s("div", { className: p.top, children: [
|
|
284
|
+
/* @__PURE__ */ e("span", { className: p.art, "aria-hidden": "true" }),
|
|
285
|
+
/* @__PURE__ */ e("span", { className: p.name, children: t.name }),
|
|
286
|
+
/* @__PURE__ */ e("span", { className: p.tagline, children: d.tagline }),
|
|
287
|
+
/* @__PURE__ */ e("span", { className: p.price, children: a ? /* @__PURE__ */ s($, { children: [
|
|
288
|
+
/* @__PURE__ */ e("span", { className: p.amount, children: ee(a) }),
|
|
289
|
+
/* @__PURE__ */ e("span", { className: p.period, children: Gn[a.billingPeriod] })
|
|
290
|
+
] }) : /* @__PURE__ */ e("span", { className: p.amount, children: "免费" }) }),
|
|
291
|
+
/* @__PURE__ */ e("span", { className: p.priceNote, children: u || " " })
|
|
292
292
|
] }),
|
|
293
|
-
/* @__PURE__ */ s("div", { className:
|
|
294
|
-
/* @__PURE__ */ e("div", { className:
|
|
295
|
-
/* @__PURE__ */ e("span", { className:
|
|
296
|
-
/* @__PURE__ */ e("span", { children:
|
|
297
|
-
] },
|
|
298
|
-
/* @__PURE__ */ e("div", { className:
|
|
293
|
+
/* @__PURE__ */ s("div", { className: p.body, children: [
|
|
294
|
+
/* @__PURE__ */ e("div", { className: p.benefits, role: "list", "aria-label": `${t.name}权益`, children: xe(t, r, o).map((m) => /* @__PURE__ */ s("div", { className: p.benefit, "data-included": m.included ? "true" : "false", role: "listitem", children: [
|
|
295
|
+
/* @__PURE__ */ e("span", { className: p.check, "aria-hidden": "true", children: m.included ? /* @__PURE__ */ e(ne, {}) : /* @__PURE__ */ e(Ve, {}) }),
|
|
296
|
+
/* @__PURE__ */ e("span", { children: m.text })
|
|
297
|
+
] }, m.text)) }),
|
|
298
|
+
/* @__PURE__ */ e("div", { className: p.action, children: l })
|
|
299
299
|
] })
|
|
300
300
|
]
|
|
301
301
|
}
|
|
302
302
|
);
|
|
303
303
|
}, Qn = ({ data: t, focusPlan: a }) => {
|
|
304
|
-
const { config: r } =
|
|
304
|
+
const { config: r } = D(), i = O(), { session: c, activeSpace: l, activeSpaceId: o, subscription: d, wallet: u, allowed: _ } = t, m = Ce(_), [y, N] = dt("month"), A = l ? Y(l) : !1, U = ke(l), I = d.isError && re(d.error), C = d.data ?? null, b = (m.data ?? []).filter((h) => h.spaceType === (A ? "team" : "personal")), R = `${window.location.origin}${G(r.routes.app, "subscription")}`, k = (h) => {
|
|
305
305
|
var P;
|
|
306
|
-
return te(c == null ? void 0 : c.accountCenterUrl, { productCode: (P =
|
|
307
|
-
}, v =
|
|
308
|
-
|
|
306
|
+
return te(c == null ? void 0 : c.accountCenterUrl, { productCode: (P = u.data) == null ? void 0 : P.productCode, returnUrl: R, spaceId: A ? o : void 0, priceCode: h });
|
|
307
|
+
}, v = me(b, "month") && me(b, "year"), L = _e(null), T = _e(!1), f = !!(a && b.some((h) => h.code === a));
|
|
308
|
+
$e(() => {
|
|
309
309
|
var h, P;
|
|
310
|
-
!
|
|
311
|
-
}, [
|
|
312
|
-
const J = (h, P,
|
|
310
|
+
!f || T.current || (T.current = !0, (P = (h = L.current) == null ? void 0 : h.scrollIntoView) == null || P.call(h, { behavior: "smooth", block: "start" }));
|
|
311
|
+
}, [f]);
|
|
312
|
+
const J = (h, P, M) => {
|
|
313
313
|
if (h.isDefault || !P)
|
|
314
|
-
return
|
|
315
|
-
if (!
|
|
316
|
-
const
|
|
314
|
+
return M ? /* @__PURE__ */ e(w, { theme: "light", type: "tertiary", block: !0, disabled: !0, className: p.ctaCurrent, children: "正在使用" }) : /* @__PURE__ */ e("span", { className: p.ctaNote, children: "会员到期后回到免费版" });
|
|
315
|
+
if (!U) return /* @__PURE__ */ e("span", { className: p.ctaNote, children: I ? "请团队所有者续费" : "请团队所有者购买" });
|
|
316
|
+
const B = M ? "续费" : I ? `续费${h.name}` : !C || C.isDefault ? "立即开通" : h.tier > C.tier ? `升级到${h.name}` : `选择${h.name}`, oe = k(P.code);
|
|
317
317
|
if (!oe) return null;
|
|
318
|
-
const
|
|
319
|
-
return /* @__PURE__ */ e(ce, { block: !0, className:
|
|
318
|
+
const Ae = B.includes(h.name) ? B : `${B}${h.name}`;
|
|
319
|
+
return /* @__PURE__ */ e(ce, { block: !0, className: p.cta, href: oe, target: "_blank", "aria-label": `${Ae}(在统一账号中心打开)`, children: B });
|
|
320
320
|
};
|
|
321
|
-
return
|
|
322
|
-
|
|
321
|
+
return m.isPending ? /* @__PURE__ */ e(x, { title: "会员套餐", className: n.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ e("div", { className: p.grid, children: [0, 1, 2].map((h) => /* @__PURE__ */ e("div", { className: p.skeleton, children: /* @__PURE__ */ e(H, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(H.Paragraph, { rows: 4 }) }) }, h)) }) }) : m.isError ? /* @__PURE__ */ e(x, { title: "会员套餐", className: n.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ e(Ee, { type: "info", fullMode: !1, closeIcon: null, description: "暂时读不到套餐价格,可以在统一账号中心查看全部套餐。", children: /* @__PURE__ */ e(F, { size: "small", href: k(), label: "查看全部套餐(在统一账号中心打开)", children: "查看全部套餐" }) }) }) : b.length ? /* @__PURE__ */ e("div", { ref: L, children: /* @__PURE__ */ s(
|
|
322
|
+
x,
|
|
323
323
|
{
|
|
324
324
|
title: "会员套餐",
|
|
325
|
-
className: `${n.card} ${
|
|
325
|
+
className: `${n.card} ${p.section}`,
|
|
326
326
|
bordered: !1,
|
|
327
327
|
headerLine: !1,
|
|
328
328
|
headerExtraContent: v ? /* @__PURE__ */ e(
|
|
329
|
-
|
|
329
|
+
Fe,
|
|
330
330
|
{
|
|
331
331
|
type: "button",
|
|
332
332
|
buttonSize: "small",
|
|
333
333
|
options: qn,
|
|
334
|
-
value:
|
|
334
|
+
value: y,
|
|
335
335
|
onChange: (h) => N(h.target.value),
|
|
336
336
|
"aria-label": "付费周期"
|
|
337
337
|
}
|
|
338
338
|
) : null,
|
|
339
339
|
children: [
|
|
340
|
-
/* @__PURE__ */ e("span", { className:
|
|
341
|
-
/* @__PURE__ */ e("div", { className:
|
|
342
|
-
const P = bn(h,
|
|
340
|
+
/* @__PURE__ */ e("span", { className: p.subtitle, children: "价格取自 24.city 统一账号中心,点按钮去统一账号中心付款,付款后回到这里。" }),
|
|
341
|
+
/* @__PURE__ */ e("div", { className: p.grid, children: b.map((h) => {
|
|
342
|
+
const P = bn(h, y), M = !!(C && C.planCode === h.code);
|
|
343
343
|
return /* @__PURE__ */ e(
|
|
344
344
|
jn,
|
|
345
345
|
{
|
|
346
346
|
plan: h,
|
|
347
347
|
price: P,
|
|
348
|
-
catalog:
|
|
349
|
-
current:
|
|
348
|
+
catalog: m.data ?? [],
|
|
349
|
+
current: M,
|
|
350
350
|
focus: h.code === a,
|
|
351
|
-
action: J(h, P,
|
|
351
|
+
action: J(h, P, M),
|
|
352
352
|
custom: i
|
|
353
353
|
},
|
|
354
354
|
h.code
|
|
@@ -372,9 +372,9 @@ const ht = {
|
|
|
372
372
|
ctaIcon: ia,
|
|
373
373
|
price: ra
|
|
374
374
|
}, ca = ({ href: t, plan: a }) => {
|
|
375
|
-
const r = j(), { teamPromoHighlights: i = [] } =
|
|
376
|
-
a && a.includedSeats > 0 ? `含 ${
|
|
377
|
-
a && a.monthlyPoints > 0 ? `每月 ${
|
|
375
|
+
const r = j(), { teamPromoHighlights: i = [] } = O(), c = a ? we(a) : null, l = [
|
|
376
|
+
a && a.includedSeats > 0 ? `含 ${E(a.includedSeats)} 个成员席位` : "",
|
|
377
|
+
a && a.monthlyPoints > 0 ? `每月 ${E(a.monthlyPoints)} 积分` : "",
|
|
378
378
|
"套餐和积分团队共用",
|
|
379
379
|
...i
|
|
380
380
|
].filter(Boolean);
|
|
@@ -395,7 +395,7 @@ const ht = {
|
|
|
395
395
|
t ? /* @__PURE__ */ s("div", { className: S.action, children: [
|
|
396
396
|
/* @__PURE__ */ s(ce, { className: S.cta, href: t, target: "_blank", "aria-label": "开通团队版(在统一账号中心打开)", children: [
|
|
397
397
|
"开通团队版",
|
|
398
|
-
/* @__PURE__ */ e(
|
|
398
|
+
/* @__PURE__ */ e(ge, { className: S.ctaIcon, "aria-hidden": "true" })
|
|
399
399
|
] }),
|
|
400
400
|
c ? /* @__PURE__ */ s("span", { className: S.price, children: [
|
|
401
401
|
Pe(c),
|
|
@@ -404,83 +404,83 @@ const ht = {
|
|
|
404
404
|
] }) : null
|
|
405
405
|
] });
|
|
406
406
|
}, oa = ({ data: t, focusPlan: a }) => {
|
|
407
|
-
var
|
|
408
|
-
const { config: r } =
|
|
409
|
-
return /* @__PURE__ */ s(
|
|
410
|
-
/* @__PURE__ */ s(
|
|
407
|
+
var T;
|
|
408
|
+
const { config: r } = D(), { session: i, activeSpace: c, activeSpaceId: l, wallet: o, subscription: d, allowed: u } = t, _ = Ce(u), m = i == null ? void 0 : i.accountCenterUrl, y = c ? Y(c) : !1, N = ke(c), A = c ? Q(c) : "当前空间", U = `${window.location.origin}${G(r.routes.app, "subscription")}`, I = (T = o.data) == null ? void 0 : T.productCode, C = te(m, { productCode: I, returnUrl: U, spaceId: y ? l : void 0 }), b = te(m, { productCode: I, returnUrl: U, spaceType: "team" }), R = q(m, "orders"), k = d.isError && re(d.error), v = d.data, L = (f) => N ? /* @__PURE__ */ e(F, { type: "primary", href: C, label: `${f}(在统一账号中心打开)`, children: f }) : /* @__PURE__ */ e("span", { className: n.ownerOnly, children: k ? "请团队所有者续费" : "请团队所有者购买" });
|
|
409
|
+
return /* @__PURE__ */ s($, { children: [
|
|
410
|
+
/* @__PURE__ */ s(x, { className: n.heroCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
411
411
|
/* @__PURE__ */ s("div", { className: n.hero, "data-tone": k ? "warning" : "primary", children: [
|
|
412
412
|
/* @__PURE__ */ s("div", { className: n.heroMain, children: [
|
|
413
|
-
/* @__PURE__ */ s("span", { className: n.heroEyebrow, title:
|
|
414
|
-
/* @__PURE__ */ e(
|
|
413
|
+
/* @__PURE__ */ s("span", { className: n.heroEyebrow, title: A, children: [
|
|
414
|
+
/* @__PURE__ */ e(ze, { "aria-hidden": "true" }),
|
|
415
415
|
/* @__PURE__ */ s("span", { className: n.heroEyebrowText, children: [
|
|
416
416
|
"当前套餐 · ",
|
|
417
|
-
|
|
417
|
+
A
|
|
418
418
|
] })
|
|
419
419
|
] }),
|
|
420
|
-
d.isPending ? /* @__PURE__ */ e(H, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(H.Paragraph, { rows: 2, className: n.heroSkeleton }) }) : k ? /* @__PURE__ */ s(
|
|
420
|
+
d.isPending ? /* @__PURE__ */ e(H, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(H.Paragraph, { rows: 2, className: n.heroSkeleton }) }) : k ? /* @__PURE__ */ s($, { children: [
|
|
421
421
|
/* @__PURE__ */ e("span", { className: n.heroValue, children: "团队版已到期" }),
|
|
422
422
|
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "该团队的团队版已到期,请在统一账号中心续费后再使用,续费后成员继续共用套餐和积分。" })
|
|
423
|
-
] }) : d.isError ? /* @__PURE__ */ s(
|
|
423
|
+
] }) : d.isError ? /* @__PURE__ */ s($, { children: [
|
|
424
424
|
/* @__PURE__ */ e("span", { className: n.heroValue, children: "暂不可用" }),
|
|
425
425
|
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "暂时读不到当前套餐,请稍后重试。" })
|
|
426
|
-
] }) : v ? /* @__PURE__ */ s(
|
|
427
|
-
/* @__PURE__ */ e("span", { className: n.heroValue, children:
|
|
426
|
+
] }) : v ? /* @__PURE__ */ s($, { children: [
|
|
427
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, children: Le(v) }),
|
|
428
428
|
/* @__PURE__ */ s("span", { className: n.heroMeta, children: [
|
|
429
|
-
/* @__PURE__ */ e(
|
|
429
|
+
/* @__PURE__ */ e(ye, { size: "small", color: "green", children: "生效中" }),
|
|
430
430
|
Xe(v)
|
|
431
431
|
] })
|
|
432
|
-
] }) : /* @__PURE__ */ s(
|
|
432
|
+
] }) : /* @__PURE__ */ s($, { children: [
|
|
433
433
|
/* @__PURE__ */ e("span", { className: n.heroValue, children: "未开通" }),
|
|
434
434
|
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "当前空间还没有生效的套餐。" })
|
|
435
435
|
] })
|
|
436
436
|
] }),
|
|
437
437
|
/* @__PURE__ */ s("div", { className: n.heroActions, children: [
|
|
438
|
-
d.isError && !k ? /* @__PURE__ */ e(w, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(
|
|
439
|
-
d.isPending ? null : k ?
|
|
438
|
+
d.isError && !k ? /* @__PURE__ */ e(w, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(fe, { "aria-hidden": "true" }), onClick: () => void d.refetch(), children: "重试" }) : null,
|
|
439
|
+
d.isPending ? null : k ? L("续费团队版") : v && !v.isDefault ? L("续费或升级") : L(v ? "升级套餐" : "选择套餐")
|
|
440
440
|
] })
|
|
441
441
|
] }),
|
|
442
442
|
/* @__PURE__ */ s("div", { className: n.heroFoot, children: [
|
|
443
443
|
/* @__PURE__ */ e("span", { children: "套餐属于当前空间,对 24.city 所有产品同时生效;购买、续费和发票在统一账号中心办理。" }),
|
|
444
|
-
/* @__PURE__ */ e(
|
|
444
|
+
/* @__PURE__ */ e(F, { type: "text", size: "small", href: R, label: "订单记录(在统一账号中心打开)", children: "订单记录" })
|
|
445
445
|
] })
|
|
446
446
|
] }),
|
|
447
447
|
/* @__PURE__ */ e(Qn, { data: t, focusPlan: a }),
|
|
448
|
-
c && !
|
|
448
|
+
c && !y ? /* @__PURE__ */ e(ca, { href: b, plan: We(_.data) }) : null
|
|
449
449
|
] });
|
|
450
|
-
}, la = ({ subscription: t }) => t.isPending ? "读取中" : t.isError ? re(t.error) ? "团队版已到期" : "暂不可用" : t.data ?
|
|
451
|
-
var
|
|
452
|
-
const { section: t = "" } = qe(), { config: a } =
|
|
450
|
+
}, la = ({ subscription: t }) => t.isPending ? "读取中" : t.isError ? re(t.error) ? "团队版已到期" : "暂不可用" : t.data ? Le(t.data) : "未开通", da = ({ wallet: t }) => t.isPending ? "读取中" : t.data ? E(t.data.availablePoints) : "暂不可用", Da = () => {
|
|
451
|
+
var T;
|
|
452
|
+
const { section: t = "" } = qe(), { config: a } = D(), r = j(), i = O(), { PointsDetail: c } = i, l = Ze(i), o = l.find((f) => f.key === t), d = ae(), u = et(se().state), _ = tt(), { confirmLogout: m, pending: y } = nt(), N = a.routes.app;
|
|
453
453
|
if (!at(t) && !o) return /* @__PURE__ */ e(ie, { replace: !0, to: G(N, "profile") });
|
|
454
|
-
const
|
|
454
|
+
const A = {
|
|
455
455
|
profile: "你的统一账号与当前空间。密码、登录设备和团队成员在 24.city 统一账号中心管理,所有产品同步生效。",
|
|
456
456
|
subscription: "当前空间的套餐与权益,以统一账号中心为准;购买、续费和升级都在统一账号中心完成。",
|
|
457
457
|
points: c ? `当前空间的可用积分,以及你在 ${r.shortName} 里的扣费明细。` : "当前空间的可用积分,由统一账号中心记账。"
|
|
458
|
-
},
|
|
458
|
+
}, U = o ? o.description : A[t], I = st(N, l).items, C = I.find((f) => f.to === G(N, t)), { activeSpace: b, profile: R, allowed: k } = _, v = ((T = R.data) == null ? void 0 : T.nickName) ?? "", L = Se(b == null ? void 0 : b.role);
|
|
459
459
|
return /* @__PURE__ */ s("div", { className: n.center, children: [
|
|
460
|
-
/* @__PURE__ */ e("aside", { className: n.aside, "aria-label": "个人中心", children: /* @__PURE__ */ s(
|
|
460
|
+
/* @__PURE__ */ e("aside", { className: n.aside, "aria-label": "个人中心", children: /* @__PURE__ */ s(x, { className: n.identityCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
461
461
|
/* @__PURE__ */ s("div", { className: n.identity, children: [
|
|
462
|
-
/* @__PURE__ */ e(
|
|
462
|
+
/* @__PURE__ */ e(Ue, { size: "medium", shape: "circle", className: n.identityAvatar, children: v ? Array.from(v)[0] : /* @__PURE__ */ e(de, { "aria-hidden": "true" }) }),
|
|
463
463
|
/* @__PURE__ */ s("div", { className: n.identityText, children: [
|
|
464
|
-
/* @__PURE__ */ e("span", { className: n.identityName, title: v || void 0, children: v || (
|
|
464
|
+
/* @__PURE__ */ e("span", { className: n.identityName, title: v || void 0, children: v || (R.isPending ? "" : it) }),
|
|
465
465
|
b ? /* @__PURE__ */ s("span", { className: n.identitySpace, children: [
|
|
466
466
|
Y(b) ? /* @__PURE__ */ e(Ne, { "aria-hidden": "true" }) : /* @__PURE__ */ e(de, { "aria-hidden": "true" }),
|
|
467
467
|
/* @__PURE__ */ e("span", { className: n.identitySpaceName, children: Q(b) }),
|
|
468
|
-
|
|
468
|
+
L ? /* @__PURE__ */ e("span", { className: n.identityRole, children: L }) : null
|
|
469
469
|
] }) : null
|
|
470
470
|
] })
|
|
471
471
|
] }),
|
|
472
472
|
k ? /* @__PURE__ */ s("div", { className: n.identityStats, children: [
|
|
473
473
|
/* @__PURE__ */ s("div", { className: n.identityStat, children: [
|
|
474
474
|
/* @__PURE__ */ e("span", { className: n.identityStatLabel, children: "当前套餐" }),
|
|
475
|
-
/* @__PURE__ */ e("span", { className: n.identityStatValue, children: la(
|
|
475
|
+
/* @__PURE__ */ e("span", { className: n.identityStatValue, children: la(_) })
|
|
476
476
|
] }),
|
|
477
477
|
/* @__PURE__ */ s("div", { className: n.identityStat, children: [
|
|
478
478
|
/* @__PURE__ */ e("span", { className: n.identityStatLabel, children: "可用积分" }),
|
|
479
|
-
/* @__PURE__ */ e("span", { className: n.identityStatValue, children: da(
|
|
479
|
+
/* @__PURE__ */ e("span", { className: n.identityStatValue, children: da(_) })
|
|
480
480
|
] })
|
|
481
481
|
] }) : null,
|
|
482
|
-
/* @__PURE__ */ e("nav", { className: n.nav, "aria-label": "个人中心分区", children:
|
|
483
|
-
const J =
|
|
482
|
+
/* @__PURE__ */ e("nav", { className: n.nav, "aria-label": "个人中心分区", children: I.map((f) => {
|
|
483
|
+
const J = f === C;
|
|
484
484
|
return /* @__PURE__ */ s(
|
|
485
485
|
w,
|
|
486
486
|
{
|
|
@@ -488,32 +488,32 @@ const ht = {
|
|
|
488
488
|
type: "tertiary",
|
|
489
489
|
className: n.navItem,
|
|
490
490
|
"aria-current": J ? "page" : void 0,
|
|
491
|
-
onClick: () => d(
|
|
491
|
+
onClick: () => d(f.to),
|
|
492
492
|
children: [
|
|
493
|
-
|
|
494
|
-
/* @__PURE__ */ e("span", { className: n.navLabel, children:
|
|
493
|
+
f.icon ? /* @__PURE__ */ e("span", { className: n.navIcon, "aria-hidden": "true", children: /* @__PURE__ */ e(f.icon, {}) }) : null,
|
|
494
|
+
/* @__PURE__ */ e("span", { className: n.navLabel, children: f.label }),
|
|
495
495
|
/* @__PURE__ */ e(He, { className: n.navArrow, "aria-hidden": "true" })
|
|
496
496
|
]
|
|
497
497
|
},
|
|
498
|
-
|
|
498
|
+
f.key
|
|
499
499
|
);
|
|
500
500
|
}) }),
|
|
501
|
-
/* @__PURE__ */ e("div", { className: n.asideFoot, children: /* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", className: n.logout, icon: /* @__PURE__ */ e(Ge, { "aria-hidden": "true" }), disabled:
|
|
501
|
+
/* @__PURE__ */ e("div", { className: n.asideFoot, children: /* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", className: n.logout, icon: /* @__PURE__ */ e(Ge, { "aria-hidden": "true" }), disabled: y, onClick: m, children: "退出登录" }) })
|
|
502
502
|
] }) }),
|
|
503
503
|
/* @__PURE__ */ s("div", { className: n.main, children: [
|
|
504
504
|
/* @__PURE__ */ s("header", { className: n.head, children: [
|
|
505
505
|
/* @__PURE__ */ e(W.Title, { heading: 1, className: n.title, children: C == null ? void 0 : C.label }),
|
|
506
|
-
/* @__PURE__ */ e(W.Paragraph, { className: n.description, children:
|
|
506
|
+
/* @__PURE__ */ e(W.Paragraph, { className: n.description, children: U })
|
|
507
507
|
] }),
|
|
508
|
-
k ? o ? /* @__PURE__ */ e(o.Component, { data:
|
|
508
|
+
k ? o ? /* @__PURE__ */ e(o.Component, { data: _ }) : t === "profile" ? /* @__PURE__ */ e(gn, { data: _ }) : t === "subscription" ? /* @__PURE__ */ e(oa, { data: _, focusPlan: u }) : /* @__PURE__ */ e(yn, { data: _ }) : /* @__PURE__ */ e(je, {})
|
|
509
509
|
] })
|
|
510
510
|
] });
|
|
511
|
-
},
|
|
512
|
-
const t = se(), a = ae(), { accountApi: r, config: i } =
|
|
513
|
-
return
|
|
514
|
-
c && !o && !l && !Je() && !he() && window.location.replace(
|
|
515
|
-
}, [c,
|
|
516
|
-
|
|
511
|
+
}, Ba = () => {
|
|
512
|
+
const t = se(), a = ae(), { accountApi: r, config: i } = D(), { bootstrapped: c, serviceUnavailable: l, session: o } = be(), d = ve(new URLSearchParams(t.search).get("returnPath"), i.routes.app), u = r.startLogin(d, i.routes.app);
|
|
513
|
+
return $e(() => {
|
|
514
|
+
c && !o && !l && !Je() && !he() && window.location.replace(u);
|
|
515
|
+
}, [c, u, l, o]), c && o ? /* @__PURE__ */ e(ie, { to: d, replace: !0 }) : c && !o && he() ? /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(
|
|
516
|
+
z,
|
|
517
517
|
{
|
|
518
518
|
status: "info",
|
|
519
519
|
title: "已退出登录",
|
|
@@ -525,7 +525,7 @@ const ht = {
|
|
|
525
525
|
theme: "solid",
|
|
526
526
|
type: "primary",
|
|
527
527
|
onClick: () => {
|
|
528
|
-
|
|
528
|
+
pe(), window.location.replace(u);
|
|
529
529
|
},
|
|
530
530
|
children: "重新登录"
|
|
531
531
|
}
|
|
@@ -536,7 +536,7 @@ const ht = {
|
|
|
536
536
|
theme: "light",
|
|
537
537
|
type: "tertiary",
|
|
538
538
|
onClick: () => {
|
|
539
|
-
|
|
539
|
+
pe(), a(i.routes.publicHome);
|
|
540
540
|
},
|
|
541
541
|
children: "返回首页"
|
|
542
542
|
}
|
|
@@ -544,33 +544,33 @@ const ht = {
|
|
|
544
544
|
] })
|
|
545
545
|
}
|
|
546
546
|
) }) : /* @__PURE__ */ e(Z, { children: l ? /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
547
|
-
|
|
547
|
+
z,
|
|
548
548
|
{
|
|
549
549
|
status: "error",
|
|
550
550
|
title: "统一账号服务暂不可用",
|
|
551
551
|
description: "请稍后重试。",
|
|
552
552
|
extra: /* @__PURE__ */ s(le, { spacing: 12, children: [
|
|
553
|
-
/* @__PURE__ */ e(w, { theme: "solid", type: "primary", onClick: () => window.location.replace(
|
|
553
|
+
/* @__PURE__ */ e(w, { theme: "solid", type: "primary", onClick: () => window.location.replace(u), children: "重试" }),
|
|
554
554
|
/* @__PURE__ */ e(w, { theme: "light", type: "tertiary", onClick: () => a(i.routes.publicHome), children: "返回首页" })
|
|
555
555
|
] })
|
|
556
556
|
}
|
|
557
|
-
) }) : /* @__PURE__ */ e(
|
|
558
|
-
}, ha = "_pill_7o99a_2",
|
|
557
|
+
) }) : /* @__PURE__ */ e(z, { status: "loading", title: "正在前往统一登录…" }) });
|
|
558
|
+
}, ha = "_pill_7o99a_2", pa = "_upgrade_7o99a_24", ue = {
|
|
559
559
|
pill: ha,
|
|
560
|
-
upgrade:
|
|
561
|
-
},
|
|
560
|
+
upgrade: pa
|
|
561
|
+
}, Va = ({ quota: t, unit: a, onUpgrade: r }) => {
|
|
562
562
|
if (!t) return null;
|
|
563
563
|
const i = rt(t);
|
|
564
|
-
return /* @__PURE__ */ s("span", { className:
|
|
564
|
+
return /* @__PURE__ */ s("span", { className: ue.pill, "data-full": i ? "true" : "false", role: "status", children: [
|
|
565
565
|
/* @__PURE__ */ e("span", { children: ct(t, a) }),
|
|
566
|
-
i ? /* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", size: "small", className:
|
|
566
|
+
i ? /* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", size: "small", className: ue.upgrade, onClick: r, children: "升级" }) : null
|
|
567
567
|
] });
|
|
568
|
-
},
|
|
569
|
-
const a = se(), { config: r } =
|
|
568
|
+
}, za = ({ children: t }) => {
|
|
569
|
+
const a = se(), { config: r } = D(), { bootstrapped: i, serviceUnavailable: c, session: l } = be();
|
|
570
570
|
if (!i) return /* @__PURE__ */ e(Qe, {});
|
|
571
571
|
if (c)
|
|
572
572
|
return /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
573
|
-
|
|
573
|
+
z,
|
|
574
574
|
{
|
|
575
575
|
status: "error",
|
|
576
576
|
title: "账号服务暂不可用",
|
|
@@ -582,14 +582,14 @@ const ht = {
|
|
|
582
582
|
const o = ve(a.pathname + a.search, r.routes.app);
|
|
583
583
|
return /* @__PURE__ */ e(ie, { to: `${r.routes.login}?returnPath=${encodeURIComponent(o)}`, replace: !0 });
|
|
584
584
|
}
|
|
585
|
-
return /* @__PURE__ */ e(
|
|
586
|
-
},
|
|
587
|
-
modal:
|
|
588
|
-
hero:
|
|
589
|
-
badge:
|
|
590
|
-
art:
|
|
591
|
-
title:
|
|
592
|
-
description:
|
|
585
|
+
return /* @__PURE__ */ e($, { children: t });
|
|
586
|
+
}, _a = "_modal_e9iw1_6", ma = "_hero_e9iw1_27", ua = "_badge_e9iw1_39", ya = "_art_e9iw1_52", ga = "_title_e9iw1_65", fa = "_description_e9iw1_73", Na = "_body_e9iw1_80", ba = "_offer_e9iw1_87", va = "_offerName_e9iw1_93", Sa = "_lines_e9iw1_99", wa = "_line_e9iw1_99", Ca = "_check_e9iw1_114", ka = "_cta_e9iw1_127", Pa = "_ctaPrice_e9iw1_144", La = "_ownerOnly_e9iw1_153", $a = "_later_e9iw1_161", g = {
|
|
587
|
+
modal: _a,
|
|
588
|
+
hero: ma,
|
|
589
|
+
badge: ua,
|
|
590
|
+
art: ya,
|
|
591
|
+
title: ga,
|
|
592
|
+
description: fa,
|
|
593
593
|
body: Na,
|
|
594
594
|
offer: ba,
|
|
595
595
|
offerName: va,
|
|
@@ -598,70 +598,70 @@ const ht = {
|
|
|
598
598
|
check: Ca,
|
|
599
599
|
cta: ka,
|
|
600
600
|
ctaPrice: Pa,
|
|
601
|
-
ownerOnly:
|
|
602
|
-
later:
|
|
601
|
+
ownerOnly: La,
|
|
602
|
+
later: $a
|
|
603
603
|
}, Ha = ({
|
|
604
604
|
title: t,
|
|
605
605
|
description: a,
|
|
606
606
|
art: r = "engine",
|
|
607
607
|
onClose: i
|
|
608
608
|
}) => {
|
|
609
|
-
const c = ae(), l =
|
|
610
|
-
return /* @__PURE__ */ s(
|
|
611
|
-
/* @__PURE__ */ s("div", { className:
|
|
612
|
-
/* @__PURE__ */ e("span", { className:
|
|
613
|
-
/* @__PURE__ */ e("span", { className:
|
|
614
|
-
/* @__PURE__ */ e("span", { className:
|
|
615
|
-
/* @__PURE__ */ e("span", { className:
|
|
609
|
+
const c = ae(), l = O(), { offer: o, plans: d, canBuy: u, subscriptionPath: _ } = ot(), m = o ? xe(o.plan, d.data ?? [], l).filter((N) => N.included).slice(0, 5).map((N) => N.text) : [], y = o != null && o.price ? `${Pe(o.price)}起` : "";
|
|
610
|
+
return /* @__PURE__ */ s(Re, { visible: !0, header: null, footer: null, onCancel: i, className: g.modal, centered: !0, children: [
|
|
611
|
+
/* @__PURE__ */ s("div", { className: g.hero, "data-art": r, children: [
|
|
612
|
+
/* @__PURE__ */ e("span", { className: g.badge, children: "会员专享" }),
|
|
613
|
+
/* @__PURE__ */ e("span", { className: g.art, "aria-hidden": "true" }),
|
|
614
|
+
/* @__PURE__ */ e("span", { className: g.title, children: t }),
|
|
615
|
+
/* @__PURE__ */ e("span", { className: g.description, children: a })
|
|
616
616
|
] }),
|
|
617
|
-
/* @__PURE__ */ s("div", { className:
|
|
618
|
-
o ? /* @__PURE__ */ s("span", { className:
|
|
617
|
+
/* @__PURE__ */ s("div", { className: g.body, children: [
|
|
618
|
+
o ? /* @__PURE__ */ s("span", { className: g.offer, children: [
|
|
619
619
|
"升级到",
|
|
620
|
-
/* @__PURE__ */ e("span", { className:
|
|
620
|
+
/* @__PURE__ */ e("span", { className: g.offerName, children: o.plan.name }),
|
|
621
621
|
"即可使用,同时获得:"
|
|
622
|
-
] }) : /* @__PURE__ */ e("span", { className:
|
|
623
|
-
|
|
624
|
-
/* @__PURE__ */ e("span", { className:
|
|
622
|
+
] }) : /* @__PURE__ */ e("span", { className: g.offer, children: "升级套餐即可使用。" }),
|
|
623
|
+
m.length ? /* @__PURE__ */ e("div", { className: g.lines, role: "list", "aria-label": "升级后的权益", children: m.map((N) => /* @__PURE__ */ s("div", { className: g.line, role: "listitem", children: [
|
|
624
|
+
/* @__PURE__ */ e("span", { className: g.check, "aria-hidden": "true", children: /* @__PURE__ */ e(ne, {}) }),
|
|
625
625
|
N
|
|
626
626
|
] }, N)) }) : null,
|
|
627
|
-
|
|
627
|
+
u ? /* @__PURE__ */ s(
|
|
628
628
|
w,
|
|
629
629
|
{
|
|
630
630
|
theme: "light",
|
|
631
631
|
type: "tertiary",
|
|
632
632
|
block: !0,
|
|
633
|
-
className:
|
|
634
|
-
"aria-label": `立即升级${
|
|
633
|
+
className: g.cta,
|
|
634
|
+
"aria-label": `立即升级${y ? `,${y}` : ""}(打开订阅与套餐)`,
|
|
635
635
|
onClick: () => {
|
|
636
|
-
i(), c(
|
|
636
|
+
i(), c(_, { state: lt(o == null ? void 0 : o.plan.code) });
|
|
637
637
|
},
|
|
638
638
|
children: [
|
|
639
639
|
"立即升级",
|
|
640
|
-
|
|
640
|
+
y ? /* @__PURE__ */ e("span", { className: g.ctaPrice, children: y }) : null
|
|
641
641
|
]
|
|
642
642
|
}
|
|
643
|
-
) : /* @__PURE__ */ e("span", { className:
|
|
644
|
-
/* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", block: !0, className:
|
|
643
|
+
) : /* @__PURE__ */ e("span", { className: g.ownerOnly, children: "团队套餐由所有者在统一账号中心升级,请联系团队所有者。" }),
|
|
644
|
+
/* @__PURE__ */ e(w, { theme: "borderless", type: "tertiary", block: !0, className: g.later, onClick: i, children: "暂不升级" })
|
|
645
645
|
] })
|
|
646
646
|
] });
|
|
647
647
|
};
|
|
648
648
|
export {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
Da as A,
|
|
650
|
+
F as C,
|
|
651
|
+
Ba as L,
|
|
652
652
|
Qn as P,
|
|
653
|
-
|
|
654
|
-
|
|
653
|
+
Va as Q,
|
|
654
|
+
za as R,
|
|
655
655
|
K as S,
|
|
656
656
|
ca as T,
|
|
657
657
|
Ha as U,
|
|
658
|
-
|
|
659
|
-
|
|
658
|
+
yn as a,
|
|
659
|
+
gn as b,
|
|
660
660
|
oa as c,
|
|
661
661
|
q as d,
|
|
662
|
-
|
|
662
|
+
Te as e,
|
|
663
663
|
te as f,
|
|
664
664
|
bn as g,
|
|
665
|
-
|
|
665
|
+
xe as p,
|
|
666
666
|
vn as y
|
|
667
667
|
};
|