@24city/web-console 0.2.1 → 0.3.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/CHANGELOG.md +59 -0
- package/GUIDELINES.md +52 -6
- package/README.md +24 -5
- package/dist/account/index.js +2 -2
- package/dist/chunks/color-mode-DC4KIKya.js +40 -0
- package/dist/chunks/color-mode-switch-BinpVuZ0.js +24 -0
- package/dist/chunks/console-layout-D58Ux9DC.js +210 -0
- package/dist/chunks/form-layout-BDOTSKaB.js +75 -0
- package/dist/chunks/status-text-CKFIzlND.js +12 -0
- package/dist/chunks/upgrade-modal-DIINHIt0.js +667 -0
- package/dist/chunks/wallet-badge-n1ASGYJY.js +573 -0
- package/dist/chunks/waterfall-Cmz0ZULQ.js +614 -0
- package/dist/chunks/work-summary-DVmaOkCu.js +195 -0
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.js +5 -3
- package/dist/data/status-text.d.ts +15 -0
- package/dist/form/field.d.ts +30 -0
- package/dist/form/form-layout.d.ts +34 -0
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +182 -151
- package/dist/layout/index.js +1 -1
- package/dist/list/filter-panel.d.ts +10 -2
- package/dist/list/index.js +1 -1
- package/dist/page/color-mode-switch.d.ts +10 -0
- package/dist/page/index.d.ts +1 -0
- package/dist/page/index.js +24 -22
- package/dist/styles.css +1417 -394
- package/dist/theme/color-mode.d.ts +29 -0
- package/dist/theme/index.d.ts +15 -7
- package/dist/theme/index.js +56 -37
- package/dist/theme/palette.d.ts +6 -0
- package/dist/workbench/index.d.ts +3 -0
- package/dist/workbench/index.js +15 -0
- package/dist/workbench/step-tabs.d.ts +59 -0
- package/dist/workbench/work-canvas.d.ts +43 -0
- package/dist/workbench/work-summary.d.ts +47 -0
- package/package.json +11 -1
- package/dist/chunks/console-layout-BWz1qRog.js +0 -210
- package/dist/chunks/upgrade-modal-DgChxbLm.js +0 -667
- package/dist/chunks/wallet-badge-dVrO6py9.js +0 -565
- package/dist/chunks/waterfall-CQG8aVdx.js +0 -613
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { Card as x, Button as C, Typography as W, Tag as ge, Skeleton as j, Banner as Ee, RadioGroup as ze, Avatar as Fe, Space as le, Modal as Ue } from "@douyinfe/semi-ui";
|
|
3
|
+
import { IconExternalOpen as ye, IconGift as Re, IconRefresh as fe, IconLock as Me, IconDesktop as Oe, IconUserGroup as Ne, IconShield as De, IconTick as ne, IconMinus as Be, IconCrown as Ve, IconUser as de, IconChevronRight as je, IconExit as He } from "@douyinfe/semi-icons";
|
|
4
|
+
import { useParams as Ge, useNavigate as ae, useLocation as se, Navigate as ie } from "react-router";
|
|
5
|
+
import { S as qe, F as Z, e as V, c as Qe } from "./page-YBG0dEN1.js";
|
|
6
|
+
import { u as q, a as M, b as O } 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 me } from "./logout-signal-CiD_zY5M.js";
|
|
8
|
+
import { H as Q, I as Se, q as Y, l as Ke, J as Ce, m as ee, O as Pe, i as ke, r as ce, g as H, n as Le, z as we, 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 ct, G as rt, N as ot, x as lt } from "./wallet-badge-n1ASGYJY.js";
|
|
9
|
+
import { L as re } from "./link-button-giJEcTmG.js";
|
|
10
|
+
import { useState as dt, useRef as _e, useEffect as $e } from "react";
|
|
11
|
+
const ht = {
|
|
12
|
+
/** 统一资料(显示名称)、修改登录密码、登录设备与导出个人数据 */
|
|
13
|
+
settings: "/app/settings",
|
|
14
|
+
/** 当前空间在 24.city 各产品里的积分消耗 */
|
|
15
|
+
points: "/app/points",
|
|
16
|
+
/** 套餐和商品订单 */
|
|
17
|
+
orders: "/app/orders",
|
|
18
|
+
/** 加入的空间、团队成员与邀请 */
|
|
19
|
+
spaces: "/app/spaces"
|
|
20
|
+
}, Ie = (t) => {
|
|
21
|
+
const a = (t == null ? void 0 : t.trim()) ?? "";
|
|
22
|
+
if (!a) return null;
|
|
23
|
+
try {
|
|
24
|
+
const c = new URL(a);
|
|
25
|
+
return c.protocol !== "https:" && c.protocol !== "http:" ? null : `${c.origin}${c.pathname.replace(/\/+$/, "")}`;
|
|
26
|
+
} catch {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}, G = (t, a) => {
|
|
30
|
+
const c = Ie(t);
|
|
31
|
+
return c ? `${c}${ht[a]}` : null;
|
|
32
|
+
}, te = (t, a) => {
|
|
33
|
+
const c = Ie(t);
|
|
34
|
+
if (!c) return null;
|
|
35
|
+
const i = new URLSearchParams();
|
|
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), `${c}/plans?${i.toString()}`;
|
|
37
|
+
}, mt = "_center_14d6l_7", _t = "_aside_14d6l_21", ut = "_identityCard_14d6l_27", pt = "_identity_14d6l_27", gt = "_identityAvatar_14d6l_42", yt = "_identityText_14d6l_55", ft = "_identityName_14d6l_64", Nt = "_identitySpace_14d6l_76", bt = "_identitySpaceName_14d6l_91", vt = "_identityRole_14d6l_98", St = "_identityStats_14d6l_108", Ct = "_identityStat_14d6l_108", Pt = "_identityStatLabel_14d6l_129", kt = "_identityStatValue_14d6l_135", Lt = "_nav_14d6l_147", wt = "_navItem_14d6l_156", $t = "_navIcon_14d6l_191", It = "_navLabel_14d6l_202", Tt = "_navArrow_14d6l_207", xt = "_asideFoot_14d6l_223", At = "_logout_14d6l_228", Et = "_main_14d6l_249", zt = "_head_14d6l_262", Ft = "_title_14d6l_268", Ut = "_description_14d6l_277", Rt = "_card_14d6l_286", Mt = "_usage_14d6l_285", Ot = "_fields_14d6l_318", Dt = "_field_14d6l_318", Bt = "_fieldLabel_14d6l_331", Vt = "_fieldValue_14d6l_337", jt = "_fieldText_14d6l_345", Ht = "_fieldMuted_14d6l_358", Gt = "_fieldHint_14d6l_364", qt = "_mono_14d6l_370", Qt = "_inlineTag_14d6l_379", Yt = "_settingList_14d6l_384", Jt = "_settingRow_14d6l_389", Kt = "_settingIcon_14d6l_405", Xt = "_settingText_14d6l_418", Wt = "_settingTitle_14d6l_426", Zt = "_settingDescription_14d6l_433", en = "_settingAction_14d6l_439", tn = "_note_14d6l_443", nn = "_centerLink_14d6l_463", an = "_centerLinkIcon_14d6l_469", sn = "_heroCard_14d6l_477", cn = "_hero_14d6l_477", rn = "_heroMain_14d6l_501", on = "_heroEyebrow_14d6l_510", ln = "_heroEyebrowText_14d6l_525", dn = "_heroValue_14d6l_536", hn = "_heroMeta_14d6l_546", mn = "_heroActions_14d6l_560", _n = "_heroFoot_14d6l_569", un = "_ownerOnly_14d6l_587", pn = "_heroSkeleton_14d6l_709", n = {
|
|
38
|
+
center: mt,
|
|
39
|
+
aside: _t,
|
|
40
|
+
identityCard: ut,
|
|
41
|
+
identity: pt,
|
|
42
|
+
identityAvatar: gt,
|
|
43
|
+
identityText: yt,
|
|
44
|
+
identityName: ft,
|
|
45
|
+
identitySpace: Nt,
|
|
46
|
+
identitySpaceName: bt,
|
|
47
|
+
identityRole: vt,
|
|
48
|
+
identityStats: St,
|
|
49
|
+
identityStat: Ct,
|
|
50
|
+
identityStatLabel: Pt,
|
|
51
|
+
identityStatValue: kt,
|
|
52
|
+
nav: Lt,
|
|
53
|
+
navItem: wt,
|
|
54
|
+
navIcon: $t,
|
|
55
|
+
navLabel: It,
|
|
56
|
+
navArrow: Tt,
|
|
57
|
+
asideFoot: xt,
|
|
58
|
+
logout: At,
|
|
59
|
+
main: Et,
|
|
60
|
+
head: zt,
|
|
61
|
+
title: Ft,
|
|
62
|
+
description: Ut,
|
|
63
|
+
card: Rt,
|
|
64
|
+
usage: Mt,
|
|
65
|
+
fields: Ot,
|
|
66
|
+
field: Dt,
|
|
67
|
+
fieldLabel: Bt,
|
|
68
|
+
fieldValue: Vt,
|
|
69
|
+
fieldText: jt,
|
|
70
|
+
fieldMuted: Ht,
|
|
71
|
+
fieldHint: Gt,
|
|
72
|
+
mono: qt,
|
|
73
|
+
inlineTag: Qt,
|
|
74
|
+
settingList: Yt,
|
|
75
|
+
settingRow: Jt,
|
|
76
|
+
settingIcon: Kt,
|
|
77
|
+
settingText: Xt,
|
|
78
|
+
settingTitle: Wt,
|
|
79
|
+
settingDescription: Zt,
|
|
80
|
+
settingAction: en,
|
|
81
|
+
note: tn,
|
|
82
|
+
centerLink: nn,
|
|
83
|
+
centerLinkIcon: an,
|
|
84
|
+
heroCard: sn,
|
|
85
|
+
hero: cn,
|
|
86
|
+
heroMain: rn,
|
|
87
|
+
heroEyebrow: on,
|
|
88
|
+
heroEyebrowText: ln,
|
|
89
|
+
heroValue: dn,
|
|
90
|
+
heroMeta: hn,
|
|
91
|
+
heroActions: mn,
|
|
92
|
+
heroFoot: _n,
|
|
93
|
+
ownerOnly: un,
|
|
94
|
+
heroSkeleton: pn
|
|
95
|
+
}, z = ({
|
|
96
|
+
href: t,
|
|
97
|
+
children: a,
|
|
98
|
+
type: c = "secondary",
|
|
99
|
+
size: i = "default",
|
|
100
|
+
label: r
|
|
101
|
+
}) => t ? /* @__PURE__ */ s(
|
|
102
|
+
re,
|
|
103
|
+
{
|
|
104
|
+
theme: c === "primary" ? "solid" : c === "text" ? "borderless" : "light",
|
|
105
|
+
type: c === "primary" ? "primary" : "tertiary",
|
|
106
|
+
size: i,
|
|
107
|
+
href: t,
|
|
108
|
+
target: "_blank",
|
|
109
|
+
"aria-label": r,
|
|
110
|
+
className: n.centerLink,
|
|
111
|
+
children: [
|
|
112
|
+
a,
|
|
113
|
+
/* @__PURE__ */ e(ye, { className: n.centerLinkIcon, "aria-hidden": "true" })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
) : null, K = ({
|
|
117
|
+
icon: t,
|
|
118
|
+
title: a,
|
|
119
|
+
description: c,
|
|
120
|
+
action: i
|
|
121
|
+
}) => /* @__PURE__ */ s("div", { className: n.settingRow, children: [
|
|
122
|
+
/* @__PURE__ */ e("span", { className: n.settingIcon, "aria-hidden": "true", children: t }),
|
|
123
|
+
/* @__PURE__ */ s("div", { className: n.settingText, children: [
|
|
124
|
+
/* @__PURE__ */ e("span", { className: n.settingTitle, children: a }),
|
|
125
|
+
/* @__PURE__ */ e("span", { className: n.settingDescription, children: c })
|
|
126
|
+
] }),
|
|
127
|
+
i ? /* @__PURE__ */ e("div", { className: n.settingAction, children: i }) : null
|
|
128
|
+
] }), gn = ({ data: t }) => {
|
|
129
|
+
var g;
|
|
130
|
+
const a = q(), { PointsDetail: c } = M(), { session: i, activeSpace: r, activeSpaceId: l, globalUserId: o, wallet: d } = t, p = G(i == null ? void 0 : i.accountCenterUrl, "points"), _ = r ? Q(r) : "当前空间", u = (g = d.data) == null ? void 0 : g.availablePoints;
|
|
131
|
+
return /* @__PURE__ */ s($, { children: [
|
|
132
|
+
/* @__PURE__ */ s(x, { className: n.heroCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
133
|
+
/* @__PURE__ */ s("div", { className: n.hero, "data-tone": "primary", children: [
|
|
134
|
+
/* @__PURE__ */ s("div", { className: n.heroMain, children: [
|
|
135
|
+
/* @__PURE__ */ s("span", { className: n.heroEyebrow, title: _, children: [
|
|
136
|
+
/* @__PURE__ */ e(Re, { "aria-hidden": "true" }),
|
|
137
|
+
/* @__PURE__ */ s("span", { className: n.heroEyebrowText, children: [
|
|
138
|
+
"可用积分 · ",
|
|
139
|
+
_
|
|
140
|
+
] })
|
|
141
|
+
] }),
|
|
142
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, "aria-live": "polite", children: d.isPending ? "读取中" : d.isError || u === void 0 ? "暂不可用" : E(u) }),
|
|
143
|
+
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "积分属于当前空间,24.city 各产品共用。" })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ s("div", { className: n.heroActions, children: [
|
|
146
|
+
/* @__PURE__ */ e(C, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(fe, { "aria-hidden": "true" }), disabled: d.isFetching, onClick: () => void d.refetch(), children: "刷新" }),
|
|
147
|
+
/* @__PURE__ */ e(z, { type: "primary", href: p, label: "全部积分消耗(在统一账号中心打开)", children: "全部积分消耗" })
|
|
148
|
+
] })
|
|
149
|
+
] }),
|
|
150
|
+
/* @__PURE__ */ e("div", { className: n.heroFoot, children: /* @__PURE__ */ e("span", { children: c ? `下面是你本人在 ${a.shortName} 里的扣费明细;当前空间在 24.city 各产品里的全部积分消耗,请到统一账号中心查看。` : "当前空间在 24.city 各产品里的全部积分消耗,请到统一账号中心查看。" }) })
|
|
151
|
+
] }),
|
|
152
|
+
c ? /* @__PURE__ */ e("div", { className: n.usage, children: /* @__PURE__ */ e(c, { activeSpaceId: l, globalUserId: o }) }) : null
|
|
153
|
+
] });
|
|
154
|
+
}, B = ({ label: t, children: a, hint: c }) => /* @__PURE__ */ s("div", { className: n.field, children: [
|
|
155
|
+
/* @__PURE__ */ e("span", { className: n.fieldLabel, children: t }),
|
|
156
|
+
/* @__PURE__ */ s("div", { className: n.fieldValue, children: [
|
|
157
|
+
a,
|
|
158
|
+
c ? /* @__PURE__ */ e("span", { className: n.fieldHint, children: c }) : null
|
|
159
|
+
] })
|
|
160
|
+
] }), yn = ({ data: t }) => {
|
|
161
|
+
var g;
|
|
162
|
+
const a = q(), { session: c, activeSpace: i, profile: r, globalUserId: l } = t, o = c == null ? void 0 : c.accountCenterUrl, d = ((g = r.data) == null ? void 0 : g.nickName) ?? "", p = Se(i == null ? void 0 : i.role), _ = G(o, "settings"), u = G(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(B, { label: "昵称", hint: `首次登录 ${a.shortName} 时从统一账号带来`, children: /* @__PURE__ */ e("span", { className: n.fieldText, children: d || (r.isPending ? "读取中" : "未设置") }) }),
|
|
166
|
+
/* @__PURE__ */ e(B, { label: "统一账号 ID", hint: "联系客服时可以提供", children: /* @__PURE__ */ e(W.Text, { copyable: { copyTip: "复制", successTip: "已复制" }, className: n.mono, children: l }) }),
|
|
167
|
+
/* @__PURE__ */ e(B, { label: "当前空间", children: /* @__PURE__ */ s("span", { className: n.fieldText, children: [
|
|
168
|
+
i ? Q(i) : "暂不可用",
|
|
169
|
+
i && Y(i) ? /* @__PURE__ */ e(ge, { size: "small", color: "blue", className: n.inlineTag, children: "团队" }) : null,
|
|
170
|
+
p ? /* @__PURE__ */ s("span", { className: n.fieldMuted, children: [
|
|
171
|
+
"· 我是",
|
|
172
|
+
p
|
|
173
|
+
] }) : null
|
|
174
|
+
] }) }),
|
|
175
|
+
/* @__PURE__ */ e(B, { label: "本次登录有效至", hint: "到期后重新登录即可", children: /* @__PURE__ */ e("span", { className: n.fieldText, children: c ? Ye(c.absoluteExpiresAt) : "暂无" }) })
|
|
176
|
+
] }) }),
|
|
177
|
+
/* @__PURE__ */ s(x, { title: "登录与安全", className: n.card, bordered: !1, headerLine: !1, children: [
|
|
178
|
+
/* @__PURE__ */ s("div", { className: n.settingList, children: [
|
|
179
|
+
/* @__PURE__ */ e(
|
|
180
|
+
K,
|
|
181
|
+
{
|
|
182
|
+
icon: /* @__PURE__ */ e(Me, {}),
|
|
183
|
+
title: "登录密码",
|
|
184
|
+
description: "验证已绑定的手机号后修改。改完后,24.city 所有产品都用新密码登录。",
|
|
185
|
+
action: /* @__PURE__ */ e(z, { href: _, label: "修改密码(在统一账号中心打开)", children: "修改密码" })
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ e(
|
|
189
|
+
K,
|
|
190
|
+
{
|
|
191
|
+
icon: /* @__PURE__ */ e(Oe, {}),
|
|
192
|
+
title: "登录设备与个人数据",
|
|
193
|
+
description: "查看登录过的设备,导出你的个人数据。",
|
|
194
|
+
action: /* @__PURE__ */ e(z, { href: _, label: "查看登录设备(在统一账号中心打开)", children: "前往查看" })
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ e(
|
|
198
|
+
K,
|
|
199
|
+
{
|
|
200
|
+
icon: /* @__PURE__ */ e(Ne, {}),
|
|
201
|
+
title: "空间与成员",
|
|
202
|
+
description: "查看你加入的空间;团队所有者和管理员在这里邀请、管理成员。",
|
|
203
|
+
action: /* @__PURE__ */ e(z, { href: u, label: "管理空间与成员(在统一账号中心打开)", children: "前往管理" })
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ s("div", { className: n.note, children: [
|
|
208
|
+
/* @__PURE__ */ e(De, { "aria-hidden": "true" }),
|
|
209
|
+
/* @__PURE__ */ e("span", { children: _ ? `${a.shortName} 使用 24.city 统一账号登录,不保存你的密码和验证码。以上设置在统一账号中心修改,所有产品同步生效。` : "统一账号中心的地址暂时不可用,请稍后刷新页面再试。" })
|
|
210
|
+
] })
|
|
211
|
+
] })
|
|
212
|
+
] });
|
|
213
|
+
}, X = {
|
|
214
|
+
free: { tone: "basic", tagline: "先免费体验", benefits: [] },
|
|
215
|
+
standard: { tone: "standard", badge: "推荐", tagline: "个人用户的常用之选", benefits: ["按积分扣费,用多少扣多少"] },
|
|
216
|
+
pro: { tone: "pro", tagline: "高频使用,积分更充足", benefits: ["每月积分更多,适合批量使用"] }
|
|
217
|
+
}, fn = {
|
|
218
|
+
tone: "team",
|
|
219
|
+
tagline: "团队一起用,套餐和积分共用",
|
|
220
|
+
benefits: ["成员共用套餐和积分"]
|
|
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
|
+
var c;
|
|
223
|
+
return ((c = a.planCopy) == null ? void 0 : c[t.code]) ?? Nn(t, a);
|
|
224
|
+
}, xe = (t, a = [], c = {}) => {
|
|
225
|
+
const i = [], r = (l, o = !0) => {
|
|
226
|
+
i.some((d) => d.text === l) || i.push({ text: l, included: o });
|
|
227
|
+
};
|
|
228
|
+
t.monthlyPoints > 0 && r(t.isDefault ? `每月赠送 ${E(t.monthlyPoints)} 积分` : `每月 ${E(t.monthlyPoints)} 积分`), t.spaceType === "team" && t.includedSeats > 0 && r(`含 ${E(t.includedSeats)} 个成员席位`);
|
|
229
|
+
for (const l of Ke(t, a, c)) r(l.text, l.included);
|
|
230
|
+
for (const l of Te(t, c).benefits) r(l);
|
|
231
|
+
return i;
|
|
232
|
+
}, bn = (t, a) => t.prices.filter((r) => r.billingPeriod === a && r.amountCents > 0).reduce((r, l) => !r || l.amountCents < r.amountCents ? l : r, null) ?? Ce(t), vn = (t, a) => {
|
|
233
|
+
if (a.billingPeriod !== "year") return "";
|
|
234
|
+
const c = 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), r = i ? i.amountCents * 12 - a.amountCents : 0;
|
|
235
|
+
return r > 0 ? `约 ${c}/月 · 比月付省 ${ee({ amountCents: r, currency: a.currency })}` : `约 ${c}/月`;
|
|
236
|
+
}, Sn = "_subtitle_m4zgm_7", Cn = "_grid_m4zgm_16", Pn = "_skeleton_m4zgm_22", kn = "_card_m4zgm_30", Ln = "_section_m4zgm_62", wn = "_badge_m4zgm_90", $n = "_top_m4zgm_109", In = "_art_m4zgm_139", Tn = "_name_m4zgm_160", xn = "_tagline_m4zgm_178", An = "_price_m4zgm_195", En = "_amount_m4zgm_202", zn = "_period_m4zgm_218", Fn = "_priceNote_m4zgm_227", Un = "_body_m4zgm_244", Rn = "_benefits_m4zgm_252", Mn = "_benefit_m4zgm_252", On = "_check_m4zgm_268", Dn = "_action_m4zgm_304", Bn = "_cta_m4zgm_304", Vn = "_ctaCurrent_m4zgm_345", jn = "_ctaNote_m4zgm_354", m = {
|
|
237
|
+
subtitle: Sn,
|
|
238
|
+
grid: Cn,
|
|
239
|
+
skeleton: Pn,
|
|
240
|
+
card: kn,
|
|
241
|
+
section: Ln,
|
|
242
|
+
badge: wn,
|
|
243
|
+
top: $n,
|
|
244
|
+
art: In,
|
|
245
|
+
name: Tn,
|
|
246
|
+
tagline: xn,
|
|
247
|
+
price: An,
|
|
248
|
+
amount: En,
|
|
249
|
+
period: zn,
|
|
250
|
+
priceNote: Fn,
|
|
251
|
+
body: Un,
|
|
252
|
+
benefits: Rn,
|
|
253
|
+
benefit: Mn,
|
|
254
|
+
check: On,
|
|
255
|
+
action: Dn,
|
|
256
|
+
cta: Bn,
|
|
257
|
+
ctaCurrent: Vn,
|
|
258
|
+
ctaNote: jn
|
|
259
|
+
}, Hn = { month: "/月", year: "/年", one_time: "" }, Gn = [
|
|
260
|
+
{ label: "按月付", value: "month" },
|
|
261
|
+
{ label: "按年付", value: "year" }
|
|
262
|
+
], ue = (t, a) => t.some((c) => c.prices.some((i) => i.billingPeriod === a && i.amountCents > 0)), qn = ({
|
|
263
|
+
plan: t,
|
|
264
|
+
price: a,
|
|
265
|
+
catalog: c,
|
|
266
|
+
current: i,
|
|
267
|
+
focus: r,
|
|
268
|
+
action: l,
|
|
269
|
+
custom: o
|
|
270
|
+
}) => {
|
|
271
|
+
const d = Te(t, o), p = a ? vn(t, a) : "长期有效", _ = d.badge ?? (r ? "推荐升级" : void 0);
|
|
272
|
+
return /* @__PURE__ */ s(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
className: m.card,
|
|
276
|
+
"data-tone": d.tone,
|
|
277
|
+
"data-current": i ? "true" : "false",
|
|
278
|
+
"data-focus": r && !i ? "true" : "false",
|
|
279
|
+
role: "group",
|
|
280
|
+
"aria-label": t.name,
|
|
281
|
+
children: [
|
|
282
|
+
i ? /* @__PURE__ */ e("span", { className: m.badge, "data-kind": "current", children: "当前套餐" }) : _ ? /* @__PURE__ */ e("span", { className: m.badge, children: _ }) : null,
|
|
283
|
+
/* @__PURE__ */ s("div", { className: d.tone === "pro" ? `${m.top} semi-always-light` : m.top, children: [
|
|
284
|
+
/* @__PURE__ */ e("span", { className: m.art, "aria-hidden": "true" }),
|
|
285
|
+
/* @__PURE__ */ e("span", { className: m.name, children: t.name }),
|
|
286
|
+
/* @__PURE__ */ e("span", { className: m.tagline, children: d.tagline }),
|
|
287
|
+
/* @__PURE__ */ e("span", { className: m.price, children: a ? /* @__PURE__ */ s($, { children: [
|
|
288
|
+
/* @__PURE__ */ e("span", { className: m.amount, children: ee(a) }),
|
|
289
|
+
/* @__PURE__ */ e("span", { className: m.period, children: Hn[a.billingPeriod] })
|
|
290
|
+
] }) : /* @__PURE__ */ e("span", { className: m.amount, children: "免费" }) }),
|
|
291
|
+
/* @__PURE__ */ e("span", { className: m.priceNote, children: p || " " })
|
|
292
|
+
] }),
|
|
293
|
+
/* @__PURE__ */ s("div", { className: m.body, children: [
|
|
294
|
+
/* @__PURE__ */ e("div", { className: m.benefits, role: "list", "aria-label": `${t.name}权益`, children: xe(t, c, o).map((u) => /* @__PURE__ */ s("div", { className: m.benefit, "data-included": u.included ? "true" : "false", role: "listitem", children: [
|
|
295
|
+
/* @__PURE__ */ e("span", { className: m.check, "aria-hidden": "true", children: u.included ? /* @__PURE__ */ e(ne, {}) : /* @__PURE__ */ e(Be, {}) }),
|
|
296
|
+
/* @__PURE__ */ e("span", { children: u.text })
|
|
297
|
+
] }, u.text)) }),
|
|
298
|
+
/* @__PURE__ */ e("div", { className: m.action, children: l })
|
|
299
|
+
] })
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}, Qn = ({ data: t, focusPlan: a }) => {
|
|
304
|
+
const { config: c } = O(), i = M(), { session: r, activeSpace: l, activeSpaceId: o, subscription: d, wallet: p, allowed: _ } = t, u = Pe(_), [g, N] = dt("month"), A = l ? Y(l) : !1, F = ke(l), I = d.isError && ce(d.error), P = d.data ?? null, b = (u.data ?? []).filter((h) => h.spaceType === (A ? "team" : "personal")), U = `${window.location.origin}${H(c.routes.app, "subscription")}`, k = (h) => {
|
|
305
|
+
var L;
|
|
306
|
+
return te(r == null ? void 0 : r.accountCenterUrl, { productCode: (L = p.data) == null ? void 0 : L.productCode, returnUrl: U, spaceId: A ? o : void 0, priceCode: h });
|
|
307
|
+
}, v = ue(b, "month") && ue(b, "year"), w = _e(null), T = _e(!1), f = !!(a && b.some((h) => h.code === a));
|
|
308
|
+
$e(() => {
|
|
309
|
+
var h, L;
|
|
310
|
+
!f || T.current || (T.current = !0, (L = (h = w.current) == null ? void 0 : h.scrollIntoView) == null || L.call(h, { behavior: "smooth", block: "start" }));
|
|
311
|
+
}, [f]);
|
|
312
|
+
const J = (h, L, R) => {
|
|
313
|
+
if (h.isDefault || !L)
|
|
314
|
+
return R ? /* @__PURE__ */ e(C, { theme: "light", type: "tertiary", block: !0, disabled: !0, className: m.ctaCurrent, children: "正在使用" }) : /* @__PURE__ */ e("span", { className: m.ctaNote, children: "会员到期后回到免费版" });
|
|
315
|
+
if (!F) return /* @__PURE__ */ e("span", { className: m.ctaNote, children: I ? "请团队所有者续费" : "请团队所有者购买" });
|
|
316
|
+
const D = R ? "续费" : I ? `续费${h.name}` : !P || P.isDefault ? "立即开通" : h.tier > P.tier ? `升级到${h.name}` : `选择${h.name}`, oe = k(L.code);
|
|
317
|
+
if (!oe) return null;
|
|
318
|
+
const Ae = D.includes(h.name) ? D : `${D}${h.name}`;
|
|
319
|
+
return /* @__PURE__ */ e(re, { block: !0, className: m.cta, href: oe, target: "_blank", "aria-label": `${Ae}(在统一账号中心打开)`, children: D });
|
|
320
|
+
};
|
|
321
|
+
return u.isPending ? /* @__PURE__ */ e(x, { title: "会员套餐", className: n.card, bordered: !1, headerLine: !1, children: /* @__PURE__ */ e("div", { className: m.grid, children: [0, 1, 2].map((h) => /* @__PURE__ */ e("div", { className: m.skeleton, children: /* @__PURE__ */ e(j, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(j.Paragraph, { rows: 4 }) }) }, h)) }) }) : u.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(z, { size: "small", href: k(), label: "查看全部套餐(在统一账号中心打开)", children: "查看全部套餐" }) }) }) : b.length ? /* @__PURE__ */ e("div", { ref: w, children: /* @__PURE__ */ s(
|
|
322
|
+
x,
|
|
323
|
+
{
|
|
324
|
+
title: "会员套餐",
|
|
325
|
+
className: `${n.card} ${m.section}`,
|
|
326
|
+
bordered: !1,
|
|
327
|
+
headerLine: !1,
|
|
328
|
+
headerExtraContent: v ? /* @__PURE__ */ e(
|
|
329
|
+
ze,
|
|
330
|
+
{
|
|
331
|
+
type: "button",
|
|
332
|
+
buttonSize: "small",
|
|
333
|
+
options: Gn,
|
|
334
|
+
value: g,
|
|
335
|
+
onChange: (h) => N(h.target.value),
|
|
336
|
+
"aria-label": "付费周期"
|
|
337
|
+
}
|
|
338
|
+
) : null,
|
|
339
|
+
children: [
|
|
340
|
+
/* @__PURE__ */ e("span", { className: m.subtitle, children: "价格取自 24.city 统一账号中心,点按钮去统一账号中心付款,付款后回到这里。" }),
|
|
341
|
+
/* @__PURE__ */ e("div", { className: m.grid, children: b.map((h) => {
|
|
342
|
+
const L = bn(h, g), R = !!(P && P.planCode === h.code);
|
|
343
|
+
return /* @__PURE__ */ e(
|
|
344
|
+
qn,
|
|
345
|
+
{
|
|
346
|
+
plan: h,
|
|
347
|
+
price: L,
|
|
348
|
+
catalog: u.data ?? [],
|
|
349
|
+
current: R,
|
|
350
|
+
focus: h.code === a,
|
|
351
|
+
action: J(h, L, R),
|
|
352
|
+
custom: i
|
|
353
|
+
},
|
|
354
|
+
h.code
|
|
355
|
+
);
|
|
356
|
+
}) })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
) }) : null;
|
|
360
|
+
}, Yn = "_team_13j8p_7", Jn = "_art_13j8p_22", Kn = "_text_13j8p_30", Xn = "_eyebrow_13j8p_39", Wn = "_title_13j8p_49", Zn = "_description_13j8p_57", ea = "_highlights_13j8p_63", ta = "_highlight_13j8p_63", na = "_highlightIcon_13j8p_83", aa = "_action_13j8p_88", sa = "_cta_13j8p_96", ia = "_ctaIcon_13j8p_116", ca = "_price_13j8p_121", S = {
|
|
361
|
+
team: Yn,
|
|
362
|
+
art: Jn,
|
|
363
|
+
text: Kn,
|
|
364
|
+
eyebrow: Xn,
|
|
365
|
+
title: Wn,
|
|
366
|
+
description: Zn,
|
|
367
|
+
highlights: ea,
|
|
368
|
+
highlight: ta,
|
|
369
|
+
highlightIcon: na,
|
|
370
|
+
action: aa,
|
|
371
|
+
cta: sa,
|
|
372
|
+
ctaIcon: ia,
|
|
373
|
+
price: ca
|
|
374
|
+
}, ra = ({ href: t, plan: a }) => {
|
|
375
|
+
const c = q(), { teamPromoHighlights: i = [] } = M(), r = a ? Ce(a) : null, l = [
|
|
376
|
+
a && a.includedSeats > 0 ? `含 ${E(a.includedSeats)} 个成员席位` : "",
|
|
377
|
+
a && a.monthlyPoints > 0 ? `每月 ${E(a.monthlyPoints)} 积分` : "",
|
|
378
|
+
"套餐和积分团队共用",
|
|
379
|
+
...i
|
|
380
|
+
].filter(Boolean);
|
|
381
|
+
return /* @__PURE__ */ s("section", { className: S.team, "aria-label": "开通团队版", children: [
|
|
382
|
+
/* @__PURE__ */ e("span", { className: S.art, "aria-hidden": "true" }),
|
|
383
|
+
/* @__PURE__ */ s("div", { className: S.text, children: [
|
|
384
|
+
/* @__PURE__ */ e("span", { className: S.eyebrow, children: "团队版" }),
|
|
385
|
+
/* @__PURE__ */ s("span", { className: S.title, children: [
|
|
386
|
+
"和同事一起用 ",
|
|
387
|
+
c.shortName
|
|
388
|
+
] }),
|
|
389
|
+
/* @__PURE__ */ e("span", { className: S.description, children: "开通团队版会创建一个团队空间,你是所有者;套餐、席位和积分归团队共用。" }),
|
|
390
|
+
/* @__PURE__ */ e("div", { className: S.highlights, role: "list", "aria-label": "团队版要点", children: l.map((o) => /* @__PURE__ */ s("span", { className: S.highlight, role: "listitem", children: [
|
|
391
|
+
/* @__PURE__ */ e(ne, { className: S.highlightIcon, "aria-hidden": "true" }),
|
|
392
|
+
o
|
|
393
|
+
] }, o)) })
|
|
394
|
+
] }),
|
|
395
|
+
t ? /* @__PURE__ */ s("div", { className: S.action, children: [
|
|
396
|
+
/* @__PURE__ */ s(re, { className: S.cta, href: t, target: "_blank", "aria-label": "开通团队版(在统一账号中心打开)", children: [
|
|
397
|
+
"开通团队版",
|
|
398
|
+
/* @__PURE__ */ e(ye, { className: S.ctaIcon, "aria-hidden": "true" })
|
|
399
|
+
] }),
|
|
400
|
+
r ? /* @__PURE__ */ s("span", { className: S.price, children: [
|
|
401
|
+
Le(r),
|
|
402
|
+
"起"
|
|
403
|
+
] }) : null
|
|
404
|
+
] }) : null
|
|
405
|
+
] });
|
|
406
|
+
}, oa = ({ data: t, focusPlan: a }) => {
|
|
407
|
+
var T;
|
|
408
|
+
const { config: c } = O(), { session: i, activeSpace: r, activeSpaceId: l, wallet: o, subscription: d, allowed: p } = t, _ = Pe(p), u = i == null ? void 0 : i.accountCenterUrl, g = r ? Y(r) : !1, N = ke(r), A = r ? Q(r) : "当前空间", F = `${window.location.origin}${H(c.routes.app, "subscription")}`, I = (T = o.data) == null ? void 0 : T.productCode, P = te(u, { productCode: I, returnUrl: F, spaceId: g ? l : void 0 }), b = te(u, { productCode: I, returnUrl: F, spaceType: "team" }), U = G(u, "orders"), k = d.isError && ce(d.error), v = d.data, w = (f) => N ? /* @__PURE__ */ e(z, { type: "primary", href: P, 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
|
+
/* @__PURE__ */ s("div", { className: n.hero, "data-tone": k ? "warning" : "primary", children: [
|
|
412
|
+
/* @__PURE__ */ s("div", { className: n.heroMain, children: [
|
|
413
|
+
/* @__PURE__ */ s("span", { className: n.heroEyebrow, title: A, children: [
|
|
414
|
+
/* @__PURE__ */ e(Ve, { "aria-hidden": "true" }),
|
|
415
|
+
/* @__PURE__ */ s("span", { className: n.heroEyebrowText, children: [
|
|
416
|
+
"当前套餐 · ",
|
|
417
|
+
A
|
|
418
|
+
] })
|
|
419
|
+
] }),
|
|
420
|
+
d.isPending ? /* @__PURE__ */ e(j, { loading: !0, active: !0, placeholder: /* @__PURE__ */ e(j.Paragraph, { rows: 2, className: n.heroSkeleton }) }) : k ? /* @__PURE__ */ s($, { children: [
|
|
421
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, children: "团队版已到期" }),
|
|
422
|
+
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "该团队的团队版已到期,请在统一账号中心续费后再使用,续费后成员继续共用套餐和积分。" })
|
|
423
|
+
] }) : d.isError ? /* @__PURE__ */ s($, { children: [
|
|
424
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, children: "暂不可用" }),
|
|
425
|
+
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "暂时读不到当前套餐,请稍后重试。" })
|
|
426
|
+
] }) : v ? /* @__PURE__ */ s($, { children: [
|
|
427
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, children: we(v) }),
|
|
428
|
+
/* @__PURE__ */ s("span", { className: n.heroMeta, children: [
|
|
429
|
+
/* @__PURE__ */ e(ge, { size: "small", color: "green", children: "生效中" }),
|
|
430
|
+
Xe(v)
|
|
431
|
+
] })
|
|
432
|
+
] }) : /* @__PURE__ */ s($, { children: [
|
|
433
|
+
/* @__PURE__ */ e("span", { className: n.heroValue, children: "未开通" }),
|
|
434
|
+
/* @__PURE__ */ e("span", { className: n.heroMeta, children: "当前空间还没有生效的套餐。" })
|
|
435
|
+
] })
|
|
436
|
+
] }),
|
|
437
|
+
/* @__PURE__ */ s("div", { className: n.heroActions, children: [
|
|
438
|
+
d.isError && !k ? /* @__PURE__ */ e(C, { theme: "light", type: "tertiary", icon: /* @__PURE__ */ e(fe, { "aria-hidden": "true" }), onClick: () => void d.refetch(), children: "重试" }) : null,
|
|
439
|
+
d.isPending ? null : k ? w("续费团队版") : v && !v.isDefault ? w("续费或升级") : w(v ? "升级套餐" : "选择套餐")
|
|
440
|
+
] })
|
|
441
|
+
] }),
|
|
442
|
+
/* @__PURE__ */ s("div", { className: n.heroFoot, children: [
|
|
443
|
+
/* @__PURE__ */ e("span", { children: "套餐属于当前空间,对 24.city 所有产品同时生效;购买、续费和发票在统一账号中心办理。" }),
|
|
444
|
+
/* @__PURE__ */ e(z, { type: "text", size: "small", href: U, label: "订单记录(在统一账号中心打开)", children: "订单记录" })
|
|
445
|
+
] })
|
|
446
|
+
] }),
|
|
447
|
+
/* @__PURE__ */ e(Qn, { data: t, focusPlan: a }),
|
|
448
|
+
r && !g ? /* @__PURE__ */ e(ra, { href: b, plan: We(_.data) }) : null
|
|
449
|
+
] });
|
|
450
|
+
}, la = ({ subscription: t }) => t.isPending ? "读取中" : t.isError ? ce(t.error) ? "团队版已到期" : "暂不可用" : t.data ? we(t.data) : "未开通", da = ({ wallet: t }) => t.isPending ? "读取中" : t.data ? E(t.data.availablePoints) : "暂不可用", Oa = () => {
|
|
451
|
+
var T;
|
|
452
|
+
const { section: t = "" } = Ge(), { config: a } = O(), c = q(), i = M(), { PointsDetail: r } = i, l = Ze(i), o = l.find((f) => f.key === t), d = ae(), p = et(se().state), _ = tt(), { confirmLogout: u, pending: g } = nt(), N = a.routes.app;
|
|
453
|
+
if (!at(t) && !o) return /* @__PURE__ */ e(ie, { replace: !0, to: H(N, "profile") });
|
|
454
|
+
const A = {
|
|
455
|
+
profile: "你的统一账号与当前空间。密码、登录设备和团队成员在 24.city 统一账号中心管理,所有产品同步生效。",
|
|
456
|
+
subscription: "当前空间的套餐与权益,以统一账号中心为准;购买、续费和升级都在统一账号中心完成。",
|
|
457
|
+
points: r ? `当前空间的可用积分,以及你在 ${c.shortName} 里的扣费明细。` : "当前空间的可用积分,由统一账号中心记账。"
|
|
458
|
+
}, F = o ? o.description : A[t], I = st(N, l).items, P = I.find((f) => f.to === H(N, t)), { activeSpace: b, profile: U, allowed: k } = _, v = ((T = U.data) == null ? void 0 : T.nickName) ?? "", w = Se(b == null ? void 0 : b.role);
|
|
459
|
+
return /* @__PURE__ */ s("div", { className: n.center, children: [
|
|
460
|
+
/* @__PURE__ */ e("aside", { className: n.aside, "aria-label": "个人中心", children: /* @__PURE__ */ s(x, { className: n.identityCard, bordered: !1, bodyStyle: { padding: 0 }, children: [
|
|
461
|
+
/* @__PURE__ */ s("div", { className: n.identity, children: [
|
|
462
|
+
/* @__PURE__ */ e(Fe, { size: "medium", shape: "circle", className: n.identityAvatar, children: v ? Array.from(v)[0] : /* @__PURE__ */ e(de, { "aria-hidden": "true" }) }),
|
|
463
|
+
/* @__PURE__ */ s("div", { className: n.identityText, children: [
|
|
464
|
+
/* @__PURE__ */ e("span", { className: n.identityName, title: v || void 0, children: v || (U.isPending ? "" : it) }),
|
|
465
|
+
b ? /* @__PURE__ */ s("span", { className: n.identitySpace, children: [
|
|
466
|
+
Y(b) ? /* @__PURE__ */ e(Ne, { "aria-hidden": "true" }) : /* @__PURE__ */ e(de, { "aria-hidden": "true" }),
|
|
467
|
+
/* @__PURE__ */ e("span", { className: n.identitySpaceName, children: Q(b) }),
|
|
468
|
+
w ? /* @__PURE__ */ e("span", { className: n.identityRole, children: w }) : null
|
|
469
|
+
] }) : null
|
|
470
|
+
] })
|
|
471
|
+
] }),
|
|
472
|
+
k ? /* @__PURE__ */ s("div", { className: n.identityStats, children: [
|
|
473
|
+
/* @__PURE__ */ s("div", { className: n.identityStat, children: [
|
|
474
|
+
/* @__PURE__ */ e("span", { className: n.identityStatLabel, children: "当前套餐" }),
|
|
475
|
+
/* @__PURE__ */ e("span", { className: n.identityStatValue, children: la(_) })
|
|
476
|
+
] }),
|
|
477
|
+
/* @__PURE__ */ s("div", { className: n.identityStat, children: [
|
|
478
|
+
/* @__PURE__ */ e("span", { className: n.identityStatLabel, children: "可用积分" }),
|
|
479
|
+
/* @__PURE__ */ e("span", { className: n.identityStatValue, children: da(_) })
|
|
480
|
+
] })
|
|
481
|
+
] }) : null,
|
|
482
|
+
/* @__PURE__ */ e("nav", { className: n.nav, "aria-label": "个人中心分区", children: I.map((f) => {
|
|
483
|
+
const J = f === P;
|
|
484
|
+
return /* @__PURE__ */ s(
|
|
485
|
+
C,
|
|
486
|
+
{
|
|
487
|
+
theme: "borderless",
|
|
488
|
+
type: "tertiary",
|
|
489
|
+
className: n.navItem,
|
|
490
|
+
"aria-current": J ? "page" : void 0,
|
|
491
|
+
onClick: () => d(f.to),
|
|
492
|
+
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
|
+
/* @__PURE__ */ e(je, { className: n.navArrow, "aria-hidden": "true" })
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
f.key
|
|
499
|
+
);
|
|
500
|
+
}) }),
|
|
501
|
+
/* @__PURE__ */ e("div", { className: n.asideFoot, children: /* @__PURE__ */ e(C, { theme: "borderless", type: "tertiary", className: n.logout, icon: /* @__PURE__ */ e(He, { "aria-hidden": "true" }), disabled: g, onClick: u, children: "退出登录" }) })
|
|
502
|
+
] }) }),
|
|
503
|
+
/* @__PURE__ */ s("div", { className: n.main, children: [
|
|
504
|
+
/* @__PURE__ */ s("header", { className: n.head, children: [
|
|
505
|
+
/* @__PURE__ */ e(W.Title, { heading: 1, className: n.title, children: P == null ? void 0 : P.label }),
|
|
506
|
+
/* @__PURE__ */ e(W.Paragraph, { className: n.description, children: F })
|
|
507
|
+
] }),
|
|
508
|
+
k ? o ? /* @__PURE__ */ e(o.Component, { data: _ }) : t === "profile" ? /* @__PURE__ */ e(yn, { data: _ }) : t === "subscription" ? /* @__PURE__ */ e(oa, { data: _, focusPlan: p }) : /* @__PURE__ */ e(gn, { data: _ }) : /* @__PURE__ */ e(qe, {})
|
|
509
|
+
] })
|
|
510
|
+
] });
|
|
511
|
+
}, Da = () => {
|
|
512
|
+
const t = se(), a = ae(), { accountApi: c, config: i } = O(), { bootstrapped: r, serviceUnavailable: l, session: o } = be(), d = ve(new URLSearchParams(t.search).get("returnPath"), i.routes.app), p = c.startLogin(d, i.routes.app);
|
|
513
|
+
return $e(() => {
|
|
514
|
+
r && !o && !l && !Je() && !he() && window.location.replace(p);
|
|
515
|
+
}, [r, p, l, o]), r && o ? /* @__PURE__ */ e(ie, { to: d, replace: !0 }) : r && !o && he() ? /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(
|
|
516
|
+
V,
|
|
517
|
+
{
|
|
518
|
+
status: "info",
|
|
519
|
+
title: "已退出登录",
|
|
520
|
+
description: "您已在其他窗口退出 24.city 统一账号。需要继续使用时请重新登录。",
|
|
521
|
+
extra: /* @__PURE__ */ s(le, { spacing: 12, children: [
|
|
522
|
+
/* @__PURE__ */ e(
|
|
523
|
+
C,
|
|
524
|
+
{
|
|
525
|
+
theme: "solid",
|
|
526
|
+
type: "primary",
|
|
527
|
+
onClick: () => {
|
|
528
|
+
me(), window.location.replace(p);
|
|
529
|
+
},
|
|
530
|
+
children: "重新登录"
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
/* @__PURE__ */ e(
|
|
534
|
+
C,
|
|
535
|
+
{
|
|
536
|
+
theme: "light",
|
|
537
|
+
type: "tertiary",
|
|
538
|
+
onClick: () => {
|
|
539
|
+
me(), a(i.routes.publicHome);
|
|
540
|
+
},
|
|
541
|
+
children: "返回首页"
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
] })
|
|
545
|
+
}
|
|
546
|
+
) }) : /* @__PURE__ */ e(Z, { children: l ? /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
547
|
+
V,
|
|
548
|
+
{
|
|
549
|
+
status: "error",
|
|
550
|
+
title: "统一账号服务暂不可用",
|
|
551
|
+
description: "请稍后重试。",
|
|
552
|
+
extra: /* @__PURE__ */ s(le, { spacing: 12, children: [
|
|
553
|
+
/* @__PURE__ */ e(C, { theme: "solid", type: "primary", onClick: () => window.location.replace(p), children: "重试" }),
|
|
554
|
+
/* @__PURE__ */ e(C, { theme: "light", type: "tertiary", onClick: () => a(i.routes.publicHome), children: "返回首页" })
|
|
555
|
+
] })
|
|
556
|
+
}
|
|
557
|
+
) }) : /* @__PURE__ */ e(V, { status: "loading", title: "正在前往统一登录…" }) });
|
|
558
|
+
}, ha = "_pill_1hckq_2", ma = "_upgrade_1hckq_24", pe = {
|
|
559
|
+
pill: ha,
|
|
560
|
+
upgrade: ma
|
|
561
|
+
}, Ba = ({ quota: t, unit: a, onUpgrade: c }) => {
|
|
562
|
+
if (!t) return null;
|
|
563
|
+
const i = ct(t);
|
|
564
|
+
return /* @__PURE__ */ s("span", { className: pe.pill, "data-full": i ? "true" : "false", role: "status", children: [
|
|
565
|
+
/* @__PURE__ */ e("span", { children: rt(t, a) }),
|
|
566
|
+
i ? /* @__PURE__ */ e(C, { theme: "borderless", type: "tertiary", size: "small", className: pe.upgrade, onClick: c, children: "升级" }) : null
|
|
567
|
+
] });
|
|
568
|
+
}, Va = ({ children: t }) => {
|
|
569
|
+
const a = se(), { config: c } = O(), { bootstrapped: i, serviceUnavailable: r, session: l } = be();
|
|
570
|
+
if (!i) return /* @__PURE__ */ e(Qe, {});
|
|
571
|
+
if (r)
|
|
572
|
+
return /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e("div", { role: "alert", children: /* @__PURE__ */ e(
|
|
573
|
+
V,
|
|
574
|
+
{
|
|
575
|
+
status: "error",
|
|
576
|
+
title: "账号服务暂不可用",
|
|
577
|
+
description: "无法确认当前会话与空间,应用已停止加载受保护数据。",
|
|
578
|
+
extra: /* @__PURE__ */ e(C, { theme: "solid", type: "primary", onClick: () => window.location.reload(), children: "重新加载" })
|
|
579
|
+
}
|
|
580
|
+
) }) });
|
|
581
|
+
if (!l || l.purpose !== "user") {
|
|
582
|
+
const o = ve(a.pathname + a.search, c.routes.app);
|
|
583
|
+
return /* @__PURE__ */ e(ie, { to: `${c.routes.login}?returnPath=${encodeURIComponent(o)}`, replace: !0 });
|
|
584
|
+
}
|
|
585
|
+
return /* @__PURE__ */ e($, { children: t });
|
|
586
|
+
}, _a = "_modal_19bot_6", ua = "_hero_19bot_27", pa = "_badge_19bot_39", ga = "_art_19bot_52", ya = "_title_19bot_65", fa = "_description_19bot_73", Na = "_body_19bot_80", ba = "_offer_19bot_87", va = "_offerName_19bot_93", Sa = "_lines_19bot_99", Ca = "_line_19bot_99", Pa = "_check_19bot_114", ka = "_cta_19bot_127", La = "_ctaPrice_19bot_144", wa = "_ownerOnly_19bot_154", $a = "_later_19bot_162", y = {
|
|
587
|
+
modal: _a,
|
|
588
|
+
hero: ua,
|
|
589
|
+
badge: pa,
|
|
590
|
+
art: ga,
|
|
591
|
+
title: ya,
|
|
592
|
+
description: fa,
|
|
593
|
+
body: Na,
|
|
594
|
+
offer: ba,
|
|
595
|
+
offerName: va,
|
|
596
|
+
lines: Sa,
|
|
597
|
+
line: Ca,
|
|
598
|
+
check: Pa,
|
|
599
|
+
cta: ka,
|
|
600
|
+
ctaPrice: La,
|
|
601
|
+
ownerOnly: wa,
|
|
602
|
+
later: $a
|
|
603
|
+
}, ja = ({
|
|
604
|
+
title: t,
|
|
605
|
+
description: a,
|
|
606
|
+
art: c = "engine",
|
|
607
|
+
onClose: i
|
|
608
|
+
}) => {
|
|
609
|
+
const r = ae(), l = M(), { offer: o, plans: d, canBuy: p, subscriptionPath: _ } = ot(), u = o ? xe(o.plan, d.data ?? [], l).filter((N) => N.included).slice(0, 5).map((N) => N.text) : [], g = o != null && o.price ? `${Le(o.price)}起` : "";
|
|
610
|
+
return /* @__PURE__ */ s(Ue, { visible: !0, header: null, footer: null, onCancel: i, className: y.modal, centered: !0, children: [
|
|
611
|
+
/* @__PURE__ */ s("div", { className: y.hero, "data-art": c, children: [
|
|
612
|
+
/* @__PURE__ */ e("span", { className: y.badge, children: "会员专享" }),
|
|
613
|
+
/* @__PURE__ */ e("span", { className: y.art, "aria-hidden": "true" }),
|
|
614
|
+
/* @__PURE__ */ e("span", { className: y.title, children: t }),
|
|
615
|
+
/* @__PURE__ */ e("span", { className: y.description, children: a })
|
|
616
|
+
] }),
|
|
617
|
+
/* @__PURE__ */ s("div", { className: y.body, children: [
|
|
618
|
+
o ? /* @__PURE__ */ s("span", { className: y.offer, children: [
|
|
619
|
+
"升级到",
|
|
620
|
+
/* @__PURE__ */ e("span", { className: y.offerName, children: o.plan.name }),
|
|
621
|
+
"即可使用,同时获得:"
|
|
622
|
+
] }) : /* @__PURE__ */ e("span", { className: y.offer, children: "升级套餐即可使用。" }),
|
|
623
|
+
u.length ? /* @__PURE__ */ e("div", { className: y.lines, role: "list", "aria-label": "升级后的权益", children: u.map((N) => /* @__PURE__ */ s("div", { className: y.line, role: "listitem", children: [
|
|
624
|
+
/* @__PURE__ */ e("span", { className: y.check, "aria-hidden": "true", children: /* @__PURE__ */ e(ne, {}) }),
|
|
625
|
+
N
|
|
626
|
+
] }, N)) }) : null,
|
|
627
|
+
p ? /* @__PURE__ */ s(
|
|
628
|
+
C,
|
|
629
|
+
{
|
|
630
|
+
theme: "light",
|
|
631
|
+
type: "tertiary",
|
|
632
|
+
block: !0,
|
|
633
|
+
className: y.cta,
|
|
634
|
+
"aria-label": `立即升级${g ? `,${g}` : ""}(打开订阅与套餐)`,
|
|
635
|
+
onClick: () => {
|
|
636
|
+
i(), r(_, { state: lt(o == null ? void 0 : o.plan.code) });
|
|
637
|
+
},
|
|
638
|
+
children: [
|
|
639
|
+
"立即升级",
|
|
640
|
+
g ? /* @__PURE__ */ e("span", { className: y.ctaPrice, children: g }) : null
|
|
641
|
+
]
|
|
642
|
+
}
|
|
643
|
+
) : /* @__PURE__ */ e("span", { className: y.ownerOnly, children: "团队套餐由所有者在统一账号中心升级,请联系团队所有者。" }),
|
|
644
|
+
/* @__PURE__ */ e(C, { theme: "borderless", type: "tertiary", block: !0, className: y.later, onClick: i, children: "暂不升级" })
|
|
645
|
+
] })
|
|
646
|
+
] });
|
|
647
|
+
};
|
|
648
|
+
export {
|
|
649
|
+
Oa as A,
|
|
650
|
+
z as C,
|
|
651
|
+
Da as L,
|
|
652
|
+
Qn as P,
|
|
653
|
+
Ba as Q,
|
|
654
|
+
Va as R,
|
|
655
|
+
K as S,
|
|
656
|
+
ra as T,
|
|
657
|
+
ja as U,
|
|
658
|
+
gn as a,
|
|
659
|
+
yn as b,
|
|
660
|
+
oa as c,
|
|
661
|
+
G as d,
|
|
662
|
+
Te as e,
|
|
663
|
+
te as f,
|
|
664
|
+
bn as g,
|
|
665
|
+
xe as p,
|
|
666
|
+
vn as y
|
|
667
|
+
};
|