@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.
Files changed (209) hide show
  1. package/build.config.ts +1 -6
  2. package/lib/@types/index.d.ts +1 -0
  3. package/lib/@types/index.js +0 -1
  4. package/lib/BlockletStudio/index.js +50 -50
  5. package/lib/ComponentInstaller/index.js +122 -202
  6. package/lib/ComponentInstaller/installer-item.js +116 -138
  7. package/lib/ComponentInstaller/locales.js +5 -10
  8. package/lib/ComponentInstaller/use-component-installed.js +37 -41
  9. package/lib/ComponentManager/components/add-component.js +58 -67
  10. package/lib/ComponentManager/components/check-component.js +2 -9
  11. package/lib/ComponentManager/components/publish-component.js +50 -59
  12. package/lib/ComponentManager/components/resource-dialog.js +42 -39
  13. package/lib/ComponentManager/index.js +3 -27
  14. package/lib/ComponentManager/libs/locales.js +2 -8
  15. package/lib/Dashboard/index.js +74 -99
  16. package/lib/Footer/brand.js +21 -43
  17. package/lib/Footer/copyright.js +15 -24
  18. package/lib/Footer/index.js +47 -71
  19. package/lib/Footer/internal-footer.js +72 -100
  20. package/lib/Footer/layout/plain.js +26 -45
  21. package/lib/Footer/layout/row.js +12 -29
  22. package/lib/Footer/layout/standard.js +34 -64
  23. package/lib/Footer/links.js +74 -104
  24. package/lib/Footer/social-media.js +35 -42
  25. package/lib/Header/index.js +69 -117
  26. package/lib/Icon/index.js +18 -53
  27. package/{es/UserCenter/components/notification.d.ts → lib/UserCenter/components/config-profile.d.ts} +1 -1
  28. package/lib/UserCenter/components/config-profile.js +67 -0
  29. package/lib/UserCenter/components/notification.js +203 -186
  30. package/lib/UserCenter/components/passport.js +70 -79
  31. package/lib/UserCenter/components/privacy.js +86 -88
  32. package/lib/UserCenter/components/settings.js +74 -84
  33. package/lib/UserCenter/components/storage/connect-to.js +56 -75
  34. package/lib/UserCenter/components/storage/connected.js +16 -37
  35. package/lib/UserCenter/components/storage/delete.js +42 -51
  36. package/lib/UserCenter/components/storage/disconnect.js +15 -29
  37. package/lib/UserCenter/components/storage/index.js +20 -54
  38. package/lib/UserCenter/components/storage/item.js +94 -122
  39. package/lib/UserCenter/components/storage/preview-nft.js +77 -85
  40. package/lib/UserCenter/components/third-party-login/index.js +49 -61
  41. package/lib/UserCenter/components/third-party-login/third-party-item.js +159 -176
  42. package/lib/UserCenter/components/user-center.js +276 -287
  43. package/lib/UserCenter/components/user-info/index.js +3 -27
  44. package/lib/UserCenter/components/user-info/user-basic-info.js +134 -129
  45. package/lib/UserCenter/components/user-info/user-info-item.js +43 -37
  46. package/lib/UserCenter/components/user-info/user-info.js +41 -74
  47. package/lib/UserCenter/components/webhook-item.js +184 -177
  48. package/lib/UserCenter/index.js +1 -13
  49. package/lib/UserCenter/libs/api.js +4 -16
  50. package/lib/UserCenter/libs/locales.d.ts +10 -0
  51. package/lib/UserCenter/libs/locales.js +12 -8
  52. package/lib/UserCenter/libs/utils.js +7 -17
  53. package/lib/UserSessions/components/user-session-info.js +88 -85
  54. package/lib/UserSessions/components/user-sessions.js +177 -213
  55. package/lib/UserSessions/index.js +1 -13
  56. package/lib/UserSessions/libs/locales.js +2 -8
  57. package/lib/UserSessions/libs/utils.js +4 -11
  58. package/lib/blocklets.js +59 -63
  59. package/lib/common/header-addons.js +44 -60
  60. package/lib/common/link-blocker.js +9 -18
  61. package/lib/common/overridable-theme-provider.js +10 -23
  62. package/lib/common/wallet-hidden-topbar.js +7 -14
  63. package/lib/contexts/config-user-space.js +38 -46
  64. package/lib/hooks/use-mobile.js +5 -13
  65. package/lib/index.js +10 -100
  66. package/lib/libs/client.js +2 -8
  67. package/lib/libs/spaces.js +6 -13
  68. package/lib/types.js +39 -41
  69. package/lib/utils.js +25 -44
  70. package/package.json +8 -38
  71. package/src/@types/index.ts +1 -0
  72. package/src/Footer/brand.jsx +6 -1
  73. package/src/UserCenter/components/config-profile.tsx +70 -0
  74. package/src/UserCenter/components/notification.tsx +63 -47
  75. package/src/UserCenter/components/settings.tsx +6 -0
  76. package/src/UserCenter/libs/locales.ts +10 -0
  77. package/es/@types/index.d.ts +0 -101
  78. package/es/@types/index.js +0 -0
  79. package/es/@types/shims.d.ts +0 -16
  80. package/es/BlockletStudio/index.d.ts +0 -28
  81. package/es/BlockletStudio/index.js +0 -114
  82. package/es/ComponentInstaller/index.d.ts +0 -37
  83. package/es/ComponentInstaller/index.js +0 -200
  84. package/es/ComponentInstaller/installer-item.d.ts +0 -21
  85. package/es/ComponentInstaller/installer-item.js +0 -139
  86. package/es/ComponentInstaller/locales.d.ts +0 -28
  87. package/es/ComponentInstaller/locales.js +0 -22
  88. package/es/ComponentInstaller/use-component-installed.d.ts +0 -12
  89. package/es/ComponentInstaller/use-component-installed.js +0 -88
  90. package/es/ComponentManager/components/add-component.d.ts +0 -16
  91. package/es/ComponentManager/components/add-component.js +0 -114
  92. package/es/ComponentManager/components/check-component.d.ts +0 -2
  93. package/es/ComponentManager/components/check-component.js +0 -2
  94. package/es/ComponentManager/components/publish-component.d.ts +0 -10
  95. package/es/ComponentManager/components/publish-component.js +0 -76
  96. package/es/ComponentManager/components/resource-dialog.d.ts +0 -14
  97. package/es/ComponentManager/components/resource-dialog.js +0 -74
  98. package/es/ComponentManager/index.d.ts +0 -3
  99. package/es/ComponentManager/index.js +0 -3
  100. package/es/ComponentManager/libs/locales.d.ts +0 -14
  101. package/es/ComponentManager/libs/locales.js +0 -14
  102. package/es/Dashboard/index.d.ts +0 -40
  103. package/es/Dashboard/index.js +0 -118
  104. package/es/Footer/brand.d.ts +0 -22
  105. package/es/Footer/brand.js +0 -73
  106. package/es/Footer/copyright.d.ts +0 -18
  107. package/es/Footer/copyright.js +0 -25
  108. package/es/Footer/index.d.ts +0 -6
  109. package/es/Footer/index.js +0 -82
  110. package/es/Footer/internal-footer.d.ts +0 -29
  111. package/es/Footer/internal-footer.js +0 -117
  112. package/es/Footer/layout/plain.d.ts +0 -15
  113. package/es/Footer/layout/plain.js +0 -39
  114. package/es/Footer/layout/row.d.ts +0 -18
  115. package/es/Footer/layout/row.js +0 -41
  116. package/es/Footer/layout/standard.d.ts +0 -15
  117. package/es/Footer/layout/standard.js +0 -53
  118. package/es/Footer/links.d.ts +0 -22
  119. package/es/Footer/links.js +0 -207
  120. package/es/Footer/social-media.d.ts +0 -14
  121. package/es/Footer/social-media.js +0 -60
  122. package/es/Header/index.d.ts +0 -10
  123. package/es/Header/index.js +0 -155
  124. package/es/Icon/index.d.ts +0 -23
  125. package/es/Icon/index.js +0 -55
  126. package/es/UserCenter/assets/banner.png +0 -0
  127. package/es/UserCenter/components/notification.js +0 -248
  128. package/es/UserCenter/components/passport.d.ts +0 -6
  129. package/es/UserCenter/components/passport.js +0 -88
  130. package/es/UserCenter/components/privacy.d.ts +0 -11
  131. package/es/UserCenter/components/privacy.js +0 -99
  132. package/es/UserCenter/components/settings.d.ts +0 -9
  133. package/es/UserCenter/components/settings.js +0 -89
  134. package/es/UserCenter/components/storage/connect-to.d.ts +0 -7
  135. package/es/UserCenter/components/storage/connect-to.js +0 -108
  136. package/es/UserCenter/components/storage/connected.d.ts +0 -7
  137. package/es/UserCenter/components/storage/connected.js +0 -24
  138. package/es/UserCenter/components/storage/delete.d.ts +0 -7
  139. package/es/UserCenter/components/storage/delete.js +0 -62
  140. package/es/UserCenter/components/storage/disconnect.d.ts +0 -3
  141. package/es/UserCenter/components/storage/disconnect.js +0 -23
  142. package/es/UserCenter/components/storage/icons/empty-spaces-nft.svg +0 -58
  143. package/es/UserCenter/components/storage/icons/long-arrow.svg +0 -5
  144. package/es/UserCenter/components/storage/icons/space-connected.svg +0 -3
  145. package/es/UserCenter/components/storage/icons/space-disconnect.svg +0 -3
  146. package/es/UserCenter/components/storage/index.d.ts +0 -3
  147. package/es/UserCenter/components/storage/index.js +0 -27
  148. package/es/UserCenter/components/storage/item.d.ts +0 -9
  149. package/es/UserCenter/components/storage/item.js +0 -158
  150. package/es/UserCenter/components/storage/preview-nft.d.ts +0 -6
  151. package/es/UserCenter/components/storage/preview-nft.js +0 -80
  152. package/es/UserCenter/components/third-party-login/index.d.ts +0 -5
  153. package/es/UserCenter/components/third-party-login/index.js +0 -110
  154. package/es/UserCenter/components/third-party-login/third-party-item.d.ts +0 -13
  155. package/es/UserCenter/components/third-party-login/third-party-item.js +0 -224
  156. package/es/UserCenter/components/user-center.d.ts +0 -15
  157. package/es/UserCenter/components/user-center.js +0 -414
  158. package/es/UserCenter/components/user-info/index.d.ts +0 -3
  159. package/es/UserCenter/components/user-info/index.js +0 -3
  160. package/es/UserCenter/components/user-info/user-basic-info.d.ts +0 -11
  161. package/es/UserCenter/components/user-info/user-basic-info.js +0 -151
  162. package/es/UserCenter/components/user-info/user-info-item.d.ts +0 -11
  163. package/es/UserCenter/components/user-info/user-info-item.js +0 -47
  164. package/es/UserCenter/components/user-info/user-info.d.ts +0 -6
  165. package/es/UserCenter/components/user-info/user-info.js +0 -66
  166. package/es/UserCenter/components/webhook-item.d.ts +0 -3
  167. package/es/UserCenter/components/webhook-item.js +0 -243
  168. package/es/UserCenter/index.d.ts +0 -1
  169. package/es/UserCenter/index.js +0 -1
  170. package/es/UserCenter/libs/api.d.ts +0 -3
  171. package/es/UserCenter/libs/api.js +0 -4
  172. package/es/UserCenter/libs/locales.d.ts +0 -162
  173. package/es/UserCenter/libs/locales.js +0 -162
  174. package/es/UserCenter/libs/utils.d.ts +0 -4
  175. package/es/UserCenter/libs/utils.js +0 -14
  176. package/es/UserSessions/components/user-session-info.d.ts +0 -6
  177. package/es/UserSessions/components/user-session-info.js +0 -92
  178. package/es/UserSessions/components/user-sessions.d.ts +0 -9
  179. package/es/UserSessions/components/user-sessions.js +0 -265
  180. package/es/UserSessions/index.d.ts +0 -1
  181. package/es/UserSessions/index.js +0 -1
  182. package/es/UserSessions/libs/locales.d.ts +0 -58
  183. package/es/UserSessions/libs/locales.js +0 -58
  184. package/es/UserSessions/libs/utils.d.ts +0 -2
  185. package/es/UserSessions/libs/utils.js +0 -73
  186. package/es/blocklets.d.ts +0 -16
  187. package/es/blocklets.js +0 -178
  188. package/es/common/header-addons.d.ts +0 -21
  189. package/es/common/header-addons.js +0 -83
  190. package/es/common/link-blocker.d.ts +0 -7
  191. package/es/common/link-blocker.js +0 -18
  192. package/es/common/overridable-theme-provider.d.ts +0 -18
  193. package/es/common/overridable-theme-provider.js +0 -15
  194. package/es/common/wallet-hidden-topbar.d.ts +0 -1
  195. package/es/common/wallet-hidden-topbar.js +0 -14
  196. package/es/contexts/config-user-space.d.ts +0 -26
  197. package/es/contexts/config-user-space.js +0 -53
  198. package/es/hooks/use-mobile.d.ts +0 -4
  199. package/es/hooks/use-mobile.js +0 -5
  200. package/es/index.d.ts +0 -10
  201. package/es/index.js +0 -10
  202. package/es/libs/client.d.ts +0 -2
  203. package/es/libs/client.js +0 -2
  204. package/es/libs/spaces.d.ts +0 -2
  205. package/es/libs/spaces.js +0 -13
  206. package/es/types.d.ts +0 -2
  207. package/es/types.js +0 -43
  208. package/es/utils.d.ts +0 -8
  209. 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,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { WebhookItemProps } from '../../@types';
3
- export default function WebhookItem({ onTest, onDelete, onSave, onCancel, type, url, edit, }: WebhookItemProps): import("react").JSX.Element;
@@ -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
- }
@@ -1 +0,0 @@
1
- export { default as UserCenter } from './components/user-center';
@@ -1 +0,0 @@
1
- export { default as UserCenter } from "./components/user-center.js";
@@ -1,3 +0,0 @@
1
- import axios from 'axios';
2
- declare const api: import("axios").AxiosInstance;
3
- export { axios, api };
@@ -1,4 +0,0 @@
1
- import axios from "axios";
2
- axios.defaults.timeout = 10 * 1e3;
3
- const api = axios.create();
4
- export { axios, api };
@@ -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,4 +0,0 @@
1
- import type { AxiosError } from 'axios';
2
- import { CreatePassportProps } from '../../@types';
3
- export declare const formatAxiosError: (err: AxiosError) => string;
4
- export declare const createPassportSvg: (props: CreatePassportProps) => any;
@@ -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
- });
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { User } from '../../@types';
3
- export default function UserSessionInfo({ user, sessionUser }: {
4
- readonly user: User;
5
- readonly sessionUser: any;
6
- }): import("react").JSX.Element;