@24city/web-console 0.1.1 → 0.1.3
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 +19 -0
- package/README.md +33 -4
- package/dist/account/index.js +2 -2
- package/dist/chunks/console-layout-D5YgsZYN.js +208 -0
- package/dist/chunks/{upgrade-modal-DzdKuEkJ.js → upgrade-modal-J0X79nT2.js} +295 -295
- package/dist/chunks/{wallet-badge-CnyMLpUO.js → wallet-badge-BXu-WxJa.js} +54 -54
- package/dist/index.js +3 -3
- package/dist/layout/index.js +1 -1
- package/dist/styles.css +277 -239
- package/dist/testing/guard.d.ts +5 -0
- package/dist/testing/guard.js +46 -36
- package/dist/vite.d.ts +24 -0
- package/dist/vite.js +24 -0
- package/package.json +6 -1
- package/dist/chunks/console-layout-BibioK5M.js +0 -198
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as s, jsxs as m, Fragment as me } from "react/jsx-runtime";
|
|
2
|
-
import { useState as B, useRef as pe, useCallback as
|
|
3
|
-
import { Skeleton as re, Button as b, Toast as _e, Modal as
|
|
2
|
+
import { useState as B, useRef as pe, useCallback as Ce, useEffect as Se } from "react";
|
|
3
|
+
import { Skeleton as re, Button as b, Toast as _e, Modal as Te, Avatar as Ae, Popover as Pe, Tooltip as Le } from "@douyinfe/semi-ui";
|
|
4
4
|
import { IconUser as D, IconCrown as Ee, IconGift as Ie, IconChevronRight as V, IconUserGroup as ie, IconChevronUp as $e, IconChevronDown as ze, IconTick as Oe } from "@douyinfe/semi-icons";
|
|
5
5
|
import { useNavigate as J } from "react-router";
|
|
6
6
|
import { a as fe, b as g } from "./context-CaVim6ZO.js";
|
|
7
7
|
import { q as v, k as Be, a as De, t as he, w as Me, l as Fe, u as F, g as Re, f as le } from "./logout-signal-CiD_zY5M.js";
|
|
8
|
-
import { useQueryClient as ye, useQuery as
|
|
8
|
+
import { useQueryClient as ye, useQuery as A } from "@tanstack/react-query";
|
|
9
9
|
import { notifyCustomerSessionChanged as be } from "@24city/web-runtime/session-sync";
|
|
10
|
-
const Ue = "
|
|
10
|
+
const Ue = "_trigger_cxn03_6", Ke = "_avatarWrap_cxn03_27", qe = "_avatar_cxn03_27", We = "_card_cxn03_80", Ye = "_identity_cxn03_90", Ge = "_who_cxn03_98", je = "_nameRow_cxn03_107", Qe = "_name_cxn03_107", Ve = "_planChip_cxn03_124", He = "_diamond_cxn03_154", Xe = "_spaceToggle_cxn03_162", Je = "_spaceStatic_cxn03_163", Ze = "_spaceSwitchText_cxn03_184", et = "_spaceName_cxn03_190", tt = "_spaceType_cxn03_196", nt = "_spaceList_cxn03_206", at = "_spaceOption_cxn03_215", st = "_spaceCheck_cxn03_237", ot = "_plan_cxn03_124", ct = "_links_cxn03_249", rt = "_link_cxn03_249", it = "_linkIcon_cxn03_287", lt = "_linkLabel_cxn03_298", dt = "_linkArrow_cxn03_303", ut = "_divider_cxn03_309", mt = "_logout_cxn03_315", l = {
|
|
11
11
|
trigger: Ue,
|
|
12
12
|
avatarWrap: Ke,
|
|
13
13
|
avatar: qe,
|
|
@@ -34,7 +34,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
34
34
|
linkArrow: dt,
|
|
35
35
|
divider: ut,
|
|
36
36
|
logout: mt
|
|
37
|
-
}, pt = ["profile", "subscription", "points"], _t = (e) => pt.includes(e), N = (e, t) => `${e}/account/${t}`, Mn = (e, t) => t === `${e}/account` || t.startsWith(`${e}/account/`), O = (e) => `account-${e}`,
|
|
37
|
+
}, pt = ["profile", "subscription", "points"], _t = (e) => pt.includes(e), N = (e, t) => `${e}/account/${t}`, Mn = (e, t) => t === `${e}/account` || t.startsWith(`${e}/account/`), O = (e) => `account-${e}`, P = {
|
|
38
38
|
profile: O("profile"),
|
|
39
39
|
subscription: O("subscription"),
|
|
40
40
|
points: O("points")
|
|
@@ -52,9 +52,9 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
52
52
|
key: "personal",
|
|
53
53
|
label: "个人中心",
|
|
54
54
|
items: [
|
|
55
|
-
{ key:
|
|
56
|
-
{ key:
|
|
57
|
-
{ key:
|
|
55
|
+
{ key: P.profile, label: "账号与安全", to: N(e, "profile"), icon: D },
|
|
56
|
+
{ key: P.subscription, label: "订阅与套餐", to: N(e, "subscription"), icon: Ee },
|
|
57
|
+
{ key: P.points, label: "积分与明细", to: N(e, "points"), icon: Ie },
|
|
58
58
|
...t.map(
|
|
59
59
|
(n) => ({
|
|
60
60
|
key: O(n.key),
|
|
@@ -92,24 +92,24 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
92
92
|
_ && d.push({ text: _, included: !1 });
|
|
93
93
|
}
|
|
94
94
|
return d;
|
|
95
|
-
}, H = (e) => e.planName || e.planCode, Nt = (e) => e.isDefault || !e.currentPeriodEnd ? "长期有效" : `有效期至 ${Be(e.currentPeriodEnd)}`, vt = 1440 * 60 * 1e3,
|
|
95
|
+
}, H = (e) => e.planName || e.planCode, Nt = (e) => e.isDefault || !e.currentPeriodEnd ? "长期有效" : `有效期至 ${Be(e.currentPeriodEnd)}`, vt = 1440 * 60 * 1e3, xt = (e, t = Date.now()) => {
|
|
96
96
|
if (e.isDefault || !e.currentPeriodEnd) return null;
|
|
97
97
|
const n = Date.parse(e.currentPeriodEnd);
|
|
98
98
|
return Number.isFinite(n) ? Math.max(0, Math.ceil((n - t) / vt)) : null;
|
|
99
|
-
},
|
|
99
|
+
}, Ct = 7, St = { month: "/月", year: "/年", one_time: "" }, Tt = (e) => {
|
|
100
100
|
const t = (e.amountCents / 100).toLocaleString("zh-CN", { maximumFractionDigits: 2 });
|
|
101
101
|
return e.currency === "CNY" ? `¥${t}` : `${e.currency} ${t}`;
|
|
102
102
|
}, Kn = (e) => e ? { focusPlan: e } : void 0, qn = (e) => {
|
|
103
103
|
if (typeof e != "object" || e === null) return;
|
|
104
104
|
const t = e.focusPlan;
|
|
105
105
|
return typeof t == "string" && t ? t : void 0;
|
|
106
|
-
},
|
|
106
|
+
}, At = (e) => `${Tt(e)}${St[e.billingPeriod]}`, Pt = (e) => {
|
|
107
107
|
const t = e.prices.filter((o) => o.amountCents > 0), n = t.filter((o) => o.billingPeriod === "month");
|
|
108
108
|
return (n.length ? n : t).reduce((o, c) => !o || c.amountCents < o.amountCents ? c : o, null);
|
|
109
109
|
}, Lt = (e, t, n) => {
|
|
110
110
|
const o = (e ?? []).filter(
|
|
111
111
|
(c) => c.spaceType === t && !c.isDefault && (n === null || c.tier > n)
|
|
112
|
-
).map((c) => ({ plan: c, price:
|
|
112
|
+
).map((c) => ({ plan: c, price: Pt(c) }));
|
|
113
113
|
return o.sort(
|
|
114
114
|
(c, d) => {
|
|
115
115
|
var u, r;
|
|
@@ -151,12 +151,12 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
151
151
|
assetValue: sn,
|
|
152
152
|
assetArrow: on,
|
|
153
153
|
assetDivider: cn
|
|
154
|
-
}, rn =
|
|
154
|
+
}, rn = P.points, ee = P.subscription, ln = ({ membership: e, text: t, onOpen: n }) => {
|
|
155
155
|
const { canBuy: a, offer: o } = e;
|
|
156
156
|
return a ? /* @__PURE__ */ m("span", { className: i.cta, children: [
|
|
157
157
|
/* @__PURE__ */ s(b, { theme: "light", type: "tertiary", block: !0, className: i.ctaButton, onClick: () => n(ee), children: t }),
|
|
158
158
|
o != null && o.price ? /* @__PURE__ */ m("span", { className: i.ctaTag, children: [
|
|
159
|
-
|
|
159
|
+
At(o.price),
|
|
160
160
|
"起"
|
|
161
161
|
] }) : null
|
|
162
162
|
] }) : /* @__PURE__ */ s("span", { className: i.ownerOnly, children: "请团队所有者在统一账号中心续费" });
|
|
@@ -194,24 +194,24 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
194
194
|
/* @__PURE__ */ s(q, { membership: e, onOpen: t })
|
|
195
195
|
] });
|
|
196
196
|
if (a.kind === "member") {
|
|
197
|
-
const { subscription: h, daysLeft: y } = a,
|
|
198
|
-
return /* @__PURE__ */ m("div", { className: i.member, "data-expiring":
|
|
197
|
+
const { subscription: h, daysLeft: y } = a, C = y !== null && y <= Ct, S = (c == null ? void 0 : c.monthlyPoints) ?? 0;
|
|
198
|
+
return /* @__PURE__ */ m("div", { className: i.member, "data-expiring": C ? "true" : "false", children: [
|
|
199
199
|
/* @__PURE__ */ s("span", { className: i.memberArt, "aria-hidden": "true" }),
|
|
200
200
|
/* @__PURE__ */ m("div", { className: i.memberBody, children: [
|
|
201
201
|
/* @__PURE__ */ m("span", { className: i.memberEyebrow, children: [
|
|
202
202
|
"当前会员",
|
|
203
|
-
|
|
203
|
+
S > 0 ? ` · 每月 ${v(S)} 积分` : ""
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ s("span", { className: i.memberTitle, children: H(h) }),
|
|
206
206
|
/* @__PURE__ */ s("span", { className: i.memberMeta, children: Nt(h) }),
|
|
207
|
-
e.canBuy ? /* @__PURE__ */ s(b, { theme: "light", type: "tertiary", size: "small", className: i.memberCta, onClick: () => t(ee), children:
|
|
207
|
+
e.canBuy ? /* @__PURE__ */ s(b, { theme: "light", type: "tertiary", size: "small", className: i.memberCta, onClick: () => t(ee), children: C ? "立即续费" : o ? "续费或升级" : "续费" }) : null
|
|
208
208
|
] }),
|
|
209
209
|
/* @__PURE__ */ s(
|
|
210
210
|
q,
|
|
211
211
|
{
|
|
212
212
|
membership: e,
|
|
213
213
|
onOpen: t,
|
|
214
|
-
extra: y === null ? void 0 : { label: y === 0 ? "今天到期" : `剩余 ${y} 天`, tone:
|
|
214
|
+
extra: y === null ? void 0 : { label: y === 0 ? "今天到期" : `剩余 ${y} 天`, tone: C ? "warning" : void 0 }
|
|
215
215
|
}
|
|
216
216
|
)
|
|
217
217
|
] });
|
|
@@ -245,7 +245,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
245
245
|
});
|
|
246
246
|
};
|
|
247
247
|
return { confirmLogout: () => {
|
|
248
|
-
e ||
|
|
248
|
+
e || Te.confirm({
|
|
249
249
|
title: "退出登录",
|
|
250
250
|
content: "将同时退出 24.city 统一账号并回到首页,再次进入工作台需要重新登录。",
|
|
251
251
|
okText: "退出登录",
|
|
@@ -264,16 +264,16 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
264
264
|
subscription: (e, t) => ["product-subscription", e, t],
|
|
265
265
|
plans: ["product-plans"]
|
|
266
266
|
}, hn = () => {
|
|
267
|
-
const { accountApi: e } = g(), { session: t, spaces: n } = F(), a = (t == null ? void 0 : t.activeSpaceId) ?? "", o = (t == null ? void 0 : t.globalUserId) ?? "", c = (t == null ? void 0 : t.purpose) === "user" && !!(a && o), d = n.find((_) => _.id === a), u =
|
|
267
|
+
const { accountApi: e } = g(), { session: t, spaces: n } = F(), a = (t == null ? void 0 : t.activeSpaceId) ?? "", o = (t == null ? void 0 : t.globalUserId) ?? "", c = (t == null ? void 0 : t.purpose) === "user" && !!(a && o), d = n.find((_) => _.id === a), u = A({
|
|
268
268
|
queryKey: L.profile(o),
|
|
269
269
|
queryFn: () => e.getProfile(),
|
|
270
270
|
enabled: !!o,
|
|
271
271
|
staleTime: 1 / 0
|
|
272
|
-
}), r =
|
|
272
|
+
}), r = A({
|
|
273
273
|
queryKey: L.wallet(a, o),
|
|
274
274
|
queryFn: () => e.getWallet(),
|
|
275
275
|
enabled: c
|
|
276
|
-
}), p =
|
|
276
|
+
}), p = A({
|
|
277
277
|
queryKey: L.subscription(a, o),
|
|
278
278
|
queryFn: () => e.getSubscription(),
|
|
279
279
|
enabled: c
|
|
@@ -281,7 +281,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
281
281
|
return { session: t, allowed: c, activeSpace: d, activeSpaceId: a, globalUserId: o, profile: u, wallet: r, subscription: p };
|
|
282
282
|
}, yn = 5 * 6e4, bn = (e) => {
|
|
283
283
|
const { accountApi: t } = g();
|
|
284
|
-
return
|
|
284
|
+
return A({
|
|
285
285
|
queryKey: L.plans,
|
|
286
286
|
queryFn: () => t.getPlans(),
|
|
287
287
|
enabled: e,
|
|
@@ -291,7 +291,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
291
291
|
var y;
|
|
292
292
|
const { config: e } = g(), t = hn(), { activeSpace: n, subscription: a, allowed: o } = t, c = bn(o), d = n ? M(n) : !1, u = d ? "team" : "personal";
|
|
293
293
|
let r;
|
|
294
|
-
!o || a.isPending ? r = { kind: "loading" } : a.isError ? r = fn(a.error) ? { kind: "team-expired" } : { kind: "error" } : !a.data || a.data.isDefault ? r = { kind: "free", subscription: a.data ?? null } : r = { kind: "member", subscription: a.data, daysLeft:
|
|
294
|
+
!o || a.isPending ? r = { kind: "loading" } : a.isError ? r = fn(a.error) ? { kind: "team-expired" } : { kind: "error" } : !a.data || a.data.isDefault ? r = { kind: "free", subscription: a.data ?? null } : r = { kind: "member", subscription: a.data, daysLeft: xt(a.data) };
|
|
295
295
|
const p = r.kind === "free" || r.kind === "member" ? ((y = r.subscription) == null ? void 0 : y.tier) ?? null : null, _ = r.kind === "free" || r.kind === "member" || r.kind === "team-expired" ? Lt(c.data, u, p) : null, h = (r.kind === "free" || r.kind === "member") && r.subscription ? Et(c.data, r.subscription) : void 0;
|
|
296
296
|
return {
|
|
297
297
|
...t,
|
|
@@ -306,7 +306,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
306
306
|
subscriptionPath: N(e.routes.app, "subscription")
|
|
307
307
|
};
|
|
308
308
|
}, gn = () => {
|
|
309
|
-
const e = ye(), t = Re(), { session: n } = F(), { accountApi: a } = g(), [o, c] = B(!1), d = pe(0), u = n == null ? void 0 : n.activeSpaceId, r =
|
|
309
|
+
const e = ye(), t = Re(), { session: n } = F(), { accountApi: a } = g(), [o, c] = B(!1), d = pe(0), u = n == null ? void 0 : n.activeSpaceId, r = Ce(
|
|
310
310
|
async (p) => {
|
|
311
311
|
if (!p || p === u || o) return;
|
|
312
312
|
const _ = ++d.current;
|
|
@@ -334,21 +334,21 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
334
334
|
}, Y = "我的账号", kn = 80, wn = 200, G = ({ space: e }) => /* @__PURE__ */ m(me, { children: [
|
|
335
335
|
/* @__PURE__ */ s("span", { className: l.spaceName, children: X(e) }),
|
|
336
336
|
M(e) ? /* @__PURE__ */ s("span", { className: l.spaceType, children: "团队" }) : null
|
|
337
|
-
] }), ue = ({ nickName: e, member: t, size: n }) => /* @__PURE__ */ s("span", { className: l.avatarWrap, "data-member": t ? "true" : "false", "data-size": n > 40 ? "large" : "small", children: /* @__PURE__ */ s(
|
|
337
|
+
] }), ue = ({ nickName: e, member: t, size: n }) => /* @__PURE__ */ s("span", { className: l.avatarWrap, "data-member": t ? "true" : "false", "data-size": n > 40 ? "large" : "small", children: /* @__PURE__ */ s(Ae, { size: "small", shape: "circle", className: l.avatar, style: { width: n, height: n }, children: e ? Array.from(e)[0] : /* @__PURE__ */ s(D, { "aria-hidden": "true" }) }) }), Nn = ({ state: e }) => e.kind === "member" ? /* @__PURE__ */ m("span", { className: l.planChip, "data-tone": "member", children: [
|
|
338
338
|
/* @__PURE__ */ s("span", { className: l.diamond, "aria-hidden": "true" }),
|
|
339
339
|
H(e.subscription)
|
|
340
340
|
] }) : e.kind === "free" ? /* @__PURE__ */ s("span", { className: l.planChip, "data-tone": "free", children: e.subscription ? H(e.subscription) : "未开通" }) : e.kind === "team-expired" ? /* @__PURE__ */ s("span", { className: l.planChip, "data-tone": "warning", children: "团队版已到期" }) : null, Gn = ({ personal: e, selectedKey: t, onOpen: n }) => {
|
|
341
341
|
var ce;
|
|
342
|
-
const { config: a } = g(), o = fe(), c = J(), d = e ?? yt(a.routes.app, ht(o)), u = ke(), { profile: r, state: p } = u, { session: _, spaces: h } = F(), { confirmLogout: y, pending:
|
|
343
|
-
|
|
342
|
+
const { config: a } = g(), o = fe(), c = J(), d = e ?? yt(a.routes.app, ht(o)), u = ke(), { profile: r, state: p } = u, { session: _, spaces: h } = F(), { confirmLogout: y, pending: C } = _n(), { switching: S, switchSpace: we } = gn(), [R, E] = B(!1), [U, I] = B(!1), T = pe(void 0), K = ((ce = r.data) == null ? void 0 : ce.nickName) ?? "", $ = K || (r.isPending ? "" : Y), te = (_ == null ? void 0 : _.activeSpaceId) ?? "", k = h.find((f) => f.id === te), ne = h.length > 1, ae = p.kind === "member", x = () => {
|
|
343
|
+
T.current !== void 0 && (window.clearTimeout(T.current), T.current = void 0);
|
|
344
344
|
};
|
|
345
|
-
|
|
345
|
+
Se(() => x, []);
|
|
346
346
|
const z = () => {
|
|
347
|
-
|
|
347
|
+
x(), E(!1), I(!1);
|
|
348
348
|
}, Ne = () => {
|
|
349
|
-
|
|
349
|
+
x(), T.current = window.setTimeout(() => E(!0), kn);
|
|
350
350
|
}, se = () => {
|
|
351
|
-
|
|
351
|
+
x(), T.current = window.setTimeout(() => {
|
|
352
352
|
E(!1), I(!1);
|
|
353
353
|
}, wn);
|
|
354
354
|
}, oe = (f) => {
|
|
@@ -356,9 +356,9 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
356
356
|
n(f);
|
|
357
357
|
return;
|
|
358
358
|
}
|
|
359
|
-
const w = d.items.find((
|
|
359
|
+
const w = d.items.find((xe) => xe.key === f);
|
|
360
360
|
w && c(w.to);
|
|
361
|
-
}, ve = /* @__PURE__ */ m("div", { className: l.card, role: "dialog", "aria-label": "账号", onMouseEnter:
|
|
361
|
+
}, ve = /* @__PURE__ */ m("div", { className: l.card, role: "dialog", "aria-label": "账号", onMouseEnter: x, onMouseLeave: se, children: [
|
|
362
362
|
/* @__PURE__ */ m("div", { className: l.identity, children: [
|
|
363
363
|
/* @__PURE__ */ s(ue, { nickName: K, member: ae, size: 52 }),
|
|
364
364
|
/* @__PURE__ */ m("div", { className: l.who, children: [
|
|
@@ -399,7 +399,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
399
399
|
block: !0,
|
|
400
400
|
className: l.spaceOption,
|
|
401
401
|
"aria-current": w ? "true" : void 0,
|
|
402
|
-
disabled:
|
|
402
|
+
disabled: S && !w,
|
|
403
403
|
onClick: () => {
|
|
404
404
|
w || (z(), we(f.id));
|
|
405
405
|
},
|
|
@@ -437,7 +437,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
437
437
|
type: "tertiary",
|
|
438
438
|
block: !0,
|
|
439
439
|
className: l.logout,
|
|
440
|
-
disabled:
|
|
440
|
+
disabled: C,
|
|
441
441
|
onClick: () => {
|
|
442
442
|
z(), y();
|
|
443
443
|
},
|
|
@@ -446,7 +446,7 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
446
446
|
)
|
|
447
447
|
] });
|
|
448
448
|
return /* @__PURE__ */ s(
|
|
449
|
-
|
|
449
|
+
Pe,
|
|
450
450
|
{
|
|
451
451
|
trigger: "custom",
|
|
452
452
|
visible: R,
|
|
@@ -465,21 +465,21 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
465
465
|
"aria-label": $ ? `${$},账号菜单` : "账号菜单",
|
|
466
466
|
"aria-haspopup": "dialog",
|
|
467
467
|
"aria-expanded": R,
|
|
468
|
-
loading:
|
|
468
|
+
loading: S,
|
|
469
469
|
onMouseEnter: Ne,
|
|
470
470
|
onMouseLeave: se,
|
|
471
471
|
onClick: () => {
|
|
472
|
-
|
|
472
|
+
x(), E((f) => !f), R && I(!1);
|
|
473
473
|
},
|
|
474
474
|
children: /* @__PURE__ */ s(ue, { nickName: K, member: ae, size: 34 })
|
|
475
475
|
}
|
|
476
476
|
)
|
|
477
477
|
}
|
|
478
478
|
);
|
|
479
|
-
}, vn = "_upgrade_ea6lf_2",
|
|
479
|
+
}, vn = "_upgrade_ea6lf_2", xn = "_crown_ea6lf_25", Cn = "_text_ea6lf_37", j = {
|
|
480
480
|
upgrade: vn,
|
|
481
|
-
crown:
|
|
482
|
-
text:
|
|
481
|
+
crown: xn,
|
|
482
|
+
text: Cn
|
|
483
483
|
}, jn = () => {
|
|
484
484
|
const { config: e } = g(), t = J(), { state: n, canBuy: a } = ke();
|
|
485
485
|
if (!a || n.kind !== "free" && n.kind !== "team-expired") return null;
|
|
@@ -488,12 +488,12 @@ const Ue = "_trigger_am2co_6", Ke = "_avatarWrap_am2co_27", qe = "_avatar_am2co_
|
|
|
488
488
|
/* @__PURE__ */ s("span", { className: j.crown, "aria-hidden": "true" }),
|
|
489
489
|
/* @__PURE__ */ s("span", { className: j.text, children: o })
|
|
490
490
|
] });
|
|
491
|
-
},
|
|
492
|
-
wallet:
|
|
493
|
-
coin:
|
|
494
|
-
value:
|
|
491
|
+
}, Sn = "_wallet_weimr_2", Tn = "_coin_weimr_25", An = "_value_weimr_32", Q = {
|
|
492
|
+
wallet: Sn,
|
|
493
|
+
coin: Tn,
|
|
494
|
+
value: An
|
|
495
495
|
}, Qn = () => {
|
|
496
|
-
const { accountApi: e, config: t } = g(), { session: n } = F(), a = J(), o = (n == null ? void 0 : n.activeSpaceId) ?? "", c = (n == null ? void 0 : n.globalUserId) ?? "", d =
|
|
496
|
+
const { accountApi: e, config: t } = g(), { session: n } = F(), a = J(), o = (n == null ? void 0 : n.activeSpaceId) ?? "", c = (n == null ? void 0 : n.globalUserId) ?? "", d = A({
|
|
497
497
|
queryKey: L.wallet(o, c),
|
|
498
498
|
queryFn: () => e.getWallet(),
|
|
499
499
|
enabled: !!n,
|
|
@@ -521,18 +521,18 @@ export {
|
|
|
521
521
|
ht as B,
|
|
522
522
|
Un as C,
|
|
523
523
|
Fn as D,
|
|
524
|
-
|
|
524
|
+
Ct as E,
|
|
525
525
|
Y as F,
|
|
526
526
|
Rn as G,
|
|
527
527
|
X as H,
|
|
528
528
|
Yn as I,
|
|
529
|
-
|
|
529
|
+
Pt as J,
|
|
530
530
|
Lt as K,
|
|
531
531
|
hn as L,
|
|
532
532
|
_n as M,
|
|
533
533
|
ke as N,
|
|
534
534
|
bn as O,
|
|
535
|
-
|
|
535
|
+
P,
|
|
536
536
|
gn as Q,
|
|
537
537
|
bt as U,
|
|
538
538
|
Qn as W,
|
|
@@ -548,8 +548,8 @@ export {
|
|
|
548
548
|
Et as j,
|
|
549
549
|
Wn as k,
|
|
550
550
|
wt as l,
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
Tt as m,
|
|
552
|
+
At as n,
|
|
553
553
|
Mn as o,
|
|
554
554
|
_t as p,
|
|
555
555
|
M as q,
|
|
@@ -557,7 +557,7 @@ export {
|
|
|
557
557
|
Z as s,
|
|
558
558
|
It as t,
|
|
559
559
|
O as u,
|
|
560
|
-
|
|
560
|
+
xt as v,
|
|
561
561
|
qn as w,
|
|
562
562
|
Kn as x,
|
|
563
563
|
Nt as y,
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as s, a as o, c as t, b as r, h as n, j as i, k as u, m as l, o as c, p, q as m, s as d, t as f, i as g, d as C, v as P, x as S, l as A, n as L, r as h, y as R, z as y, B as E, e as N, f as x, C as B, D as T, E as O, u as b, g as _, w as v } from "./chunks/logout-signal-CiD_zY5M.js";
|
|
2
|
-
import { A as U, C as I, L as D, P as M, a as k, b as q, Q as w, R as Q, S as z, c as K, T as H, U as G, d as V, p as W, e as j, f as Y, g as J, y as X } from "./chunks/upgrade-modal-
|
|
3
|
-
import { A as $, a as aa, b as ea, E as sa, F as oa, P as ta, c as ra, d as na, U as ia, e as ua, W as la, f as ca, g as pa, h as ma, i as da, j as fa, k as ga, l as Ca, m as Pa, n as Sa, o as Aa, p as La, q as ha, r as Ra, s as ya, t as Ea, u as Na, v as xa, w as Ba, x as Ta, y as Oa, z as ba, B as _a, C as va, D as Fa, G as Ua, H as Ia, I as Da, J as Ma, K as ka, L as qa, M as wa, N as Qa, O as za, Q as Ka } from "./chunks/wallet-badge-
|
|
2
|
+
import { A as U, C as I, L as D, P as M, a as k, b as q, Q as w, R as Q, S as z, c as K, T as H, U as G, d as V, p as W, e as j, f as Y, g as J, y as X } from "./chunks/upgrade-modal-J0X79nT2.js";
|
|
3
|
+
import { A as $, a as aa, b as ea, E as sa, F as oa, P as ta, c as ra, d as na, U as ia, e as ua, W as la, f as ca, g as pa, h as ma, i as da, j as fa, k as ga, l as Ca, m as Pa, n as Sa, o as Aa, p as La, q as ha, r as Ra, s as ya, t as Ea, u as Na, v as xa, w as Ba, x as Ta, y as Oa, z as ba, B as _a, C as va, D as Fa, G as Ua, H as Ia, I as Da, J as Ma, K as ka, L as qa, M as wa, N as Qa, O as za, Q as Ka } from "./chunks/wallet-badge-BXu-WxJa.js";
|
|
4
4
|
import { A as Ga } from "./chunks/auth-provider-CqiyTeOt.js";
|
|
5
5
|
import { ConsoleSemiProvider as Wa, MODAL_BUTTON_PROPS as ja, modalButtonProps as Ya } from "./semi.js";
|
|
6
|
-
import { B as Xa, C as Za, f as $a, a as ae, i as ee } from "./chunks/console-layout-
|
|
6
|
+
import { B as Xa, C as Za, f as $a, a as ae, i as ee } from "./chunks/console-layout-D5YgsZYN.js";
|
|
7
7
|
import { E as oe, R as te } from "./chunks/error-boundary-D3qiD7ov.js";
|
|
8
8
|
import { L as ne } from "./chunks/link-button-giJEcTmG.js";
|
|
9
9
|
import { N as ue, S as le, T as ce } from "./chunks/text-link-FTsBp_QU.js";
|
package/dist/layout/index.js
CHANGED