@blocklet/did-domain-react 0.3.97 → 0.3.99

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/es/domain.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
3
- import { CircularProgress } from "@mui/material";
3
+ import { CircularProgress, Tooltip } from "@mui/material";
4
4
  import Box from "@mui/material/Box";
5
5
  import Popover from "@mui/material/Popover";
6
6
  import { useTheme } from "@mui/material/styles";
@@ -45,7 +45,7 @@ export function Domain({
45
45
  }
46
46
  const iframeSrc = joinURL(urlState.value, `/embed/domain?nft-did=${nftDid}&locale=${locale}`);
47
47
  return /* @__PURE__ */ jsxs(Fragment, { children: [
48
- /* @__PURE__ */ jsx(
48
+ /* @__PURE__ */ jsx(Tooltip, { title: t("embed.iconTip"), children: /* @__PURE__ */ jsx(
49
49
  Box,
50
50
  {
51
51
  component: "img",
@@ -56,7 +56,7 @@ export function Domain({
56
56
  onClick: handlePopoverClick,
57
57
  sx: mergeSx({ cursor: "pointer" }, sx)
58
58
  }
59
- ),
59
+ ) }),
60
60
  /* @__PURE__ */ jsx(
61
61
  Popover,
62
62
  {
@@ -74,7 +74,7 @@ export function Domain({
74
74
  ref: iframeRef,
75
75
  title: t("common.subscription"),
76
76
  width: isMobile ? "320px" : "400px",
77
- height: isMobile ? "600px" : "680px",
77
+ height: "350px",
78
78
  style: { border: 0 },
79
79
  src: iframeSrc
80
80
  }
package/es/locales/en.js CHANGED
@@ -1,5 +1,8 @@
1
1
  import flat from "flat";
2
2
  export default flat({
3
+ embed: {
4
+ iconTip: "Click to view subscription details"
5
+ },
3
6
  buy: {
4
7
  button: {
5
8
  title: "Buy DID Domain"
package/es/locales/zh.js CHANGED
@@ -1,5 +1,8 @@
1
1
  import flat from "flat";
2
2
  export default flat({
3
+ embed: {
4
+ iconTip: "\u70B9\u51FB\u67E5\u770B\u8BA2\u9605\u8BE6\u60C5"
5
+ },
3
6
  buy: {
4
7
  button: {
5
8
  title: "\u8D2D\u4E70 DID \u57DF\u540D"
package/lib/domain.js CHANGED
@@ -58,16 +58,19 @@ function Domain({
58
58
  }
59
59
  const iframeSrc = (0, _ufo.joinURL)(urlState.value, `/embed/domain?nft-did=${nftDid}&locale=${locale}`);
60
60
  return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
61
- children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_Box.default, {
62
- component: "img",
63
- src: (0, _ufo.joinURL)(didDomainURL, "/.well-known/service/blocklet/logo"),
64
- alt: "logo",
65
- width: 16,
66
- height: 16,
67
- onClick: handlePopoverClick,
68
- sx: (0, _util.mergeSx)({
69
- cursor: "pointer"
70
- }, sx)
61
+ children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Tooltip, {
62
+ title: t("embed.iconTip"),
63
+ children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_Box.default, {
64
+ component: "img",
65
+ src: (0, _ufo.joinURL)(didDomainURL, "/.well-known/service/blocklet/logo"),
66
+ alt: "logo",
67
+ width: 16,
68
+ height: 16,
69
+ onClick: handlePopoverClick,
70
+ sx: (0, _util.mergeSx)({
71
+ cursor: "pointer"
72
+ }, sx)
73
+ })
71
74
  }), /* @__PURE__ */(0, _jsxRuntime.jsx)(_Popover.default, {
72
75
  id: "popover-info",
73
76
  open: Boolean(state.popoverAnchorEl),
@@ -81,7 +84,7 @@ function Domain({
81
84
  ref: iframeRef,
82
85
  title: t("common.subscription"),
83
86
  width: isMobile ? "320px" : "400px",
84
- height: isMobile ? "600px" : "680px",
87
+ height: "350px",
85
88
  style: {
86
89
  border: 0
87
90
  },
package/lib/locales/en.js CHANGED
@@ -7,6 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  var _flat = _interopRequireDefault(require("flat"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  module.exports = (0, _flat.default)({
10
+ embed: {
11
+ iconTip: "Click to view subscription details"
12
+ },
10
13
  buy: {
11
14
  button: {
12
15
  title: "Buy DID Domain"
package/lib/locales/zh.js CHANGED
@@ -7,6 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  var _flat = _interopRequireDefault(require("flat"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  module.exports = (0, _flat.default)({
10
+ embed: {
11
+ iconTip: "\u70B9\u51FB\u67E5\u770B\u8BA2\u9605\u8BE6\u60C5"
12
+ },
10
13
  buy: {
11
14
  button: {
12
15
  title: "\u8D2D\u4E70 DID \u57DF\u540D"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/did-domain-react",
3
- "version": "0.3.97",
3
+ "version": "0.3.99",
4
4
  "description": "Reusable react components for DID Domain",
5
5
  "keywords": [
6
6
  "react",
@@ -102,5 +102,5 @@
102
102
  "vite-plugin-babel": "^1.3.0",
103
103
  "vite-plugin-node-polyfills": "^0.21.0"
104
104
  },
105
- "gitHead": "ca0607ee6b7d42b72b947197b94ea6dac05dbf02"
105
+ "gitHead": "b073ec184890f3d85056a3a3da65fc289a7841f8"
106
106
  }
package/src/domain.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
2
- import { CircularProgress } from '@mui/material';
2
+ import { CircularProgress, Tooltip } from '@mui/material';
3
3
  import Box from '@mui/material/Box';
4
4
  import Popover from '@mui/material/Popover';
5
5
  import { useTheme } from '@mui/material/styles';
@@ -60,15 +60,18 @@ export function Domain({
60
60
 
61
61
  return (
62
62
  <>
63
- <Box
64
- component="img"
65
- src={joinURL(didDomainURL, '/.well-known/service/blocklet/logo')}
66
- alt="logo"
67
- width={16}
68
- height={16}
69
- onClick={handlePopoverClick}
70
- sx={mergeSx({ cursor: 'pointer' }, sx)}
71
- />
63
+ <Tooltip title={t('embed.iconTip')}>
64
+ <Box
65
+ component="img"
66
+ src={joinURL(didDomainURL, '/.well-known/service/blocklet/logo')}
67
+ alt="logo"
68
+ width={16}
69
+ height={16}
70
+ onClick={handlePopoverClick}
71
+ sx={mergeSx({ cursor: 'pointer' }, sx)}
72
+ />
73
+ </Tooltip>
74
+
72
75
  <Popover
73
76
  id="popover-info"
74
77
  open={Boolean(state.popoverAnchorEl)}
@@ -82,7 +85,7 @@ export function Domain({
82
85
  ref={iframeRef}
83
86
  title={t('common.subscription')}
84
87
  width={isMobile ? '320px' : '400px'}
85
- height={isMobile ? '600px' : '680px'}
88
+ height="350px"
86
89
  style={{ border: 0 }}
87
90
  src={iframeSrc}
88
91
  />
package/src/locales/en.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import flat from 'flat';
2
2
 
3
3
  export default flat({
4
+ embed: {
5
+ iconTip: 'Click to view subscription details',
6
+ },
4
7
  buy: {
5
8
  button: {
6
9
  title: 'Buy DID Domain',
package/src/locales/zh.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import flat from 'flat';
2
2
 
3
3
  export default flat({
4
+ embed: {
5
+ iconTip: '点击查看订阅详情',
6
+ },
4
7
  buy: {
5
8
  button: {
6
9
  title: '购买 DID 域名',