@taskon/widget-react 0.0.1-beta.4 → 0.0.1-beta.6
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 +13 -4
- package/dist/CommunityTaskList.css +119 -111
- package/dist/EligibilityInfo.css +114 -110
- package/dist/LeaderboardWidget.css +73 -71
- package/dist/PageBuilder.css +5 -0
- package/dist/Quest.css +259 -255
- package/dist/TaskOnProvider.css +2 -0
- package/dist/UserCenterWidget.css +6 -6
- package/dist/UserCenterWidget2.css +1626 -1601
- package/dist/{dynamic-import-helper.css → WidgetShell.css} +2 -2
- package/dist/chunks/{CommunityTaskList-C9Gv8KOF.js → CommunityTaskList-Hde2OKHH.js} +1070 -580
- package/dist/chunks/{EligibilityInfo-D-Fuy9GE.js → EligibilityInfo-BV0Z2TgY.js} +1972 -1028
- package/dist/chunks/{LeaderboardWidget-BV2D2q1N.js → LeaderboardWidget-BNGRD5Bu.js} +270 -249
- package/dist/chunks/{PageBuilder-DQoU4Mwf.js → PageBuilder-C5DSHiW9.js} +5 -5
- package/dist/chunks/{Quest-B5NyVr3o.js → Quest-DG9zfXJo.js} +723 -513
- package/dist/chunks/{TaskOnProvider-93UxARFo.js → TaskOnProvider-BhamHIyY.js} +98 -68
- package/dist/chunks/{ThemeProvider-CPI_roeh.js → ThemeProvider-mXLdLSkq.js} +107 -20
- package/dist/chunks/{UserCenterWidget-cADBSVg7.js → UserCenterWidget-D5ttw4hO.js} +1328 -1337
- package/dist/chunks/{UserCenterWidget-BRtigY_S.js → UserCenterWidget-jDO5zTN1.js} +358 -254
- package/dist/chunks/{dynamic-import-helper-DwXlQC0S.js → WidgetShell-D7yC894Y.js} +447 -457
- package/dist/chunks/communitytask-es-CBNnS4o2.js +521 -0
- package/dist/chunks/communitytask-ja-GRf9cbdx.js +521 -0
- package/dist/chunks/communitytask-ko-Bf24PQKI.js +521 -0
- package/dist/chunks/communitytask-ru-CZm2CPoV.js +521 -0
- package/dist/chunks/leaderboardwidget-es-vKjrjQaz.js +146 -0
- package/dist/chunks/leaderboardwidget-ja-Q6u0HxKG.js +146 -0
- package/dist/chunks/leaderboardwidget-ko-CG6SWgxf.js +146 -0
- package/dist/chunks/leaderboardwidget-ru-DCcHcJGz.js +146 -0
- package/dist/chunks/quest-es-Dyyy0zaw.js +863 -0
- package/dist/chunks/quest-ja-Depog33y.js +863 -0
- package/dist/chunks/quest-ko-BMu3uRQJ.js +863 -0
- package/dist/chunks/quest-ru-xne814Rw.js +863 -0
- package/dist/chunks/taskwidget-es-Do9b3Mqw.js +245 -0
- package/dist/chunks/taskwidget-ja-CqSu-yWA.js +245 -0
- package/dist/chunks/taskwidget-ko-EHgXFV4B.js +245 -0
- package/dist/chunks/taskwidget-ru-CMbLQDK4.js +245 -0
- package/dist/chunks/usercenter-es-Dz3Wp2vV.js +512 -0
- package/dist/chunks/usercenter-ja-CKE4DJC6.js +512 -0
- package/dist/chunks/usercenter-ko-Dtpkn2qb.js +512 -0
- package/dist/chunks/usercenter-ru-DnBGee45.js +512 -0
- package/dist/community-task.d.ts +0 -390
- package/dist/community-task.js +2 -7
- package/dist/core.d.ts +46 -10
- package/dist/core.js +11 -11
- package/dist/index.d.ts +46 -667
- package/dist/index.js +19 -28
- package/dist/leaderboard.d.ts +0 -498
- package/dist/leaderboard.js +2 -16
- package/dist/page-builder.js +1 -1
- package/dist/quest.d.ts +0 -289
- package/dist/quest.js +2 -5
- package/dist/user-center.d.ts +0 -1608
- package/dist/user-center.js +2 -494
- package/package.json +5 -2
- package/dist/chunks/leaderboardwidget-ja-Bj6gz6y1.js +0 -119
- package/dist/chunks/leaderboardwidget-ko-f1cLO9ic.js +0 -119
- package/dist/chunks/usercenter-ja-B2465c1O.js +0 -326
- package/dist/chunks/usercenter-ko-xAEYxqLg.js +0 -326
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { T as Table, u as usePagination, D as Dialog, B as Button, a as useResolvedWidgetConfig, W as WidgetShell, _ as __variableDynamicImportRuntimeHelper } from "./dynamic-import-helper-DwXlQC0S.js";
|
|
2
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useRef, useCallback, useLayoutEffect, useMemo, useEffect } from "react";
|
|
4
3
|
import { UserCenterRewardCardType, USER_CENTER_PAGE_SIZE, createUserCenterApi, SnsType, createUserApi, VerifyCodeType, getChainName, truncateAddress, filterEnabledAccounts, filterEnabledWallets, USER_CENTER_REWARD_CARD_TYPES, RewardType, toWei, LockedType, filterEnabledTabs, UserCenterTabType } from "@taskon/core";
|
|
5
|
-
import {
|
|
6
|
-
import { L as LoadingState, E as EmptyState, P as Pagination,
|
|
4
|
+
import { h as useTaskOnContext } from "./ThemeProvider-mXLdLSkq.js";
|
|
5
|
+
import { u as useUserCenterLocale, L as LoadingState, E as EmptyState, P as Pagination, f as formatDateTime, A as AssetImage, b as buildRewardCards, a as useBindSocialAccount, I as Input, c as useTokenAssets, d as useRewardDetails, e as usePointsHistory, W as WithdrawForm, g as PointsList, N as NftRewardContent, T as TokenRewardContent } from "./UserCenterWidget-D5ttw4hO.js";
|
|
6
|
+
import { T as Table, a as usePagination, D as Dialog, B as Button, u as useResolvedWidgetConfig, W as WidgetShell } from "./WidgetShell-D7yC894Y.js";
|
|
7
7
|
import { u as useWallet, d as useToast } from "./useToast-CaRkylKe.js";
|
|
8
8
|
import '../UserCenterWidget.css';function Tabs({
|
|
9
9
|
items,
|
|
@@ -90,16 +90,16 @@ function ActivityHistoryList({
|
|
|
90
90
|
loading,
|
|
91
91
|
error,
|
|
92
92
|
pagination,
|
|
93
|
-
messages,
|
|
94
93
|
mode = "pagination",
|
|
95
94
|
onItemClick,
|
|
96
95
|
onRetry
|
|
97
96
|
}) {
|
|
97
|
+
const { messages } = useUserCenterLocale();
|
|
98
98
|
const columns = useMemo(
|
|
99
99
|
() => [
|
|
100
100
|
{
|
|
101
101
|
key: "campaign_name",
|
|
102
|
-
title: messages.
|
|
102
|
+
title: messages.activity_name,
|
|
103
103
|
cellClassName: "taskon-activity-history__cell--name",
|
|
104
104
|
render: (_value, row) => /* @__PURE__ */ jsxs("div", { className: "taskon-activity-history__name-cell", children: [
|
|
105
105
|
/* @__PURE__ */ jsx("span", { className: "taskon-activity-history__campaign-name", children: row.campaign_name }),
|
|
@@ -108,14 +108,14 @@ function ActivityHistoryList({
|
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
key: "time",
|
|
111
|
-
title: messages.
|
|
111
|
+
title: messages.activity_time,
|
|
112
112
|
width: "380px",
|
|
113
113
|
align: "right",
|
|
114
114
|
cellClassName: "taskon-activity-history__cell--time",
|
|
115
115
|
render: (_value, row) => formatTimeRange(row.start_time, row.end_time)
|
|
116
116
|
}
|
|
117
117
|
],
|
|
118
|
-
[messages.
|
|
118
|
+
[messages.activity_name, messages.activity_time]
|
|
119
119
|
);
|
|
120
120
|
const rowConfig = useMemo(
|
|
121
121
|
() => ({
|
|
@@ -142,7 +142,7 @@ function ActivityHistoryList({
|
|
|
142
142
|
] });
|
|
143
143
|
}
|
|
144
144
|
if (!loading && data.length === 0) {
|
|
145
|
-
return /* @__PURE__ */ jsx(EmptyState, { message: messages.
|
|
145
|
+
return /* @__PURE__ */ jsx(EmptyState, { message: messages.empty_activity_history });
|
|
146
146
|
}
|
|
147
147
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-activity-history", children: [
|
|
148
148
|
/* @__PURE__ */ jsx(
|
|
@@ -165,8 +165,7 @@ function ActivityHistoryList({
|
|
|
165
165
|
onPrevious: pagination.goToPrevious,
|
|
166
166
|
onNext: pagination.goToNext,
|
|
167
167
|
hasPrevious: pagination.hasPrevious,
|
|
168
|
-
hasNext: pagination.hasNext
|
|
169
|
-
messages
|
|
168
|
+
hasNext: pagination.hasNext
|
|
170
169
|
}
|
|
171
170
|
) : pagination.hasMore && /* @__PURE__ */ jsx("div", { className: "taskon-activity-history__load-more", children: /* @__PURE__ */ jsx(
|
|
172
171
|
"button",
|
|
@@ -175,25 +174,31 @@ function ActivityHistoryList({
|
|
|
175
174
|
className: "taskon-activity-history__load-more-btn",
|
|
176
175
|
onClick: pagination.loadMore,
|
|
177
176
|
disabled: loading,
|
|
178
|
-
children: loading ? messages.loading : messages.
|
|
177
|
+
children: loading ? messages.loading : messages.load_more
|
|
179
178
|
}
|
|
180
179
|
) })
|
|
181
180
|
] });
|
|
182
181
|
}
|
|
183
|
-
function getCardTitle(type, messages, pointsData) {
|
|
182
|
+
function getCardTitle(type, messages, pointsData, xpLevelData) {
|
|
183
|
+
var _a;
|
|
184
184
|
switch (type) {
|
|
185
185
|
case UserCenterRewardCardType.Token:
|
|
186
|
-
return messages.
|
|
186
|
+
return messages.reward_token;
|
|
187
187
|
case UserCenterRewardCardType.Nft:
|
|
188
|
-
return messages.
|
|
188
|
+
return messages.reward_nft;
|
|
189
189
|
case UserCenterRewardCardType.Whitelist:
|
|
190
|
-
return messages.
|
|
190
|
+
return messages.reward_whitelist;
|
|
191
191
|
case UserCenterRewardCardType.DiscordRole:
|
|
192
|
-
return messages.
|
|
192
|
+
return messages.reward_discord_role;
|
|
193
193
|
case UserCenterRewardCardType.Points:
|
|
194
|
-
return (pointsData == null ? void 0 : pointsData.points_name) ?? messages.
|
|
195
|
-
case UserCenterRewardCardType.XpLevel:
|
|
196
|
-
|
|
194
|
+
return (pointsData == null ? void 0 : pointsData.points_name) ?? messages.reward_points;
|
|
195
|
+
case UserCenterRewardCardType.XpLevel: {
|
|
196
|
+
const xpPointsName = (_a = xpLevelData == null ? void 0 : xpLevelData.xpPointsName) == null ? void 0 : _a.trim();
|
|
197
|
+
if (xpPointsName) {
|
|
198
|
+
return `${xpPointsName} & ${messages.level}`;
|
|
199
|
+
}
|
|
200
|
+
return messages.reward_xp_level;
|
|
201
|
+
}
|
|
197
202
|
default:
|
|
198
203
|
return type;
|
|
199
204
|
}
|
|
@@ -209,24 +214,75 @@ function TokenIcon() {
|
|
|
209
214
|
/* @__PURE__ */ jsx("path", { d: "M12.5 2L3 10H22L12.5 2Z", fill: "url(#token-gem-top)" }),
|
|
210
215
|
/* @__PURE__ */ jsx("path", { d: "M3 10L12.5 26L12.5 10H3Z", fill: "url(#token-gem-left)" }),
|
|
211
216
|
/* @__PURE__ */ jsx("path", { d: "M22 10L12.5 26L12.5 10H22Z", fill: "url(#token-gem-right)" }),
|
|
212
|
-
/* @__PURE__ */ jsx(
|
|
217
|
+
/* @__PURE__ */ jsx(
|
|
218
|
+
"path",
|
|
219
|
+
{
|
|
220
|
+
d: "M12.5 2L8 10H17L12.5 2Z",
|
|
221
|
+
fill: "url(#token-gem-highlight)",
|
|
222
|
+
fillOpacity: "0.6"
|
|
223
|
+
}
|
|
224
|
+
),
|
|
213
225
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
214
|
-
/* @__PURE__ */ jsxs(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
/* @__PURE__ */ jsxs(
|
|
227
|
+
"linearGradient",
|
|
228
|
+
{
|
|
229
|
+
id: "token-gem-top",
|
|
230
|
+
x1: "12.5",
|
|
231
|
+
y1: "2",
|
|
232
|
+
x2: "12.5",
|
|
233
|
+
y2: "10",
|
|
234
|
+
gradientUnits: "userSpaceOnUse",
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#81D4FA" }),
|
|
237
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#4FC3F7" })
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ jsxs(
|
|
242
|
+
"linearGradient",
|
|
243
|
+
{
|
|
244
|
+
id: "token-gem-left",
|
|
245
|
+
x1: "3",
|
|
246
|
+
y1: "10",
|
|
247
|
+
x2: "12.5",
|
|
248
|
+
y2: "26",
|
|
249
|
+
gradientUnits: "userSpaceOnUse",
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#4FC3F7" }),
|
|
252
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#0288D1" })
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
/* @__PURE__ */ jsxs(
|
|
257
|
+
"linearGradient",
|
|
258
|
+
{
|
|
259
|
+
id: "token-gem-right",
|
|
260
|
+
x1: "22",
|
|
261
|
+
y1: "10",
|
|
262
|
+
x2: "12.5",
|
|
263
|
+
y2: "26",
|
|
264
|
+
gradientUnits: "userSpaceOnUse",
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#29B6F6" }),
|
|
267
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#0277BD" })
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
/* @__PURE__ */ jsxs(
|
|
272
|
+
"linearGradient",
|
|
273
|
+
{
|
|
274
|
+
id: "token-gem-highlight",
|
|
275
|
+
x1: "12.5",
|
|
276
|
+
y1: "2",
|
|
277
|
+
x2: "12.5",
|
|
278
|
+
y2: "10",
|
|
279
|
+
gradientUnits: "userSpaceOnUse",
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#E1F5FE" }),
|
|
282
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#81D4FA" })
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
)
|
|
230
286
|
] })
|
|
231
287
|
] });
|
|
232
288
|
}
|
|
@@ -257,10 +313,21 @@ function XpLevelIcon() {
|
|
|
257
313
|
strokeLinejoin: "round"
|
|
258
314
|
}
|
|
259
315
|
),
|
|
260
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
316
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
317
|
+
"linearGradient",
|
|
318
|
+
{
|
|
319
|
+
id: "xp-gradient",
|
|
320
|
+
x1: "13",
|
|
321
|
+
y1: "2",
|
|
322
|
+
x2: "13",
|
|
323
|
+
y2: "21.5",
|
|
324
|
+
gradientUnits: "userSpaceOnUse",
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#FDE68A" }),
|
|
327
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#F59E0B" })
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
) })
|
|
264
331
|
] });
|
|
265
332
|
}
|
|
266
333
|
function PointsIcon() {
|
|
@@ -272,10 +339,21 @@ function PointsIcon() {
|
|
|
272
339
|
fill: "url(#points-gradient)"
|
|
273
340
|
}
|
|
274
341
|
),
|
|
275
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
342
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
343
|
+
"linearGradient",
|
|
344
|
+
{
|
|
345
|
+
id: "points-gradient",
|
|
346
|
+
x1: "12",
|
|
347
|
+
y1: "2",
|
|
348
|
+
x2: "12",
|
|
349
|
+
y2: "20.8",
|
|
350
|
+
gradientUnits: "userSpaceOnUse",
|
|
351
|
+
children: [
|
|
352
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#A78BFA" }),
|
|
353
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#7C3AED" })
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
) })
|
|
279
357
|
] });
|
|
280
358
|
}
|
|
281
359
|
function DefaultIcon({
|
|
@@ -306,10 +384,11 @@ function AssetCard({
|
|
|
306
384
|
value,
|
|
307
385
|
selected = false,
|
|
308
386
|
onClick,
|
|
309
|
-
|
|
310
|
-
|
|
387
|
+
pointsData,
|
|
388
|
+
xpLevelData
|
|
311
389
|
}) {
|
|
312
|
-
const
|
|
390
|
+
const { messages } = useUserCenterLocale();
|
|
391
|
+
const title = getCardTitle(type, messages, pointsData, xpLevelData);
|
|
313
392
|
const iconUrl = getCardIconUrl(type, pointsData);
|
|
314
393
|
const iconClassName = `taskon-asset-card__icon${needsLightBackground(type) ? " taskon-asset-card__icon--light" : ""}`;
|
|
315
394
|
return /* @__PURE__ */ jsxs(
|
|
@@ -320,7 +399,14 @@ function AssetCard({
|
|
|
320
399
|
onClick,
|
|
321
400
|
"aria-pressed": selected,
|
|
322
401
|
children: [
|
|
323
|
-
/* @__PURE__ */ jsx("div", { className: iconClassName, children: iconUrl ? /* @__PURE__ */ jsx(
|
|
402
|
+
/* @__PURE__ */ jsx("div", { className: iconClassName, children: iconUrl ? /* @__PURE__ */ jsx(
|
|
403
|
+
"img",
|
|
404
|
+
{
|
|
405
|
+
src: iconUrl,
|
|
406
|
+
alt: title,
|
|
407
|
+
className: "taskon-asset-card__icon-img"
|
|
408
|
+
}
|
|
409
|
+
) : /* @__PURE__ */ jsx(DefaultIcon, { type }) }),
|
|
324
410
|
/* @__PURE__ */ jsxs("div", { className: "taskon-asset-card__content", children: [
|
|
325
411
|
/* @__PURE__ */ jsx("span", { className: "taskon-asset-card__title", children: title }),
|
|
326
412
|
/* @__PURE__ */ jsx("span", { className: "taskon-asset-card__value", children: value })
|
|
@@ -333,9 +419,9 @@ function AssetCarousel({
|
|
|
333
419
|
cards,
|
|
334
420
|
selectedCard,
|
|
335
421
|
selectedPointsId,
|
|
336
|
-
onSelectCard
|
|
337
|
-
messages
|
|
422
|
+
onSelectCard
|
|
338
423
|
}) {
|
|
424
|
+
const { messages } = useUserCenterLocale();
|
|
339
425
|
const containerRef = useRef(null);
|
|
340
426
|
const [showLeftArrow, setShowLeftArrow] = useState(false);
|
|
341
427
|
const [showRightArrow, setShowRightArrow] = useState(false);
|
|
@@ -347,19 +433,16 @@ function AssetCarousel({
|
|
|
347
433
|
setShowLeftArrow(scrollLeft > 0);
|
|
348
434
|
setShowRightArrow(scrollLeft + clientWidth < scrollWidth - 1);
|
|
349
435
|
}, []);
|
|
350
|
-
useCallback(
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
},
|
|
361
|
-
[]
|
|
362
|
-
);
|
|
436
|
+
useCallback((direction) => {
|
|
437
|
+
const container = containerRef.current;
|
|
438
|
+
if (!container) return;
|
|
439
|
+
const scrollAmount = 200;
|
|
440
|
+
const newScrollLeft = direction === "left" ? container.scrollLeft - scrollAmount : container.scrollLeft + scrollAmount;
|
|
441
|
+
container.scrollTo({
|
|
442
|
+
left: newScrollLeft,
|
|
443
|
+
behavior: "smooth"
|
|
444
|
+
});
|
|
445
|
+
}, []);
|
|
363
446
|
const isCardSelected = useCallback(
|
|
364
447
|
(card) => {
|
|
365
448
|
if (selectedCard !== card.type) return false;
|
|
@@ -385,7 +468,7 @@ function AssetCarousel({
|
|
|
385
468
|
return /* @__PURE__ */ jsx("div", { className: "taskon-asset-carousel--empty" });
|
|
386
469
|
}
|
|
387
470
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-asset-carousel", children: [
|
|
388
|
-
/* @__PURE__ */ jsx("h3", { className: "taskon-asset-carousel__title", children: messages.
|
|
471
|
+
/* @__PURE__ */ jsx("h3", { className: "taskon-asset-carousel__title", children: messages.section_you_have_earned }),
|
|
389
472
|
/* @__PURE__ */ jsx("div", { ref: containerRef, className: "taskon-asset-carousel__container", children: visibleCards.map((card, index) => {
|
|
390
473
|
var _a;
|
|
391
474
|
return /* @__PURE__ */ jsx(
|
|
@@ -398,8 +481,8 @@ function AssetCarousel({
|
|
|
398
481
|
var _a2;
|
|
399
482
|
return onSelectCard(card.type, (_a2 = card.pointsData) == null ? void 0 : _a2.points_id);
|
|
400
483
|
},
|
|
401
|
-
|
|
402
|
-
|
|
484
|
+
pointsData: card.pointsData,
|
|
485
|
+
xpLevelData: card.xpLevelData
|
|
403
486
|
},
|
|
404
487
|
`${card.type}-${((_a = card.pointsData) == null ? void 0 : _a.points_id) ?? index}`
|
|
405
488
|
);
|
|
@@ -464,26 +547,28 @@ function XpLevelCard({
|
|
|
464
547
|
historyLoading,
|
|
465
548
|
historyError,
|
|
466
549
|
pagination,
|
|
467
|
-
messages,
|
|
468
550
|
className = ""
|
|
469
551
|
}) {
|
|
552
|
+
var _a;
|
|
553
|
+
const { messages } = useUserCenterLocale();
|
|
470
554
|
const { level, currentXp, nextLevelXp, totalXp } = xpData;
|
|
555
|
+
const pointsName = ((_a = xpData.pointsName) == null ? void 0 : _a.trim()) || messages.default_xp_points_name;
|
|
471
556
|
const xpToNext = Math.max(0, nextLevelXp - currentXp);
|
|
472
557
|
const columns = [
|
|
473
558
|
{
|
|
474
559
|
key: "detail",
|
|
475
|
-
title: messages.
|
|
560
|
+
title: messages.column_detail,
|
|
476
561
|
render: (_, row) => /* @__PURE__ */ jsx("span", { className: "taskon-points-list__name", children: row.name })
|
|
477
562
|
},
|
|
478
563
|
{
|
|
479
564
|
key: "time",
|
|
480
|
-
title: messages.
|
|
565
|
+
title: messages.column_time,
|
|
481
566
|
width: 160,
|
|
482
567
|
render: (_, row) => /* @__PURE__ */ jsx("span", { className: "taskon-points-list__time", children: formatDateTime(row.receive_time) })
|
|
483
568
|
},
|
|
484
569
|
{
|
|
485
570
|
key: "amount",
|
|
486
|
-
title: `${messages.
|
|
571
|
+
title: `${messages.column_amount} (${pointsName})`,
|
|
487
572
|
width: 160,
|
|
488
573
|
align: "right",
|
|
489
574
|
render: (_, row) => {
|
|
@@ -525,10 +610,11 @@ function XpLevelCard({
|
|
|
525
610
|
] })
|
|
526
611
|
] }),
|
|
527
612
|
/* @__PURE__ */ jsxs("div", { className: "taskon-xp-level-card__xp", children: [
|
|
528
|
-
/* @__PURE__ */ jsx("span", { className: "taskon-xp-level-card__xp-label", children: messages.
|
|
613
|
+
/* @__PURE__ */ jsx("span", { className: "taskon-xp-level-card__xp-label", children: messages.total_xp }),
|
|
529
614
|
/* @__PURE__ */ jsxs("span", { className: "taskon-xp-level-card__xp-value", children: [
|
|
530
615
|
formatNumber(totalXp),
|
|
531
|
-
"
|
|
616
|
+
" ",
|
|
617
|
+
pointsName
|
|
532
618
|
] })
|
|
533
619
|
] })
|
|
534
620
|
] }),
|
|
@@ -538,21 +624,24 @@ function XpLevelCard({
|
|
|
538
624
|
formatNumber(currentXp),
|
|
539
625
|
" / ",
|
|
540
626
|
formatNumber(nextLevelXp),
|
|
541
|
-
"
|
|
627
|
+
" ",
|
|
628
|
+
pointsName
|
|
542
629
|
] }),
|
|
543
630
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
544
|
-
messages.
|
|
631
|
+
messages.xp_to_next_level,
|
|
545
632
|
": ",
|
|
546
|
-
formatNumber(xpToNext)
|
|
633
|
+
formatNumber(xpToNext),
|
|
634
|
+
" ",
|
|
635
|
+
pointsName
|
|
547
636
|
] })
|
|
548
637
|
] }),
|
|
549
638
|
/* @__PURE__ */ jsx(ProgressBar, { value: currentXp, max: nextLevelXp, height: 10 })
|
|
550
639
|
] }),
|
|
551
640
|
/* @__PURE__ */ jsxs("div", { className: "taskon-xp-level-card__history", children: [
|
|
552
|
-
/* @__PURE__ */ jsx("h4", { className: "taskon-xp-level-card__history-title", children: messages.
|
|
641
|
+
/* @__PURE__ */ jsx("h4", { className: "taskon-xp-level-card__history-title", children: messages.xp_history }),
|
|
553
642
|
historyLoading && historyData.length === 0 && /* @__PURE__ */ jsx(LoadingState, { message: messages.loading }),
|
|
554
643
|
historyError && historyData.length === 0 && /* @__PURE__ */ jsx("div", { className: "taskon-user-center-error", children: /* @__PURE__ */ jsx("p", { className: "taskon-user-center-error__message", children: historyError.message }) }),
|
|
555
|
-
!historyLoading && !historyError && historyData.length === 0 && /* @__PURE__ */ jsx(EmptyState, { message: messages.
|
|
644
|
+
!historyLoading && !historyError && historyData.length === 0 && /* @__PURE__ */ jsx(EmptyState, { message: messages.no_data }),
|
|
556
645
|
historyData.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
557
646
|
/* @__PURE__ */ jsx("div", { className: "taskon-xp-level-card__table-wrap", children: /* @__PURE__ */ jsx(
|
|
558
647
|
Table,
|
|
@@ -565,7 +654,7 @@ function XpLevelCard({
|
|
|
565
654
|
loading: historyLoading && historyData.length > 0,
|
|
566
655
|
loadingText: messages.loading,
|
|
567
656
|
empty: {
|
|
568
|
-
title: messages.
|
|
657
|
+
title: messages.no_data
|
|
569
658
|
}
|
|
570
659
|
}
|
|
571
660
|
) }),
|
|
@@ -577,8 +666,7 @@ function XpLevelCard({
|
|
|
577
666
|
onPrevious: pagination.goToPrevious,
|
|
578
667
|
onNext: pagination.goToNext,
|
|
579
668
|
hasPrevious: pagination.hasPrevious,
|
|
580
|
-
hasNext: pagination.hasNext
|
|
581
|
-
messages
|
|
669
|
+
hasNext: pagination.hasNext
|
|
582
670
|
}
|
|
583
671
|
)
|
|
584
672
|
] })
|
|
@@ -589,9 +677,9 @@ function WhitelistTable({
|
|
|
589
677
|
data,
|
|
590
678
|
loading,
|
|
591
679
|
error,
|
|
592
|
-
pagination
|
|
593
|
-
messages
|
|
680
|
+
pagination
|
|
594
681
|
}) {
|
|
682
|
+
const { messages } = useUserCenterLocale();
|
|
595
683
|
if (loading && data.length === 0) {
|
|
596
684
|
return /* @__PURE__ */ jsx(LoadingState, { message: messages.loading });
|
|
597
685
|
}
|
|
@@ -599,12 +687,12 @@ function WhitelistTable({
|
|
|
599
687
|
return /* @__PURE__ */ jsx("div", { className: "taskon-user-center-error", children: /* @__PURE__ */ jsx("p", { className: "taskon-user-center-error__message", children: error.message }) });
|
|
600
688
|
}
|
|
601
689
|
if (!loading && data.length === 0) {
|
|
602
|
-
return /* @__PURE__ */ jsx(EmptyState, { message: messages.
|
|
690
|
+
return /* @__PURE__ */ jsx(EmptyState, { message: messages.no_data });
|
|
603
691
|
}
|
|
604
692
|
const columns = [
|
|
605
693
|
{
|
|
606
694
|
key: "whitelist",
|
|
607
|
-
title: messages.
|
|
695
|
+
title: messages.column_whitelist,
|
|
608
696
|
width: 100,
|
|
609
697
|
render: (_, row) => {
|
|
610
698
|
const wlValue = row.reward_value;
|
|
@@ -622,21 +710,21 @@ function WhitelistTable({
|
|
|
622
710
|
},
|
|
623
711
|
{
|
|
624
712
|
key: "detail",
|
|
625
|
-
title: messages.
|
|
713
|
+
title: messages.column_detail,
|
|
626
714
|
render: (_, row) => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__campaign-name", children: row.campaign_name })
|
|
627
715
|
},
|
|
628
716
|
{
|
|
629
717
|
key: "time",
|
|
630
|
-
title: messages.
|
|
718
|
+
title: messages.column_time,
|
|
631
719
|
width: 160,
|
|
632
720
|
render: (_, row) => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__time", children: formatDateTime(row.reward_time) })
|
|
633
721
|
},
|
|
634
722
|
{
|
|
635
723
|
key: "status",
|
|
636
|
-
title: messages.
|
|
724
|
+
title: messages.column_status,
|
|
637
725
|
width: 120,
|
|
638
726
|
align: "right",
|
|
639
|
-
render: () => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__manual-drop", children: messages.
|
|
727
|
+
render: () => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__manual-drop", children: messages.manual_drop })
|
|
640
728
|
}
|
|
641
729
|
];
|
|
642
730
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-reward-table", children: [
|
|
@@ -651,7 +739,7 @@ function WhitelistTable({
|
|
|
651
739
|
loading: loading && data.length > 0,
|
|
652
740
|
loadingText: messages.loading,
|
|
653
741
|
empty: {
|
|
654
|
-
title: messages.
|
|
742
|
+
title: messages.no_data
|
|
655
743
|
}
|
|
656
744
|
}
|
|
657
745
|
),
|
|
@@ -663,8 +751,7 @@ function WhitelistTable({
|
|
|
663
751
|
onPrevious: pagination.goToPrevious,
|
|
664
752
|
onNext: pagination.goToNext,
|
|
665
753
|
hasPrevious: pagination.hasPrevious,
|
|
666
|
-
hasNext: pagination.hasNext
|
|
667
|
-
messages
|
|
754
|
+
hasNext: pagination.hasNext
|
|
668
755
|
}
|
|
669
756
|
)
|
|
670
757
|
] });
|
|
@@ -673,9 +760,9 @@ function DiscordRoleTable({
|
|
|
673
760
|
data,
|
|
674
761
|
loading,
|
|
675
762
|
error,
|
|
676
|
-
pagination
|
|
677
|
-
messages
|
|
763
|
+
pagination
|
|
678
764
|
}) {
|
|
765
|
+
const { messages } = useUserCenterLocale();
|
|
679
766
|
if (loading && data.length === 0) {
|
|
680
767
|
return /* @__PURE__ */ jsx(LoadingState, { message: messages.loading });
|
|
681
768
|
}
|
|
@@ -683,12 +770,12 @@ function DiscordRoleTable({
|
|
|
683
770
|
return /* @__PURE__ */ jsx("div", { className: "taskon-user-center-error", children: /* @__PURE__ */ jsx("p", { className: "taskon-user-center-error__message", children: error.message }) });
|
|
684
771
|
}
|
|
685
772
|
if (!loading && data.length === 0) {
|
|
686
|
-
return /* @__PURE__ */ jsx(EmptyState, { message: messages.
|
|
773
|
+
return /* @__PURE__ */ jsx(EmptyState, { message: messages.no_data });
|
|
687
774
|
}
|
|
688
775
|
const columns = [
|
|
689
776
|
{
|
|
690
777
|
key: "discordRole",
|
|
691
|
-
title: messages.
|
|
778
|
+
title: messages.column_discord_role,
|
|
692
779
|
width: 160,
|
|
693
780
|
render: (_, row) => {
|
|
694
781
|
const dcValue = row.reward_value;
|
|
@@ -697,21 +784,21 @@ function DiscordRoleTable({
|
|
|
697
784
|
},
|
|
698
785
|
{
|
|
699
786
|
key: "detail",
|
|
700
|
-
title: messages.
|
|
787
|
+
title: messages.column_detail,
|
|
701
788
|
render: (_, row) => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__campaign-name", children: row.milestone_name || row.campaign_name })
|
|
702
789
|
},
|
|
703
790
|
{
|
|
704
791
|
key: "time",
|
|
705
|
-
title: messages.
|
|
792
|
+
title: messages.column_time,
|
|
706
793
|
width: 160,
|
|
707
794
|
render: (_, row) => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__time", children: formatDateTime(row.reward_time) })
|
|
708
795
|
},
|
|
709
796
|
{
|
|
710
797
|
key: "status",
|
|
711
|
-
title: messages.
|
|
798
|
+
title: messages.column_status,
|
|
712
799
|
width: 120,
|
|
713
800
|
align: "right",
|
|
714
|
-
render: () => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__manual-drop", children: messages.
|
|
801
|
+
render: () => /* @__PURE__ */ jsx("span", { className: "taskon-reward-table__manual-drop", children: messages.manual_drop })
|
|
715
802
|
}
|
|
716
803
|
];
|
|
717
804
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-reward-table", children: [
|
|
@@ -726,7 +813,7 @@ function DiscordRoleTable({
|
|
|
726
813
|
loading: loading && data.length > 0,
|
|
727
814
|
loadingText: messages.loading,
|
|
728
815
|
empty: {
|
|
729
|
-
title: messages.
|
|
816
|
+
title: messages.no_data
|
|
730
817
|
}
|
|
731
818
|
}
|
|
732
819
|
),
|
|
@@ -738,8 +825,7 @@ function DiscordRoleTable({
|
|
|
738
825
|
onPrevious: pagination.goToPrevious,
|
|
739
826
|
onNext: pagination.goToNext,
|
|
740
827
|
hasPrevious: pagination.hasPrevious,
|
|
741
|
-
hasNext: pagination.hasNext
|
|
742
|
-
messages
|
|
828
|
+
hasNext: pagination.hasNext
|
|
743
829
|
}
|
|
744
830
|
)
|
|
745
831
|
] });
|
|
@@ -990,8 +1076,7 @@ const SNS_TYPE_MAP = {
|
|
|
990
1076
|
Discord: "Discord",
|
|
991
1077
|
Telegram: "Telegram",
|
|
992
1078
|
Email: "Email",
|
|
993
|
-
Reddit: "Reddit"
|
|
994
|
-
FSLID: "FSLID"
|
|
1079
|
+
Reddit: "Reddit"
|
|
995
1080
|
};
|
|
996
1081
|
const CHAIN_TYPE_MAP = {
|
|
997
1082
|
evm: "evm",
|
|
@@ -1010,8 +1095,7 @@ const ALL_SOCIAL_TYPES = [
|
|
|
1010
1095
|
SnsType.Discord,
|
|
1011
1096
|
SnsType.Telegram,
|
|
1012
1097
|
SnsType.Email,
|
|
1013
|
-
SnsType.Reddit
|
|
1014
|
-
SnsType.FSLID
|
|
1098
|
+
SnsType.Reddit
|
|
1015
1099
|
];
|
|
1016
1100
|
const ALL_CHAIN_TYPES = [
|
|
1017
1101
|
"evm",
|
|
@@ -1037,8 +1121,6 @@ function getSocialProfileUrl(snsType, username) {
|
|
|
1037
1121
|
return `https://reddit.com/user/${username}`;
|
|
1038
1122
|
case SnsType.Email:
|
|
1039
1123
|
return null;
|
|
1040
|
-
case SnsType.FSLID:
|
|
1041
|
-
return null;
|
|
1042
1124
|
default:
|
|
1043
1125
|
return null;
|
|
1044
1126
|
}
|
|
@@ -1885,7 +1967,11 @@ function ArrowButton({
|
|
|
1885
1967
|
}
|
|
1886
1968
|
);
|
|
1887
1969
|
}
|
|
1888
|
-
function CopyButton({
|
|
1970
|
+
function CopyButton({
|
|
1971
|
+
text,
|
|
1972
|
+
copyLabel,
|
|
1973
|
+
copiedLabel
|
|
1974
|
+
}) {
|
|
1889
1975
|
const [copied, setCopied] = useState(false);
|
|
1890
1976
|
const handleCopy = useCallback(() => {
|
|
1891
1977
|
navigator.clipboard.writeText(text).then(() => {
|
|
@@ -1898,7 +1984,8 @@ function CopyButton({ text }) {
|
|
|
1898
1984
|
{
|
|
1899
1985
|
className: "taskon-network-copy-btn",
|
|
1900
1986
|
onClick: handleCopy,
|
|
1901
|
-
title: copied ?
|
|
1987
|
+
title: copied ? copiedLabel : copyLabel,
|
|
1988
|
+
"aria-label": copied ? copiedLabel : copyLabel,
|
|
1902
1989
|
children: copied ? (
|
|
1903
1990
|
// 复制成功图标(勾选)
|
|
1904
1991
|
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M3 7L6 10L11 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
@@ -1921,7 +2008,7 @@ function SocialAccountItem({
|
|
|
1921
2008
|
disabledReason,
|
|
1922
2009
|
messages
|
|
1923
2010
|
}) {
|
|
1924
|
-
const displayText = data.isBound && data.account ? data.account.sns_user_name :
|
|
2011
|
+
const displayText = data.isBound && data.account ? data.account.sns_user_name : messages.link_platform_account.replace("{platform}", data.snsType);
|
|
1925
2012
|
return /* @__PURE__ */ jsxs(
|
|
1926
2013
|
"div",
|
|
1927
2014
|
{
|
|
@@ -1941,14 +2028,14 @@ function SocialAccountItem({
|
|
|
1941
2028
|
) : /* @__PURE__ */ jsx("span", { className: "taskon-identity-social-item__name", children: displayText }) })
|
|
1942
2029
|
] }),
|
|
1943
2030
|
data.isBound ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1944
|
-
/* @__PURE__ */ jsx("span", { className: "taskon-identity-social-item__linked", children: messages.linked
|
|
2031
|
+
/* @__PURE__ */ jsx("span", { className: "taskon-identity-social-item__linked", children: messages.linked }),
|
|
1945
2032
|
!disabled && /* @__PURE__ */ jsx(
|
|
1946
2033
|
"button",
|
|
1947
2034
|
{
|
|
1948
2035
|
className: "taskon-identity-social-item__unlink-btn",
|
|
1949
2036
|
onClick: onUnbind,
|
|
1950
2037
|
disabled: isLoading,
|
|
1951
|
-
"aria-label": messages.unbind
|
|
2038
|
+
"aria-label": messages.unbind,
|
|
1952
2039
|
children: isLoading ? /* @__PURE__ */ jsx("span", { className: "taskon-identity-social-btn__spinner" }) : /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M11 3L3 11M3 3L11 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1953
2040
|
}
|
|
1954
2041
|
)
|
|
@@ -1981,18 +2068,25 @@ function WalletItem({
|
|
|
1981
2068
|
const isEvm = data.coreChainType === "evm";
|
|
1982
2069
|
if (isEvm && addresses && addresses.length > 0) {
|
|
1983
2070
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-network-card taskon-network-card--multi", children: [
|
|
1984
|
-
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__header", children: /* @__PURE__ */ jsx("span", { className: "taskon-network-card__label", children:
|
|
2071
|
+
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__header", children: /* @__PURE__ */ jsx("span", { className: "taskon-network-card__label", children: messages.evm_chain }) }),
|
|
1985
2072
|
/* @__PURE__ */ jsx(EvmChainIcons, {}),
|
|
1986
2073
|
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__addresses", children: addresses.map((addr, index) => {
|
|
1987
2074
|
var _a, _b, _c;
|
|
1988
2075
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-network-address-row", children: [
|
|
1989
2076
|
/* @__PURE__ */ jsxs("div", { className: "taskon-network-address-row__left", children: [
|
|
1990
2077
|
/* @__PURE__ */ jsx("span", { className: `taskon-network-address-row__addr ${!addr.isPrimary ? "taskon-network-address-row__addr--secondary" : ""}`, children: truncateAddress(((_a = addr.address) == null ? void 0 : _a.address) ?? "") }),
|
|
1991
|
-
/* @__PURE__ */ jsx(
|
|
2078
|
+
/* @__PURE__ */ jsx(
|
|
2079
|
+
CopyButton,
|
|
2080
|
+
{
|
|
2081
|
+
text: ((_b = addr.address) == null ? void 0 : _b.address) ?? "",
|
|
2082
|
+
copyLabel: messages.copy,
|
|
2083
|
+
copiedLabel: messages.copied
|
|
2084
|
+
}
|
|
2085
|
+
)
|
|
1992
2086
|
] }),
|
|
1993
2087
|
/* @__PURE__ */ jsx("div", { className: "taskon-network-address-row__divider" }),
|
|
1994
2088
|
/* @__PURE__ */ jsxs("div", { className: "taskon-network-address-row__right", children: [
|
|
1995
|
-
/* @__PURE__ */ jsx("span", { className: `taskon-network-address-row__type ${addr.isPrimary ? "taskon-network-address-row__type--primary" : "taskon-network-address-row__type--secondary"}`, children: addr.isPrimary ?
|
|
2089
|
+
/* @__PURE__ */ jsx("span", { className: `taskon-network-address-row__type ${addr.isPrimary ? "taskon-network-address-row__type--primary" : "taskon-network-address-row__type--secondary"}`, children: addr.isPrimary ? messages.primary_address : messages.secondary_address }),
|
|
1996
2090
|
/* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "taskon-network-address-row__edit", children: [
|
|
1997
2091
|
/* @__PURE__ */ jsx("path", { d: "M2 12H4L10.5 5.5L8.5 3.5L2 10V12Z", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1998
2092
|
/* @__PURE__ */ jsx("path", { d: "M8.5 3.5L10.5 5.5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round" })
|
|
@@ -2008,7 +2102,7 @@ function WalletItem({
|
|
|
2008
2102
|
},
|
|
2009
2103
|
disabled: isLoading || disabled,
|
|
2010
2104
|
title: disabledReason,
|
|
2011
|
-
children: messages.unbind
|
|
2105
|
+
children: messages.unbind
|
|
2012
2106
|
}
|
|
2013
2107
|
)
|
|
2014
2108
|
] }, ((_c = addr.address) == null ? void 0 : _c.address) ?? index);
|
|
@@ -2017,7 +2111,7 @@ function WalletItem({
|
|
|
2017
2111
|
}
|
|
2018
2112
|
if (isEvm && !data.isBound) {
|
|
2019
2113
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-network-card taskon-network-card--multi", children: [
|
|
2020
|
-
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__header", children: /* @__PURE__ */ jsx("span", { className: "taskon-network-card__label", children:
|
|
2114
|
+
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__header", children: /* @__PURE__ */ jsx("span", { className: "taskon-network-card__label", children: messages.evm_chain }) }),
|
|
2021
2115
|
/* @__PURE__ */ jsx(EvmChainIcons, {}),
|
|
2022
2116
|
/* @__PURE__ */ jsx(
|
|
2023
2117
|
"button",
|
|
@@ -2025,7 +2119,7 @@ function WalletItem({
|
|
|
2025
2119
|
className: "taskon-network-connect-btn",
|
|
2026
2120
|
onClick: onBind,
|
|
2027
2121
|
disabled: isLoading,
|
|
2028
|
-
children: isLoading ? messages.loading : messages.
|
|
2122
|
+
children: isLoading ? messages.loading : messages.connect_wallet
|
|
2029
2123
|
}
|
|
2030
2124
|
)
|
|
2031
2125
|
] });
|
|
@@ -2039,14 +2133,21 @@ function WalletItem({
|
|
|
2039
2133
|
onClick: () => onUnbind(),
|
|
2040
2134
|
disabled: isLoading || disabled,
|
|
2041
2135
|
title: disabledReason,
|
|
2042
|
-
children: messages.unbind
|
|
2136
|
+
children: messages.unbind
|
|
2043
2137
|
}
|
|
2044
2138
|
),
|
|
2045
2139
|
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__header", children: /* @__PURE__ */ jsx("span", { className: "taskon-network-card__label", children: name }) }),
|
|
2046
2140
|
/* @__PURE__ */ jsx("div", { className: "taskon-network-card__chain-icon", children: /* @__PURE__ */ jsx(ChainIcon, { chain: data.coreChainType }) }),
|
|
2047
2141
|
/* @__PURE__ */ jsxs("div", { className: "taskon-network-address-input", children: [
|
|
2048
2142
|
/* @__PURE__ */ jsx("span", { className: "taskon-network-address-input__text", children: truncateAddress(data.address.address) }),
|
|
2049
|
-
/* @__PURE__ */ jsx(
|
|
2143
|
+
/* @__PURE__ */ jsx(
|
|
2144
|
+
CopyButton,
|
|
2145
|
+
{
|
|
2146
|
+
text: data.address.address,
|
|
2147
|
+
copyLabel: messages.copy,
|
|
2148
|
+
copiedLabel: messages.copied
|
|
2149
|
+
}
|
|
2150
|
+
)
|
|
2050
2151
|
] })
|
|
2051
2152
|
] });
|
|
2052
2153
|
}
|
|
@@ -2059,7 +2160,7 @@ function WalletItem({
|
|
|
2059
2160
|
className: "taskon-network-connect-btn",
|
|
2060
2161
|
onClick: onBind,
|
|
2061
2162
|
disabled: isLoading,
|
|
2062
|
-
children: isLoading ? messages.loading : messages.
|
|
2163
|
+
children: isLoading ? messages.loading : messages.connect_wallet
|
|
2063
2164
|
}
|
|
2064
2165
|
)
|
|
2065
2166
|
] });
|
|
@@ -2089,14 +2190,14 @@ function ConfirmUnlinkDialog({
|
|
|
2089
2190
|
{
|
|
2090
2191
|
open,
|
|
2091
2192
|
onOpenChange,
|
|
2092
|
-
title: messages.
|
|
2193
|
+
title: messages.confirm_unbind,
|
|
2093
2194
|
showCloseButton: false,
|
|
2094
2195
|
maxWidth: 400,
|
|
2095
2196
|
children: /* @__PURE__ */ jsxs("div", { className: "taskon-confirm-unlink", children: [
|
|
2096
2197
|
/* @__PURE__ */ jsx("div", { className: "taskon-confirm-unlink__icon", children: /* @__PURE__ */ jsx(WarningIcon, {}) }),
|
|
2097
2198
|
/* @__PURE__ */ jsxs("div", { className: "taskon-confirm-unlink__text", children: [
|
|
2098
|
-
/* @__PURE__ */ jsx("h4", { className: "taskon-confirm-unlink__title", children: messages.
|
|
2099
|
-
/* @__PURE__ */ jsx("p", { className: "taskon-confirm-unlink__description", children: messages.
|
|
2199
|
+
/* @__PURE__ */ jsx("h4", { className: "taskon-confirm-unlink__title", children: messages.confirm_unbind }),
|
|
2200
|
+
/* @__PURE__ */ jsx("p", { className: "taskon-confirm-unlink__description", children: messages.unbind_warning })
|
|
2100
2201
|
] }),
|
|
2101
2202
|
/* @__PURE__ */ jsxs("div", { className: "taskon-confirm-unlink__actions", children: [
|
|
2102
2203
|
/* @__PURE__ */ jsx(
|
|
@@ -2124,17 +2225,19 @@ function ConfirmUnlinkDialog({
|
|
|
2124
2225
|
}
|
|
2125
2226
|
function SocialAccountsSection({
|
|
2126
2227
|
accounts,
|
|
2127
|
-
messages,
|
|
2128
2228
|
onBind,
|
|
2129
2229
|
onUnbind,
|
|
2130
2230
|
isProcessing,
|
|
2131
2231
|
checkUnlink,
|
|
2132
2232
|
onShowWarning
|
|
2133
2233
|
}) {
|
|
2234
|
+
const { messages } = useUserCenterLocale();
|
|
2134
2235
|
if (accounts.length === 0) {
|
|
2135
2236
|
return null;
|
|
2136
2237
|
}
|
|
2137
|
-
const [confirmTarget, setConfirmTarget] = useState(
|
|
2238
|
+
const [confirmTarget, setConfirmTarget] = useState(
|
|
2239
|
+
null
|
|
2240
|
+
);
|
|
2138
2241
|
const showConfirm = confirmTarget !== null;
|
|
2139
2242
|
const handleBind = useCallback(
|
|
2140
2243
|
(account) => {
|
|
@@ -2147,7 +2250,7 @@ function SocialAccountsSection({
|
|
|
2147
2250
|
if (!account.account) return;
|
|
2148
2251
|
const check = checkUnlink(account.account);
|
|
2149
2252
|
if (check.disabled) {
|
|
2150
|
-
onShowWarning(check.message ?? messages.
|
|
2253
|
+
onShowWarning(check.message ?? messages.unbind_failed);
|
|
2151
2254
|
return;
|
|
2152
2255
|
}
|
|
2153
2256
|
setConfirmTarget(account);
|
|
@@ -2160,7 +2263,7 @@ function SocialAccountsSection({
|
|
|
2160
2263
|
setConfirmTarget(null);
|
|
2161
2264
|
}, [confirmTarget, onUnbind]);
|
|
2162
2265
|
return /* @__PURE__ */ jsxs("section", { className: "taskon-identity-social-section", children: [
|
|
2163
|
-
/* @__PURE__ */ jsx("h3", { className: "taskon-identity-social-section__title", children: messages.
|
|
2266
|
+
/* @__PURE__ */ jsx("h3", { className: "taskon-identity-social-section__title", children: messages.social_accounts }),
|
|
2164
2267
|
/* @__PURE__ */ jsx("div", { className: "taskon-identity-social-grid", children: accounts.map((account) => {
|
|
2165
2268
|
const check = account.account ? checkUnlink(account.account) : { disabled: false, message: null };
|
|
2166
2269
|
return /* @__PURE__ */ jsx(
|
|
@@ -2195,7 +2298,6 @@ function SocialAccountsSection({
|
|
|
2195
2298
|
function WalletsSection({
|
|
2196
2299
|
wallets,
|
|
2197
2300
|
rawAddresses,
|
|
2198
|
-
messages,
|
|
2199
2301
|
onBind,
|
|
2200
2302
|
onUnbind,
|
|
2201
2303
|
isProcessing,
|
|
@@ -2203,6 +2305,7 @@ function WalletsSection({
|
|
|
2203
2305
|
onShowWarning,
|
|
2204
2306
|
onShowInfo
|
|
2205
2307
|
}) {
|
|
2308
|
+
const { messages } = useUserCenterLocale();
|
|
2206
2309
|
if (wallets.length === 0) {
|
|
2207
2310
|
return null;
|
|
2208
2311
|
}
|
|
@@ -2232,11 +2335,11 @@ function WalletsSection({
|
|
|
2232
2335
|
if (!addressToUnbind || !wallet.address) return;
|
|
2233
2336
|
const check = checkUnlink(wallet.address, wallet.isKycVerified);
|
|
2234
2337
|
if (check.disabled) {
|
|
2235
|
-
onShowWarning(check.message ?? messages.
|
|
2338
|
+
onShowWarning(check.message ?? messages.unbind_failed);
|
|
2236
2339
|
return;
|
|
2237
2340
|
}
|
|
2238
2341
|
if (check.needsKycWarning) {
|
|
2239
|
-
onShowInfo(messages.
|
|
2342
|
+
onShowInfo(messages.kyc_warning);
|
|
2240
2343
|
}
|
|
2241
2344
|
setConfirmTarget({ wallet, address: addressToUnbind });
|
|
2242
2345
|
},
|
|
@@ -2248,7 +2351,7 @@ function WalletsSection({
|
|
|
2248
2351
|
setConfirmTarget(null);
|
|
2249
2352
|
}, [confirmTarget, onUnbind]);
|
|
2250
2353
|
return /* @__PURE__ */ jsxs("section", { className: "taskon-network-section", children: [
|
|
2251
|
-
/* @__PURE__ */ jsx("h3", { className: "taskon-network-section__title", children: messages.
|
|
2354
|
+
/* @__PURE__ */ jsx("h3", { className: "taskon-network-section__title", children: messages.wallet_addresses }),
|
|
2252
2355
|
/* @__PURE__ */ jsx("div", { className: "taskon-network-grid", children: wallets.map((wallet) => {
|
|
2253
2356
|
const check = wallet.address ? checkUnlink(wallet.address, wallet.isKycVerified) : { disabled: false, message: null };
|
|
2254
2357
|
const isEvm = wallet.coreChainType === "evm";
|
|
@@ -2304,16 +2407,16 @@ function EmailBindDialog({
|
|
|
2304
2407
|
const showCodeInput = status === "inputCode" || status === "submitting" || status === "success";
|
|
2305
2408
|
const emailError = useMemo(() => {
|
|
2306
2409
|
if (isEmailDuplicate) {
|
|
2307
|
-
return messages.
|
|
2410
|
+
return messages.email_already_linked;
|
|
2308
2411
|
}
|
|
2309
2412
|
if (email && !isEmailValid) {
|
|
2310
|
-
return messages.
|
|
2413
|
+
return messages.please_enter_valid_email;
|
|
2311
2414
|
}
|
|
2312
2415
|
return void 0;
|
|
2313
2416
|
}, [isEmailDuplicate, email, isEmailValid, messages]);
|
|
2314
2417
|
const codeError = useMemo(() => {
|
|
2315
2418
|
if (isCodeInvalid) {
|
|
2316
|
-
return messages.
|
|
2419
|
+
return messages.please_enter_valid_code;
|
|
2317
2420
|
}
|
|
2318
2421
|
return void 0;
|
|
2319
2422
|
}, [isCodeInvalid, messages]);
|
|
@@ -2357,20 +2460,20 @@ function EmailBindDialog({
|
|
|
2357
2460
|
onOpenChange: (open) => {
|
|
2358
2461
|
if (!open) handleClose();
|
|
2359
2462
|
},
|
|
2360
|
-
title: messages.
|
|
2463
|
+
title: messages.link_email_account,
|
|
2361
2464
|
showCloseButton: true,
|
|
2362
2465
|
maxWidth: 400,
|
|
2363
2466
|
children: /* @__PURE__ */ jsxs("div", { className: "taskon-email-bind-dialog", children: [
|
|
2364
|
-
/* @__PURE__ */ jsx("h2", { className: "taskon-email-bind-dialog__title", children: messages.
|
|
2467
|
+
/* @__PURE__ */ jsx("h2", { className: "taskon-email-bind-dialog__title", children: messages.link_email_account }),
|
|
2365
2468
|
/* @__PURE__ */ jsxs("div", { className: "taskon-email-bind-dialog__field", children: [
|
|
2366
|
-
/* @__PURE__ */ jsx("label", { className: "taskon-email-bind-dialog__label", children: messages.
|
|
2469
|
+
/* @__PURE__ */ jsx("label", { className: "taskon-email-bind-dialog__label", children: messages.email_address }),
|
|
2367
2470
|
/* @__PURE__ */ jsx(
|
|
2368
2471
|
Input,
|
|
2369
2472
|
{
|
|
2370
2473
|
type: "email",
|
|
2371
2474
|
value: email,
|
|
2372
2475
|
onChange: handleEmailChange,
|
|
2373
|
-
placeholder: messages.
|
|
2476
|
+
placeholder: messages.please_enter_email,
|
|
2374
2477
|
maxLength: 64,
|
|
2375
2478
|
disabled: showCodeInput,
|
|
2376
2479
|
error: emailError,
|
|
@@ -2379,7 +2482,7 @@ function EmailBindDialog({
|
|
|
2379
2482
|
)
|
|
2380
2483
|
] }),
|
|
2381
2484
|
showCodeInput && /* @__PURE__ */ jsxs("div", { className: "taskon-email-bind-dialog__field", children: [
|
|
2382
|
-
/* @__PURE__ */ jsx("label", { className: "taskon-email-bind-dialog__label", children: messages.
|
|
2485
|
+
/* @__PURE__ */ jsx("label", { className: "taskon-email-bind-dialog__label", children: messages.verification_code }),
|
|
2383
2486
|
/* @__PURE__ */ jsx(
|
|
2384
2487
|
Input,
|
|
2385
2488
|
{
|
|
@@ -2387,7 +2490,7 @@ function EmailBindDialog({
|
|
|
2387
2490
|
inputMode: "numeric",
|
|
2388
2491
|
value: code,
|
|
2389
2492
|
onChange: handleCodeChange,
|
|
2390
|
-
placeholder: messages.
|
|
2493
|
+
placeholder: messages.please_enter_code,
|
|
2391
2494
|
maxLength: 6,
|
|
2392
2495
|
disabled: isSubmitting,
|
|
2393
2496
|
error: codeError,
|
|
@@ -2399,7 +2502,7 @@ function EmailBindDialog({
|
|
|
2399
2502
|
disabled: countdown > 0 || isSending,
|
|
2400
2503
|
loading: isSending,
|
|
2401
2504
|
onClick: handleSendCode,
|
|
2402
|
-
children: countdown > 0 ? `${messages.
|
|
2505
|
+
children: countdown > 0 ? `${messages.resend_code} (${countdown}s)` : messages.resend_code
|
|
2403
2506
|
}
|
|
2404
2507
|
)
|
|
2405
2508
|
}
|
|
@@ -2416,7 +2519,7 @@ function EmailBindDialog({
|
|
|
2416
2519
|
loading: isSending,
|
|
2417
2520
|
onClick: handleSendCode,
|
|
2418
2521
|
style: { width: "100%" },
|
|
2419
|
-
children: messages.
|
|
2522
|
+
children: messages.send_verification_code
|
|
2420
2523
|
}
|
|
2421
2524
|
)
|
|
2422
2525
|
) : (
|
|
@@ -2430,7 +2533,7 @@ function EmailBindDialog({
|
|
|
2430
2533
|
loading: isSubmitting,
|
|
2431
2534
|
onClick: handleBind,
|
|
2432
2535
|
style: { width: "100%" },
|
|
2433
|
-
children: messages.confirm
|
|
2536
|
+
children: messages.confirm
|
|
2434
2537
|
}
|
|
2435
2538
|
)
|
|
2436
2539
|
) })
|
|
@@ -2440,7 +2543,6 @@ function EmailBindDialog({
|
|
|
2440
2543
|
}
|
|
2441
2544
|
function EmailSection({
|
|
2442
2545
|
emailAccount,
|
|
2443
|
-
messages,
|
|
2444
2546
|
onUnbind,
|
|
2445
2547
|
isUnbinding,
|
|
2446
2548
|
checkUnlink,
|
|
@@ -2448,6 +2550,7 @@ function EmailSection({
|
|
|
2448
2550
|
onShowError,
|
|
2449
2551
|
onShowWarning
|
|
2450
2552
|
}) {
|
|
2553
|
+
const { messages } = useUserCenterLocale();
|
|
2451
2554
|
const [dialogVisible, setDialogVisible] = useState(false);
|
|
2452
2555
|
const {
|
|
2453
2556
|
status: emailBindStatus,
|
|
@@ -2460,19 +2563,19 @@ function EmailSection({
|
|
|
2460
2563
|
clearError: clearEmailError
|
|
2461
2564
|
} = useBindEmail({
|
|
2462
2565
|
onSendCodeSuccess: () => {
|
|
2463
|
-
onShowSuccess(messages.
|
|
2566
|
+
onShowSuccess(messages.send_code_success);
|
|
2464
2567
|
},
|
|
2465
2568
|
onSendCodeError: (error) => {
|
|
2466
2569
|
if (!error.message.includes("duplicate")) {
|
|
2467
|
-
onShowError(messages.
|
|
2570
|
+
onShowError(messages.send_code_failed);
|
|
2468
2571
|
}
|
|
2469
2572
|
},
|
|
2470
2573
|
onBindSuccess: () => {
|
|
2471
|
-
onShowSuccess(messages.
|
|
2574
|
+
onShowSuccess(messages.bind_success);
|
|
2472
2575
|
setDialogVisible(false);
|
|
2473
2576
|
},
|
|
2474
2577
|
onBindError: () => {
|
|
2475
|
-
onShowError(messages.
|
|
2578
|
+
onShowError(messages.bind_failed);
|
|
2476
2579
|
}
|
|
2477
2580
|
});
|
|
2478
2581
|
const handleBind = useCallback(() => {
|
|
@@ -2482,7 +2585,7 @@ function EmailSection({
|
|
|
2482
2585
|
if (!emailAccount.account) return;
|
|
2483
2586
|
const check2 = checkUnlink(emailAccount.account);
|
|
2484
2587
|
if (check2.disabled) {
|
|
2485
|
-
onShowWarning(check2.message ?? messages.
|
|
2588
|
+
onShowWarning(check2.message ?? messages.unbind_failed);
|
|
2486
2589
|
return;
|
|
2487
2590
|
}
|
|
2488
2591
|
onUnbind(emailAccount.account.sns_id, "Email");
|
|
@@ -2494,7 +2597,7 @@ function EmailSection({
|
|
|
2494
2597
|
const check = emailAccount.account ? checkUnlink(emailAccount.account) : { disabled: false, message: null };
|
|
2495
2598
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2496
2599
|
/* @__PURE__ */ jsxs("section", { className: "taskon-identity-email-section", children: [
|
|
2497
|
-
/* @__PURE__ */ jsx("h3", { className: "taskon-identity-email-section__title", children: messages.
|
|
2600
|
+
/* @__PURE__ */ jsx("h3", { className: "taskon-identity-email-section__title", children: messages.email_address }),
|
|
2498
2601
|
/* @__PURE__ */ jsx("div", { className: "taskon-identity-email-card", children: /* @__PURE__ */ jsx(
|
|
2499
2602
|
SocialAccountItem,
|
|
2500
2603
|
{
|
|
@@ -2525,13 +2628,25 @@ function EmailSection({
|
|
|
2525
2628
|
)
|
|
2526
2629
|
] });
|
|
2527
2630
|
}
|
|
2631
|
+
const USER_CENTER_WALLET_ACCOUNT_TYPE = String(SnsType.All).toLowerCase();
|
|
2632
|
+
const isWalletAccountType = (accountType) => accountType.toLowerCase() === USER_CENTER_WALLET_ACCOUNT_TYPE;
|
|
2528
2633
|
function IdentityContent({
|
|
2529
|
-
config
|
|
2530
|
-
messages
|
|
2634
|
+
config
|
|
2531
2635
|
}) {
|
|
2532
|
-
|
|
2636
|
+
var _a, _b, _c, _d;
|
|
2637
|
+
const { t } = useUserCenterLocale();
|
|
2638
|
+
const identityTab = config.find(
|
|
2639
|
+
(t2) => t2.tab === "Identity"
|
|
2640
|
+
);
|
|
2533
2641
|
const enabledAccounts = identityTab ? filterEnabledAccounts(identityTab) : [];
|
|
2534
2642
|
const enabledWallets = identityTab ? filterEnabledWallets(identityTab) : [];
|
|
2643
|
+
const identityParams = identityTab && !Array.isArray(identityTab.params) ? identityTab.params : void 0;
|
|
2644
|
+
const walletAccountOption = (_a = identityParams == null ? void 0 : identityParams.accountOptions) == null ? void 0 : _a.find(
|
|
2645
|
+
(account) => isWalletAccountType(String(account.account))
|
|
2646
|
+
);
|
|
2647
|
+
const isWalletAccountEnabled = walletAccountOption ? walletAccountOption.enabled !== false : true;
|
|
2648
|
+
const hasExplicitAccountConfig = (((_b = identityParams == null ? void 0 : identityParams.accountOptions) == null ? void 0 : _b.length) ?? 0) > 0;
|
|
2649
|
+
const hasExplicitWalletConfig = (((_c = walletAccountOption == null ? void 0 : walletAccountOption.walletOptions) == null ? void 0 : _c.length) ?? 0) > 0 || (((_d = identityParams == null ? void 0 : identityParams.walletOptions) == null ? void 0 : _d.length) ?? 0) > 0;
|
|
2535
2650
|
const { socialAccounts, walletAddresses, rawAddresses, isLoaded } = useIdentityData();
|
|
2536
2651
|
const { checkSocialUnlink, checkWalletUnlink } = useDisableUnlink();
|
|
2537
2652
|
const { toast } = useToast();
|
|
@@ -2541,18 +2656,22 @@ function IdentityContent({
|
|
|
2541
2656
|
processingType: socialProcessingType
|
|
2542
2657
|
} = useUnbindSocial({
|
|
2543
2658
|
onUnbindSuccess: () => {
|
|
2544
|
-
toast.success(
|
|
2659
|
+
toast.success(t("unbind_success"));
|
|
2545
2660
|
},
|
|
2546
2661
|
onUnbindError: () => {
|
|
2547
|
-
toast.error(
|
|
2662
|
+
toast.error(t("unbind_failed"));
|
|
2548
2663
|
}
|
|
2549
2664
|
});
|
|
2550
|
-
const {
|
|
2665
|
+
const {
|
|
2666
|
+
bind: bindOAuth,
|
|
2667
|
+
isBinding: isOAuthBinding,
|
|
2668
|
+
isOAuthSupported
|
|
2669
|
+
} = useOAuthBindings({
|
|
2551
2670
|
onSuccess: () => {
|
|
2552
|
-
toast.success(
|
|
2671
|
+
toast.success(t("bind_success"));
|
|
2553
2672
|
},
|
|
2554
2673
|
onFailed: (error) => {
|
|
2555
|
-
toast.error(error ||
|
|
2674
|
+
toast.error(error || t("bind_failed"));
|
|
2556
2675
|
}
|
|
2557
2676
|
});
|
|
2558
2677
|
const {
|
|
@@ -2563,34 +2682,55 @@ function IdentityContent({
|
|
|
2563
2682
|
processingChain: walletProcessingChain
|
|
2564
2683
|
} = useBindWallet({
|
|
2565
2684
|
onBindSuccess: () => {
|
|
2566
|
-
toast.success(
|
|
2685
|
+
toast.success(t("bind_success"));
|
|
2567
2686
|
},
|
|
2568
2687
|
onUnbindSuccess: () => {
|
|
2569
|
-
toast.success(
|
|
2688
|
+
toast.success(t("unbind_success"));
|
|
2570
2689
|
},
|
|
2571
2690
|
onBindError: () => {
|
|
2572
|
-
toast.error(
|
|
2691
|
+
toast.error(t("bind_failed"));
|
|
2573
2692
|
},
|
|
2574
2693
|
onUnbindError: () => {
|
|
2575
|
-
toast.error(
|
|
2694
|
+
toast.error(t("unbind_failed"));
|
|
2576
2695
|
}
|
|
2577
2696
|
});
|
|
2697
|
+
const enabledSocialAccountTypes = useMemo(() => {
|
|
2698
|
+
return new Set(
|
|
2699
|
+
enabledAccounts.filter((account) => !isWalletAccountType(String(account.account))).map((account) => String(account.account).toLowerCase())
|
|
2700
|
+
);
|
|
2701
|
+
}, [enabledAccounts]);
|
|
2702
|
+
const enabledWalletChainTypes = useMemo(() => {
|
|
2703
|
+
return new Set(
|
|
2704
|
+
enabledWallets.map((wallet) => String(wallet.chain).toLowerCase())
|
|
2705
|
+
);
|
|
2706
|
+
}, [enabledWallets]);
|
|
2578
2707
|
const filteredSocialAccounts = useMemo(() => {
|
|
2579
2708
|
return socialAccounts.filter((account) => {
|
|
2580
|
-
if (
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
)
|
|
2709
|
+
if (isWalletAccountType(String(account.snsType))) {
|
|
2710
|
+
return false;
|
|
2711
|
+
}
|
|
2712
|
+
if (!hasExplicitAccountConfig) {
|
|
2713
|
+
return true;
|
|
2714
|
+
}
|
|
2715
|
+
return enabledSocialAccountTypes.has(account.snsType.toLowerCase());
|
|
2584
2716
|
});
|
|
2585
|
-
}, [socialAccounts,
|
|
2717
|
+
}, [socialAccounts, hasExplicitAccountConfig, enabledSocialAccountTypes]);
|
|
2586
2718
|
const filteredWalletAddresses = useMemo(() => {
|
|
2719
|
+
if (!isWalletAccountEnabled) {
|
|
2720
|
+
return [];
|
|
2721
|
+
}
|
|
2722
|
+
if (!hasExplicitWalletConfig) {
|
|
2723
|
+
return walletAddresses;
|
|
2724
|
+
}
|
|
2587
2725
|
return walletAddresses.filter((wallet) => {
|
|
2588
|
-
|
|
2589
|
-
return enabledWallets.some(
|
|
2590
|
-
(cfg) => cfg.chain.toLowerCase() === wallet.coreChainType.toLowerCase()
|
|
2591
|
-
);
|
|
2726
|
+
return enabledWalletChainTypes.has(wallet.coreChainType.toLowerCase());
|
|
2592
2727
|
});
|
|
2593
|
-
}, [
|
|
2728
|
+
}, [
|
|
2729
|
+
walletAddresses,
|
|
2730
|
+
hasExplicitWalletConfig,
|
|
2731
|
+
enabledWalletChainTypes,
|
|
2732
|
+
isWalletAccountEnabled
|
|
2733
|
+
]);
|
|
2594
2734
|
const emailAccount = useMemo(() => {
|
|
2595
2735
|
return filteredSocialAccounts.find((a) => a.snsType === SnsType.Email);
|
|
2596
2736
|
}, [filteredSocialAccounts]);
|
|
@@ -2603,9 +2743,9 @@ function IdentityContent({
|
|
|
2603
2743
|
bindOAuth(snsType);
|
|
2604
2744
|
return;
|
|
2605
2745
|
}
|
|
2606
|
-
toast.info(
|
|
2746
|
+
toast.info(t("bind_social_todo"));
|
|
2607
2747
|
},
|
|
2608
|
-
[bindOAuth, isOAuthSupported, toast,
|
|
2748
|
+
[bindOAuth, isOAuthSupported, toast, t]
|
|
2609
2749
|
);
|
|
2610
2750
|
const isSocialProcessing = useCallback(
|
|
2611
2751
|
(snsType) => {
|
|
@@ -2636,7 +2776,7 @@ function IdentityContent({
|
|
|
2636
2776
|
return socialProcessingType === SnsType.Email && socialUnbindStatus === "loading";
|
|
2637
2777
|
}, [socialProcessingType, socialUnbindStatus]);
|
|
2638
2778
|
if (!isLoaded) {
|
|
2639
|
-
return /* @__PURE__ */ jsx("div", { className: "taskon-identity", children: /* @__PURE__ */ jsx("div", { className: "taskon-identity-loading", children:
|
|
2779
|
+
return /* @__PURE__ */ jsx("div", { className: "taskon-identity", children: /* @__PURE__ */ jsx("div", { className: "taskon-identity-loading", children: t("loading") }) });
|
|
2640
2780
|
}
|
|
2641
2781
|
const isEmpty = socialAccountsWithoutEmail.length === 0 && !emailAccount && filteredWalletAddresses.length === 0;
|
|
2642
2782
|
return /* @__PURE__ */ jsxs("div", { className: "taskon-identity", children: [
|
|
@@ -2644,7 +2784,6 @@ function IdentityContent({
|
|
|
2644
2784
|
SocialAccountsSection,
|
|
2645
2785
|
{
|
|
2646
2786
|
accounts: socialAccountsWithoutEmail,
|
|
2647
|
-
messages,
|
|
2648
2787
|
onBind: handleSocialBind,
|
|
2649
2788
|
onUnbind: unbindSocial,
|
|
2650
2789
|
isProcessing: isSocialProcessing,
|
|
@@ -2657,7 +2796,6 @@ function IdentityContent({
|
|
|
2657
2796
|
{
|
|
2658
2797
|
wallets: filteredWalletAddresses,
|
|
2659
2798
|
rawAddresses,
|
|
2660
|
-
messages,
|
|
2661
2799
|
onBind: handleWalletBind,
|
|
2662
2800
|
onUnbind: handleWalletUnbind,
|
|
2663
2801
|
isProcessing: isWalletProcessing,
|
|
@@ -2670,7 +2808,6 @@ function IdentityContent({
|
|
|
2670
2808
|
EmailSection,
|
|
2671
2809
|
{
|
|
2672
2810
|
emailAccount,
|
|
2673
|
-
messages,
|
|
2674
2811
|
onUnbind: unbindSocial,
|
|
2675
2812
|
isUnbinding: isEmailUnbinding,
|
|
2676
2813
|
checkUnlink: checkSocialUnlink,
|
|
@@ -2679,15 +2816,15 @@ function IdentityContent({
|
|
|
2679
2816
|
onShowWarning: toast.warning
|
|
2680
2817
|
}
|
|
2681
2818
|
),
|
|
2682
|
-
isEmpty && /* @__PURE__ */ jsx("div", { className: "taskon-identity-empty", children:
|
|
2819
|
+
isEmpty && /* @__PURE__ */ jsx("div", { className: "taskon-identity-empty", children: t("empty_identity") })
|
|
2683
2820
|
] });
|
|
2684
2821
|
}
|
|
2685
2822
|
function MyRewardsContent({
|
|
2686
|
-
messages,
|
|
2687
2823
|
defaultRewardCard,
|
|
2688
2824
|
defaultPointId
|
|
2689
2825
|
}) {
|
|
2690
2826
|
const { toast } = useToast();
|
|
2827
|
+
const { t } = useUserCenterLocale();
|
|
2691
2828
|
const { client } = useTaskOnContext();
|
|
2692
2829
|
const [selectedPointsId, setSelectedPointsId] = useState(null);
|
|
2693
2830
|
const hasUserSelectedRef = useRef(false);
|
|
@@ -2822,7 +2959,7 @@ function MyRewardsContent({
|
|
|
2822
2959
|
return;
|
|
2823
2960
|
}
|
|
2824
2961
|
if (!item.nonce || !item.receiver_address) {
|
|
2825
|
-
toast.error(
|
|
2962
|
+
toast.error(t("missing_resend_payload"));
|
|
2826
2963
|
return;
|
|
2827
2964
|
}
|
|
2828
2965
|
try {
|
|
@@ -2830,9 +2967,11 @@ function MyRewardsContent({
|
|
|
2830
2967
|
chain: viewingFrozenToken.chain,
|
|
2831
2968
|
nonce: item.nonce
|
|
2832
2969
|
});
|
|
2833
|
-
const withdrawableRequests = requests.filter(
|
|
2970
|
+
const withdrawableRequests = requests.filter(
|
|
2971
|
+
(request) => request.can_withdraw
|
|
2972
|
+
);
|
|
2834
2973
|
if (withdrawableRequests.length === 0) {
|
|
2835
|
-
toast.error(
|
|
2974
|
+
toast.error(t("no_tokens_for_resend"));
|
|
2836
2975
|
return;
|
|
2837
2976
|
}
|
|
2838
2977
|
setResendParams({
|
|
@@ -2843,7 +2982,9 @@ function MyRewardsContent({
|
|
|
2843
2982
|
setSelectedTokenForWithdraw(viewingFrozenToken);
|
|
2844
2983
|
setShowWithdrawForm(true);
|
|
2845
2984
|
} catch (error) {
|
|
2846
|
-
toast.error(
|
|
2985
|
+
toast.error(
|
|
2986
|
+
error instanceof Error ? error.message : t("failed_load_resend_details")
|
|
2987
|
+
);
|
|
2847
2988
|
}
|
|
2848
2989
|
};
|
|
2849
2990
|
const handleSelectCard = (type, pointsId) => {
|
|
@@ -2889,14 +3030,14 @@ function MyRewardsContent({
|
|
|
2889
3030
|
}
|
|
2890
3031
|
}, [selectedCard]);
|
|
2891
3032
|
if (rewardsLoading && cards.length === 0) {
|
|
2892
|
-
return /* @__PURE__ */ jsx(LoadingState, { message:
|
|
3033
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("loading") });
|
|
2893
3034
|
}
|
|
2894
3035
|
if (rewardsError && cards.length === 0) {
|
|
2895
3036
|
return /* @__PURE__ */ jsx("div", { className: "taskon-user-center-error", children: /* @__PURE__ */ jsx("p", { className: "taskon-user-center-error__message", children: rewardsError.message }) });
|
|
2896
3037
|
}
|
|
2897
3038
|
const hasVisibleCards = cards.some((c) => c.visible);
|
|
2898
3039
|
if (!rewardsLoading && !hasVisibleCards) {
|
|
2899
|
-
return /* @__PURE__ */ jsx(EmptyState, { message:
|
|
3040
|
+
return /* @__PURE__ */ jsx(EmptyState, { message: t("empty_rewards") });
|
|
2900
3041
|
}
|
|
2901
3042
|
const renderSelectedContent = () => {
|
|
2902
3043
|
switch (selectedCard) {
|
|
@@ -2912,7 +3053,6 @@ function MyRewardsContent({
|
|
|
2912
3053
|
tokenHistoryLoading,
|
|
2913
3054
|
tokenHistoryError,
|
|
2914
3055
|
tokenHistoryPagination,
|
|
2915
|
-
messages,
|
|
2916
3056
|
onWithdraw: handleWithdraw,
|
|
2917
3057
|
onBatchWithdraw: handleBatchWithdraw,
|
|
2918
3058
|
onViewFrozen: handleViewFrozen,
|
|
@@ -2928,7 +3068,7 @@ function MyRewardsContent({
|
|
|
2928
3068
|
);
|
|
2929
3069
|
case USER_CENTER_REWARD_CARD_TYPES.XpLevel:
|
|
2930
3070
|
if (!selectedXpLevelData) {
|
|
2931
|
-
return /* @__PURE__ */ jsx(EmptyState, { message:
|
|
3071
|
+
return /* @__PURE__ */ jsx(EmptyState, { message: t("no_data") });
|
|
2932
3072
|
}
|
|
2933
3073
|
return /* @__PURE__ */ jsx(
|
|
2934
3074
|
XpLevelCard,
|
|
@@ -2937,13 +3077,13 @@ function MyRewardsContent({
|
|
|
2937
3077
|
level: selectedXpLevelData.level,
|
|
2938
3078
|
currentXp: selectedXpLevelData.currentXp,
|
|
2939
3079
|
nextLevelXp: selectedXpLevelData.nextLevelXp,
|
|
2940
|
-
totalXp: selectedXpLevelData.currentXp
|
|
3080
|
+
totalXp: selectedXpLevelData.currentXp,
|
|
3081
|
+
pointsName: selectedXpLevelData.xpPointsName
|
|
2941
3082
|
},
|
|
2942
3083
|
historyData: xpLevelHistory,
|
|
2943
3084
|
historyLoading: xpLevelHistoryLoading,
|
|
2944
3085
|
historyError: xpLevelHistoryError,
|
|
2945
|
-
pagination: xpLevelHistoryPagination
|
|
2946
|
-
messages
|
|
3086
|
+
pagination: xpLevelHistoryPagination
|
|
2947
3087
|
}
|
|
2948
3088
|
);
|
|
2949
3089
|
case USER_CENTER_REWARD_CARD_TYPES.Nft:
|
|
@@ -2954,7 +3094,6 @@ function MyRewardsContent({
|
|
|
2954
3094
|
loading: nftLoading,
|
|
2955
3095
|
error: nftError,
|
|
2956
3096
|
pagination: nftPagination,
|
|
2957
|
-
messages,
|
|
2958
3097
|
onClaimSuccess: () => {
|
|
2959
3098
|
refreshNftList();
|
|
2960
3099
|
}
|
|
@@ -2967,8 +3106,7 @@ function MyRewardsContent({
|
|
|
2967
3106
|
data: whitelistList,
|
|
2968
3107
|
loading: whitelistLoading,
|
|
2969
3108
|
error: whitelistError,
|
|
2970
|
-
pagination: whitelistPagination
|
|
2971
|
-
messages
|
|
3109
|
+
pagination: whitelistPagination
|
|
2972
3110
|
}
|
|
2973
3111
|
);
|
|
2974
3112
|
case USER_CENTER_REWARD_CARD_TYPES.DiscordRole:
|
|
@@ -2978,13 +3116,12 @@ function MyRewardsContent({
|
|
|
2978
3116
|
data: discordRoleList,
|
|
2979
3117
|
loading: discordRoleLoading,
|
|
2980
3118
|
error: discordRoleError,
|
|
2981
|
-
pagination: discordRolePagination
|
|
2982
|
-
messages
|
|
3119
|
+
pagination: discordRolePagination
|
|
2983
3120
|
}
|
|
2984
3121
|
);
|
|
2985
3122
|
case USER_CENTER_REWARD_CARD_TYPES.Points:
|
|
2986
3123
|
if (!selectedPointsData) {
|
|
2987
|
-
return /* @__PURE__ */ jsx(EmptyState, { message:
|
|
3124
|
+
return /* @__PURE__ */ jsx(EmptyState, { message: t("empty_points") });
|
|
2988
3125
|
}
|
|
2989
3126
|
return /* @__PURE__ */ jsx(
|
|
2990
3127
|
PointsList,
|
|
@@ -2993,8 +3130,7 @@ function MyRewardsContent({
|
|
|
2993
3130
|
data: pointsHistory,
|
|
2994
3131
|
loading: pointsLoading,
|
|
2995
3132
|
error: pointsError,
|
|
2996
|
-
pagination: pointsPagination
|
|
2997
|
-
messages
|
|
3133
|
+
pagination: pointsPagination
|
|
2998
3134
|
}
|
|
2999
3135
|
);
|
|
3000
3136
|
default:
|
|
@@ -3008,8 +3144,7 @@ function MyRewardsContent({
|
|
|
3008
3144
|
cards,
|
|
3009
3145
|
selectedCard,
|
|
3010
3146
|
selectedPointsId,
|
|
3011
|
-
onSelectCard: handleSelectCard
|
|
3012
|
-
messages
|
|
3147
|
+
onSelectCard: handleSelectCard
|
|
3013
3148
|
}
|
|
3014
3149
|
),
|
|
3015
3150
|
renderSelectedContent(),
|
|
@@ -3017,7 +3152,6 @@ function MyRewardsContent({
|
|
|
3017
3152
|
WithdrawForm,
|
|
3018
3153
|
{
|
|
3019
3154
|
open: showWithdrawForm,
|
|
3020
|
-
messages,
|
|
3021
3155
|
tokenAssets,
|
|
3022
3156
|
tokenAssetsLoading,
|
|
3023
3157
|
initialTokenId: selectedTokenForWithdraw == null ? void 0 : selectedTokenForWithdraw.token_id,
|
|
@@ -3039,7 +3173,10 @@ function MyRewardsContent({
|
|
|
3039
3173
|
chain: request.chain,
|
|
3040
3174
|
chainLabel: (matchedToken == null ? void 0 : matchedToken.chain_label) ?? request.chain,
|
|
3041
3175
|
amount: request.token_amount,
|
|
3042
|
-
amountInWei: toWei(
|
|
3176
|
+
amountInWei: toWei(
|
|
3177
|
+
request.token_amount,
|
|
3178
|
+
request.token_decimals
|
|
3179
|
+
)
|
|
3043
3180
|
};
|
|
3044
3181
|
}) : void 0,
|
|
3045
3182
|
onClose: () => {
|
|
@@ -3055,9 +3192,7 @@ function MyRewardsContent({
|
|
|
3055
3192
|
)
|
|
3056
3193
|
] });
|
|
3057
3194
|
}
|
|
3058
|
-
function ActivityHistoryContent({
|
|
3059
|
-
messages
|
|
3060
|
-
}) {
|
|
3195
|
+
function ActivityHistoryContent() {
|
|
3061
3196
|
const { data, loading, error, pagination, refresh } = useActivityHistory({
|
|
3062
3197
|
mode: "pagination"
|
|
3063
3198
|
});
|
|
@@ -3068,7 +3203,6 @@ function ActivityHistoryContent({
|
|
|
3068
3203
|
loading,
|
|
3069
3204
|
error,
|
|
3070
3205
|
pagination,
|
|
3071
|
-
messages,
|
|
3072
3206
|
mode: "pagination",
|
|
3073
3207
|
onRetry: refresh
|
|
3074
3208
|
}
|
|
@@ -3082,17 +3216,13 @@ function mergeUserCenterConfig(props, cloud) {
|
|
|
3082
3216
|
};
|
|
3083
3217
|
}
|
|
3084
3218
|
const TAB_LABEL_KEYS = {
|
|
3085
|
-
[UserCenterTabType.MyRewards]: "
|
|
3086
|
-
[UserCenterTabType.Identity]: "
|
|
3087
|
-
[UserCenterTabType.ActivityHistory]: "
|
|
3088
|
-
};
|
|
3089
|
-
const TAB_DEFAULT_LABELS = {
|
|
3090
|
-
[UserCenterTabType.MyRewards]: "My Rewards",
|
|
3091
|
-
[UserCenterTabType.Identity]: "Identity",
|
|
3092
|
-
[UserCenterTabType.ActivityHistory]: "Activity History"
|
|
3219
|
+
[UserCenterTabType.MyRewards]: "tab_my_rewards",
|
|
3220
|
+
[UserCenterTabType.Identity]: "tab_identity",
|
|
3221
|
+
[UserCenterTabType.ActivityHistory]: "tab_activity_history"
|
|
3093
3222
|
};
|
|
3094
3223
|
function UserCenterWidget(props) {
|
|
3095
3224
|
const { widgetId, themeMode } = props;
|
|
3225
|
+
const { t } = useUserCenterLocale();
|
|
3096
3226
|
const { functionConfig, cloudTheme, isConfigLoading, configError } = useResolvedWidgetConfig(widgetId);
|
|
3097
3227
|
const mergedConfig = useMemo(() => {
|
|
3098
3228
|
return mergeUserCenterConfig(
|
|
@@ -3110,14 +3240,8 @@ function UserCenterWidget(props) {
|
|
|
3110
3240
|
cloudTheme,
|
|
3111
3241
|
themeMode,
|
|
3112
3242
|
className: "taskon-user-center",
|
|
3113
|
-
errorMessage: configError ?? (!isConfigured ? "
|
|
3114
|
-
children: Array.isArray(resolvedConfig) && resolvedConfig.length > 0 ? /* @__PURE__ */ jsx(
|
|
3115
|
-
UserCenterWidgetInner,
|
|
3116
|
-
{
|
|
3117
|
-
...props,
|
|
3118
|
-
config: resolvedConfig
|
|
3119
|
-
}
|
|
3120
|
-
) : null
|
|
3243
|
+
errorMessage: configError ?? (!isConfigured ? t("not_configured") : void 0),
|
|
3244
|
+
children: Array.isArray(resolvedConfig) && resolvedConfig.length > 0 ? /* @__PURE__ */ jsx(UserCenterWidgetInner, { ...props, config: resolvedConfig }) : null
|
|
3121
3245
|
}
|
|
3122
3246
|
);
|
|
3123
3247
|
}
|
|
@@ -3132,29 +3256,25 @@ function UserCenterWidgetInner({
|
|
|
3132
3256
|
}) {
|
|
3133
3257
|
var _a;
|
|
3134
3258
|
const { isInitializing } = useTaskOnContext();
|
|
3135
|
-
const {
|
|
3136
|
-
widgetId: "UserCenterWidget",
|
|
3137
|
-
defaultMessages: enMessages,
|
|
3138
|
-
loadMessages: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./locales/en.json": () => import("./UserCenterWidget-cADBSVg7.js").then((n) => n.w), "./locales/ja.json": () => import("./usercenter-ja-B2465c1O.js"), "./locales/ko.json": () => import("./usercenter-ko-xAEYxqLg.js") }), `./locales/${locale}.json`, 3)
|
|
3139
|
-
});
|
|
3259
|
+
const { t, isLoading: isLocaleLoading } = useUserCenterLocale();
|
|
3140
3260
|
const enabledTabs = useMemo(() => filterEnabledTabs(config), [config]);
|
|
3141
3261
|
const tabItems = useMemo(() => {
|
|
3142
3262
|
return enabledTabs.map((tabConfig) => ({
|
|
3143
3263
|
key: tabConfig.tab,
|
|
3144
|
-
label:
|
|
3264
|
+
label: t(TAB_LABEL_KEYS[tabConfig.tab])
|
|
3145
3265
|
}));
|
|
3146
|
-
}, [enabledTabs,
|
|
3147
|
-
const initialTab = defaultTab && enabledTabs.some((
|
|
3266
|
+
}, [enabledTabs, t]);
|
|
3267
|
+
const initialTab = defaultTab && enabledTabs.some((t2) => t2.tab === defaultTab) ? defaultTab : ((_a = enabledTabs[0]) == null ? void 0 : _a.tab) ?? UserCenterTabType.MyRewards;
|
|
3148
3268
|
const [activeTab, setActiveTab] = useState(initialTab);
|
|
3149
3269
|
const handleTabChange = (tab) => {
|
|
3150
3270
|
setActiveTab(tab);
|
|
3151
3271
|
onTabChange == null ? void 0 : onTabChange(tab);
|
|
3152
3272
|
};
|
|
3153
3273
|
if (isInitializing || isLocaleLoading) {
|
|
3154
|
-
return /* @__PURE__ */ jsx("div", { className: `taskon-user-center ${className}`, style, children: /* @__PURE__ */ jsx(LoadingState, { message:
|
|
3274
|
+
return /* @__PURE__ */ jsx("div", { className: `taskon-user-center ${className}`, style, children: /* @__PURE__ */ jsx(LoadingState, { message: t("loading") }) });
|
|
3155
3275
|
}
|
|
3156
3276
|
if (enabledTabs.length === 0) {
|
|
3157
|
-
return /* @__PURE__ */ jsx("div", { className: `taskon-user-center ${className}`, style, children: /* @__PURE__ */ jsx("div", { className: "taskon-user-center-empty", children:
|
|
3277
|
+
return /* @__PURE__ */ jsx("div", { className: `taskon-user-center ${className}`, style, children: /* @__PURE__ */ jsx("div", { className: "taskon-user-center-empty", children: t("no_data") }) });
|
|
3158
3278
|
}
|
|
3159
3279
|
return /* @__PURE__ */ jsxs("div", { className: `taskon-user-center ${className}`, style, children: [
|
|
3160
3280
|
/* @__PURE__ */ jsx(Tabs, { items: tabItems, activeKey: activeTab, onChange: handleTabChange }),
|
|
@@ -3163,31 +3283,15 @@ function UserCenterWidgetInner({
|
|
|
3163
3283
|
MyRewardsContent,
|
|
3164
3284
|
{
|
|
3165
3285
|
config,
|
|
3166
|
-
messages,
|
|
3167
3286
|
defaultRewardCard,
|
|
3168
3287
|
defaultPointId
|
|
3169
3288
|
}
|
|
3170
3289
|
),
|
|
3171
|
-
activeTab === UserCenterTabType.Identity && /* @__PURE__ */ jsx(IdentityContent, { config
|
|
3172
|
-
activeTab === UserCenterTabType.ActivityHistory && /* @__PURE__ */ jsx(
|
|
3173
|
-
ActivityHistoryContent,
|
|
3174
|
-
{
|
|
3175
|
-
messages
|
|
3176
|
-
}
|
|
3177
|
-
)
|
|
3290
|
+
activeTab === UserCenterTabType.Identity && /* @__PURE__ */ jsx(IdentityContent, { config }),
|
|
3291
|
+
activeTab === UserCenterTabType.ActivityHistory && /* @__PURE__ */ jsx(ActivityHistoryContent, {})
|
|
3178
3292
|
] })
|
|
3179
3293
|
] });
|
|
3180
3294
|
}
|
|
3181
3295
|
export {
|
|
3182
|
-
|
|
3183
|
-
UserCenterWidget as U,
|
|
3184
|
-
AssetCard as a,
|
|
3185
|
-
AssetCarousel as b,
|
|
3186
|
-
useUserRewards as c,
|
|
3187
|
-
useFrozenAssets as d,
|
|
3188
|
-
useIdentityData as e,
|
|
3189
|
-
useUnbindSocial as f,
|
|
3190
|
-
useBindWallet as g,
|
|
3191
|
-
useDisableUnlink as h,
|
|
3192
|
-
useActivityHistory as u
|
|
3296
|
+
UserCenterWidget as U
|
|
3193
3297
|
};
|