@blocklet/ui-react 2.10.10 → 2.10.12
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Chip, IconButton, Typography } from "@mui/material";
|
|
2
|
+
import { Box, Chip, IconButton, Link, Typography } from "@mui/material";
|
|
3
3
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
4
4
|
import CheckIcon from "@mui/icons-material/Check";
|
|
5
5
|
import styled from "@emotion/styled";
|
|
@@ -92,7 +92,7 @@ function SpaceItem({
|
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
/* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", children: /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", width: "100%", children: /* @__PURE__ */ jsx(IconButton, { size: "small",
|
|
95
|
+
/* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", children: /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", width: "100%", children: /* @__PURE__ */ jsx(IconButton, { size: "small", LinkComponent: Link, href: getSpaceHomeUrl(spaceGateway.endpoint), target: "_blank", children: /* @__PURE__ */ jsx(OpenInNewIcon, {}) }) }) })
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
),
|
|
@@ -214,95 +214,109 @@ export default function UserCenter({
|
|
|
214
214
|
) });
|
|
215
215
|
}
|
|
216
216
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
217
|
-
/* @__PURE__ */ jsxs(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
display: {
|
|
226
|
-
xs: "none",
|
|
227
|
-
md: "block"
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
children: userState.data.fullName
|
|
231
|
-
}
|
|
232
|
-
) : null,
|
|
233
|
-
/* @__PURE__ */ jsx(
|
|
234
|
-
UserBasicInfo,
|
|
235
|
-
{
|
|
236
|
-
isMyself,
|
|
237
|
-
switchPassport: session.switchPassport,
|
|
238
|
-
switchProfile: session.switchProfile,
|
|
239
|
-
openSettings,
|
|
240
|
-
user: userState.data,
|
|
241
|
-
showFullDid: false,
|
|
242
|
-
sx: {
|
|
243
|
-
display: {
|
|
244
|
-
md: "none",
|
|
245
|
-
xs: "block"
|
|
217
|
+
/* @__PURE__ */ jsxs(
|
|
218
|
+
Box,
|
|
219
|
+
{
|
|
220
|
+
sx: [
|
|
221
|
+
{
|
|
222
|
+
flex: {
|
|
223
|
+
xs: "revert",
|
|
224
|
+
md: 1
|
|
246
225
|
},
|
|
247
|
-
|
|
226
|
+
overflow: "hidden"
|
|
248
227
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
228
|
+
],
|
|
229
|
+
children: [
|
|
230
|
+
userState?.data?.fullName ? /* @__PURE__ */ jsx(
|
|
231
|
+
Typography,
|
|
232
|
+
{
|
|
233
|
+
variant: "h4",
|
|
234
|
+
sx: {
|
|
235
|
+
py: 1.5,
|
|
236
|
+
fontWeight: 700,
|
|
237
|
+
display: {
|
|
238
|
+
xs: "none",
|
|
239
|
+
md: "block"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
children: userState.data.fullName
|
|
243
|
+
}
|
|
244
|
+
) : null,
|
|
245
|
+
/* @__PURE__ */ jsx(
|
|
246
|
+
UserBasicInfo,
|
|
247
|
+
{
|
|
248
|
+
isMyself,
|
|
249
|
+
switchPassport: session.switchPassport,
|
|
250
|
+
switchProfile: session.switchProfile,
|
|
251
|
+
openSettings,
|
|
252
|
+
user: userState.data,
|
|
253
|
+
showFullDid: false,
|
|
254
|
+
sx: {
|
|
255
|
+
display: {
|
|
256
|
+
md: "none",
|
|
257
|
+
xs: "block"
|
|
279
258
|
},
|
|
280
|
-
|
|
259
|
+
mb: 1.5
|
|
281
260
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
userCenterTabs.length > 0 && currentTab ? /* @__PURE__ */ jsxs(
|
|
264
|
+
Box,
|
|
265
|
+
{
|
|
266
|
+
sx: {
|
|
267
|
+
overflow: "auto",
|
|
268
|
+
padding: "1px"
|
|
269
|
+
},
|
|
270
|
+
children: [
|
|
271
|
+
/* @__PURE__ */ jsx(
|
|
272
|
+
Tabs,
|
|
273
|
+
{
|
|
274
|
+
variant: "line",
|
|
275
|
+
tabs: userCenterTabs,
|
|
276
|
+
current: currentTab,
|
|
277
|
+
onChange: handleChangeTab,
|
|
278
|
+
sx: { mb: 1.5 }
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
!privacyState.data || privacyState.loading ? /* @__PURE__ */ jsx(
|
|
282
|
+
Box,
|
|
283
|
+
{
|
|
284
|
+
sx: {
|
|
285
|
+
height: "100%",
|
|
286
|
+
minWidth: "160px",
|
|
287
|
+
minHeight: "160px",
|
|
288
|
+
display: "flex",
|
|
289
|
+
justifyContent: "center",
|
|
290
|
+
alignItems: "center"
|
|
291
|
+
},
|
|
292
|
+
children: /* @__PURE__ */ jsx(CircularProgress, { sx: { color: colors.primary100 } })
|
|
293
|
+
}
|
|
294
|
+
) : (
|
|
295
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
296
|
+
/* @__PURE__ */ jsx(Fragment, { children: currentActiveTab?.protected && !isMyself ? /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Empty, { children: t("underProtected") }) }) : (
|
|
297
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
298
|
+
/* @__PURE__ */ jsx(Fragment, { children: children && /* @__PURE__ */ jsx(Box, { ...contentProps, children }) })
|
|
299
|
+
) })
|
|
300
|
+
)
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
) : null,
|
|
304
|
+
userCenterTabs.length === 0 ? /* @__PURE__ */ jsx(
|
|
305
|
+
Box,
|
|
306
|
+
{
|
|
307
|
+
sx: {
|
|
308
|
+
display: {
|
|
309
|
+
xs: isMyself ? "none" : "block",
|
|
310
|
+
md: "block"
|
|
311
|
+
},
|
|
312
|
+
py: 3
|
|
313
|
+
},
|
|
314
|
+
children: /* @__PURE__ */ jsx(Empty, { children: t("emptyContent") })
|
|
315
|
+
}
|
|
316
|
+
) : null
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
),
|
|
306
320
|
/* @__PURE__ */ jsx(
|
|
307
321
|
Box,
|
|
308
322
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.12",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@arcblock/bridge": "^2.10.
|
|
36
|
-
"@arcblock/react-hooks": "^2.10.
|
|
35
|
+
"@arcblock/bridge": "^2.10.12",
|
|
36
|
+
"@arcblock/react-hooks": "^2.10.12",
|
|
37
37
|
"@iconify-icons/logos": "^1.2.36",
|
|
38
38
|
"@iconify-icons/material-symbols": "^1.2.58",
|
|
39
39
|
"@iconify/react": "^4.1.1",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"jest": "^28.1.3",
|
|
80
80
|
"unbuild": "^2.0.0"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "c32ebbc1536d9374a99865ff463f0a300b6e5372"
|
|
83
83
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, BoxProps, Chip, IconButton, Typography } from '@mui/material';
|
|
1
|
+
import { Box, BoxProps, Chip, IconButton, Link, Typography } from '@mui/material';
|
|
2
2
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
3
3
|
import CheckIcon from '@mui/icons-material/Check';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
@@ -86,7 +86,7 @@ function SpaceItem({
|
|
|
86
86
|
</Box>
|
|
87
87
|
<Box display="flex" alignItems="center">
|
|
88
88
|
<Box display="flex" alignItems="center" width="100%">
|
|
89
|
-
<IconButton size="small"
|
|
89
|
+
<IconButton size="small" LinkComponent={Link} href={getSpaceHomeUrl(spaceGateway.endpoint)} target="_blank">
|
|
90
90
|
<OpenInNewIcon />
|
|
91
91
|
</IconButton>
|
|
92
92
|
</Box>
|
|
@@ -261,7 +261,16 @@ export default function UserCenter({
|
|
|
261
261
|
|
|
262
262
|
return (
|
|
263
263
|
<>
|
|
264
|
-
<Box
|
|
264
|
+
<Box
|
|
265
|
+
sx={[
|
|
266
|
+
{
|
|
267
|
+
flex: {
|
|
268
|
+
xs: 'revert',
|
|
269
|
+
md: 1,
|
|
270
|
+
},
|
|
271
|
+
overflow: 'hidden',
|
|
272
|
+
},
|
|
273
|
+
]}>
|
|
265
274
|
{userState?.data?.fullName ? (
|
|
266
275
|
<Typography
|
|
267
276
|
variant="h4"
|