mantur-components 0.1.8 → 0.1.9
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/README.md +1 -0
- package/dist/header/mock.d.ts +11 -6
- package/dist/mantur-components.js +405 -299
- package/dist/mantur-components.umd.cjs +1 -1
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
2
2
|
import { Avatar as a, Button as o, Card as s, DatePicker as c, Divider as l, Dropdown as u, Form as d, Grid as f, Input as p, Menu as m, Message as h, Modal as g, Pagination as _, Select as v, Table as y, Tabs as b, Tag as x, Typography as S, Upload as C } from "@arco-design/web-react";
|
|
3
|
-
import { IconCheckCircleFill as w, IconDown as T, IconEdit as E, IconFile as D, IconLanguage as O, IconMoonFill as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { useTheme as
|
|
3
|
+
import { IconCheckCircleFill as w, IconDown as T, IconEdit as E, IconFile as D, IconLanguage as O, IconMoonFill as k, IconPlus as A, IconPoweroff as j, IconSunFill as M, IconUpload as N } from "@arco-design/web-react/icon";
|
|
4
|
+
import { useTranslation as P } from "react-i18next";
|
|
5
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
6
|
+
import { useTheme as L } from "next-themes";
|
|
7
7
|
//#region \0rolldown/runtime.js
|
|
8
|
-
var
|
|
9
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
8
|
+
var R = Object.create, z = Object.defineProperty, B = Object.getOwnPropertyDescriptor, V = Object.getOwnPropertyNames, ee = Object.getPrototypeOf, H = Object.prototype.hasOwnProperty, te = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ne = (e, t, n, r) => {
|
|
9
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = V(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !H.call(e, s) && s !== n && z(e, s, {
|
|
10
10
|
get: ((e) => t[e]).bind(null, s),
|
|
11
|
-
enumerable: !(r =
|
|
11
|
+
enumerable: !(r = B(t, s)) || r.enumerable
|
|
12
12
|
});
|
|
13
13
|
return e;
|
|
14
|
-
}, re = (e, t, n) => (n = e == null ? {} :
|
|
14
|
+
}, re = (e, t, n) => (n = e == null ? {} : R(ee(e)), ne(t || !e || !e.__esModule ? z(n, "default", {
|
|
15
15
|
value: e,
|
|
16
16
|
enumerable: !0
|
|
17
17
|
}) : n, e)), ie = "/api", ae = "/users/me/points", U = "mantur-points-refresh", oe = "mantur-tenant-context-change";
|
|
@@ -97,11 +97,11 @@ function fe(e) {
|
|
|
97
97
|
async function pe() {
|
|
98
98
|
return fe((await K(ce())).data);
|
|
99
99
|
}
|
|
100
|
-
async function
|
|
100
|
+
async function me() {
|
|
101
101
|
let e = await pe();
|
|
102
102
|
return typeof window < "u" && window.dispatchEvent(new CustomEvent(U, { detail: e })), e;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function he(e, t) {
|
|
105
105
|
return t?.tenantId ? e.find((e) => e.tenantId === t.tenantId) || {
|
|
106
106
|
tenantId: t.tenantId,
|
|
107
107
|
tenantName: t.tenantName || t.tenantId,
|
|
@@ -111,37 +111,37 @@ function me(e, t) {
|
|
|
111
111
|
}))
|
|
112
112
|
} : e.find((e) => e.isOwner) || e[0];
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function q(e) {
|
|
115
115
|
typeof window < "u" && (window.__MANTUR_COMPONENTS_TENANT_CONTEXT__ = e, window.dispatchEvent(new CustomEvent(oe, { detail: e })));
|
|
116
116
|
}
|
|
117
|
-
async function
|
|
117
|
+
async function ge() {
|
|
118
118
|
return (await K("/users/me/tenants")).data || [];
|
|
119
119
|
}
|
|
120
|
-
async function
|
|
120
|
+
async function _e() {
|
|
121
121
|
return (await K("/auth/current-tenant")).data;
|
|
122
122
|
}
|
|
123
|
-
async function
|
|
123
|
+
async function ve(e) {
|
|
124
124
|
return (await K(`/auth/current-tenant/${e}`, { method: "PUT" })).data;
|
|
125
125
|
}
|
|
126
|
-
async function
|
|
127
|
-
let [t, n] = await Promise.all([
|
|
126
|
+
async function ye(e = "refresh") {
|
|
127
|
+
let [t, n] = await Promise.all([ge(), _e()]), r = {
|
|
128
128
|
tenants: t,
|
|
129
|
-
currentTenant:
|
|
129
|
+
currentTenant: he(t, n),
|
|
130
130
|
auth: n,
|
|
131
131
|
reason: e
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return q(r), r;
|
|
134
134
|
}
|
|
135
|
-
async function
|
|
136
|
-
let t = await
|
|
135
|
+
async function be(e) {
|
|
136
|
+
let t = await ve(e), n = await ge(), r = {
|
|
137
137
|
tenants: n,
|
|
138
|
-
currentTenant:
|
|
138
|
+
currentTenant: he(n, t),
|
|
139
139
|
auth: t,
|
|
140
140
|
reason: "switch"
|
|
141
141
|
};
|
|
142
|
-
return
|
|
142
|
+
return q(r), r;
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var xe = {
|
|
145
145
|
title: "Mantur",
|
|
146
146
|
switchTeam: "Switch Team",
|
|
147
147
|
personalSettings: "Personal Settings",
|
|
@@ -178,6 +178,12 @@ var be = {
|
|
|
178
178
|
rechargeHint: "Recharge points are valid for 2 years after arrival.",
|
|
179
179
|
payNow: "Pay Now",
|
|
180
180
|
rechargeSuccess: "Recharge successful",
|
|
181
|
+
customRechargeAmount: "Custom Amount",
|
|
182
|
+
customRechargeDescription: "Enter the recharge amount you need. Minimum $10 USD.",
|
|
183
|
+
customRechargeMinError: "Minimum recharge is $10 USD",
|
|
184
|
+
customRechargeEstimate: "Estimated points",
|
|
185
|
+
customRechargeRate: "$1 = 100 points. Package bonuses do not apply.",
|
|
186
|
+
selectRechargePackage: "Select a package or enter a custom amount",
|
|
181
187
|
all: "All",
|
|
182
188
|
income: "Income",
|
|
183
189
|
expense: "Expense",
|
|
@@ -194,10 +200,10 @@ var be = {
|
|
|
194
200
|
pointsDeductionTip: "Points expiring soon are deducted first.",
|
|
195
201
|
pointsNoteTitle: "Note",
|
|
196
202
|
pointsAccountNote: "Points are attached to your personal account. You recharge, consume, and manage them yourself. Others cannot recharge or use them for you. Recharge points are valid for 2 years; gifted points follow the validity set by operations."
|
|
197
|
-
},
|
|
203
|
+
}, Se = {
|
|
198
204
|
languageZh: "中文",
|
|
199
205
|
languageEn: "English"
|
|
200
|
-
},
|
|
206
|
+
}, Ce = {
|
|
201
207
|
title: "漫途",
|
|
202
208
|
switchTeam: "切换团队",
|
|
203
209
|
personalSettings: "个人设置",
|
|
@@ -234,6 +240,12 @@ var be = {
|
|
|
234
240
|
rechargeHint: "充值积分有效期 2 年(自到账日起算),支付后不可退换。",
|
|
235
241
|
payNow: "立即支付",
|
|
236
242
|
rechargeSuccess: "充值成功",
|
|
243
|
+
customRechargeAmount: "自定义金额",
|
|
244
|
+
customRechargeDescription: "按需输入充值金额,最低 $10 USD 起充",
|
|
245
|
+
customRechargeMinError: "最低充值 $10 USD",
|
|
246
|
+
customRechargeEstimate: "预计到账积分",
|
|
247
|
+
customRechargeRate: "兑换比 $1 = 100 积分(不享套餐赠送)",
|
|
248
|
+
selectRechargePackage: "请先选择套餐或输入自定义金额",
|
|
237
249
|
all: "全部",
|
|
238
250
|
income: "获得",
|
|
239
251
|
expense: "消耗",
|
|
@@ -250,62 +262,62 @@ var be = {
|
|
|
250
262
|
pointsDeductionTip: "优先扣减即将到期的积分",
|
|
251
263
|
pointsNoteTitle: "说明",
|
|
252
264
|
pointsAccountNote: "积分账户挂在你的个人账号上,自己充值、自己消耗、自己负责;他人不能代充、不能代用。充值积分有效期固定 2 年;赠送积分有效期由后台运营发放时设置。"
|
|
253
|
-
},
|
|
265
|
+
}, we = {
|
|
254
266
|
languageZh: "中文",
|
|
255
267
|
languageEn: "English"
|
|
256
|
-
},
|
|
268
|
+
}, Te = "i18nextLng", Ee = "manturLanguageSource", J = "mantur-language-change", De = {
|
|
257
269
|
"zh-CN": {
|
|
258
|
-
...
|
|
259
|
-
...
|
|
270
|
+
...Ce,
|
|
271
|
+
...we
|
|
260
272
|
},
|
|
261
273
|
"en-US": {
|
|
262
|
-
...
|
|
263
|
-
...
|
|
274
|
+
...xe,
|
|
275
|
+
...Se
|
|
264
276
|
}
|
|
265
277
|
};
|
|
266
|
-
function
|
|
278
|
+
function Y(e) {
|
|
267
279
|
return e?.toLowerCase().startsWith("en") ? "en-US" : "zh-CN";
|
|
268
280
|
}
|
|
269
|
-
function
|
|
270
|
-
return typeof window > "u" ? "zh-CN" :
|
|
281
|
+
function X() {
|
|
282
|
+
return typeof window > "u" ? "zh-CN" : Y(window.localStorage.getItem("i18nextLng") || document.documentElement.lang || navigator.language);
|
|
271
283
|
}
|
|
272
|
-
function
|
|
273
|
-
return
|
|
284
|
+
function Oe(e) {
|
|
285
|
+
return De[Y(e)];
|
|
274
286
|
}
|
|
275
287
|
//#endregion
|
|
276
288
|
//#region src/lang-switch/LangSwitch.tsx
|
|
277
|
-
var
|
|
278
|
-
function
|
|
289
|
+
var ke = Te, Ae = Ee;
|
|
290
|
+
function je(e, t) {
|
|
279
291
|
document.cookie = `${encodeURIComponent(e)}=${encodeURIComponent(t)}; path=/`;
|
|
280
292
|
}
|
|
281
|
-
function
|
|
282
|
-
let { i18n: e } =
|
|
293
|
+
function Me() {
|
|
294
|
+
let { i18n: e } = P(), [n, r] = i(() => X()), a = Oe(n);
|
|
283
295
|
return t(() => {
|
|
284
|
-
r(
|
|
285
|
-
}, [e.language]), /* @__PURE__ */
|
|
286
|
-
droplist: /* @__PURE__ */
|
|
296
|
+
r(Y(e.language));
|
|
297
|
+
}, [e.language]), /* @__PURE__ */ F(u, {
|
|
298
|
+
droplist: /* @__PURE__ */ I(m, {
|
|
287
299
|
selectedKeys: [n],
|
|
288
300
|
onClickMenuItem: (t) => {
|
|
289
|
-
let n =
|
|
290
|
-
localStorage.setItem(
|
|
301
|
+
let n = Y(t);
|
|
302
|
+
localStorage.setItem(ke, t), localStorage.setItem(Ae, "manual"), r(n), e.changeLanguage(t), je("Accept-Language", t), window.dispatchEvent(new CustomEvent(J, { detail: n })), window.location.reload();
|
|
291
303
|
},
|
|
292
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ F(m.Item, { children: a.languageZh }, "zh-CN"), /* @__PURE__ */ F(m.Item, { children: a.languageEn }, "en-US")]
|
|
293
305
|
}),
|
|
294
306
|
trigger: "click",
|
|
295
307
|
position: "br",
|
|
296
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ F(o, {
|
|
297
309
|
shape: "circle",
|
|
298
|
-
icon: /* @__PURE__ */
|
|
310
|
+
icon: /* @__PURE__ */ F(O, {})
|
|
299
311
|
})
|
|
300
312
|
});
|
|
301
313
|
}
|
|
302
314
|
//#endregion
|
|
303
315
|
//#region src/theme-switch/ThemeSwitch.tsx
|
|
304
|
-
function
|
|
305
|
-
let { resolvedTheme: e, setTheme: t } =
|
|
306
|
-
return /* @__PURE__ */
|
|
316
|
+
function Ne() {
|
|
317
|
+
let { resolvedTheme: e, setTheme: t } = L();
|
|
318
|
+
return /* @__PURE__ */ F(o, {
|
|
307
319
|
shape: "circle",
|
|
308
|
-
icon:
|
|
320
|
+
icon: F(e === "light" ? k : M, {}),
|
|
309
321
|
onClick: () => {
|
|
310
322
|
t(e === "light" ? "dark" : "light");
|
|
311
323
|
}
|
|
@@ -313,7 +325,7 @@ function Me() {
|
|
|
313
325
|
}
|
|
314
326
|
//#endregion
|
|
315
327
|
//#region src/header/mock.ts
|
|
316
|
-
var
|
|
328
|
+
var Z = [
|
|
317
329
|
{
|
|
318
330
|
id: "points-500",
|
|
319
331
|
points: 500,
|
|
@@ -329,13 +341,8 @@ var Q = [
|
|
|
329
341
|
points: 5500,
|
|
330
342
|
price: 50,
|
|
331
343
|
recommended: !0
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
id: "points-24000",
|
|
335
|
-
points: 24e3,
|
|
336
|
-
price: 200
|
|
337
344
|
}
|
|
338
|
-
],
|
|
345
|
+
], Pe = [
|
|
339
346
|
{
|
|
340
347
|
id: "recharge-1",
|
|
341
348
|
type: "income",
|
|
@@ -408,14 +415,14 @@ var Q = [
|
|
|
408
415
|
badgeKind: "deducted",
|
|
409
416
|
badgeText: "已扣除"
|
|
410
417
|
}
|
|
411
|
-
], { RangePicker:
|
|
412
|
-
function
|
|
418
|
+
], { RangePicker: Fe } = c, Ie = 21, Le = 7;
|
|
419
|
+
function Re(e) {
|
|
413
420
|
return e === "recharge" ? "arcoblue" : e === "gift" ? "cyan" : e === "expired" ? "gray" : "orange";
|
|
414
421
|
}
|
|
415
|
-
function
|
|
422
|
+
function ze({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
|
|
416
423
|
let [l, u] = i("all"), [d, p] = i("all"), [m, C] = i(["2026-04-15", "2026-05-15"]), [w, T] = i(1), E = (e) => new Intl.NumberFormat().format(e), D = n(() => {
|
|
417
424
|
let [e, t] = m;
|
|
418
|
-
return
|
|
425
|
+
return Pe.filter((n) => {
|
|
419
426
|
let r = l === "all" || n.type === l, i = d === "all" || n.source === d, a = !e || n.date >= e, o = !t || n.date <= t;
|
|
420
427
|
return r && i && a && o;
|
|
421
428
|
});
|
|
@@ -427,12 +434,12 @@ function Re({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
|
|
|
427
434
|
{
|
|
428
435
|
title: r.pointsDetail,
|
|
429
436
|
dataIndex: "name",
|
|
430
|
-
render: (e, t) => /* @__PURE__ */
|
|
437
|
+
render: (e, t) => /* @__PURE__ */ I("div", {
|
|
431
438
|
className: "min-w-0",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ F(S.Text, {
|
|
433
440
|
className: "font-medium!",
|
|
434
441
|
children: t.name
|
|
435
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ F(S.Text, {
|
|
436
443
|
type: "secondary",
|
|
437
444
|
className: "mt-1 block! text-xs!",
|
|
438
445
|
children: t.meta
|
|
@@ -444,7 +451,7 @@ function Re({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
|
|
|
444
451
|
dataIndex: "amount",
|
|
445
452
|
width: 120,
|
|
446
453
|
align: "right",
|
|
447
|
-
render: (e, t) => /* @__PURE__ */
|
|
454
|
+
render: (e, t) => /* @__PURE__ */ I(S.Text, {
|
|
448
455
|
className: `font-semibold! ${t.amount > 0 ? "text-arco-success-6!" : "text-arco-danger-6!"}`,
|
|
449
456
|
children: [t.amount > 0 ? "+" : "", E(t.amount)]
|
|
450
457
|
})
|
|
@@ -454,23 +461,23 @@ function Re({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
|
|
|
454
461
|
dataIndex: "badgeText",
|
|
455
462
|
width: 110,
|
|
456
463
|
align: "right",
|
|
457
|
-
render: (e, t) => /* @__PURE__ */
|
|
458
|
-
color:
|
|
464
|
+
render: (e, t) => /* @__PURE__ */ F(x, {
|
|
465
|
+
color: Re(t.badgeKind),
|
|
459
466
|
children: t.badgeText
|
|
460
467
|
})
|
|
461
468
|
}
|
|
462
469
|
];
|
|
463
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ F(g, {
|
|
464
471
|
title: r.pointsDetail,
|
|
465
472
|
visible: e,
|
|
466
|
-
footer: /* @__PURE__ */
|
|
473
|
+
footer: /* @__PURE__ */ I("div", {
|
|
467
474
|
className: "flex justify-end gap-2",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ F(o, {
|
|
469
476
|
onClick: a,
|
|
470
477
|
children: r.close
|
|
471
|
-
}), /* @__PURE__ */
|
|
478
|
+
}), /* @__PURE__ */ F(o, {
|
|
472
479
|
type: "primary",
|
|
473
|
-
icon: /* @__PURE__ */
|
|
480
|
+
icon: /* @__PURE__ */ F(A, {}),
|
|
474
481
|
onClick: () => {
|
|
475
482
|
a(), c();
|
|
476
483
|
},
|
|
@@ -482,146 +489,146 @@ function Re({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
|
|
|
482
489
|
width: 780,
|
|
483
490
|
maxWidth: "calc(100vw - 48px)"
|
|
484
491
|
},
|
|
485
|
-
children: /* @__PURE__ */
|
|
492
|
+
children: /* @__PURE__ */ I("div", {
|
|
486
493
|
className: "max-h-[70vh] overflow-y-auto",
|
|
487
494
|
children: [
|
|
488
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ I(s, {
|
|
489
496
|
bordered: !1,
|
|
490
497
|
className: "from-arco-primary-light-1/40 to-cyan-400/5 rounded-none! bg-linear-to-br!",
|
|
491
498
|
children: [
|
|
492
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ F(S.Text, {
|
|
493
500
|
type: "secondary",
|
|
494
501
|
className: "text-xs!",
|
|
495
502
|
children: r.totalBalance
|
|
496
503
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ I("div", {
|
|
498
505
|
className: "mt-1.5 mb-3.5 ",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ F(S.Text, {
|
|
500
507
|
className: "text-3xl! font-bold!",
|
|
501
508
|
children: E(t.total)
|
|
502
|
-
}), /* @__PURE__ */
|
|
509
|
+
}), /* @__PURE__ */ I(S.Text, {
|
|
503
510
|
type: "secondary",
|
|
504
511
|
className: "ml-2 text-sm! ",
|
|
505
512
|
children: ["🪙 ", r.pointsUnit]
|
|
506
513
|
})]
|
|
507
514
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ I(f.Row, {
|
|
509
516
|
gutter: 12,
|
|
510
|
-
children: [/* @__PURE__ */
|
|
517
|
+
children: [/* @__PURE__ */ F(f.Col, {
|
|
511
518
|
span: 12,
|
|
512
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ I(s, {
|
|
513
520
|
size: "small",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
521
|
+
children: [/* @__PURE__ */ I("div", {
|
|
515
522
|
className: "mb-1 flex items-center justify-between",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ F(S.Text, {
|
|
517
524
|
type: "secondary",
|
|
518
525
|
className: "text-xs!",
|
|
519
526
|
children: r.rechargePoints
|
|
520
|
-
}), /* @__PURE__ */
|
|
527
|
+
}), /* @__PURE__ */ F(x, {
|
|
521
528
|
color: "arcoblue",
|
|
522
529
|
children: r.sourceRecharge
|
|
523
530
|
})]
|
|
524
|
-
}), /* @__PURE__ */
|
|
531
|
+
}), /* @__PURE__ */ F(S.Text, {
|
|
525
532
|
className: "text-lg! font-semibold!",
|
|
526
533
|
children: E(t.recharge)
|
|
527
534
|
})]
|
|
528
535
|
})
|
|
529
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ F(f.Col, {
|
|
530
537
|
span: 12,
|
|
531
|
-
children: /* @__PURE__ */
|
|
538
|
+
children: /* @__PURE__ */ I(s, {
|
|
532
539
|
size: "small",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
540
|
+
children: [/* @__PURE__ */ I("div", {
|
|
534
541
|
className: "mb-1 flex items-center justify-between",
|
|
535
|
-
children: [/* @__PURE__ */
|
|
542
|
+
children: [/* @__PURE__ */ F(S.Text, {
|
|
536
543
|
type: "secondary",
|
|
537
544
|
className: "text-xs!",
|
|
538
545
|
children: r.giftedPoints
|
|
539
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ F(x, {
|
|
540
547
|
color: "success",
|
|
541
548
|
children: r.sourceGifted
|
|
542
549
|
})]
|
|
543
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ F(S.Text, {
|
|
544
551
|
className: "text-lg! font-semibold!",
|
|
545
552
|
children: E(t.gifted)
|
|
546
553
|
})]
|
|
547
554
|
})
|
|
548
555
|
})]
|
|
549
556
|
}),
|
|
550
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ F(S.Text, {
|
|
551
558
|
type: "secondary",
|
|
552
559
|
className: "mt-2.5 block! text-xs!",
|
|
553
560
|
children: r.pointsDeductionTip
|
|
554
561
|
})
|
|
555
562
|
]
|
|
556
563
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ I("div", {
|
|
558
565
|
className: "px-6 py-4",
|
|
559
566
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ I(b, {
|
|
561
568
|
activeTab: l,
|
|
562
569
|
onChange: (e) => u(e),
|
|
563
570
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ F(b.TabPane, { title: r.all }, "all"),
|
|
572
|
+
/* @__PURE__ */ F(b.TabPane, { title: r.income }, "income"),
|
|
573
|
+
/* @__PURE__ */ F(b.TabPane, { title: r.expense }, "expense")
|
|
567
574
|
]
|
|
568
575
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ I("div", {
|
|
570
577
|
className: "mt-2 mb-3.5 flex flex-wrap items-center gap-2.5",
|
|
571
578
|
children: [
|
|
572
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ I(v, {
|
|
573
580
|
value: d,
|
|
574
581
|
style: { width: 140 },
|
|
575
582
|
onChange: (e) => p(e),
|
|
576
583
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ F(v.Option, {
|
|
578
585
|
value: "all",
|
|
579
586
|
children: r.sourceAll
|
|
580
587
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ F(v.Option, {
|
|
582
589
|
value: "recharge",
|
|
583
590
|
children: r.sourceRecharge
|
|
584
591
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ F(v.Option, {
|
|
586
593
|
value: "gift",
|
|
587
594
|
children: r.sourceGifted
|
|
588
595
|
})
|
|
589
596
|
]
|
|
590
597
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ F(Fe, {
|
|
592
599
|
value: m,
|
|
593
600
|
onChange: (e) => C(e),
|
|
594
601
|
style: { width: 260 }
|
|
595
602
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ F(o, {
|
|
597
604
|
onClick: () => h.success(r.refreshed),
|
|
598
605
|
children: r.query
|
|
599
606
|
})
|
|
600
607
|
]
|
|
601
608
|
}),
|
|
602
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ F(y, {
|
|
603
610
|
rowKey: "id",
|
|
604
611
|
columns: O,
|
|
605
612
|
data: D,
|
|
606
613
|
pagination: !1,
|
|
607
614
|
border: !1
|
|
608
615
|
}),
|
|
609
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ F(_, {
|
|
610
617
|
className: "mt-3 flex justify-center!",
|
|
611
618
|
current: w,
|
|
612
|
-
pageSize:
|
|
613
|
-
total:
|
|
619
|
+
pageSize: Le,
|
|
620
|
+
total: Ie,
|
|
614
621
|
onChange: T
|
|
615
622
|
})
|
|
616
623
|
]
|
|
617
624
|
}),
|
|
618
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ F(s, {
|
|
619
626
|
bordered: !1,
|
|
620
627
|
className: "bg-arco-primary-light-1/30 rounded-none!",
|
|
621
|
-
children: /* @__PURE__ */
|
|
628
|
+
children: /* @__PURE__ */ I(S.Text, {
|
|
622
629
|
type: "secondary",
|
|
623
630
|
className: "text-xs! leading-6!",
|
|
624
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ I("strong", { children: [r.pointsNoteTitle, ":"] }), r.pointsAccountNote]
|
|
625
632
|
})
|
|
626
633
|
})
|
|
627
634
|
]
|
|
@@ -630,17 +637,17 @@ function Re({ visible: e, points: t, text: r, onCancel: a, onRecharge: c }) {
|
|
|
630
637
|
}
|
|
631
638
|
//#endregion
|
|
632
639
|
//#region src/labels.ts
|
|
633
|
-
var
|
|
634
|
-
function
|
|
640
|
+
var Be = xe;
|
|
641
|
+
function Ve(e) {
|
|
635
642
|
return {
|
|
636
|
-
...
|
|
643
|
+
...Be,
|
|
637
644
|
...e
|
|
638
645
|
};
|
|
639
646
|
}
|
|
640
647
|
//#endregion
|
|
641
648
|
//#region src/header/components/ProfileModal.tsx
|
|
642
|
-
var
|
|
643
|
-
function
|
|
649
|
+
var He = 2048, Ue = 2 * 1024 * 1024;
|
|
650
|
+
function We(e) {
|
|
644
651
|
return new Promise((t, n) => {
|
|
645
652
|
let r = URL.createObjectURL(e), i = new Image();
|
|
646
653
|
i.onload = () => {
|
|
@@ -653,8 +660,8 @@ function Ue(e) {
|
|
|
653
660
|
}, i.src = r;
|
|
654
661
|
});
|
|
655
662
|
}
|
|
656
|
-
function
|
|
657
|
-
let u =
|
|
663
|
+
function Ge({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
|
|
664
|
+
let u = Ve(s), [f] = d.useForm(), [m, _] = i(!1), [v, y] = i(null), [b, x] = i(null), S = r(null);
|
|
658
665
|
t(() => () => {
|
|
659
666
|
S.current &&= (URL.revokeObjectURL(S.current), null);
|
|
660
667
|
}, []), t(() => {
|
|
@@ -669,7 +676,7 @@ function We({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
|
|
|
669
676
|
}, T = (e) => {
|
|
670
677
|
h.success(e);
|
|
671
678
|
};
|
|
672
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ F(g, {
|
|
673
680
|
title: u.profileTitle,
|
|
674
681
|
visible: e,
|
|
675
682
|
onOk: async () => {
|
|
@@ -689,42 +696,42 @@ function We({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
|
|
|
689
696
|
confirmLoading: m,
|
|
690
697
|
okText: u.profileSave,
|
|
691
698
|
cancelText: u.profileCancel,
|
|
692
|
-
children: /* @__PURE__ */
|
|
699
|
+
children: /* @__PURE__ */ I(d, {
|
|
693
700
|
form: f,
|
|
694
701
|
layout: "vertical",
|
|
695
|
-
children: [/* @__PURE__ */
|
|
702
|
+
children: [/* @__PURE__ */ F(d.Item, {
|
|
696
703
|
label: u.profileNickname,
|
|
697
704
|
field: "nickname",
|
|
698
705
|
rules: [{
|
|
699
706
|
required: !0,
|
|
700
707
|
message: u.profileNicknamePlaceholder
|
|
701
708
|
}],
|
|
702
|
-
children: /* @__PURE__ */
|
|
709
|
+
children: /* @__PURE__ */ F(p, {
|
|
703
710
|
placeholder: u.profileNicknamePlaceholder,
|
|
704
711
|
allowClear: !0
|
|
705
712
|
})
|
|
706
|
-
}), /* @__PURE__ */
|
|
713
|
+
}), /* @__PURE__ */ F(d.Item, {
|
|
707
714
|
label: u.profileAvatar,
|
|
708
|
-
children: /* @__PURE__ */
|
|
715
|
+
children: /* @__PURE__ */ I("div", {
|
|
709
716
|
className: "flex flex-col gap-2",
|
|
710
|
-
children: [/* @__PURE__ */
|
|
717
|
+
children: [/* @__PURE__ */ I("div", {
|
|
711
718
|
className: "flex items-center gap-3",
|
|
712
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ F(a, {
|
|
713
720
|
size: 64,
|
|
714
721
|
className: "shrink-0 bg-arco-primary-light-1!",
|
|
715
|
-
children: b || n?.avatar ? /* @__PURE__ */
|
|
722
|
+
children: b || n?.avatar ? /* @__PURE__ */ F("img", {
|
|
716
723
|
src: b || n?.avatar,
|
|
717
724
|
alt: "",
|
|
718
725
|
className: "block h-full w-full object-cover"
|
|
719
726
|
}) : n?.nickname?.[0] || n?.username?.[0] || "U"
|
|
720
|
-
}), /* @__PURE__ */
|
|
727
|
+
}), /* @__PURE__ */ F(C, {
|
|
721
728
|
accept: "image/*",
|
|
722
729
|
showUploadList: !1,
|
|
723
730
|
beforeUpload: async (e) => {
|
|
724
|
-
if (e.size >
|
|
731
|
+
if (e.size > Ue) return w(u.profileAvatarTooLarge), !1;
|
|
725
732
|
try {
|
|
726
|
-
let { width: t, height: n } = await
|
|
727
|
-
if (t >
|
|
733
|
+
let { width: t, height: n } = await We(e);
|
|
734
|
+
if (t > He || n > He) return w(u.profileAvatarDimensionExceeded), !1;
|
|
728
735
|
} catch (e) {
|
|
729
736
|
return w(u.profileAvatarInvalidImage, e), !1;
|
|
730
737
|
}
|
|
@@ -734,14 +741,14 @@ function We({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
|
|
|
734
741
|
return S.current = n, n;
|
|
735
742
|
}), y(e), !1;
|
|
736
743
|
},
|
|
737
|
-
children: /* @__PURE__ */
|
|
744
|
+
children: /* @__PURE__ */ F(o, {
|
|
738
745
|
type: "outline",
|
|
739
746
|
size: "small",
|
|
740
|
-
icon: /* @__PURE__ */
|
|
747
|
+
icon: /* @__PURE__ */ F(N, {}),
|
|
741
748
|
children: u.profileUploadAvatar
|
|
742
749
|
})
|
|
743
750
|
})]
|
|
744
|
-
}), /* @__PURE__ */
|
|
751
|
+
}), /* @__PURE__ */ F("span", {
|
|
745
752
|
className: "text-xs text-arco-text-3",
|
|
746
753
|
children: u.profileAvatarHint
|
|
747
754
|
})]
|
|
@@ -752,45 +759,53 @@ function We({ visible: e, user: n, labels: s, onCancel: c, onSubmit: l }) {
|
|
|
752
759
|
}
|
|
753
760
|
//#endregion
|
|
754
761
|
//#region src/header/components/UserAvatar.tsx
|
|
755
|
-
function
|
|
762
|
+
function Ke(e) {
|
|
756
763
|
return e?.nickname?.[0] || e?.username?.[0] || "U";
|
|
757
764
|
}
|
|
758
|
-
function
|
|
759
|
-
return /* @__PURE__ */
|
|
765
|
+
function Q({ user: e, size: t, className: n = "" }) {
|
|
766
|
+
return /* @__PURE__ */ F(a, {
|
|
760
767
|
size: t,
|
|
761
768
|
className: `bg-arco-primary/20! text-arco-primary-6 border-2 font-bold ${n}`,
|
|
762
|
-
children: e?.avatar ? /* @__PURE__ */
|
|
769
|
+
children: e?.avatar ? /* @__PURE__ */ F("img", {
|
|
763
770
|
src: e.avatar,
|
|
764
771
|
alt: "avatar",
|
|
765
772
|
className: "h-full w-full object-cover"
|
|
766
|
-
}) :
|
|
773
|
+
}) : Ke(e)
|
|
767
774
|
});
|
|
768
775
|
}
|
|
769
776
|
//#endregion
|
|
770
777
|
//#region src/header/components/RechargeModal.tsx
|
|
771
|
-
function
|
|
772
|
-
let [
|
|
773
|
-
|
|
774
|
-
|
|
778
|
+
function qe({ visible: e, user: t, points: n, text: a, onCancel: c, onPay: l }) {
|
|
779
|
+
let [u, d] = i(Z[2].id), [p, m] = i(""), h = r(null), _ = (e) => new Intl.NumberFormat().format(e), v = p.trim(), y = Number(v), b = v.length > 0, C = u === "custom", T = b && Number.isFinite(y) && Number.isInteger(y) && y >= 10, E = Z.find((e) => e.id === u), D = C && T ? {
|
|
780
|
+
id: "custom",
|
|
781
|
+
price: y,
|
|
782
|
+
points: y * 100,
|
|
783
|
+
custom: !0
|
|
784
|
+
} : E, O = D ? `${a.payNow} · $${D.price}` : b ? a.customRechargeMinError : a.selectRechargePackage, k = (e) => {
|
|
785
|
+
d(e), m("");
|
|
786
|
+
}, A = () => {
|
|
787
|
+
d("custom"), h.current?.focus();
|
|
788
|
+
};
|
|
789
|
+
return /* @__PURE__ */ F(g, {
|
|
790
|
+
title: a.rechargeTitle,
|
|
775
791
|
visible: e,
|
|
776
|
-
footer: /* @__PURE__ */
|
|
792
|
+
footer: /* @__PURE__ */ I("div", {
|
|
777
793
|
className: "mx-auto flex max-w-7xl items-center justify-between gap-5",
|
|
778
|
-
children: [/* @__PURE__ */
|
|
794
|
+
children: [/* @__PURE__ */ F("span", {
|
|
779
795
|
className: "text-arco-text-2 text-sm leading-6",
|
|
780
|
-
children:
|
|
796
|
+
children: a.rechargeHint
|
|
781
797
|
}), /* @__PURE__ */ F(o, {
|
|
782
798
|
type: "primary",
|
|
783
799
|
size: "large",
|
|
784
800
|
className: "min-w-48! font-bold!",
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
]
|
|
801
|
+
disabled: !D,
|
|
802
|
+
onClick: () => {
|
|
803
|
+
D && l(D);
|
|
804
|
+
},
|
|
805
|
+
children: O
|
|
791
806
|
})]
|
|
792
807
|
}),
|
|
793
|
-
onCancel:
|
|
808
|
+
onCancel: c,
|
|
794
809
|
alignCenter: !1,
|
|
795
810
|
wrapClassName: "overflow-hidden!",
|
|
796
811
|
style: {
|
|
@@ -800,41 +815,41 @@ function Ke({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c })
|
|
|
800
815
|
paddingBottom: 0
|
|
801
816
|
},
|
|
802
817
|
className: "top-0! m-0! flex! h-screen! w-screen! max-w-none! flex-col! [&_.arco-modal-body]:min-h-0! [&_.arco-modal-body]:flex-1! [&_.arco-modal-body]:overflow-hidden! [&_.arco-modal-body]:p-0! [&_.arco-modal-close-icon]:top-1.5! [&_.arco-modal-close-icon]:right-4! [&_.arco-modal-close-icon]:inline-flex! [&_.arco-modal-close-icon]:h-9! [&_.arco-modal-close-icon]:w-9! [&_.arco-modal-close-icon]:items-center! [&_.arco-modal-close-icon]:justify-center! [&_.arco-modal-close-icon]:rounded-lg! [&_.arco-modal-close-icon]:text-lg! [&_.arco-modal-close-icon]:leading-9! [&_.arco-modal-close-icon]:transition-colors [&_.arco-modal-close-icon:hover]:bg-arco-fill-2 [&_.arco-modal-close-icon:hover]:text-arco-primary-6 [&_.arco-modal-close-icon_svg]:h-[18px]! [&_.arco-modal-close-icon_svg]:w-[18px]! [&_.arco-modal-content]:flex! [&_.arco-modal-content]:h-auto! [&_.arco-modal-content]:min-h-0! [&_.arco-modal-content]:flex-1! [&_.arco-modal-content]:flex-col! [&_.arco-modal-content]:overflow-hidden! [&_.arco-modal-content]:rounded-none! [&_.arco-modal-footer]:shrink-0! [&_.arco-modal-header]:shrink-0!",
|
|
803
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ I("div", {
|
|
804
819
|
className: "mx-auto flex h-full w-full max-w-7xl flex-col items-center ",
|
|
805
|
-
children: [/* @__PURE__ */
|
|
820
|
+
children: [/* @__PURE__ */ I("div", {
|
|
806
821
|
className: "w-full border-arco-border-1 bg-arco-fill-1 text-arco-text-2 flex items-center gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
|
|
807
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: [/* @__PURE__ */ F(Q, {
|
|
808
823
|
user: t,
|
|
809
824
|
size: 32,
|
|
810
825
|
className: "shrink-0"
|
|
811
|
-
}), /* @__PURE__ */
|
|
826
|
+
}), /* @__PURE__ */ I("span", { children: [
|
|
812
827
|
t?.nickname || t?.username,
|
|
813
828
|
" · ",
|
|
814
|
-
|
|
829
|
+
a.currentBalance,
|
|
815
830
|
" ",
|
|
816
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ F("strong", {
|
|
817
832
|
className: "text-arco-text-1",
|
|
818
|
-
children:
|
|
833
|
+
children: _(n.total)
|
|
819
834
|
}),
|
|
820
835
|
" ",
|
|
821
|
-
|
|
836
|
+
a.pointsUnit
|
|
822
837
|
] })]
|
|
823
|
-
}), /* @__PURE__ */
|
|
838
|
+
}), /* @__PURE__ */ F("div", {
|
|
824
839
|
className: "mt-6 w-full",
|
|
825
|
-
children: /* @__PURE__ */
|
|
840
|
+
children: /* @__PURE__ */ I(f.Row, {
|
|
826
841
|
gutter: [16, 16],
|
|
827
|
-
children:
|
|
842
|
+
children: [Z.map((e) => /* @__PURE__ */ F(f.Col, {
|
|
828
843
|
xs: 24,
|
|
829
844
|
sm: 12,
|
|
830
845
|
lg: 6,
|
|
831
|
-
children: /* @__PURE__ */
|
|
846
|
+
children: /* @__PURE__ */ I(s, {
|
|
832
847
|
hoverable: !0,
|
|
833
848
|
role: "button",
|
|
834
849
|
tabIndex: 0,
|
|
835
|
-
onClick: () =>
|
|
850
|
+
onClick: () => k(e.id),
|
|
836
851
|
onKeyDown: (t) => {
|
|
837
|
-
(t.key === "Enter" || t.key === " ") &&
|
|
852
|
+
(t.key === "Enter" || t.key === " ") && k(e.id);
|
|
838
853
|
},
|
|
839
854
|
bodyStyle: {
|
|
840
855
|
minHeight: 192,
|
|
@@ -842,38 +857,129 @@ function Ke({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c })
|
|
|
842
857
|
flexDirection: "column",
|
|
843
858
|
justifyContent: "space-between"
|
|
844
859
|
},
|
|
845
|
-
className: `border-arco-border-2! bg-arco-bg-2! relative cursor-pointer overflow-hidden rounded-lg! shadow-sm! transition-all duration-200 before:absolute before:inset-x-0 before:top-0 before:h-1 before:bg-linear-to-r before:from-arco-primary before:to-transparent hover:shadow-md! ${
|
|
860
|
+
className: `border-arco-border-2! bg-arco-bg-2! relative cursor-pointer overflow-hidden rounded-lg! shadow-sm! transition-all duration-200 before:absolute before:inset-x-0 before:top-0 before:h-1 before:bg-linear-to-r before:from-arco-primary before:to-transparent hover:shadow-md! ${u === e.id ? "border-arco-primary-6! bg-arco-primary-light-1/40! ring-arco-primary-6/20 ring-2! shadow-[0_18px_38px_rgb(var(--primary-6)/22%)]!" : "hover:border-arco-primary-6!"}`,
|
|
846
861
|
children: [
|
|
847
|
-
|
|
848
|
-
"recommended" in e && e.recommended ? /* @__PURE__ */
|
|
862
|
+
u === e.id ? /* @__PURE__ */ F(w, { className: "text-arco-primary-6! absolute bottom-4 left-4 text-xl" }) : null,
|
|
863
|
+
"recommended" in e && e.recommended ? /* @__PURE__ */ F(x, {
|
|
849
864
|
color: "arcoblue",
|
|
850
865
|
className: "absolute top-4 right-4 text-xs! font-bold!",
|
|
851
866
|
children: "HOT"
|
|
852
867
|
}) : null,
|
|
853
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ I("div", {
|
|
854
869
|
className: "min-w-0 pr-16",
|
|
855
|
-
children: [/* @__PURE__ */
|
|
870
|
+
children: [/* @__PURE__ */ I(S.Text, {
|
|
856
871
|
className: "flex items-center text-3xl! leading-tight! font-bold!",
|
|
857
|
-
children: [
|
|
872
|
+
children: [_(e.points), /* @__PURE__ */ F("span", {
|
|
858
873
|
className: "ml-1 text-2xl",
|
|
859
874
|
children: "🪙"
|
|
860
875
|
})]
|
|
861
|
-
}), /* @__PURE__ */
|
|
876
|
+
}), /* @__PURE__ */ F(S.Text, {
|
|
862
877
|
type: "secondary",
|
|
863
878
|
className: "mt-1 block! text-sm!",
|
|
864
|
-
children:
|
|
879
|
+
children: a.pointsUnit
|
|
865
880
|
})]
|
|
866
881
|
}),
|
|
867
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ F("div", {
|
|
868
883
|
className: "mt-7 flex w-full justify-end",
|
|
869
|
-
children: /* @__PURE__ */
|
|
884
|
+
children: /* @__PURE__ */ I(S.Text, {
|
|
870
885
|
className: "text-arco-primary-6! text-right text-2xl! leading-tight! font-bold!",
|
|
871
886
|
children: ["$", e.price]
|
|
872
887
|
})
|
|
873
888
|
})
|
|
874
889
|
]
|
|
875
890
|
})
|
|
876
|
-
}, e.id))
|
|
891
|
+
}, e.id)), /* @__PURE__ */ F(f.Col, {
|
|
892
|
+
xs: 24,
|
|
893
|
+
sm: 12,
|
|
894
|
+
lg: 6,
|
|
895
|
+
children: /* @__PURE__ */ I(s, {
|
|
896
|
+
role: "button",
|
|
897
|
+
tabIndex: 0,
|
|
898
|
+
onClick: A,
|
|
899
|
+
onKeyDown: (e) => {
|
|
900
|
+
(e.key === "Enter" || e.key === " ") && A();
|
|
901
|
+
},
|
|
902
|
+
bodyStyle: {
|
|
903
|
+
minHeight: 192,
|
|
904
|
+
display: "flex",
|
|
905
|
+
flexDirection: "column",
|
|
906
|
+
justifyContent: "space-between"
|
|
907
|
+
},
|
|
908
|
+
className: `border-arco-border-2! bg-arco-bg-2! relative cursor-text overflow-hidden rounded-lg! shadow-sm! transition-all duration-200 before:absolute before:inset-x-0 before:top-0 before:h-1 before:bg-linear-to-r before:from-arco-primary before:to-transparent hover:shadow-md! ${T ? "border-arco-primary-6! bg-arco-primary-light-1/40! ring-arco-primary-6/20 ring-2! shadow-[0_18px_38px_rgb(var(--primary-6)/22%)]!" : b && C ? "border-arco-danger-6! hover:border-arco-danger-6!" : "hover:border-arco-primary-6!"}`,
|
|
909
|
+
children: [
|
|
910
|
+
T ? /* @__PURE__ */ F(w, { className: "text-arco-primary-6! absolute bottom-4 left-4 text-xl" }) : null,
|
|
911
|
+
/* @__PURE__ */ I("div", {
|
|
912
|
+
className: "flex min-w-0 flex-col gap-2.5",
|
|
913
|
+
children: [
|
|
914
|
+
/* @__PURE__ */ F(x, {
|
|
915
|
+
color: "arcoblue",
|
|
916
|
+
className: "w-fit text-xs! font-bold!",
|
|
917
|
+
children: a.customRechargeAmount
|
|
918
|
+
}),
|
|
919
|
+
/* @__PURE__ */ F(S.Text, {
|
|
920
|
+
type: "secondary",
|
|
921
|
+
className: "block! text-sm! leading-5!",
|
|
922
|
+
children: a.customRechargeDescription
|
|
923
|
+
}),
|
|
924
|
+
/* @__PURE__ */ I("div", {
|
|
925
|
+
className: "relative mt-1",
|
|
926
|
+
children: [
|
|
927
|
+
/* @__PURE__ */ F("span", {
|
|
928
|
+
className: "text-arco-text-3 pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-base font-semibold",
|
|
929
|
+
children: "$"
|
|
930
|
+
}),
|
|
931
|
+
/* @__PURE__ */ F("input", {
|
|
932
|
+
ref: h,
|
|
933
|
+
type: "number",
|
|
934
|
+
min: 10,
|
|
935
|
+
step: 1,
|
|
936
|
+
value: p,
|
|
937
|
+
placeholder: "10",
|
|
938
|
+
onFocus: () => d("custom"),
|
|
939
|
+
onChange: (e) => {
|
|
940
|
+
d("custom"), m(e.target.value);
|
|
941
|
+
},
|
|
942
|
+
onClick: (e) => e.stopPropagation(),
|
|
943
|
+
className: `bg-arco-bg-2 text-arco-text-1 w-full rounded-md border px-7 py-2.5 pr-14 text-lg font-bold outline-none transition-colors [font-family:var(--font-display)] focus:border-arco-primary-6 ${b && C && !T ? "border-arco-danger-6!" : "border-arco-border-2!"}`
|
|
944
|
+
}),
|
|
945
|
+
/* @__PURE__ */ F("span", {
|
|
946
|
+
className: "text-arco-text-3 pointer-events-none absolute top-1/2 right-3.5 -translate-y-1/2 text-xs font-medium",
|
|
947
|
+
children: "USD"
|
|
948
|
+
})
|
|
949
|
+
]
|
|
950
|
+
}),
|
|
951
|
+
b && C && !T ? /* @__PURE__ */ F(S.Text, {
|
|
952
|
+
type: "error",
|
|
953
|
+
className: "text-xs!",
|
|
954
|
+
children: a.customRechargeMinError
|
|
955
|
+
}) : null
|
|
956
|
+
]
|
|
957
|
+
}),
|
|
958
|
+
/* @__PURE__ */ I("div", {
|
|
959
|
+
className: "bg-arco-primary-light-1/40 mt-3 rounded-md px-3 py-2.5",
|
|
960
|
+
children: [
|
|
961
|
+
/* @__PURE__ */ F(S.Text, {
|
|
962
|
+
type: "secondary",
|
|
963
|
+
className: "block! text-xs!",
|
|
964
|
+
children: a.customRechargeEstimate
|
|
965
|
+
}),
|
|
966
|
+
/* @__PURE__ */ I(S.Text, {
|
|
967
|
+
className: "text-arco-primary-6! mt-0.5 block! text-lg! leading-tight! font-bold!",
|
|
968
|
+
children: [T ? _(y * 100) : "-", /* @__PURE__ */ F("span", {
|
|
969
|
+
className: "text-arco-text-3 ml-1 text-xs font-normal",
|
|
970
|
+
children: a.pointsUnit
|
|
971
|
+
})]
|
|
972
|
+
}),
|
|
973
|
+
/* @__PURE__ */ F(S.Text, {
|
|
974
|
+
type: "secondary",
|
|
975
|
+
className: "mt-0.5 block! text-[10px]!",
|
|
976
|
+
children: a.customRechargeRate
|
|
977
|
+
})
|
|
978
|
+
]
|
|
979
|
+
})
|
|
980
|
+
]
|
|
981
|
+
})
|
|
982
|
+
})]
|
|
877
983
|
})
|
|
878
984
|
})]
|
|
879
985
|
})
|
|
@@ -881,87 +987,87 @@ function Ke({ visible: e, user: t, points: n, text: r, onCancel: a, onPay: c })
|
|
|
881
987
|
}
|
|
882
988
|
//#endregion
|
|
883
989
|
//#region src/header/components/UserMenu.tsx
|
|
884
|
-
function
|
|
990
|
+
function Je({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPointsDetail: a, onLogout: s }) {
|
|
885
991
|
let c = (e) => new Intl.NumberFormat().format(e);
|
|
886
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ I("div", {
|
|
887
993
|
className: "w-80 overflow-hidden rounded-xl border border-arco-border-2 bg-arco-bg-popup shadow-[0_10px_28px_rgb(0_0_0/12%)]",
|
|
888
994
|
children: [
|
|
889
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ I("div", {
|
|
890
996
|
className: "flex items-center gap-3 px-6 pt-5 pb-4",
|
|
891
|
-
children: [/* @__PURE__ */
|
|
997
|
+
children: [/* @__PURE__ */ F(Q, {
|
|
892
998
|
user: e,
|
|
893
999
|
size: 48,
|
|
894
1000
|
className: "shrink-0"
|
|
895
|
-
}), /* @__PURE__ */
|
|
1001
|
+
}), /* @__PURE__ */ I("div", {
|
|
896
1002
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
897
|
-
children: [/* @__PURE__ */
|
|
1003
|
+
children: [/* @__PURE__ */ I("div", {
|
|
898
1004
|
className: "flex min-w-0 items-center gap-1.5",
|
|
899
|
-
children: [/* @__PURE__ */
|
|
1005
|
+
children: [/* @__PURE__ */ F("span", {
|
|
900
1006
|
className: "text-arco-text-1 truncate text-base leading-6 font-bold",
|
|
901
1007
|
children: e?.nickname || e?.username
|
|
902
|
-
}), /* @__PURE__ */
|
|
1008
|
+
}), /* @__PURE__ */ F(o, {
|
|
903
1009
|
type: "text",
|
|
904
1010
|
size: "mini",
|
|
905
|
-
icon: /* @__PURE__ */
|
|
1011
|
+
icon: /* @__PURE__ */ F(E, {}),
|
|
906
1012
|
className: "text-arco-text-3 h-6! min-w-6! px-0!",
|
|
907
1013
|
onClick: r
|
|
908
1014
|
})]
|
|
909
|
-
}), e?.email ? /* @__PURE__ */
|
|
1015
|
+
}), e?.email ? /* @__PURE__ */ F("span", {
|
|
910
1016
|
className: "text-arco-text-3 truncate text-xs leading-5",
|
|
911
1017
|
children: e.email
|
|
912
1018
|
}) : null]
|
|
913
1019
|
})]
|
|
914
1020
|
}),
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ F(l, { className: "m-0!" }),
|
|
1022
|
+
/* @__PURE__ */ I("ul", {
|
|
917
1023
|
className: "flex flex-col gap-3.5 px-6 py-4",
|
|
918
1024
|
children: [
|
|
919
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ I("li", {
|
|
920
1026
|
className: "text-arco-text-2 flex items-center justify-between gap-4 text-sm",
|
|
921
|
-
children: [/* @__PURE__ */
|
|
1027
|
+
children: [/* @__PURE__ */ F("span", { children: n.myPoints }), /* @__PURE__ */ F("strong", {
|
|
922
1028
|
className: "text-arco-primary-6 text-base font-bold",
|
|
923
1029
|
children: c(t.total)
|
|
924
1030
|
})]
|
|
925
1031
|
}),
|
|
926
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ I("li", {
|
|
927
1033
|
className: "text-arco-text-2 flex items-center justify-between gap-4 text-sm",
|
|
928
|
-
children: [/* @__PURE__ */
|
|
1034
|
+
children: [/* @__PURE__ */ F("span", { children: n.rechargePoints }), /* @__PURE__ */ F("strong", {
|
|
929
1035
|
className: "text-arco-text-1 text-base font-bold",
|
|
930
1036
|
children: c(t.recharge)
|
|
931
1037
|
})]
|
|
932
1038
|
}),
|
|
933
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ I("li", {
|
|
934
1040
|
className: "text-arco-text-2 flex items-center justify-between gap-4 text-sm",
|
|
935
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ F("span", { children: n.giftedPoints }), /* @__PURE__ */ F("strong", {
|
|
936
1042
|
className: "text-arco-text-1 text-base font-bold",
|
|
937
1043
|
children: c(t.gifted)
|
|
938
1044
|
})]
|
|
939
1045
|
})
|
|
940
1046
|
]
|
|
941
1047
|
}),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ F(l, { className: "m-0!" }),
|
|
1049
|
+
/* @__PURE__ */ I("div", {
|
|
944
1050
|
className: "flex flex-col gap-2 px-6 py-4",
|
|
945
|
-
children: [/* @__PURE__ */
|
|
1051
|
+
children: [/* @__PURE__ */ F(o, {
|
|
946
1052
|
type: "primary",
|
|
947
1053
|
long: !0,
|
|
948
|
-
icon: /* @__PURE__ */
|
|
1054
|
+
icon: /* @__PURE__ */ F(A, {}),
|
|
949
1055
|
className: "h-10! rounded-md! font-semibold!",
|
|
950
1056
|
onClick: i,
|
|
951
1057
|
children: n.recharge
|
|
952
|
-
}), /* @__PURE__ */
|
|
1058
|
+
}), /* @__PURE__ */ F(o, {
|
|
953
1059
|
long: !0,
|
|
954
|
-
icon: /* @__PURE__ */
|
|
1060
|
+
icon: /* @__PURE__ */ F(D, {}),
|
|
955
1061
|
className: "border-arco-border-2! bg-arco-fill-1! text-arco-text-1! h-10! rounded-md! font-semibold!",
|
|
956
1062
|
onClick: a,
|
|
957
1063
|
children: n.pointsDetail
|
|
958
1064
|
})]
|
|
959
1065
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ F(l, { className: "m-0!" }),
|
|
1067
|
+
/* @__PURE__ */ F("div", {
|
|
962
1068
|
className: "px-6 py-4",
|
|
963
|
-
children: /* @__PURE__ */
|
|
964
|
-
icon: /* @__PURE__ */
|
|
1069
|
+
children: /* @__PURE__ */ F(o, {
|
|
1070
|
+
icon: /* @__PURE__ */ F(j, {}),
|
|
965
1071
|
type: "text",
|
|
966
1072
|
status: "danger",
|
|
967
1073
|
long: !0,
|
|
@@ -975,236 +1081,236 @@ function qe({ user: e, points: t, text: n, onEditProfile: r, onRecharge: i, onPo
|
|
|
975
1081
|
}
|
|
976
1082
|
//#endregion
|
|
977
1083
|
//#region src/header/ManturHeader.tsx
|
|
978
|
-
var
|
|
1084
|
+
var Ye = "https://mantur.ai/images/logo.png", Xe = [
|
|
979
1085
|
"from-arco-primary-light-1 to-arco-primary-light-2 text-arco-primary-6",
|
|
980
1086
|
"from-arco-success-light-1 to-arco-success-light-2 text-arco-success-6",
|
|
981
1087
|
"from-arco-warning-light-1 to-arco-warning-light-2 text-arco-warning-6",
|
|
982
1088
|
"from-arco-danger-light-1 to-arco-danger-light-2 text-arco-danger-6"
|
|
983
1089
|
];
|
|
984
|
-
function
|
|
985
|
-
return `flex h-8 min-h-8 w-8 min-w-8 flex-none items-center justify-center rounded-lg bg-linear-to-br font-bold leading-none ${
|
|
1090
|
+
function Ze(e, t = !1) {
|
|
1091
|
+
return `flex h-8 min-h-8 w-8 min-w-8 flex-none items-center justify-center rounded-lg bg-linear-to-br font-bold leading-none ${Xe[e % Xe.length]} ${t ? "shadow-[inset_0_1px_3px_rgb(0_0_0/8%)]" : ""}`;
|
|
986
1092
|
}
|
|
987
|
-
function
|
|
1093
|
+
function Qe(e) {
|
|
988
1094
|
return e?.tenantName?.[0]?.toUpperCase() || "T";
|
|
989
1095
|
}
|
|
990
|
-
function
|
|
1096
|
+
function $(e, t, n) {
|
|
991
1097
|
let r = e?.roles?.map((e) => e.roleName).filter(Boolean);
|
|
992
1098
|
return r?.length ? r.join(", ") : e?.isOwner ? t : n;
|
|
993
1099
|
}
|
|
994
1100
|
function $e({ user: a, disabled: o = !1, brandSlot: s, children: c, onTenantContextChange: l }) {
|
|
995
|
-
let [d, f] = i(() =>
|
|
1101
|
+
let [d, f] = i(() => X()), p = Oe(d), [g, _] = i(!1), [v, y] = i(!1), [b, x] = i(!1), [S, C] = i(a), [w, E] = i([]), [D, O] = i(), [k, A] = i(!1), j = r(l), [M, N] = i({
|
|
996
1102
|
total: 0,
|
|
997
1103
|
recharge: 0,
|
|
998
1104
|
gifted: 0
|
|
999
|
-
}),
|
|
1000
|
-
total:
|
|
1001
|
-
recharge:
|
|
1002
|
-
gifted:
|
|
1003
|
-
},
|
|
1105
|
+
}), P = D?.tenantId || "", L = o, R = {
|
|
1106
|
+
total: M.total ?? 0,
|
|
1107
|
+
recharge: M.recharge ?? 0,
|
|
1108
|
+
gifted: M.gifted ?? 0
|
|
1109
|
+
}, z = async (e) => {
|
|
1004
1110
|
let t = await de(e);
|
|
1005
1111
|
return t && C(t), t;
|
|
1006
1112
|
};
|
|
1007
1113
|
t(() => {
|
|
1008
1114
|
C(a);
|
|
1009
1115
|
}, [a]), t(() => {
|
|
1010
|
-
|
|
1116
|
+
j.current = l;
|
|
1011
1117
|
}, [l]);
|
|
1012
|
-
let
|
|
1013
|
-
E(e.tenants), O(e.currentTenant),
|
|
1118
|
+
let B = e((e) => {
|
|
1119
|
+
E(e.tenants), O(e.currentTenant), j.current?.(e);
|
|
1014
1120
|
}, []);
|
|
1015
1121
|
t(() => {
|
|
1016
|
-
|
|
1122
|
+
A(!0), ye().then(B).catch((e) => {
|
|
1017
1123
|
console.warn("Failed to refresh Mantur tenant context.", e), h.error(p.error);
|
|
1018
|
-
}).finally(() =>
|
|
1019
|
-
}, [
|
|
1124
|
+
}).finally(() => A(!1));
|
|
1125
|
+
}, [B, p.error]), t(() => {
|
|
1020
1126
|
let e = (e) => {
|
|
1021
|
-
e instanceof CustomEvent &&
|
|
1127
|
+
e instanceof CustomEvent && N(e.detail);
|
|
1022
1128
|
};
|
|
1023
|
-
return window.addEventListener(U, e),
|
|
1129
|
+
return window.addEventListener(U, e), me().catch((e) => {
|
|
1024
1130
|
console.warn("Failed to refresh Mantur user points.", e);
|
|
1025
1131
|
}), () => {
|
|
1026
1132
|
window.removeEventListener(U, e);
|
|
1027
1133
|
};
|
|
1028
1134
|
}, []), t(() => {
|
|
1029
1135
|
let e = (e) => {
|
|
1030
|
-
f(e instanceof CustomEvent ?
|
|
1136
|
+
f(e instanceof CustomEvent ? Y(e.detail) : X());
|
|
1031
1137
|
};
|
|
1032
|
-
return window.addEventListener(
|
|
1033
|
-
window.removeEventListener(
|
|
1138
|
+
return window.addEventListener(J, e), window.addEventListener("storage", e), () => {
|
|
1139
|
+
window.removeEventListener(J, e), window.removeEventListener("storage", e);
|
|
1034
1140
|
};
|
|
1035
1141
|
}, []);
|
|
1036
|
-
let
|
|
1142
|
+
let V = (e) => {
|
|
1037
1143
|
h.success(e);
|
|
1038
|
-
},
|
|
1144
|
+
}, ee = (e, t) => {
|
|
1039
1145
|
console.error(t), h.error(e);
|
|
1040
1146
|
}, H = e(async (e) => {
|
|
1041
|
-
if (!
|
|
1042
|
-
|
|
1147
|
+
if (!L && e !== P) try {
|
|
1148
|
+
A(!0), B(await be(e)), V(p.switchedToTeam);
|
|
1043
1149
|
} catch (e) {
|
|
1044
|
-
|
|
1150
|
+
ee(p.error, e);
|
|
1045
1151
|
} finally {
|
|
1046
|
-
|
|
1152
|
+
A(!1);
|
|
1047
1153
|
}
|
|
1048
1154
|
}, [
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1155
|
+
B,
|
|
1156
|
+
P,
|
|
1157
|
+
L,
|
|
1052
1158
|
p.error,
|
|
1053
1159
|
p.switchedToTeam
|
|
1054
1160
|
]), te = (e) => {
|
|
1055
1161
|
let t = {
|
|
1056
|
-
total:
|
|
1057
|
-
recharge:
|
|
1058
|
-
gifted:
|
|
1162
|
+
total: R.total + e.points,
|
|
1163
|
+
recharge: R.recharge + e.points,
|
|
1164
|
+
gifted: R.gifted
|
|
1059
1165
|
};
|
|
1060
|
-
|
|
1061
|
-
}, ne = n(() => /* @__PURE__ */
|
|
1166
|
+
N(t), window.dispatchEvent(new CustomEvent(U, { detail: t })), h.success(p.rechargeSuccess), y(!1);
|
|
1167
|
+
}, ne = n(() => /* @__PURE__ */ I(m, {
|
|
1062
1168
|
className: "w-56 rounded-xl bg-arco-bg-popup shadow-[0_10px_28px_rgb(0_0_0/12%)] [&_.arco-menu-inner]:px-2 [&_.arco-menu-inner]:py-1",
|
|
1063
|
-
selectedKeys:
|
|
1169
|
+
selectedKeys: P ? [P] : [],
|
|
1064
1170
|
onClickMenuItem: H,
|
|
1065
|
-
children: [/* @__PURE__ */
|
|
1171
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1066
1172
|
className: "px-3 py-2 text-xs font-semibold tracking-[0.04em] text-arco-text-4 uppercase",
|
|
1067
1173
|
children: p.switchTeam
|
|
1068
|
-
}), w.map((e, t) => /* @__PURE__ */
|
|
1174
|
+
}), w.map((e, t) => /* @__PURE__ */ F(m.Item, {
|
|
1069
1175
|
className: "mb-1 h-auto! min-h-10! overflow-visible! rounded-lg! px-2! py-1! leading-normal!",
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1176
|
+
children: /* @__PURE__ */ I("div", {
|
|
1071
1177
|
className: "flex w-full items-center gap-3 leading-normal",
|
|
1072
|
-
children: [/* @__PURE__ */
|
|
1073
|
-
className:
|
|
1074
|
-
children:
|
|
1075
|
-
}), /* @__PURE__ */
|
|
1178
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1179
|
+
className: Ze(t),
|
|
1180
|
+
children: Qe(e)
|
|
1181
|
+
}), /* @__PURE__ */ I("div", {
|
|
1076
1182
|
className: "flex min-w-0 flex-col justify-center gap-0.75",
|
|
1077
|
-
children: [/* @__PURE__ */
|
|
1183
|
+
children: [/* @__PURE__ */ F("span", {
|
|
1078
1184
|
className: "text-sm leading-5 font-medium text-arco-text-1",
|
|
1079
1185
|
children: e.tenantName
|
|
1080
|
-
}), /* @__PURE__ */
|
|
1186
|
+
}), /* @__PURE__ */ F("span", {
|
|
1081
1187
|
className: "text-xs leading-4 text-arco-text-3",
|
|
1082
|
-
children:
|
|
1188
|
+
children: $(e, p.owner, p.member)
|
|
1083
1189
|
})]
|
|
1084
1190
|
})]
|
|
1085
1191
|
})
|
|
1086
1192
|
}, e.tenantId))]
|
|
1087
1193
|
}), [
|
|
1088
1194
|
H,
|
|
1089
|
-
|
|
1195
|
+
P,
|
|
1090
1196
|
w,
|
|
1091
1197
|
p
|
|
1092
|
-
]), re = /* @__PURE__ */
|
|
1198
|
+
]), re = /* @__PURE__ */ F(Je, {
|
|
1093
1199
|
user: S,
|
|
1094
|
-
points:
|
|
1200
|
+
points: R,
|
|
1095
1201
|
text: p,
|
|
1096
1202
|
onEditProfile: () => _(!0),
|
|
1097
1203
|
onRecharge: () => y(!0),
|
|
1098
1204
|
onPointsDetail: () => x(!0),
|
|
1099
1205
|
onLogout: ue
|
|
1100
1206
|
}), ie = Math.max(0, w.findIndex((e) => e.tenantId === D?.tenantId));
|
|
1101
|
-
return /* @__PURE__ */
|
|
1207
|
+
return /* @__PURE__ */ I("div", {
|
|
1102
1208
|
className: "flex h-20 items-center justify-between bg-transparent pr-8 shadow-[0_2px_10px_rgb(0_0_0/2%)] backdrop-blur-md max-md:pr-4",
|
|
1103
1209
|
children: [
|
|
1104
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ I("div", {
|
|
1105
1211
|
className: "flex items-center gap-6",
|
|
1106
|
-
children: [/* @__PURE__ */
|
|
1212
|
+
children: [/* @__PURE__ */ I("div", {
|
|
1107
1213
|
className: "flex w-65 items-center gap-3 px-8 max-md:w-auto max-md:px-4",
|
|
1108
|
-
children: [/* @__PURE__ */
|
|
1214
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1109
1215
|
className: "relative flex w-12 items-center justify-center overflow-hidden ",
|
|
1110
|
-
children: /* @__PURE__ */
|
|
1111
|
-
src:
|
|
1216
|
+
children: /* @__PURE__ */ F("img", {
|
|
1217
|
+
src: Ye,
|
|
1112
1218
|
alt: "logo",
|
|
1113
1219
|
className: "w-full object-contain",
|
|
1114
1220
|
onError: (e) => {
|
|
1115
1221
|
e.currentTarget.style.display = "none";
|
|
1116
1222
|
}
|
|
1117
1223
|
})
|
|
1118
|
-
}), s ?? /* @__PURE__ */
|
|
1224
|
+
}), s ?? /* @__PURE__ */ F("span", {
|
|
1119
1225
|
className: "text-lg font-bold tracking-normal text-arco-text-1",
|
|
1120
1226
|
children: p.title
|
|
1121
1227
|
})]
|
|
1122
|
-
}), /* @__PURE__ */
|
|
1228
|
+
}), /* @__PURE__ */ F(u, {
|
|
1123
1229
|
droplist: ne,
|
|
1124
1230
|
trigger: "click",
|
|
1125
1231
|
position: "bl",
|
|
1126
|
-
disabled:
|
|
1127
|
-
children: /* @__PURE__ */
|
|
1128
|
-
"aria-disabled":
|
|
1129
|
-
className: `flex items-center gap-3 rounded-full border border-arco-border-1 bg-arco-bg-1 px-2 py-1.5 transition-all ${
|
|
1232
|
+
disabled: L,
|
|
1233
|
+
children: /* @__PURE__ */ I("div", {
|
|
1234
|
+
"aria-disabled": L,
|
|
1235
|
+
className: `flex items-center gap-3 rounded-full border border-arco-border-1 bg-arco-bg-1 px-2 py-1.5 transition-all ${L ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-arco-fill-2 hover:shadow-[0_4px_12px_rgb(0_0_0/8%)]"}`,
|
|
1130
1236
|
children: [
|
|
1131
|
-
/* @__PURE__ */ P("div", {
|
|
1132
|
-
className: Xe(ie, !0),
|
|
1133
|
-
children: Ze(D)
|
|
1134
|
-
}),
|
|
1135
1237
|
/* @__PURE__ */ F("div", {
|
|
1238
|
+
className: Ze(ie, !0),
|
|
1239
|
+
children: Qe(D)
|
|
1240
|
+
}),
|
|
1241
|
+
/* @__PURE__ */ I("div", {
|
|
1136
1242
|
className: "flex min-w-0 flex-col",
|
|
1137
|
-
children: [/* @__PURE__ */
|
|
1243
|
+
children: [/* @__PURE__ */ F("span", {
|
|
1138
1244
|
className: "text-xs leading-none font-bold text-arco-text-1",
|
|
1139
|
-
children:
|
|
1140
|
-
}), /* @__PURE__ */
|
|
1245
|
+
children: k ? p.loading : D?.tenantName || p.loading
|
|
1246
|
+
}), /* @__PURE__ */ F("span", {
|
|
1141
1247
|
className: "mt-1 text-[10px] leading-none text-arco-text-3",
|
|
1142
|
-
children:
|
|
1248
|
+
children: $(D, p.owner, p.member)
|
|
1143
1249
|
})]
|
|
1144
1250
|
}),
|
|
1145
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ F(T, { className: "ml-1 text-arco-text-3" })
|
|
1146
1252
|
]
|
|
1147
1253
|
})
|
|
1148
1254
|
})]
|
|
1149
1255
|
}),
|
|
1150
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ F("div", {
|
|
1151
1257
|
className: "flex-1",
|
|
1152
1258
|
children: c
|
|
1153
1259
|
}),
|
|
1154
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ I("div", {
|
|
1155
1261
|
className: "flex items-center gap-4",
|
|
1156
|
-
children: [/* @__PURE__ */
|
|
1262
|
+
children: [/* @__PURE__ */ I("div", {
|
|
1157
1263
|
className: "flex items-center gap-4",
|
|
1158
|
-
children: [/* @__PURE__ */
|
|
1159
|
-
}), /* @__PURE__ */
|
|
1264
|
+
children: [/* @__PURE__ */ F(Ne, {}), /* @__PURE__ */ F(Me, {})]
|
|
1265
|
+
}), /* @__PURE__ */ F(u, {
|
|
1160
1266
|
droplist: re,
|
|
1161
1267
|
trigger: "click",
|
|
1162
1268
|
position: "br",
|
|
1163
1269
|
onVisibleChange: (e) => {
|
|
1164
|
-
e &&
|
|
1270
|
+
e && me().catch((e) => {
|
|
1165
1271
|
console.warn("Failed to refresh Mantur user points.", e);
|
|
1166
1272
|
});
|
|
1167
1273
|
},
|
|
1168
|
-
children: /* @__PURE__ */
|
|
1274
|
+
children: /* @__PURE__ */ I("div", {
|
|
1169
1275
|
className: "hover:bg-arco-fill-2 flex cursor-pointer items-center gap-2.5 rounded-full border border-transparent p-1 pr-2 transition-all",
|
|
1170
1276
|
children: [
|
|
1171
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ I("div", {
|
|
1172
1278
|
className: "from-arco-primary to-transparent relative rounded-full bg-linear-to-br p-0.5 shadow-sm",
|
|
1173
|
-
children: [/* @__PURE__ */
|
|
1279
|
+
children: [/* @__PURE__ */ F(Q, {
|
|
1174
1280
|
user: S,
|
|
1175
1281
|
size: 36
|
|
1176
|
-
}), /* @__PURE__ */
|
|
1282
|
+
}), /* @__PURE__ */ F("div", { className: "bg-arco-success border-arco-bg-white absolute right-0 bottom-0 h-3 w-3 rounded-full border-2 shadow-sm" })]
|
|
1177
1283
|
}),
|
|
1178
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ F("div", {
|
|
1179
1285
|
className: "hidden flex-col md:flex",
|
|
1180
|
-
children: /* @__PURE__ */
|
|
1286
|
+
children: /* @__PURE__ */ F("span", {
|
|
1181
1287
|
className: "text-arco-text-1 text-sm font-medium",
|
|
1182
1288
|
children: S?.nickname || S?.username
|
|
1183
1289
|
})
|
|
1184
1290
|
}),
|
|
1185
|
-
/* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ F(T, { className: "text-arco-text-3 ml-1" })
|
|
1186
1292
|
]
|
|
1187
1293
|
})
|
|
1188
1294
|
})]
|
|
1189
1295
|
}),
|
|
1190
|
-
/* @__PURE__ */
|
|
1296
|
+
/* @__PURE__ */ F(Ge, {
|
|
1191
1297
|
visible: g,
|
|
1192
1298
|
user: S,
|
|
1193
1299
|
labels: p,
|
|
1194
1300
|
onCancel: () => _(!1),
|
|
1195
|
-
onSubmit:
|
|
1301
|
+
onSubmit: z
|
|
1196
1302
|
}),
|
|
1197
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ F(qe, {
|
|
1198
1304
|
visible: v,
|
|
1199
1305
|
user: S,
|
|
1200
|
-
points:
|
|
1306
|
+
points: R,
|
|
1201
1307
|
text: p,
|
|
1202
1308
|
onCancel: () => y(!1),
|
|
1203
1309
|
onPay: te
|
|
1204
1310
|
}),
|
|
1205
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ F(ze, {
|
|
1206
1312
|
visible: b,
|
|
1207
|
-
points:
|
|
1313
|
+
points: R,
|
|
1208
1314
|
text: p,
|
|
1209
1315
|
onCancel: () => x(!1),
|
|
1210
1316
|
onRecharge: () => y(!0)
|
|
@@ -1511,7 +1617,7 @@ var et = /* @__PURE__ */ re((/* @__PURE__ */ te(((e, t) => {
|
|
|
1511
1617
|
})))(), 1);
|
|
1512
1618
|
function tt(e, t = "datetime", n) {
|
|
1513
1619
|
if (!e) return "-";
|
|
1514
|
-
let r = (n ?
|
|
1620
|
+
let r = (n ? Y(n) : X()).startsWith("en"), i = t === "date" ? r ? "MM/DD/YYYY" : "YYYY-MM-DD" : r ? "MM/DD/YYYY HH:mm:ss" : "YYYY-MM-DD HH:mm:ss";
|
|
1515
1621
|
return (0, et.default)(e).format(i);
|
|
1516
1622
|
}
|
|
1517
1623
|
//#endregion
|