@blocklet/ui-react 3.0.9 → 3.0.11
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/lib/BlockletStudio/index.js +70 -71
- package/lib/ComponentInstaller/index.js +85 -88
- package/lib/ComponentInstaller/installer-item.js +47 -53
- package/lib/ComponentInstaller/use-component-installed.js +32 -38
- package/lib/ComponentManager/components/add-component.js +47 -50
- package/lib/ComponentManager/components/publish-component.js +30 -31
- package/lib/ComponentManager/components/resource-dialog.js +28 -30
- package/lib/Dashboard/index.d.ts +1 -1
- package/lib/Dashboard/index.js +59 -61
- package/lib/Footer/index.js +51 -52
- package/lib/Footer/internal-footer.js +43 -47
- package/lib/Footer/layout/standard.js +11 -12
- package/lib/Footer/links.js +25 -28
- package/lib/Footer/social-media.js +17 -17
- package/lib/Header/index.js +81 -83
- package/lib/Notifications/Snackbar.js +76 -77
- package/lib/Notifications/hooks/use-title.js +34 -34
- package/lib/Notifications/utils.js +56 -60
- package/lib/UserCenter/components/config-inviter.js +17 -18
- package/lib/UserCenter/components/danger-zone.js +49 -52
- package/lib/UserCenter/components/nft.js +44 -45
- package/lib/UserCenter/components/notification.js +92 -99
- package/lib/UserCenter/components/passport.js +22 -22
- package/lib/UserCenter/components/privacy.js +6 -6
- package/lib/UserCenter/components/settings.js +40 -43
- package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
- package/lib/UserCenter/components/status-dialog/index.js +112 -114
- package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
- package/lib/UserCenter/components/status-selector/index.js +13 -13
- package/lib/UserCenter/components/storage/action.js +21 -22
- package/lib/UserCenter/components/storage/delete.js +24 -24
- package/lib/UserCenter/components/third-party-login/index.js +53 -53
- package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
- package/lib/UserCenter/components/user-center.js +198 -207
- package/lib/UserCenter/components/user-info/metadata.js +343 -353
- package/lib/UserCenter/components/user-info/switch-role.js +17 -20
- package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
- package/lib/UserCenter/components/user-info/user-info.js +40 -40
- package/lib/UserCenter/components/user-info/user-status.js +97 -99
- package/lib/UserCenter/components/user-info/utils.js +34 -35
- package/lib/UserSessions/components/user-session-info.js +25 -28
- package/lib/UserSessions/components/user-sessions.js +169 -181
- package/lib/blocklets.js +62 -72
- package/lib/common/domain-warning.js +31 -31
- package/lib/common/header-addons.d.ts +1 -1
- package/lib/common/header-addons.js +49 -53
- package/lib/common/notification-addon.js +29 -32
- package/lib/common/ws.js +17 -18
- package/lib/contexts/config-user-space.js +16 -19
- package/lib/utils.js +44 -48
- package/package.json +11 -11
|
@@ -1,90 +1,86 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { toTextList as
|
|
4
|
-
import { isSameAddr as
|
|
5
|
-
import { client as
|
|
6
|
-
const
|
|
7
|
-
if (!
|
|
1
|
+
import h from "lodash/isEmpty";
|
|
2
|
+
import m from "dompurify";
|
|
3
|
+
import { toTextList as v, Link as f, getLink as p } from "@abtnode/util/lib/notification-preview/highlight";
|
|
4
|
+
import { isSameAddr as d } from "@abtnode/util/lib/notification-preview/func";
|
|
5
|
+
import { client as T } from "../libs/client.js";
|
|
6
|
+
const b = (t) => {
|
|
7
|
+
if (!t || !t.length)
|
|
8
8
|
return [];
|
|
9
|
-
const
|
|
10
|
-
let r = null,
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
r && (l.length === 1 ? t.push(l[0]) : (r.items = l, t.push(r))), a.activity && a.activity.type ? (r = a, l = [a]) : (t.push(a), r = null, l = []);
|
|
9
|
+
const e = [];
|
|
10
|
+
let r = null, a = [];
|
|
11
|
+
if (t.forEach((s) => {
|
|
12
|
+
if (!s.activity || !s.activity.type || !r) {
|
|
13
|
+
r && (a.length === 1 ? e.push(a[0]) : (r.items = a, e.push(r))), s.activity && s.activity.type ? (r = s, a = [s]) : (e.push(s), r = null, a = []);
|
|
15
14
|
return;
|
|
16
15
|
}
|
|
17
|
-
const
|
|
16
|
+
const n = a[0].activity, c = n?.type, l = n?.target?.type, i = n?.target?.id, u = s.activity.type, o = s.activity.target?.type, y = s.activity.target?.id;
|
|
18
17
|
if (
|
|
19
18
|
// activity.type 必须相同且不为null或undefined
|
|
20
|
-
|
|
21
|
-
(!
|
|
22
|
-
|
|
19
|
+
c && u && c === u && // 如果都没有target,可以合并
|
|
20
|
+
(!n?.target && !s.activity.target || // 如果都有target,则target.type和target.id都必须相同
|
|
21
|
+
n?.target && s.activity.target && l === o && i === y)
|
|
23
22
|
)
|
|
24
|
-
|
|
23
|
+
a.push(s);
|
|
25
24
|
else {
|
|
26
|
-
if (
|
|
27
|
-
|
|
25
|
+
if (a.length === 1)
|
|
26
|
+
e.push(a[0]);
|
|
28
27
|
else {
|
|
29
|
-
const
|
|
30
|
-
|
|
28
|
+
const g = Object.assign({}, r, { items: a });
|
|
29
|
+
e.push(g);
|
|
31
30
|
}
|
|
32
|
-
r =
|
|
31
|
+
r = s, a = [s];
|
|
33
32
|
}
|
|
34
33
|
}), r)
|
|
35
|
-
if (
|
|
36
|
-
|
|
34
|
+
if (a.length === 1)
|
|
35
|
+
e.push(a[0]);
|
|
37
36
|
else {
|
|
38
|
-
const
|
|
39
|
-
|
|
37
|
+
const s = Object.assign({}, r, { items: a });
|
|
38
|
+
e.push(s);
|
|
40
39
|
}
|
|
41
|
-
return
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
return !!t && ["normal", "success", "info"].includes(t);
|
|
48
|
-
}, R = (s) => {
|
|
49
|
-
if (!s)
|
|
40
|
+
return e;
|
|
41
|
+
}, j = (t) => !h(t.activity) && !!t.activity?.type && !!t.activity?.actor, O = (t) => {
|
|
42
|
+
const { severity: e } = t || {};
|
|
43
|
+
return !!e && ["normal", "success", "info"].includes(e);
|
|
44
|
+
}, P = (t) => {
|
|
45
|
+
if (!t)
|
|
50
46
|
return null;
|
|
51
|
-
const { meta:
|
|
47
|
+
const { meta: e, target: r } = t;
|
|
52
48
|
return {
|
|
53
|
-
metaLink:
|
|
54
|
-
targetLink: r
|
|
49
|
+
metaLink: e?.id,
|
|
50
|
+
targetLink: r?.id
|
|
55
51
|
};
|
|
56
|
-
},
|
|
52
|
+
}, L = async (t, e) => {
|
|
57
53
|
try {
|
|
58
|
-
return await
|
|
54
|
+
return await T.user.getProfileUrl({ did: t, locale: e });
|
|
59
55
|
} catch (r) {
|
|
60
56
|
console.error(r);
|
|
61
57
|
return;
|
|
62
58
|
}
|
|
63
|
-
},
|
|
64
|
-
const { type: r, did:
|
|
65
|
-
return
|
|
66
|
-
},
|
|
67
|
-
const
|
|
59
|
+
}, $ = async (t, e) => {
|
|
60
|
+
const { type: r, did: a } = t;
|
|
61
|
+
return d(r, "did") ? await L(a, e) || p(t) : p(t);
|
|
62
|
+
}, E = async (t, e, r = !0) => {
|
|
63
|
+
const a = v(t);
|
|
68
64
|
return await Promise.all(
|
|
69
|
-
|
|
70
|
-
if (
|
|
65
|
+
a.map(async (n) => {
|
|
66
|
+
if (n instanceof f) {
|
|
71
67
|
if (r) {
|
|
72
|
-
const
|
|
73
|
-
return
|
|
68
|
+
const c = await $(n, e), { type: l, chainId: i, did: u } = n;
|
|
69
|
+
return d(l, "dapp") ? `<em class="dapp" data-type="${l}" data-chain-id="${i}" data-did="${u}">${n.text}</em>` : c ? `<a target="_blank" rel="noopener noreferrer" class="link" href="${c}">${n.text}</a>` : `<em class="common" data-type="${l}" data-chain-id="${i}" data-did="${u}">${n.text}</em>`;
|
|
74
70
|
}
|
|
75
|
-
return
|
|
71
|
+
return n.text;
|
|
76
72
|
}
|
|
77
|
-
return
|
|
73
|
+
return n;
|
|
78
74
|
})
|
|
79
|
-
).then((
|
|
80
|
-
},
|
|
75
|
+
).then((n) => n.join(""));
|
|
76
|
+
}, M = (t) => m.sanitize(t, {
|
|
81
77
|
ALLOWED_ATTR: ["href", "target", "rel", "class", "id", "style"]
|
|
82
78
|
});
|
|
83
79
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
O as canAutoRead,
|
|
81
|
+
P as getActivityLink,
|
|
82
|
+
j as isIncludeActivity,
|
|
83
|
+
b as mergeAdjacentNotifications,
|
|
84
|
+
M as sanitize,
|
|
85
|
+
E as toClickableSpan
|
|
90
86
|
};
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { useReactive as
|
|
4
|
-
import
|
|
5
|
-
import { client as
|
|
6
|
-
import { formatAxiosError as
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
inviter: t == null ? void 0 : t.inviter,
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Box as a, TextField as l } from "@mui/material";
|
|
3
|
+
import { useReactive as s, useMemoizedFn as f } from "ahooks";
|
|
4
|
+
import v from "@arcblock/ux/lib/Toast";
|
|
5
|
+
import { client as m } from "../../libs/client.js";
|
|
6
|
+
import { formatAxiosError as c } from "../libs/utils.js";
|
|
7
|
+
function y({ user: i }) {
|
|
8
|
+
const e = s({
|
|
9
|
+
inviter: i?.inviter,
|
|
11
10
|
loading: !1
|
|
12
|
-
}),
|
|
11
|
+
}), n = f(async (o) => {
|
|
13
12
|
try {
|
|
14
|
-
const { value:
|
|
15
|
-
|
|
16
|
-
} catch (
|
|
17
|
-
|
|
13
|
+
const { value: t } = o.target;
|
|
14
|
+
e.loading = !0, await m.user.saveProfile({ inviter: t }), e.inviter = t;
|
|
15
|
+
} catch (t) {
|
|
16
|
+
v.error(c(t));
|
|
18
17
|
} finally {
|
|
19
|
-
|
|
18
|
+
e.loading = !1;
|
|
20
19
|
}
|
|
21
20
|
});
|
|
22
|
-
return !
|
|
21
|
+
return !i || !!!window.blocklet?.settings?.invite?.enabled || !!i.inviter ? "-" : /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(l, { size: "small", fullWidth: !0, label: "", value: e.inviter, onChange: n }) });
|
|
23
22
|
}
|
|
24
23
|
export {
|
|
25
|
-
|
|
24
|
+
y as default
|
|
26
25
|
};
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { use as
|
|
3
|
-
import { Box as
|
|
4
|
-
import { useLocaleContext as
|
|
5
|
-
import { translate as
|
|
6
|
-
import { useMemoizedFn as
|
|
7
|
-
import { useConfirm as
|
|
8
|
-
import { SessionContext as
|
|
9
|
-
import { LOGIN_PROVIDER as
|
|
10
|
-
import
|
|
11
|
-
import { translations as
|
|
12
|
-
import { client as
|
|
13
|
-
function
|
|
14
|
-
const { confirmApi:
|
|
15
|
-
|
|
16
|
-
if (["true", !0].includes((s = window == null ? void 0 : window.blocklet) == null ? void 0 : s.ALLOW_SKIP_DESTROY_MYSELF_VERIFY))
|
|
1
|
+
import { jsxs as l, Fragment as D, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { use as L } from "react";
|
|
3
|
+
import { Box as a, Typography as p, Button as w } from "@mui/material";
|
|
4
|
+
import { useLocaleContext as E } from "@arcblock/ux/lib/Locale/context";
|
|
5
|
+
import { translate as I } from "@arcblock/ux/lib/Locale/util";
|
|
6
|
+
import { useMemoizedFn as d, useCreation as R } from "ahooks";
|
|
7
|
+
import { useConfirm as v } from "@arcblock/ux/lib/Dialog";
|
|
8
|
+
import { SessionContext as S } from "@arcblock/did-connect/lib/Session";
|
|
9
|
+
import { LOGIN_PROVIDER as _ } from "@blocklet/constant";
|
|
10
|
+
import m from "@arcblock/ux/lib/Toast";
|
|
11
|
+
import { translations as B } from "../libs/locales.js";
|
|
12
|
+
import { client as y } from "../../libs/client.js";
|
|
13
|
+
function N() {
|
|
14
|
+
const { confirmApi: g, confirmHolder: x } = v(), { locale: f } = E(), { session: n, connectApi: u } = L(S), e = d((r, o = {}) => I(B, r, f, "en", o)), h = R(() => {
|
|
15
|
+
if (["true", !0].includes(window?.blocklet?.ALLOW_SKIP_DESTROY_MYSELF_VERIFY))
|
|
17
16
|
return !1;
|
|
18
|
-
const
|
|
19
|
-
return !!
|
|
20
|
-
}, [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
locale: p,
|
|
17
|
+
const r = n?.user?.connectedAccounts || [], o = [_.WALLET];
|
|
18
|
+
return !!r.some((t) => o.includes(t.provider));
|
|
19
|
+
}, [n?.user]), A = d(() => new Promise((r, o) => {
|
|
20
|
+
const t = n?.user?.did;
|
|
21
|
+
u.open({
|
|
22
|
+
locale: f,
|
|
25
23
|
action: "destroy-myself",
|
|
26
24
|
forceConnected: !0,
|
|
27
25
|
saveConnect: !1,
|
|
@@ -29,7 +27,7 @@ function H() {
|
|
|
29
27
|
// 暂不允许使用 passkey 进行验证
|
|
30
28
|
passkeyBehavior: "none",
|
|
31
29
|
extraParams: {
|
|
32
|
-
removeUserDid:
|
|
30
|
+
removeUserDid: t
|
|
33
31
|
},
|
|
34
32
|
messages: {
|
|
35
33
|
title: e("destroyMyself.title"),
|
|
@@ -38,16 +36,16 @@ function H() {
|
|
|
38
36
|
success: e("destroyMyself.success")
|
|
39
37
|
},
|
|
40
38
|
// @ts-expect-error 该 did-connect 后端api 将结果塞在了 result 中,并做了加密,所以已经变成一个字符串了
|
|
41
|
-
onSuccess: ({ result:
|
|
42
|
-
const
|
|
43
|
-
|
|
39
|
+
onSuccess: ({ result: c }, C = (i) => i) => {
|
|
40
|
+
const i = C(c);
|
|
41
|
+
r(i);
|
|
44
42
|
},
|
|
45
43
|
onClose: () => {
|
|
46
|
-
|
|
44
|
+
u.close(), o(new Error(e("destroyMyself.abort")));
|
|
47
45
|
}
|
|
48
46
|
});
|
|
49
|
-
})),
|
|
50
|
-
|
|
47
|
+
})), M = d(() => {
|
|
48
|
+
g.open({
|
|
51
49
|
title: e("dangerZone.deleteAccount"),
|
|
52
50
|
content: e("dangerZone.deleteAccountDescription"),
|
|
53
51
|
confirmButtonText: e("common.confirm"),
|
|
@@ -55,29 +53,28 @@ function H() {
|
|
|
55
53
|
color: "error"
|
|
56
54
|
},
|
|
57
55
|
cancelButtonText: e("common.cancel"),
|
|
58
|
-
async onConfirm(
|
|
59
|
-
|
|
60
|
-
let r;
|
|
56
|
+
async onConfirm(r) {
|
|
57
|
+
let o;
|
|
61
58
|
try {
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
else if (
|
|
65
|
-
|
|
59
|
+
if (h)
|
|
60
|
+
o = await A();
|
|
61
|
+
else if (y?.user?.destroyMyself instanceof Function)
|
|
62
|
+
o = await y.user.destroyMyself();
|
|
66
63
|
else {
|
|
67
|
-
|
|
64
|
+
m.error(e("notImplemented"));
|
|
68
65
|
return;
|
|
69
66
|
}
|
|
70
|
-
|
|
67
|
+
o?.did === n?.user?.did ? n.logout(r) : m.error(e("destroyMyself.error"));
|
|
71
68
|
} catch (t) {
|
|
72
|
-
const
|
|
73
|
-
|
|
69
|
+
const c = t?.response?.data.error || t?.message || e("destroyMyself.error");
|
|
70
|
+
m.error(c);
|
|
74
71
|
}
|
|
75
72
|
}
|
|
76
73
|
});
|
|
77
74
|
});
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
75
|
+
return /* @__PURE__ */ l(D, { children: [
|
|
76
|
+
/* @__PURE__ */ s(a, { children: /* @__PURE__ */ l(
|
|
77
|
+
a,
|
|
81
78
|
{
|
|
82
79
|
sx: {
|
|
83
80
|
display: "flex",
|
|
@@ -87,9 +84,9 @@ function H() {
|
|
|
87
84
|
flexWrap: "wrap"
|
|
88
85
|
},
|
|
89
86
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
87
|
+
/* @__PURE__ */ l(a, { children: [
|
|
88
|
+
/* @__PURE__ */ s(
|
|
89
|
+
p,
|
|
93
90
|
{
|
|
94
91
|
variant: "h6",
|
|
95
92
|
sx: {
|
|
@@ -99,8 +96,8 @@ function H() {
|
|
|
99
96
|
children: e("dangerZone.deleteAccount")
|
|
100
97
|
}
|
|
101
98
|
),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
99
|
+
/* @__PURE__ */ s(
|
|
100
|
+
p,
|
|
104
101
|
{
|
|
105
102
|
variant: "caption",
|
|
106
103
|
sx: {
|
|
@@ -110,13 +107,13 @@ function H() {
|
|
|
110
107
|
}
|
|
111
108
|
)
|
|
112
109
|
] }),
|
|
113
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ s(w, { variant: "contained", color: "error", size: "small", onClick: M, children: e("dangerZone.delete") })
|
|
114
111
|
]
|
|
115
112
|
}
|
|
116
113
|
) }),
|
|
117
|
-
|
|
114
|
+
x
|
|
118
115
|
] });
|
|
119
116
|
}
|
|
120
117
|
export {
|
|
121
|
-
|
|
118
|
+
N as default
|
|
122
119
|
};
|
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { useMemoizedFn as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { WELLKNOWN_SERVICE_PATH_PREFIX as
|
|
8
|
-
import { translate as
|
|
9
|
-
import { useLocaleContext as
|
|
10
|
-
import { translations as
|
|
11
|
-
function
|
|
12
|
-
const { locale:
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { Box as a, Skeleton as f, Typography as u, Pagination as y } from "@mui/material";
|
|
3
|
+
import { useMemoizedFn as w, useReactive as k, useRequest as C, useCreation as b } from "ahooks";
|
|
4
|
+
import F from "axios";
|
|
5
|
+
import z from "@arcblock/ux/lib/NFTDisplay";
|
|
6
|
+
import N from "@arcblock/ux/lib/Empty";
|
|
7
|
+
import { WELLKNOWN_SERVICE_PATH_PREFIX as P } from "@abtnode/constant";
|
|
8
|
+
import { translate as R } from "@arcblock/ux/lib/Locale/util";
|
|
9
|
+
import { useLocaleContext as j } from "@arcblock/ux/lib/Locale/context";
|
|
10
|
+
import { translations as E } from "../libs/locales.js";
|
|
11
|
+
function q({ user: l }) {
|
|
12
|
+
const { locale: g } = j(), d = w((s, r = {}) => R(E, s, g, "en", r)), t = k({
|
|
13
13
|
page: 1,
|
|
14
14
|
size: 20
|
|
15
|
-
}),
|
|
16
|
-
async (
|
|
15
|
+
}), p = C(
|
|
16
|
+
async (s = t) => (await F.get(`${P}/ocap/listAssets`, {
|
|
17
17
|
params: {
|
|
18
|
-
ownerAddress:
|
|
19
|
-
...
|
|
18
|
+
ownerAddress: l.did,
|
|
19
|
+
...s
|
|
20
20
|
}
|
|
21
21
|
})).data,
|
|
22
22
|
{
|
|
23
23
|
defaultParams: [t],
|
|
24
|
-
refreshDeps: [
|
|
24
|
+
refreshDeps: [l.did, t]
|
|
25
25
|
}
|
|
26
|
-
), { loading:
|
|
27
|
-
t.page =
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
o,
|
|
26
|
+
), { loading: n, data: o } = p, i = o?.page ?? { cursor: 0, next: !1, total: 0 }, m = (s, r) => {
|
|
27
|
+
t.page = r, p.run(t);
|
|
28
|
+
}, x = b(() => {
|
|
29
|
+
if (n) {
|
|
30
|
+
const s = ["skeleton-1", "skeleton-2", "skeleton-3", "skeleton-4", "skeleton-5"].map((r) => /* @__PURE__ */ e(f, { variant: "rectangular", width: "15%", height: 166, sx: { borderRadius: 1, flexShrink: 0 } }, r));
|
|
31
|
+
return /* @__PURE__ */ c(
|
|
32
|
+
a,
|
|
34
33
|
{
|
|
35
34
|
sx: {
|
|
36
35
|
display: "flex",
|
|
@@ -38,9 +37,9 @@ function H({ user: p }) {
|
|
|
38
37
|
gap: 2
|
|
39
38
|
},
|
|
40
39
|
children: [
|
|
41
|
-
/* @__PURE__ */ e(
|
|
40
|
+
/* @__PURE__ */ e(f, { width: "20%" }),
|
|
42
41
|
/* @__PURE__ */ e(
|
|
43
|
-
|
|
42
|
+
a,
|
|
44
43
|
{
|
|
45
44
|
sx: {
|
|
46
45
|
display: "flex",
|
|
@@ -48,16 +47,16 @@ function H({ user: p }) {
|
|
|
48
47
|
gap: 2,
|
|
49
48
|
flexWrap: "nowrap"
|
|
50
49
|
},
|
|
51
|
-
children:
|
|
50
|
+
children: s
|
|
52
51
|
}
|
|
53
52
|
)
|
|
54
53
|
]
|
|
55
54
|
}
|
|
56
55
|
);
|
|
57
56
|
}
|
|
58
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ c(h, { children: [
|
|
59
58
|
/* @__PURE__ */ e(
|
|
60
|
-
|
|
59
|
+
u,
|
|
61
60
|
{
|
|
62
61
|
sx: {
|
|
63
62
|
color: "grey.A700",
|
|
@@ -67,9 +66,9 @@ function H({ user: p }) {
|
|
|
67
66
|
children: d("common.nft")
|
|
68
67
|
}
|
|
69
68
|
),
|
|
70
|
-
|
|
69
|
+
o?.assets?.length === 0 && !n && /* @__PURE__ */ e(a, { sx: { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, children: /* @__PURE__ */ e(N, { children: d("common.noNFT") }) }),
|
|
71
70
|
/* @__PURE__ */ e(
|
|
72
|
-
|
|
71
|
+
a,
|
|
73
72
|
{
|
|
74
73
|
className: "nft-list-wrapper",
|
|
75
74
|
sx: {
|
|
@@ -83,8 +82,8 @@ function H({ user: p }) {
|
|
|
83
82
|
},
|
|
84
83
|
gap: 2.5
|
|
85
84
|
},
|
|
86
|
-
children:
|
|
87
|
-
|
|
85
|
+
children: o?.assets?.map((s) => /* @__PURE__ */ e(
|
|
86
|
+
a,
|
|
88
87
|
{
|
|
89
88
|
sx: {
|
|
90
89
|
flexShrink: 0,
|
|
@@ -92,10 +91,10 @@ function H({ user: p }) {
|
|
|
92
91
|
height: { xs: 120, sm: 120, md: 120, lg: 166 }
|
|
93
92
|
},
|
|
94
93
|
children: /* @__PURE__ */ e(
|
|
95
|
-
|
|
94
|
+
z,
|
|
96
95
|
{
|
|
97
|
-
data:
|
|
98
|
-
address:
|
|
96
|
+
data: s.display,
|
|
97
|
+
address: s.address,
|
|
99
98
|
inset: !0,
|
|
100
99
|
imageFilter: {
|
|
101
100
|
imageFilter: "resize",
|
|
@@ -105,12 +104,12 @@ function H({ user: p }) {
|
|
|
105
104
|
}
|
|
106
105
|
)
|
|
107
106
|
},
|
|
108
|
-
|
|
107
|
+
s.address
|
|
109
108
|
))
|
|
110
109
|
}
|
|
111
110
|
),
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
i.next || t.page > 1 ? /* @__PURE__ */ e(
|
|
112
|
+
y,
|
|
114
113
|
{
|
|
115
114
|
sx: {
|
|
116
115
|
display: "flex",
|
|
@@ -118,15 +117,15 @@ function H({ user: p }) {
|
|
|
118
117
|
mt: 2
|
|
119
118
|
},
|
|
120
119
|
page: t.page,
|
|
121
|
-
onChange:
|
|
122
|
-
count: Math.ceil(
|
|
120
|
+
onChange: m,
|
|
121
|
+
count: Math.ceil(i.total / t.size),
|
|
123
122
|
size: "small"
|
|
124
123
|
}
|
|
125
124
|
) : null
|
|
126
125
|
] });
|
|
127
|
-
}, [
|
|
128
|
-
return /* @__PURE__ */ e(
|
|
126
|
+
}, [n, i, t.page, t.size, m]);
|
|
127
|
+
return /* @__PURE__ */ e(a, { sx: { border: "1px solid", borderColor: "divider", borderRadius: 1, p: 2, mb: 5 }, children: x });
|
|
129
128
|
}
|
|
130
129
|
export {
|
|
131
|
-
|
|
130
|
+
q as default
|
|
132
131
|
};
|