@blocklet/ui-react 2.11.28 → 2.11.29

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.
@@ -20,7 +20,7 @@ function Disconnect() {
20
20
  }
21
21
  }
22
22
  ),
23
- /* @__PURE__ */ jsx(DIDSpaceConnect, { session, onSuccess })
23
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(DIDSpaceConnect, { session, onSuccess }) })
24
24
  ] });
25
25
  }
26
26
  export default Disconnect;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import Center from "@arcblock/ux/lib/Center";
3
- import { LocaleProvider } from "@arcblock/ux/lib/Locale/context";
3
+ import { LocaleProvider, useLocaleContext } 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";
@@ -9,10 +9,11 @@ import Disconnect from "./disconnect.js";
9
9
  import { translations } from "../../libs/locales.js";
10
10
  function DidSpace() {
11
11
  const { spaceGateway, hasStorageEndpoint, loading } = useConfigUserSpaceContext();
12
+ const { locale } = useLocaleContext();
12
13
  if (loading) {
13
14
  return /* @__PURE__ */ jsx(Center, { relative: "parent", children: /* @__PURE__ */ jsx(CircularProgress, {}) });
14
15
  }
15
- return /* @__PURE__ */ jsx(LocaleProvider, { translations, children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Box, { maxWidth: "720px", children: hasStorageEndpoint ? /* @__PURE__ */ jsx(Connected, { spaceGateway }) : /* @__PURE__ */ jsx(Disconnect, {}) }) }) });
16
+ return /* @__PURE__ */ jsx(LocaleProvider, { translations, locale, children: /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Box, { maxWidth: "720px", children: hasStorageEndpoint ? /* @__PURE__ */ jsx(Connected, { spaceGateway }) : /* @__PURE__ */ jsx(Disconnect, {}) }) }) });
16
17
  }
17
18
  const Container = styled(Box)`
18
19
  height: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.11.28",
3
+ "version": "2.11.29",
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.11.28",
36
- "@arcblock/react-hooks": "^2.11.28",
35
+ "@arcblock/bridge": "^2.11.29",
36
+ "@arcblock/react-hooks": "^2.11.29",
37
37
  "@blocklet/did-space-react": "^1.0.2",
38
38
  "@iconify-icons/logos": "^1.2.36",
39
39
  "@iconify-icons/material-symbols": "^1.2.58",
@@ -81,5 +81,5 @@
81
81
  "jest": "^29.7.0",
82
82
  "unbuild": "^2.0.0"
83
83
  },
84
- "gitHead": "d5c76bd7e9d1fb74e6253a3016f6b8ccf37b77f0"
84
+ "gitHead": "adc33bd4f0d0dab0dbae75fbcddd585b0433c00f"
85
85
  }
@@ -22,7 +22,9 @@ function Disconnect() {
22
22
  margin: '16px 0',
23
23
  }}
24
24
  />
25
- <DIDSpaceConnect session={session} onSuccess={onSuccess} />
25
+ <Box>
26
+ <DIDSpaceConnect session={session} onSuccess={onSuccess} />
27
+ </Box>
26
28
  </Box>
27
29
  );
28
30
  }
@@ -1,5 +1,5 @@
1
1
  import Center from '@arcblock/ux/lib/Center';
2
- import { LocaleProvider } from '@arcblock/ux/lib/Locale/context';
2
+ import { LocaleProvider, useLocaleContext } 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';
@@ -9,6 +9,7 @@ import { translations } from '../../libs/locales';
9
9
 
10
10
  function DidSpace() {
11
11
  const { spaceGateway, hasStorageEndpoint, loading } = useConfigUserSpaceContext();
12
+ const { locale } = useLocaleContext();
12
13
 
13
14
  if (loading) {
14
15
  return (
@@ -19,7 +20,7 @@ function DidSpace() {
19
20
  }
20
21
 
21
22
  return (
22
- <LocaleProvider translations={translations}>
23
+ <LocaleProvider translations={translations} locale={locale}>
23
24
  <Container>
24
25
  <Box maxWidth="720px">{hasStorageEndpoint ? <Connected spaceGateway={spaceGateway} /> : <Disconnect />}</Box>
25
26
  </Container>