@blocklet/ui-react 2.9.90 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.config.ts +1 -6
- package/lib/@types/index.d.ts +1 -0
- package/lib/@types/index.js +0 -1
- package/lib/BlockletStudio/index.js +50 -50
- package/lib/ComponentInstaller/index.js +122 -202
- package/lib/ComponentInstaller/installer-item.js +116 -138
- package/lib/ComponentInstaller/locales.js +5 -10
- package/lib/ComponentInstaller/use-component-installed.js +37 -41
- package/lib/ComponentManager/components/add-component.js +58 -67
- package/lib/ComponentManager/components/check-component.js +2 -9
- package/lib/ComponentManager/components/publish-component.js +50 -59
- package/lib/ComponentManager/components/resource-dialog.js +42 -39
- package/lib/ComponentManager/index.js +3 -27
- package/lib/ComponentManager/libs/locales.js +2 -8
- package/lib/Dashboard/index.js +74 -99
- package/lib/Footer/brand.js +21 -43
- package/lib/Footer/copyright.js +15 -24
- package/lib/Footer/index.js +47 -71
- package/lib/Footer/internal-footer.js +72 -100
- package/lib/Footer/layout/plain.js +26 -45
- package/lib/Footer/layout/row.js +12 -29
- package/lib/Footer/layout/standard.js +34 -64
- package/lib/Footer/links.js +74 -104
- package/lib/Footer/social-media.js +35 -42
- package/lib/Header/index.js +69 -117
- package/lib/Icon/index.js +18 -53
- package/{es/UserCenter/components/notification.d.ts → lib/UserCenter/components/config-profile.d.ts} +1 -1
- package/lib/UserCenter/components/config-profile.js +67 -0
- package/lib/UserCenter/components/notification.js +203 -186
- package/lib/UserCenter/components/passport.js +70 -79
- package/lib/UserCenter/components/privacy.js +86 -88
- package/lib/UserCenter/components/settings.js +74 -84
- package/lib/UserCenter/components/storage/connect-to.js +56 -75
- package/lib/UserCenter/components/storage/connected.js +16 -37
- package/lib/UserCenter/components/storage/delete.js +42 -51
- package/lib/UserCenter/components/storage/disconnect.js +15 -29
- package/lib/UserCenter/components/storage/index.js +20 -54
- package/lib/UserCenter/components/storage/item.js +94 -122
- package/lib/UserCenter/components/storage/preview-nft.js +77 -85
- package/lib/UserCenter/components/third-party-login/index.js +49 -61
- package/lib/UserCenter/components/third-party-login/third-party-item.js +159 -176
- package/lib/UserCenter/components/user-center.js +276 -287
- package/lib/UserCenter/components/user-info/index.js +3 -27
- package/lib/UserCenter/components/user-info/user-basic-info.js +134 -129
- package/lib/UserCenter/components/user-info/user-info-item.js +43 -37
- package/lib/UserCenter/components/user-info/user-info.js +41 -74
- package/lib/UserCenter/components/webhook-item.js +184 -177
- package/lib/UserCenter/index.js +1 -13
- package/lib/UserCenter/libs/api.js +4 -16
- package/lib/UserCenter/libs/locales.d.ts +10 -0
- package/lib/UserCenter/libs/locales.js +12 -8
- package/lib/UserCenter/libs/utils.js +7 -17
- package/lib/UserSessions/components/user-session-info.js +88 -85
- package/lib/UserSessions/components/user-sessions.js +177 -213
- package/lib/UserSessions/index.js +1 -13
- package/lib/UserSessions/libs/locales.js +2 -8
- package/lib/UserSessions/libs/utils.js +4 -11
- package/lib/blocklets.js +59 -63
- package/lib/common/header-addons.js +44 -60
- package/lib/common/link-blocker.js +9 -18
- package/lib/common/overridable-theme-provider.js +10 -23
- package/lib/common/wallet-hidden-topbar.js +7 -14
- package/lib/contexts/config-user-space.js +38 -46
- package/lib/hooks/use-mobile.js +5 -13
- package/lib/index.js +10 -100
- package/lib/libs/client.js +2 -8
- package/lib/libs/spaces.js +6 -13
- package/lib/types.js +39 -41
- package/lib/utils.js +25 -44
- package/package.json +8 -38
- package/src/@types/index.ts +1 -0
- package/src/Footer/brand.jsx +6 -1
- package/src/UserCenter/components/config-profile.tsx +70 -0
- package/src/UserCenter/components/notification.tsx +63 -47
- package/src/UserCenter/components/settings.tsx +6 -0
- package/src/UserCenter/libs/locales.ts +10 -0
- package/es/@types/index.d.ts +0 -101
- package/es/@types/index.js +0 -0
- package/es/@types/shims.d.ts +0 -16
- package/es/BlockletStudio/index.d.ts +0 -28
- package/es/BlockletStudio/index.js +0 -114
- package/es/ComponentInstaller/index.d.ts +0 -37
- package/es/ComponentInstaller/index.js +0 -200
- package/es/ComponentInstaller/installer-item.d.ts +0 -21
- package/es/ComponentInstaller/installer-item.js +0 -139
- package/es/ComponentInstaller/locales.d.ts +0 -28
- package/es/ComponentInstaller/locales.js +0 -22
- package/es/ComponentInstaller/use-component-installed.d.ts +0 -12
- package/es/ComponentInstaller/use-component-installed.js +0 -88
- package/es/ComponentManager/components/add-component.d.ts +0 -16
- package/es/ComponentManager/components/add-component.js +0 -114
- package/es/ComponentManager/components/check-component.d.ts +0 -2
- package/es/ComponentManager/components/check-component.js +0 -2
- package/es/ComponentManager/components/publish-component.d.ts +0 -10
- package/es/ComponentManager/components/publish-component.js +0 -76
- package/es/ComponentManager/components/resource-dialog.d.ts +0 -14
- package/es/ComponentManager/components/resource-dialog.js +0 -74
- package/es/ComponentManager/index.d.ts +0 -3
- package/es/ComponentManager/index.js +0 -3
- package/es/ComponentManager/libs/locales.d.ts +0 -14
- package/es/ComponentManager/libs/locales.js +0 -14
- package/es/Dashboard/index.d.ts +0 -40
- package/es/Dashboard/index.js +0 -118
- package/es/Footer/brand.d.ts +0 -22
- package/es/Footer/brand.js +0 -73
- package/es/Footer/copyright.d.ts +0 -18
- package/es/Footer/copyright.js +0 -25
- package/es/Footer/index.d.ts +0 -6
- package/es/Footer/index.js +0 -82
- package/es/Footer/internal-footer.d.ts +0 -29
- package/es/Footer/internal-footer.js +0 -117
- package/es/Footer/layout/plain.d.ts +0 -15
- package/es/Footer/layout/plain.js +0 -39
- package/es/Footer/layout/row.d.ts +0 -18
- package/es/Footer/layout/row.js +0 -41
- package/es/Footer/layout/standard.d.ts +0 -15
- package/es/Footer/layout/standard.js +0 -53
- package/es/Footer/links.d.ts +0 -22
- package/es/Footer/links.js +0 -207
- package/es/Footer/social-media.d.ts +0 -14
- package/es/Footer/social-media.js +0 -60
- package/es/Header/index.d.ts +0 -10
- package/es/Header/index.js +0 -155
- package/es/Icon/index.d.ts +0 -23
- package/es/Icon/index.js +0 -55
- package/es/UserCenter/assets/banner.png +0 -0
- package/es/UserCenter/components/notification.js +0 -248
- package/es/UserCenter/components/passport.d.ts +0 -6
- package/es/UserCenter/components/passport.js +0 -88
- package/es/UserCenter/components/privacy.d.ts +0 -11
- package/es/UserCenter/components/privacy.js +0 -99
- package/es/UserCenter/components/settings.d.ts +0 -9
- package/es/UserCenter/components/settings.js +0 -89
- package/es/UserCenter/components/storage/connect-to.d.ts +0 -7
- package/es/UserCenter/components/storage/connect-to.js +0 -108
- package/es/UserCenter/components/storage/connected.d.ts +0 -7
- package/es/UserCenter/components/storage/connected.js +0 -24
- package/es/UserCenter/components/storage/delete.d.ts +0 -7
- package/es/UserCenter/components/storage/delete.js +0 -62
- package/es/UserCenter/components/storage/disconnect.d.ts +0 -3
- package/es/UserCenter/components/storage/disconnect.js +0 -23
- package/es/UserCenter/components/storage/icons/empty-spaces-nft.svg +0 -58
- package/es/UserCenter/components/storage/icons/long-arrow.svg +0 -5
- package/es/UserCenter/components/storage/icons/space-connected.svg +0 -3
- package/es/UserCenter/components/storage/icons/space-disconnect.svg +0 -3
- package/es/UserCenter/components/storage/index.d.ts +0 -3
- package/es/UserCenter/components/storage/index.js +0 -27
- package/es/UserCenter/components/storage/item.d.ts +0 -9
- package/es/UserCenter/components/storage/item.js +0 -158
- package/es/UserCenter/components/storage/preview-nft.d.ts +0 -6
- package/es/UserCenter/components/storage/preview-nft.js +0 -80
- package/es/UserCenter/components/third-party-login/index.d.ts +0 -5
- package/es/UserCenter/components/third-party-login/index.js +0 -110
- package/es/UserCenter/components/third-party-login/third-party-item.d.ts +0 -13
- package/es/UserCenter/components/third-party-login/third-party-item.js +0 -224
- package/es/UserCenter/components/user-center.d.ts +0 -15
- package/es/UserCenter/components/user-center.js +0 -414
- package/es/UserCenter/components/user-info/index.d.ts +0 -3
- package/es/UserCenter/components/user-info/index.js +0 -3
- package/es/UserCenter/components/user-info/user-basic-info.d.ts +0 -11
- package/es/UserCenter/components/user-info/user-basic-info.js +0 -151
- package/es/UserCenter/components/user-info/user-info-item.d.ts +0 -11
- package/es/UserCenter/components/user-info/user-info-item.js +0 -47
- package/es/UserCenter/components/user-info/user-info.d.ts +0 -6
- package/es/UserCenter/components/user-info/user-info.js +0 -66
- package/es/UserCenter/components/webhook-item.d.ts +0 -3
- package/es/UserCenter/components/webhook-item.js +0 -243
- package/es/UserCenter/index.d.ts +0 -1
- package/es/UserCenter/index.js +0 -1
- package/es/UserCenter/libs/api.d.ts +0 -3
- package/es/UserCenter/libs/api.js +0 -4
- package/es/UserCenter/libs/locales.d.ts +0 -162
- package/es/UserCenter/libs/locales.js +0 -162
- package/es/UserCenter/libs/utils.d.ts +0 -4
- package/es/UserCenter/libs/utils.js +0 -14
- package/es/UserSessions/components/user-session-info.d.ts +0 -6
- package/es/UserSessions/components/user-session-info.js +0 -92
- package/es/UserSessions/components/user-sessions.d.ts +0 -9
- package/es/UserSessions/components/user-sessions.js +0 -265
- package/es/UserSessions/index.d.ts +0 -1
- package/es/UserSessions/index.js +0 -1
- package/es/UserSessions/libs/locales.d.ts +0 -58
- package/es/UserSessions/libs/locales.js +0 -58
- package/es/UserSessions/libs/utils.d.ts +0 -2
- package/es/UserSessions/libs/utils.js +0 -73
- package/es/blocklets.d.ts +0 -16
- package/es/blocklets.js +0 -178
- package/es/common/header-addons.d.ts +0 -21
- package/es/common/header-addons.js +0 -83
- package/es/common/link-blocker.d.ts +0 -7
- package/es/common/link-blocker.js +0 -18
- package/es/common/overridable-theme-provider.d.ts +0 -18
- package/es/common/overridable-theme-provider.js +0 -15
- package/es/common/wallet-hidden-topbar.d.ts +0 -1
- package/es/common/wallet-hidden-topbar.js +0 -14
- package/es/contexts/config-user-space.d.ts +0 -26
- package/es/contexts/config-user-space.js +0 -53
- package/es/hooks/use-mobile.d.ts +0 -4
- package/es/hooks/use-mobile.js +0 -5
- package/es/index.d.ts +0 -10
- package/es/index.js +0 -10
- package/es/libs/client.d.ts +0 -2
- package/es/libs/client.js +0 -2
- package/es/libs/spaces.d.ts +0 -2
- package/es/libs/spaces.js +0 -13
- package/es/types.d.ts +0 -2
- package/es/types.js +0 -43
- package/es/utils.d.ts +0 -8
- package/es/utils.js +0 -78
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from "@mui/material";
|
|
3
|
-
import { Icon } from "@iconify/react";
|
|
4
|
-
import { useMemoizedFn, useCreation } from "ahooks";
|
|
5
|
-
import MailOutlineRoundedIcon from "@iconify-icons/material-symbols/mail-outline-rounded";
|
|
6
|
-
import ScheduleOutlineRoundedIcon from "@iconify-icons/material-symbols/schedule-outline-rounded";
|
|
7
|
-
import MoreTimeRoundedIcon from "@iconify-icons/material-symbols/more-time-rounded";
|
|
8
|
-
import CaptivePortalRoundedIcon from "@iconify-icons/material-symbols/captive-portal-rounded";
|
|
9
|
-
import SettingsInputAntennaRoundedIcon from "@iconify-icons/material-symbols/settings-input-antenna-rounded";
|
|
10
|
-
import RelativeTime from "@arcblock/ux/lib/RelativeTime";
|
|
11
|
-
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
12
|
-
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
13
|
-
import { LOGIN_PROVIDER_NAME } from "@arcblock/ux/lib/Util/constant";
|
|
14
|
-
import { translations } from "../../libs/locales.js";
|
|
15
|
-
import UserInfoItem from "./user-info-item.js";
|
|
16
|
-
export default function UserInfo({
|
|
17
|
-
user,
|
|
18
|
-
...rest
|
|
19
|
-
}) {
|
|
20
|
-
const { locale } = useLocaleContext();
|
|
21
|
-
const t = useMemoizedFn((key, data = {}) => {
|
|
22
|
-
return translate(translations, key, locale, "en", data);
|
|
23
|
-
});
|
|
24
|
-
const readableProvider = useCreation(() => {
|
|
25
|
-
return user?.sourceProvider && LOGIN_PROVIDER_NAME[user.sourceProvider] || t("unknown");
|
|
26
|
-
}, [user?.sourceProvider]);
|
|
27
|
-
const userInfoListData = [];
|
|
28
|
-
userInfoListData.push({
|
|
29
|
-
icon: /* @__PURE__ */ jsx(Icon, { fontSize: 16, icon: MailOutlineRoundedIcon }),
|
|
30
|
-
title: t("email"),
|
|
31
|
-
content: user?.email || t("emptyField")
|
|
32
|
-
});
|
|
33
|
-
userInfoListData.push({
|
|
34
|
-
icon: /* @__PURE__ */ jsx(Icon, { fontSize: 16, icon: ScheduleOutlineRoundedIcon }),
|
|
35
|
-
title: t("lastLoginAt"),
|
|
36
|
-
content: user?.lastLoginAt ? /* @__PURE__ */ jsx(RelativeTime, { locale, value: user?.lastLoginAt, relativeRange: 3 * 86400 * 1e3 }) : t("unknown")
|
|
37
|
-
});
|
|
38
|
-
userInfoListData.push({
|
|
39
|
-
icon: /* @__PURE__ */ jsx(Icon, { fontSize: 16, icon: SettingsInputAntennaRoundedIcon }),
|
|
40
|
-
title: t("lastLoginIp"),
|
|
41
|
-
content: user?.lastLoginIp || t("unknown")
|
|
42
|
-
});
|
|
43
|
-
userInfoListData.push({
|
|
44
|
-
icon: /* @__PURE__ */ jsx(Icon, { fontSize: 16, icon: MoreTimeRoundedIcon }),
|
|
45
|
-
title: t("createdAt"),
|
|
46
|
-
content: user?.createdAt ? /* @__PURE__ */ jsx(RelativeTime, { locale, value: user?.createdAt }) : t("unknown")
|
|
47
|
-
});
|
|
48
|
-
userInfoListData.push({
|
|
49
|
-
icon: /* @__PURE__ */ jsx(Icon, { fontSize: 16, icon: CaptivePortalRoundedIcon }),
|
|
50
|
-
title: t("registerFrom"),
|
|
51
|
-
content: readableProvider
|
|
52
|
-
});
|
|
53
|
-
return /* @__PURE__ */ jsx(
|
|
54
|
-
Box,
|
|
55
|
-
{
|
|
56
|
-
...rest,
|
|
57
|
-
sx: {
|
|
58
|
-
display: "flex",
|
|
59
|
-
flexDirection: "column",
|
|
60
|
-
gap: 1.5,
|
|
61
|
-
...rest?.sx
|
|
62
|
-
},
|
|
63
|
-
children: userInfoListData.map((item) => /* @__PURE__ */ jsx(UserInfoItem, { data: item, sx: { flex: 1 } }, item.title))
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
CircularProgress,
|
|
5
|
-
IconButton,
|
|
6
|
-
InputAdornment,
|
|
7
|
-
MenuItem,
|
|
8
|
-
Select,
|
|
9
|
-
TextField,
|
|
10
|
-
Typography
|
|
11
|
-
} from "@mui/material";
|
|
12
|
-
import { useCreation, useMemoizedFn, useReactive } from "ahooks";
|
|
13
|
-
import noop from "lodash/noop";
|
|
14
|
-
import isUrl from "is-url";
|
|
15
|
-
import { temp as colors } from "@arcblock/ux/lib/Colors";
|
|
16
|
-
import { Icon } from "@iconify/react";
|
|
17
|
-
import CloseRoundedIcon from "@iconify-icons/material-symbols/close-rounded";
|
|
18
|
-
import CheckIcon from "@iconify-icons/material-symbols/check";
|
|
19
|
-
import SendRoundedIcon from "@iconify-icons/material-symbols/send-rounded";
|
|
20
|
-
import EditSquareOutlineRoundedIcon from "@iconify-icons/material-symbols/edit-square-outline-rounded";
|
|
21
|
-
import DeleteOutlineRoundedIcon from "@iconify-icons/material-symbols/delete-outline-rounded";
|
|
22
|
-
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
23
|
-
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
24
|
-
import { translations } from "../libs/locales.js";
|
|
25
|
-
export default function WebhookItem({
|
|
26
|
-
onTest = noop,
|
|
27
|
-
onDelete = noop,
|
|
28
|
-
onSave = noop,
|
|
29
|
-
onCancel = noop,
|
|
30
|
-
type = "slack",
|
|
31
|
-
url = "",
|
|
32
|
-
edit = false
|
|
33
|
-
}) {
|
|
34
|
-
const { locale } = useLocaleContext();
|
|
35
|
-
const t = useMemoizedFn((key, data = {}) => {
|
|
36
|
-
return translate(translations, key, locale, "en", data);
|
|
37
|
-
});
|
|
38
|
-
const currentState = useReactive({
|
|
39
|
-
type: type || "slack",
|
|
40
|
-
url: url || "",
|
|
41
|
-
edit: edit ?? false,
|
|
42
|
-
error: "",
|
|
43
|
-
loading: false
|
|
44
|
-
});
|
|
45
|
-
const checkUrl = useMemoizedFn(() => {
|
|
46
|
-
if (!currentState.url) {
|
|
47
|
-
currentState.error = t("common.required");
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
if (!isUrl(currentState.url)) {
|
|
51
|
-
currentState.error = t("common.invalid");
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
currentState.error = "";
|
|
55
|
-
return true;
|
|
56
|
-
});
|
|
57
|
-
const handleClose = useMemoizedFn(() => {
|
|
58
|
-
currentState.edit = false;
|
|
59
|
-
currentState.url = url || "";
|
|
60
|
-
currentState.type = type || "slack";
|
|
61
|
-
currentState.error = "";
|
|
62
|
-
currentState.loading = false;
|
|
63
|
-
onCancel();
|
|
64
|
-
});
|
|
65
|
-
const _onTest = useMemoizedFn(async (data) => {
|
|
66
|
-
currentState.loading = true;
|
|
67
|
-
await onTest(data);
|
|
68
|
-
currentState.loading = false;
|
|
69
|
-
});
|
|
70
|
-
const onSubmit = useMemoizedFn((fn) => {
|
|
71
|
-
return () => {
|
|
72
|
-
if (checkUrl()) {
|
|
73
|
-
fn({
|
|
74
|
-
type: currentState.type,
|
|
75
|
-
url: currentState.url
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
const inputAdornment = useCreation(() => {
|
|
81
|
-
if (currentState.error) {
|
|
82
|
-
return /* @__PURE__ */ jsx(Typography, { component: "span", color: "error", children: currentState.error });
|
|
83
|
-
}
|
|
84
|
-
if (currentState.edit) {
|
|
85
|
-
if (currentState.loading) {
|
|
86
|
-
return /* @__PURE__ */ jsx(CircularProgress, { size: 16 });
|
|
87
|
-
}
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
-
IconButton,
|
|
90
|
-
{
|
|
91
|
-
size: "small",
|
|
92
|
-
onClick: onSubmit(_onTest),
|
|
93
|
-
sx: {
|
|
94
|
-
mr: -1
|
|
95
|
-
},
|
|
96
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: SendRoundedIcon })
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
return null;
|
|
101
|
-
}, [currentState.error, currentState.edit, currentState.loading]);
|
|
102
|
-
return /* @__PURE__ */ jsxs(
|
|
103
|
-
Box,
|
|
104
|
-
{
|
|
105
|
-
sx: {
|
|
106
|
-
display: "flex",
|
|
107
|
-
gap: 1.5,
|
|
108
|
-
width: "100%",
|
|
109
|
-
alignItems: {
|
|
110
|
-
xs: "flex-start",
|
|
111
|
-
md: "center"
|
|
112
|
-
},
|
|
113
|
-
flexDirection: {
|
|
114
|
-
xs: "column",
|
|
115
|
-
md: "row"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
children: [
|
|
119
|
-
/* @__PURE__ */ jsxs(
|
|
120
|
-
Select,
|
|
121
|
-
{
|
|
122
|
-
sx: {
|
|
123
|
-
borderRadius: 2,
|
|
124
|
-
"&.Mui-disabled": {
|
|
125
|
-
backgroundColor: colors.backgroundsBgField
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
disabled: !currentState.edit || currentState.loading,
|
|
129
|
-
size: "small",
|
|
130
|
-
value: currentState.type,
|
|
131
|
-
onChange: (e) => {
|
|
132
|
-
currentState.type = e.target.value;
|
|
133
|
-
},
|
|
134
|
-
children: [
|
|
135
|
-
/* @__PURE__ */ jsx(MenuItem, { value: "api", children: t("webhook.url") }),
|
|
136
|
-
/* @__PURE__ */ jsx(MenuItem, { value: "slack", children: t("webhook.slack") })
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
),
|
|
140
|
-
/* @__PURE__ */ jsxs(
|
|
141
|
-
Box,
|
|
142
|
-
{
|
|
143
|
-
sx: {
|
|
144
|
-
display: "flex",
|
|
145
|
-
alignItems: "center",
|
|
146
|
-
gap: 0.5,
|
|
147
|
-
width: "100%"
|
|
148
|
-
},
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ jsx(
|
|
151
|
-
TextField,
|
|
152
|
-
{
|
|
153
|
-
sx: {
|
|
154
|
-
flex: 1,
|
|
155
|
-
".MuiInputBase-root": {
|
|
156
|
-
borderRadius: 2,
|
|
157
|
-
"&.Mui-disabled": {
|
|
158
|
-
backgroundColor: colors.backgroundsBgField
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
disabled: !currentState.edit || currentState.loading,
|
|
163
|
-
fullWidth: true,
|
|
164
|
-
size: "small",
|
|
165
|
-
required: true,
|
|
166
|
-
value: currentState.url,
|
|
167
|
-
onChange: (e) => {
|
|
168
|
-
currentState.url = e.target.value;
|
|
169
|
-
checkUrl();
|
|
170
|
-
},
|
|
171
|
-
error: !!currentState.error,
|
|
172
|
-
InputProps: {
|
|
173
|
-
endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: inputAdornment })
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
),
|
|
177
|
-
/* @__PURE__ */ jsx(Box, { sx: { display: "flex", gap: 0.5 }, children: currentState.edit ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
178
|
-
/* @__PURE__ */ jsx(
|
|
179
|
-
IconButton,
|
|
180
|
-
{
|
|
181
|
-
color: "success",
|
|
182
|
-
onClick: onSubmit((...args) => {
|
|
183
|
-
onSave(...args);
|
|
184
|
-
currentState.edit = false;
|
|
185
|
-
}),
|
|
186
|
-
sx: {
|
|
187
|
-
borderRadius: 2,
|
|
188
|
-
border: `1px solid ${colors.strokeBorderBase}`
|
|
189
|
-
},
|
|
190
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: CheckIcon })
|
|
191
|
-
}
|
|
192
|
-
),
|
|
193
|
-
/* @__PURE__ */ jsx(
|
|
194
|
-
IconButton,
|
|
195
|
-
{
|
|
196
|
-
color: "error",
|
|
197
|
-
onClick: handleClose,
|
|
198
|
-
sx: {
|
|
199
|
-
borderRadius: 2,
|
|
200
|
-
border: `1px solid ${colors.strokeBorderBase}`
|
|
201
|
-
},
|
|
202
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: CloseRoundedIcon })
|
|
203
|
-
}
|
|
204
|
-
)
|
|
205
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
206
|
-
/* @__PURE__ */ jsx(
|
|
207
|
-
IconButton,
|
|
208
|
-
{
|
|
209
|
-
onClick: () => {
|
|
210
|
-
currentState.edit = true;
|
|
211
|
-
},
|
|
212
|
-
sx: {
|
|
213
|
-
borderRadius: 2,
|
|
214
|
-
border: `1px solid ${colors.strokeBorderBase}`
|
|
215
|
-
},
|
|
216
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: EditSquareOutlineRoundedIcon })
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
/* @__PURE__ */ jsx(
|
|
220
|
-
IconButton,
|
|
221
|
-
{
|
|
222
|
-
color: "error",
|
|
223
|
-
onClick: () => {
|
|
224
|
-
onDelete({
|
|
225
|
-
type: currentState.type,
|
|
226
|
-
url: currentState.url
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
|
-
sx: {
|
|
230
|
-
borderRadius: 2,
|
|
231
|
-
border: `1px solid ${colors.strokeBorderBase}`
|
|
232
|
-
},
|
|
233
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: DeleteOutlineRoundedIcon })
|
|
234
|
-
}
|
|
235
|
-
)
|
|
236
|
-
] }) })
|
|
237
|
-
]
|
|
238
|
-
}
|
|
239
|
-
)
|
|
240
|
-
]
|
|
241
|
-
}
|
|
242
|
-
);
|
|
243
|
-
}
|
package/es/UserCenter/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as UserCenter } from './components/user-center';
|
package/es/UserCenter/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as UserCenter } from "./components/user-center.js";
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
export declare const translations: {
|
|
2
|
-
zh: {
|
|
3
|
-
settings: string;
|
|
4
|
-
noPassport: string;
|
|
5
|
-
passport: string;
|
|
6
|
-
notification: string;
|
|
7
|
-
email: string;
|
|
8
|
-
lastLogin: string;
|
|
9
|
-
lastLoginAt: string;
|
|
10
|
-
lastLoginIp: string;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
registerFrom: string;
|
|
13
|
-
unknown: string;
|
|
14
|
-
walletNotification: string;
|
|
15
|
-
emailNotification: string;
|
|
16
|
-
phoneNotification: string;
|
|
17
|
-
addWebhook: string;
|
|
18
|
-
saveSuccess: string;
|
|
19
|
-
saveFailed: string;
|
|
20
|
-
webhookTested: string;
|
|
21
|
-
done: string;
|
|
22
|
-
emptyField: string;
|
|
23
|
-
emptyContent: string;
|
|
24
|
-
underProtected: string;
|
|
25
|
-
noUserFound: string;
|
|
26
|
-
notificationManagement: string;
|
|
27
|
-
privacyManagement: string;
|
|
28
|
-
storageManagement: string;
|
|
29
|
-
webhook: {
|
|
30
|
-
url: string;
|
|
31
|
-
slack: string;
|
|
32
|
-
};
|
|
33
|
-
common: {
|
|
34
|
-
confirm: string;
|
|
35
|
-
cancel: string;
|
|
36
|
-
required: string;
|
|
37
|
-
invalid: string;
|
|
38
|
-
};
|
|
39
|
-
toPublic: string;
|
|
40
|
-
currentPassport: string;
|
|
41
|
-
switchProfile: string;
|
|
42
|
-
userInfo: string;
|
|
43
|
-
myInfo: string;
|
|
44
|
-
loginNow: string;
|
|
45
|
-
viewAfterLogin: string;
|
|
46
|
-
sessionManagement: string;
|
|
47
|
-
storage: {
|
|
48
|
-
spaces: {
|
|
49
|
-
tips: string;
|
|
50
|
-
label: string;
|
|
51
|
-
connectedWithName: string;
|
|
52
|
-
gateway: {
|
|
53
|
-
delete: {
|
|
54
|
-
failed: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
provideNFT: {
|
|
58
|
-
title: string;
|
|
59
|
-
scan: string;
|
|
60
|
-
success: string;
|
|
61
|
-
};
|
|
62
|
-
connect: {
|
|
63
|
-
useWallet: string;
|
|
64
|
-
useWalletReconnect: string;
|
|
65
|
-
providerForStorage: string;
|
|
66
|
-
};
|
|
67
|
-
connected: {
|
|
68
|
-
title: string;
|
|
69
|
-
tag: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
thirdPartyLogin: {
|
|
74
|
-
title: string;
|
|
75
|
-
connect: string;
|
|
76
|
-
disconnect: string;
|
|
77
|
-
mainProviderCantRemove: string;
|
|
78
|
-
confirmUnbind: string;
|
|
79
|
-
confirmUnbindDescription: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
en: {
|
|
83
|
-
settings: string;
|
|
84
|
-
noPassport: string;
|
|
85
|
-
passport: string;
|
|
86
|
-
notification: string;
|
|
87
|
-
email: string;
|
|
88
|
-
lastLogin: string;
|
|
89
|
-
lastLoginAt: string;
|
|
90
|
-
lastLoginIp: string;
|
|
91
|
-
createdAt: string;
|
|
92
|
-
registerFrom: string;
|
|
93
|
-
unknown: string;
|
|
94
|
-
walletNotification: string;
|
|
95
|
-
emailNotification: string;
|
|
96
|
-
phoneNotification: string;
|
|
97
|
-
addWebhook: string;
|
|
98
|
-
saveSuccess: string;
|
|
99
|
-
saveFailed: string;
|
|
100
|
-
webhookTested: string;
|
|
101
|
-
done: string;
|
|
102
|
-
emptyField: string;
|
|
103
|
-
notificationManagement: string;
|
|
104
|
-
privacyManagement: string;
|
|
105
|
-
storageManagement: string;
|
|
106
|
-
emptyContent: string;
|
|
107
|
-
underProtected: string;
|
|
108
|
-
noUserFound: string;
|
|
109
|
-
webhook: {
|
|
110
|
-
url: string;
|
|
111
|
-
slack: string;
|
|
112
|
-
};
|
|
113
|
-
common: {
|
|
114
|
-
confirm: string;
|
|
115
|
-
cancel: string;
|
|
116
|
-
required: string;
|
|
117
|
-
invalid: string;
|
|
118
|
-
};
|
|
119
|
-
toPublic: string;
|
|
120
|
-
currentPassport: string;
|
|
121
|
-
switchProfile: string;
|
|
122
|
-
userInfo: string;
|
|
123
|
-
myInfo: string;
|
|
124
|
-
loginNow: string;
|
|
125
|
-
viewAfterLogin: string;
|
|
126
|
-
sessionManagement: string;
|
|
127
|
-
storage: {
|
|
128
|
-
spaces: {
|
|
129
|
-
tips: string;
|
|
130
|
-
label: string;
|
|
131
|
-
connectedWithName: string;
|
|
132
|
-
gateway: {
|
|
133
|
-
delete: {
|
|
134
|
-
failed: string;
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
provideNFT: {
|
|
138
|
-
title: string;
|
|
139
|
-
scan: string;
|
|
140
|
-
success: string;
|
|
141
|
-
};
|
|
142
|
-
connect: {
|
|
143
|
-
useWallet: string;
|
|
144
|
-
useWalletReconnect: string;
|
|
145
|
-
providerForStorage: string;
|
|
146
|
-
};
|
|
147
|
-
connected: {
|
|
148
|
-
title: string;
|
|
149
|
-
tag: string;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
thirdPartyLogin: {
|
|
154
|
-
title: string;
|
|
155
|
-
connect: string;
|
|
156
|
-
disconnect: string;
|
|
157
|
-
mainProviderCantRemove: string;
|
|
158
|
-
confirmUnbind: string;
|
|
159
|
-
confirmUnbindDescription: string;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
export const translations = {
|
|
2
|
-
zh: {
|
|
3
|
-
settings: "\u8BBE\u7F6E",
|
|
4
|
-
noPassport: "\u6682\u65E0\u901A\u884C\u8BC1",
|
|
5
|
-
passport: "\u901A\u884C\u8BC1",
|
|
6
|
-
notification: "\u901A\u77E5",
|
|
7
|
-
email: "\u90AE\u7BB1\u5730\u5740",
|
|
8
|
-
lastLogin: "\u4E0A\u6B21\u767B\u5F55",
|
|
9
|
-
lastLoginAt: "\u4E0A\u6B21\u767B\u5F55\u65F6\u95F4",
|
|
10
|
-
lastLoginIp: "\u4E0A\u6B21\u767B\u5F55\u5730\u5740",
|
|
11
|
-
createdAt: "\u521B\u5EFA\u65F6\u95F4",
|
|
12
|
-
registerFrom: "\u6CE8\u518C\u6765\u6E90",
|
|
13
|
-
unknown: "\u672A\u77E5",
|
|
14
|
-
walletNotification: "\u94B1\u5305\u901A\u77E5",
|
|
15
|
-
emailNotification: "\u90AE\u4EF6\u901A\u77E5",
|
|
16
|
-
phoneNotification: "\u77ED\u4FE1\u901A\u77E5",
|
|
17
|
-
addWebhook: "\u65B0\u589E\u5916\u90E8\u901A\u77E5",
|
|
18
|
-
saveSuccess: "\u4FDD\u5B58\u6210\u529F",
|
|
19
|
-
saveFailed: "\u4FDD\u5B58\u5931\u8D25",
|
|
20
|
-
webhookTested: "\u6D4B\u8BD5\u6D88\u606F\u5DF2\u7ECF\u53D1\u9001",
|
|
21
|
-
done: "\u5B8C\u6210",
|
|
22
|
-
emptyField: "\u672A\u586B\u5199",
|
|
23
|
-
emptyContent: "\u6682\u65E0\u5185\u5BB9",
|
|
24
|
-
underProtected: "\u7528\u6237\u5DF2\u8BBE\u7F6E\u9690\u79C1\u4FDD\u62A4",
|
|
25
|
-
noUserFound: "\u672A\u627E\u5230\u6307\u5B9A\u7684\u7528\u6237",
|
|
26
|
-
notificationManagement: "\u901A\u77E5\u7BA1\u7406",
|
|
27
|
-
privacyManagement: "\u9690\u79C1\u7BA1\u7406",
|
|
28
|
-
storageManagement: "\u5B58\u50A8\u7BA1\u7406",
|
|
29
|
-
webhook: {
|
|
30
|
-
url: "\u81EA\u5B9A\u4E49URL",
|
|
31
|
-
slack: "Slack"
|
|
32
|
-
},
|
|
33
|
-
common: {
|
|
34
|
-
confirm: "\u786E\u8BA4",
|
|
35
|
-
cancel: "\u53D6\u6D88",
|
|
36
|
-
required: "\u5FC5\u586B\u7684",
|
|
37
|
-
invalid: "\u65E0\u6548"
|
|
38
|
-
},
|
|
39
|
-
toPublic: "\u516C\u5F00 \u201C{name}\u201D \u9875\u9762",
|
|
40
|
-
currentPassport: "\u5F53\u524D\u4F7F\u7528\u7684\u901A\u884C\u8BC1",
|
|
41
|
-
switchProfile: "\u5207\u6362",
|
|
42
|
-
userInfo: "\u4E2A\u4EBA\u4FE1\u606F",
|
|
43
|
-
myInfo: "\u6211\u7684\u4FE1\u606F",
|
|
44
|
-
loginNow: "\u7ACB\u5373\u767B\u5F55",
|
|
45
|
-
viewAfterLogin: "\u767B\u5F55\u540E\u624D\u53EF\u4EE5\u67E5\u770B",
|
|
46
|
-
sessionManagement: "\u4F1A\u8BDD\u7BA1\u7406",
|
|
47
|
-
storage: {
|
|
48
|
-
spaces: {
|
|
49
|
-
tips: "\u63D0\u793A",
|
|
50
|
-
label: "\u8BF7\u8F93\u5165 DID Spaces \u670D\u52A1\u5730\u5740",
|
|
51
|
-
connectedWithName: "\u4F60\u5DF2\u6210\u529F\u8FDE\u63A5\u81F3 {name}",
|
|
52
|
-
gateway: {
|
|
53
|
-
delete: {
|
|
54
|
-
failed: "\u5220\u9664 DID Spaces \u5931\u8D25"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
provideNFT: {
|
|
58
|
-
title: "\u8BF7\u4E3A {appName} \u51FA\u793A DID Spaces NFT",
|
|
59
|
-
scan: "\u4F7F\u7528\u4F60\u7684 DID Wallet \u626B\u63CF\u4E0B\u9762\u7684\u4E8C\u7EF4\u7801\u4E3A\u5E94\u7528 {appName} \u51FA\u793A DID Spaces NFT",
|
|
60
|
-
success: "\u8FDE\u63A5\u6210\u529F"
|
|
61
|
-
},
|
|
62
|
-
connect: {
|
|
63
|
-
useWallet: "\u4F7F\u7528 DID Wallet \u8FDE\u63A5",
|
|
64
|
-
useWalletReconnect: "\u4F7F\u7528 DID Wallet \u91CD\u65B0\u8FDE\u63A5",
|
|
65
|
-
providerForStorage: "\u8BF7\u8FDE\u63A5\u60A8\u7684 DID Spaces"
|
|
66
|
-
},
|
|
67
|
-
connected: {
|
|
68
|
-
title: "\u5DF2\u8FDE\u63A5\u7684 DID Spaces",
|
|
69
|
-
tag: "\u5DF2\u8FDE\u63A5"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
thirdPartyLogin: {
|
|
74
|
-
title: "\u7B2C\u4E09\u65B9\u767B\u5F55",
|
|
75
|
-
connect: "\u7ED1\u5B9A",
|
|
76
|
-
disconnect: "\u89E3\u7ED1",
|
|
77
|
-
mainProviderCantRemove: "\u4E3B\u8D26\u53F7\u4E0D\u5141\u8BB8\u89E3\u7ED1",
|
|
78
|
-
confirmUnbind: "\u786E\u5B9A\u8981\u89E3\u7ED1 {name} \u5417?",
|
|
79
|
-
confirmUnbindDescription: "\u89E3\u7ED1\u540E\u60A8\u5C06\u65E0\u6CD5\u4F7F\u7528 {name} \u767B\u5F55\u81F3\u8BE5\u8D26\u6237\u3002\u5982\u679C\u89E3\u7ED1\u540E\uFF0C\u60A8\u4ECD\u4F7F\u7528 {name} \u767B\u5F55\uFF0C\u4F1A\u81EA\u52A8\u521B\u5EFA\u4E00\u4E2A\u65B0\u8D26\u6237"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
en: {
|
|
83
|
-
settings: "Settings",
|
|
84
|
-
noPassport: "No passport founded",
|
|
85
|
-
passport: "Passport",
|
|
86
|
-
notification: "Notification",
|
|
87
|
-
email: "Email",
|
|
88
|
-
lastLogin: "Last Login & IP",
|
|
89
|
-
lastLoginAt: "Last Login",
|
|
90
|
-
lastLoginIp: "Last IP",
|
|
91
|
-
createdAt: "Created At",
|
|
92
|
-
registerFrom: "Register From",
|
|
93
|
-
unknown: "Unknown",
|
|
94
|
-
walletNotification: "DID Wallet notification",
|
|
95
|
-
emailNotification: "Email notification",
|
|
96
|
-
phoneNotification: "SMS notification",
|
|
97
|
-
addWebhook: "Add external notification",
|
|
98
|
-
saveSuccess: "Save succeed",
|
|
99
|
-
saveFailed: "Save failed",
|
|
100
|
-
webhookTested: "Test message sent",
|
|
101
|
-
done: "Done",
|
|
102
|
-
emptyField: "Empty field",
|
|
103
|
-
notificationManagement: "Notification",
|
|
104
|
-
privacyManagement: "Privacy",
|
|
105
|
-
storageManagement: "Storage",
|
|
106
|
-
emptyContent: "Empty",
|
|
107
|
-
underProtected: "This page has protected privacy",
|
|
108
|
-
noUserFound: "No user found",
|
|
109
|
-
webhook: {
|
|
110
|
-
url: "Custom url",
|
|
111
|
-
slack: "Slack"
|
|
112
|
-
},
|
|
113
|
-
common: {
|
|
114
|
-
confirm: "Confirm",
|
|
115
|
-
cancel: "Cancel",
|
|
116
|
-
required: "Required",
|
|
117
|
-
invalid: "Invalid"
|
|
118
|
-
},
|
|
119
|
-
toPublic: 'Public "{name}" page',
|
|
120
|
-
currentPassport: "Passport currently in use",
|
|
121
|
-
switchProfile: "Switch",
|
|
122
|
-
userInfo: "User Info",
|
|
123
|
-
myInfo: "My Info",
|
|
124
|
-
loginNow: "Login",
|
|
125
|
-
viewAfterLogin: "View after login",
|
|
126
|
-
sessionManagement: "Session Management",
|
|
127
|
-
storage: {
|
|
128
|
-
spaces: {
|
|
129
|
-
tips: "Tips",
|
|
130
|
-
label: "Enter DID Spaces Gateway",
|
|
131
|
-
connectedWithName: "You have successfully connected to {name}",
|
|
132
|
-
gateway: {
|
|
133
|
-
delete: {
|
|
134
|
-
failed: "Delete gateway failed"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
provideNFT: {
|
|
138
|
-
title: "Please show the DID Spaces NFT for {appName}",
|
|
139
|
-
scan: "Use your DID Wallet to scan the QR code below to allow the app {appName} show DID space NFT",
|
|
140
|
-
success: "Connected successfully"
|
|
141
|
-
},
|
|
142
|
-
connect: {
|
|
143
|
-
useWallet: "Connect with DID Wallet",
|
|
144
|
-
useWalletReconnect: "Reconnect with DID Wallet",
|
|
145
|
-
providerForStorage: "Please connect your DID Spaces"
|
|
146
|
-
},
|
|
147
|
-
connected: {
|
|
148
|
-
title: "Connected DID Spaces",
|
|
149
|
-
tag: "Connected"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
thirdPartyLogin: {
|
|
154
|
-
title: "Third Party Login",
|
|
155
|
-
connect: "Connect",
|
|
156
|
-
disconnect: "Disconnect",
|
|
157
|
-
mainProviderCantRemove: "Main account not allowed to remove",
|
|
158
|
-
confirmUnbind: "Are you sure to unbind {name}?",
|
|
159
|
-
confirmUnbindDescription: "You will not be able to log in to this account using {name} after unbundling. If you are still logged in with {name} after unbundling, a new account will be created automatically!"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { joinURL } from "ufo";
|
|
2
|
-
import { createPassportSvg as _createPassportSvg } from "@arcblock/ux/lib/Util/passport";
|
|
3
|
-
import { AUTH_SERVICE_PREFIX } from "@arcblock/ux/lib/Util/constant";
|
|
4
|
-
export const formatAxiosError = (err) => {
|
|
5
|
-
const { response } = err;
|
|
6
|
-
if (response) {
|
|
7
|
-
return `Request failed: ${response.status} ${response.statusText}: ${JSON.stringify(response.data)}`;
|
|
8
|
-
}
|
|
9
|
-
return err.message;
|
|
10
|
-
};
|
|
11
|
-
export const createPassportSvg = (props) => _createPassportSvg({
|
|
12
|
-
...props,
|
|
13
|
-
issuerAvatarUrl: joinURL(window.location.origin, AUTH_SERVICE_PREFIX, "/blocklet/logo")
|
|
14
|
-
});
|