@blocklet/ui-react 2.10.13 → 2.10.14

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.
@@ -4,19 +4,17 @@ import { LocaleProvider } from "@arcblock/ux/lib/Locale/context";
4
4
  import styled from "@emotion/styled";
5
5
  import { Box, CircularProgress } from "@mui/material";
6
6
  import { useConfigUserSpaceContext } from "../../../contexts/config-user-space.js";
7
- import useMobile from "../../../hooks/use-mobile.js";
8
7
  import ConnectTo from "./connect-to.js";
9
8
  import Connected from "./connected.js";
10
9
  import Disconnect from "./disconnect.js";
11
10
  import { translations } from "../../libs/locales.js";
12
11
  function DidSpace() {
13
- const isMobile = useMobile({});
14
12
  const { spaceGateway, updateSpaceGateway, settingStorageEndpoint, hasStorageEndpoint, loading, storageEndpoint } = useConfigUserSpaceContext();
15
13
  if (loading) {
16
14
  return /* @__PURE__ */ jsx(Center, { relative: "parent", children: /* @__PURE__ */ jsx(CircularProgress, {}) });
17
15
  }
18
16
  return /* @__PURE__ */ jsx(LocaleProvider, { translations, children: /* @__PURE__ */ jsxs(Container, { children: [
19
- /* @__PURE__ */ jsx(Box, { maxWidth: isMobile ? "360px" : "720px", children: hasStorageEndpoint ? /* @__PURE__ */ jsx(Connected, { spaceGateway, settingStorageEndpoint }) : /* @__PURE__ */ jsx(Disconnect, {}) }),
17
+ /* @__PURE__ */ jsx(Box, { maxWidth: "720px", children: hasStorageEndpoint ? /* @__PURE__ */ jsx(Connected, { spaceGateway, settingStorageEndpoint }) : /* @__PURE__ */ jsx(Disconnect, {}) }),
20
18
  /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", paddingTop: "24px", children: /* @__PURE__ */ jsx(ConnectTo, { onConnect: updateSpaceGateway, storageEndpoint }) })
21
19
  ] }) });
22
20
  }
@@ -46,9 +46,9 @@ function SpaceItem({
46
46
  display: "flex",
47
47
  flexGrow: 1,
48
48
  flexDirection: "column",
49
- sx: { marginLeft: "20px", padding: "0px 0px" },
49
+ sx: { marginLeft: "20px", padding: "0px 0px", minWidth: "0px" },
50
50
  children: [
51
- /* @__PURE__ */ jsxs(Box, { className: "spaces-info", display: "flex", maxWidth: "360px", alignItems: "center", children: [
51
+ /* @__PURE__ */ jsxs(Box, { className: "spaces-info", display: "flex", alignItems: "center", children: [
52
52
  /* @__PURE__ */ jsx(
53
53
  Typography,
54
54
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.10.13",
3
+ "version": "2.10.14",
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.13",
36
- "@arcblock/react-hooks": "^2.10.13",
35
+ "@arcblock/bridge": "^2.10.14",
36
+ "@arcblock/react-hooks": "^2.10.14",
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": "572b07b7e8fff82c6c16a9f7814867a5f6d17c03"
82
+ "gitHead": "11320e1a4438e518799515f9e30f5fa091f6cf60"
83
83
  }
@@ -3,14 +3,12 @@ import { LocaleProvider } from '@arcblock/ux/lib/Locale/context';
3
3
  import styled from '@emotion/styled';
4
4
  import { Box, CircularProgress } from '@mui/material';
5
5
  import { useConfigUserSpaceContext } from '../../../contexts/config-user-space';
6
- import useMobile from '../../../hooks/use-mobile';
7
6
  import ConnectTo from './connect-to';
8
7
  import Connected from './connected';
9
8
  import Disconnect from './disconnect';
10
9
  import { translations } from '../../libs/locales';
11
10
 
12
11
  function DidSpace() {
13
- const isMobile = useMobile({});
14
12
  const { spaceGateway, updateSpaceGateway, settingStorageEndpoint, hasStorageEndpoint, loading, storageEndpoint } =
15
13
  useConfigUserSpaceContext();
16
14
 
@@ -27,7 +25,7 @@ function DidSpace() {
27
25
  <Container>
28
26
  {/* 标题区 */}
29
27
 
30
- <Box maxWidth={isMobile ? '360px' : '720px'}>
28
+ <Box maxWidth="720px">
31
29
  {hasStorageEndpoint ? (
32
30
  <Connected spaceGateway={spaceGateway} settingStorageEndpoint={settingStorageEndpoint} />
33
31
  ) : (
@@ -44,8 +44,8 @@ function SpaceItem({
44
44
  display="flex"
45
45
  flexGrow={1}
46
46
  flexDirection="column"
47
- sx={{ marginLeft: '20px', padding: '0px 0px' }}>
48
- <Box className="spaces-info" display="flex" maxWidth="360px" alignItems="center">
47
+ sx={{ marginLeft: '20px', padding: '0px 0px', minWidth: '0px' }}>
48
+ <Box className="spaces-info" display="flex" alignItems="center">
49
49
  <Typography
50
50
  color={connected ? 'primary' : 'inherit'}
51
51
  fontWeight="bold"