@arcblock/ux 2.10.61 → 2.10.63

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/lib/Logo/index.js +12 -75
  2. package/lib/NFTDisplay/broken.js +2 -79
  3. package/lib/Util/federated.d.ts +3 -0
  4. package/lib/Util/federated.js +6 -0
  5. package/lib/Wallet/Download.js +7 -201
  6. package/package.json +5 -5
  7. package/src/Logo/{index.js → index.jsx} +9 -5
  8. package/src/NFTDisplay/{broken.js → broken.jsx} +2 -1
  9. package/src/Util/federated.js +6 -0
  10. package/src/Wallet/{Download.js → Download.jsx} +6 -3
  11. /package/src/ActionButton/{index.js → index.jsx} +0 -0
  12. /package/src/ActivityIndicator/{index.js → index.jsx} +0 -0
  13. /package/src/Alert/{index.js → index.jsx} +0 -0
  14. /package/src/AnimationWaiter/{index.js → index.jsx} +0 -0
  15. /package/src/Async/{index.js → index.jsx} +0 -0
  16. /package/src/Badge/{index.js → index.jsx} +0 -0
  17. /package/src/Blocklet/{blocklet.js → blocklet.jsx} +0 -0
  18. /package/src/Blocklet/{utils.js → utils.jsx} +0 -0
  19. /package/src/BlockletNFT/{index.js → index.jsx} +0 -0
  20. /package/src/Button/{wrap.js → wrap.jsx} +0 -0
  21. /package/src/Center/{index.js → index.jsx} +0 -0
  22. /package/src/ClickToCopy/{copy-button.js → copy-button.jsx} +0 -0
  23. /package/src/ClickToCopy/{index.js → index.jsx} +0 -0
  24. /package/src/CodeBlock/{LightBox.js → LightBox.jsx} +0 -0
  25. /package/src/CodeBlock/{index.js → index.jsx} +0 -0
  26. /package/src/ContactForm/{index.js → index.jsx} +0 -0
  27. /package/src/CookieConsent/{index.js → index.jsx} +0 -0
  28. /package/src/CountDown/{index.js → index.jsx} +0 -0
  29. /package/src/Datatable/{CustomToolbar.js → CustomToolbar.jsx} +0 -0
  30. /package/src/Datatable/{DatatableContext.js → DatatableContext.jsx} +0 -0
  31. /package/src/Datatable/{TableSearch.js → TableSearch.jsx} +0 -0
  32. /package/src/DidLogo/{index.js → index.jsx} +0 -0
  33. /package/src/DriftBot/{index.js → index.jsx} +0 -0
  34. /package/src/Earth/{index.js → index.jsx} +0 -0
  35. /package/src/Empty/{index.js → index.jsx} +0 -0
  36. /package/src/Footer/{index.js → index.jsx} +0 -0
  37. /package/src/Icon/{image.js → image.jsx} +0 -0
  38. /package/src/Icon/{index.js → index.jsx} +0 -0
  39. /package/src/InfoRow/{index.js → index.jsx} +0 -0
  40. /package/src/Metric/{index.js → index.jsx} +0 -0
  41. /package/src/NFTDisplay/{aspect-ratio-container.js → aspect-ratio-container.jsx} +0 -0
  42. /package/src/NFTDisplay/{index.js → index.jsx} +0 -0
  43. /package/src/NFTDisplay/{loading.js → loading.jsx} +0 -0
  44. /package/src/NFTDisplay/svg-embedder/{img.js → img.jsx} +0 -0
  45. /package/src/NFTDisplay/svg-embedder/{inline-svg.js → inline-svg.jsx} +0 -0
  46. /package/src/PageScroller/{index.js → index.jsx} +0 -0
  47. /package/src/PricingTable/{PricingPlan.js → PricingPlan.jsx} +0 -0
  48. /package/src/PricingTable/{index.js → index.jsx} +0 -0
  49. /package/src/QRCode/{index.js → index.jsx} +0 -0
  50. /package/src/RelativeTime/{index.js → index.jsx} +0 -0
  51. /package/src/Result/{common.js → common.jsx} +0 -0
  52. /package/src/Result/{index.js → index.jsx} +0 -0
  53. /package/src/Result/{result.js → result.jsx} +0 -0
  54. /package/src/Screenshot/{index.js → index.jsx} +0 -0
  55. /package/src/Sparkline/{index.js → index.jsx} +0 -0
  56. /package/src/Spinner/{index.js → index.jsx} +0 -0
  57. /package/src/Switch/{index.js → index.jsx} +0 -0
  58. /package/src/Tag/{index.js → index.jsx} +0 -0
  59. /package/src/TextCollapse/{index.js → index.jsx} +0 -0
  60. /package/src/Theme/{theme-provider.js → theme-provider.jsx} +0 -0
  61. /package/src/Toast/{index.js → index.jsx} +0 -0
  62. /package/src/Util/{deprecate.js → deprecate.jsx} +0 -0
  63. /package/src/Video/{index.js → index.jsx} +0 -0
  64. /package/src/Wallet/{Action.js → Action.jsx} +0 -0
  65. /package/src/Wallet/{Open.js → Open.jsx} +0 -0
  66. /package/src/WebWalletSWKeeper/{index.js → index.jsx} +0 -0
  67. /package/src/WechatPrompt/{index.js → index.jsx} +0 -0
  68. /package/src/withTheme/{index.js → index.jsx} +0 -0
  69. /package/src/withTracker/{error_boundary.js → error_boundary.jsx} +0 -0
  70. /package/src/withTracker/{index.js → index.jsx} +0 -0
package/lib/Logo/index.js CHANGED
@@ -1,88 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from "react";
3
2
  import PropTypes from 'prop-types';
4
3
  import { styled } from '../Theme';
5
- var LightLogo = function LightLogo(props) {
6
- return /*#__PURE__*/_jsx("svg", {
7
- ...props,
8
- children: /*#__PURE__*/_jsxs("g", {
9
- fill: "none",
10
- fillRule: "evenodd",
11
- stroke: "#FFF",
12
- children: [/*#__PURE__*/_jsx("path", {
13
- d: "M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"
14
- }), /*#__PURE__*/_jsx("path", {
15
- d: "M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"
16
- })]
17
- })
18
- });
19
- };
20
- LightLogo.defaultProps = {
21
- xmlns: "http://www.w3.org/2000/svg",
22
- width: "45",
23
- height: "52",
24
- viewBox: "0 0 45 52"
25
- };
26
- var LightText = function LightText(props) {
27
- return /*#__PURE__*/_jsx("svg", {
28
- ...props,
29
- children: /*#__PURE__*/_jsx("path", {
30
- fill: "#FFF",
31
- fillRule: "evenodd",
32
- d: "M6.5.053h2.864L16.028 18h-2.114l-1.391-3.795H3.504L2.14 18H0L6.5.053zm1.474 1.481L4.04 12.563h7.895L7.975 1.534zm14.44 3.542c1.27 0 2.198.296 2.78.892.58.597.871 1.52.871 2.765v.36c0 .117-.008.245-.026.385h-1.826c.018-.14.027-.292.027-.452v-.48c0-.766-.186-1.283-.551-1.55-.367-.266-.916-.4-1.65-.4-.968 0-1.698.24-2.189.723-.493.48-.738 1.208-.738 2.187v8.308h-1.88V5.341h1.824l-.079 1.443c.376-.614.863-1.053 1.463-1.316a4.868 4.868 0 0 1 1.974-.392zM35.95 15.903c.501-.328.752-1.205.752-2.63h1.852c0 1.924-.403 3.178-1.208 3.765-.806.589-2.158.882-4.055.882-2.65 0-4.24-.538-4.766-1.616-.529-1.076-.793-2.781-.793-5.114 0-2.118.367-3.645 1.102-4.581.732-.934 2.209-1.401 4.43-1.401 1.378 0 2.569.221 3.572.665 1.002.446 1.503 1.497 1.503 3.153v.188a.234.234 0 0 0-.027.106v.106h-1.826c0-1.12-.228-1.851-.685-2.188-.455-.34-1.23-.507-2.322-.507-1.665 0-2.713.259-3.142.782-.43.524-.646 1.67-.646 3.44V12.2c0 1.4.161 2.448.485 3.15.322.7 1.297 1.048 2.926 1.048 1.397 0 2.346-.165 2.848-.495zm15.87-.318c.606-.328.912-1.263.912-2.805 0-.924-.147-1.69-.444-2.302-.294-.611-1.007-.917-2.133-.917h-7.09v6.516h5.528c1.543 0 2.617-.165 3.226-.492zm-8.754-13.85v6.036h5.665c1.325 0 2.239-.214 2.737-.643.503-.428.755-1.288.755-2.575 0-1.09-.192-1.834-.577-2.226-.385-.394-1.116-.591-2.19-.591h-6.39zM52 8.466c1.185.322 1.956.816 2.314 1.482.359.67.54 1.581.54 2.739 0 1.6-.325 2.858-.97 3.764-.647.909-1.874 1.363-3.686 1.363H41.05V0h8.62c1.592 0 2.759.312 3.503.934.744.624 1.115 1.78 1.115 3.473 0 1.014-.129 1.855-.386 2.522-.258.669-.89 1.181-1.903 1.536zm5.43 9.348V.001h1.907v17.812H57.43zm13.374-6.168v-.708c0-1.539-.141-2.636-.426-3.297-.284-.658-1.191-.99-2.718-.99h-.401c-1.617 0-2.625.25-3.025.75-.399.5-.599 1.632-.599 3.4v2.021c0 .206.008.407.024.602a9.48 9.48 0 0 0 .216 1.474c.106.465.275.822.505 1.072.196.179.435.302.72.373.283.072.586.116.905.135h1.254c1.083 0 1.914-.151 2.492-.456.577-.302.9-1.043.972-2.22a18.338 18.338 0 0 0 .054-1.447c.015-.233.027-.47.027-.71zm-3.786-6.518c2.399 0 3.956.414 4.672 1.243.717.828 1.074 2.418 1.074 4.766 0 2.048-.219 3.704-.657 4.966C71.668 17.367 70.16 18 67.581 18c-2.237 0-3.782-.347-4.632-1.042-.85-.694-1.275-2.205-1.275-4.54v-1.174c0-2.12.318-3.669.954-4.646.635-.98 2.099-1.471 4.39-1.471zm16.434 10.776c.501-.328.752-1.205.752-2.63h1.853c0 1.924-.403 3.178-1.209 3.765-.804.589-2.157.882-4.054.882-2.648 0-4.24-.538-4.767-1.616-.528-1.076-.79-2.781-.79-5.114 0-2.118.365-3.645 1.1-4.581.732-.934 2.21-1.401 4.43-1.401 1.377 0 2.568.221 3.571.665 1.003.446 1.504 1.497 1.504 3.153v.188a.232.232 0 0 0-.026.106v.106H83.99c0-1.12-.229-1.851-.686-2.188-.455-.34-1.23-.507-2.323-.507-1.665 0-2.712.259-3.142.782-.43.524-.643 1.67-.643 3.44V12.2c0 1.4.16 2.448.482 3.15.324.7 1.298 1.048 2.927 1.048 1.397 0 2.346-.165 2.847-.495zm9.236-4.82L99 17.813h-2.47l-5.317-6.01h-.752v6.01h-1.907V0h1.907v10.362h.752l4.512-5.02h2.309l-5.346 5.741z"
33
- })
34
- });
35
- };
36
- LightText.defaultProps = {
37
- xmlns: "http://www.w3.org/2000/svg",
38
- width: "99",
39
- height: "18",
40
- viewBox: "0 0 99 18"
41
- };
42
- var DarkLogo = function DarkLogo(props) {
43
- return /*#__PURE__*/_jsx("svg", {
44
- ...props,
45
- children: /*#__PURE__*/_jsxs("g", {
46
- fill: "none",
47
- fillRule: "evenodd",
48
- stroke: "#000",
49
- children: [/*#__PURE__*/_jsx("path", {
50
- d: "M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"
51
- }), /*#__PURE__*/_jsx("path", {
52
- d: "M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"
53
- })]
54
- })
55
- });
56
- };
57
- DarkLogo.defaultProps = {
58
- xmlns: "http://www.w3.org/2000/svg",
59
- width: "45",
60
- height: "52",
61
- viewBox: "0 0 45 52"
62
- };
63
- var DarkText = function DarkText(props) {
64
- return /*#__PURE__*/_jsx("svg", {
65
- ...props,
66
- children: /*#__PURE__*/_jsx("path", {
67
- fillRule: "evenodd",
68
- d: "M6.5.053h2.864L16.028 18h-2.114l-1.391-3.795H3.504L2.14 18H0L6.5.053zm1.474 1.481L4.04 12.563h7.895L7.975 1.534zm14.44 3.542c1.27 0 2.198.296 2.78.892.58.597.871 1.52.871 2.765v.36c0 .117-.008.245-.026.385h-1.826c.018-.14.027-.292.027-.452v-.48c0-.766-.186-1.283-.551-1.55-.367-.266-.916-.4-1.65-.4-.968 0-1.698.24-2.189.723-.493.48-.738 1.208-.738 2.187v8.308h-1.88V5.341h1.824l-.079 1.443c.376-.614.863-1.053 1.463-1.316a4.868 4.868 0 0 1 1.974-.392zM35.95 15.903c.501-.328.752-1.205.752-2.63h1.852c0 1.924-.403 3.178-1.208 3.765-.806.589-2.158.882-4.055.882-2.65 0-4.24-.538-4.766-1.616-.529-1.076-.793-2.781-.793-5.114 0-2.118.367-3.645 1.102-4.581.732-.934 2.209-1.401 4.43-1.401 1.378 0 2.569.221 3.572.665 1.002.446 1.503 1.497 1.503 3.153v.188a.234.234 0 0 0-.027.106v.106h-1.826c0-1.12-.228-1.851-.685-2.188-.455-.34-1.23-.507-2.322-.507-1.665 0-2.713.259-3.142.782-.43.524-.646 1.67-.646 3.44V12.2c0 1.4.161 2.448.485 3.15.322.7 1.297 1.048 2.926 1.048 1.397 0 2.346-.165 2.848-.495zm15.87-.318c.606-.328.912-1.263.912-2.805 0-.924-.147-1.69-.444-2.302-.294-.611-1.007-.917-2.133-.917h-7.09v6.516h5.528c1.543 0 2.617-.165 3.226-.492zm-8.754-13.85v6.036h5.665c1.325 0 2.239-.214 2.737-.643.503-.428.755-1.288.755-2.575 0-1.09-.192-1.834-.577-2.226-.385-.394-1.116-.591-2.19-.591h-6.39zM52 8.466c1.185.322 1.956.816 2.314 1.482.359.67.54 1.581.54 2.739 0 1.6-.325 2.858-.97 3.764-.647.909-1.874 1.363-3.686 1.363H41.05V0h8.62c1.592 0 2.759.312 3.503.934.744.624 1.115 1.78 1.115 3.473 0 1.014-.129 1.855-.386 2.522-.258.669-.89 1.181-1.903 1.536zm5.43 9.348V.001h1.907v17.812H57.43zm13.374-6.168v-.708c0-1.539-.141-2.636-.426-3.297-.284-.658-1.191-.99-2.718-.99h-.401c-1.617 0-2.625.25-3.025.75-.399.5-.599 1.632-.599 3.4v2.021c0 .206.008.407.024.602a9.48 9.48 0 0 0 .216 1.474c.106.465.275.822.505 1.072.196.179.435.302.72.373.283.072.586.116.905.135h1.254c1.083 0 1.914-.151 2.492-.456.577-.302.9-1.043.972-2.22a18.338 18.338 0 0 0 .054-1.447c.015-.233.027-.47.027-.71zm-3.786-6.518c2.399 0 3.956.414 4.672 1.243.717.828 1.074 2.418 1.074 4.766 0 2.048-.219 3.704-.657 4.966C71.668 17.367 70.16 18 67.581 18c-2.237 0-3.782-.347-4.632-1.042-.85-.694-1.275-2.205-1.275-4.54v-1.174c0-2.12.318-3.669.954-4.646.635-.98 2.099-1.471 4.39-1.471zm16.434 10.776c.501-.328.752-1.205.752-2.63h1.853c0 1.924-.403 3.178-1.209 3.765-.804.589-2.157.882-4.054.882-2.648 0-4.24-.538-4.767-1.616-.528-1.076-.79-2.781-.79-5.114 0-2.118.365-3.645 1.1-4.581.732-.934 2.21-1.401 4.43-1.401 1.377 0 2.568.221 3.571.665 1.003.446 1.504 1.497 1.504 3.153v.188a.232.232 0 0 0-.026.106v.106H83.99c0-1.12-.229-1.851-.686-2.188-.455-.34-1.23-.507-2.323-.507-1.665 0-2.712.259-3.142.782-.43.524-.643 1.67-.643 3.44V12.2c0 1.4.16 2.448.482 3.15.324.7 1.298 1.048 2.927 1.048 1.397 0 2.346-.165 2.847-.495zm9.236-4.82L99 17.813h-2.47l-5.317-6.01h-.752v6.01h-1.907V0h1.907v10.362h.752l4.512-5.02h2.309l-5.346 5.741z"
69
- })
70
- });
71
- };
72
- DarkText.defaultProps = {
73
- xmlns: "http://www.w3.org/2000/svg",
74
- width: "99",
75
- height: "18",
76
- viewBox: "0 0 99 18"
77
- };
4
+
5
+ // eslint-disable-next-line import/no-unresolved
6
+ import LightLogo from './images/logo-light-top.svg?react';
7
+ // eslint-disable-next-line import/no-unresolved
8
+ import LightText from './images/logo-light-text.svg?react';
9
+ // eslint-disable-next-line import/no-unresolved
10
+ import DarkLogo from './images/logo-dark-top.svg?react';
11
+ // eslint-disable-next-line import/no-unresolved
12
+ import DarkText from './images/logo-dark-text.svg?react';
13
+
78
14
  /**
79
15
  @typedef {import('react').HTMLAttributes<HTMLSpanElement> & {
80
16
  mode?: 'light' | 'dark',
81
17
  layout?: 'vertical' | 'horizontal',
82
18
  showText?: boolean,
83
- showLogo?: boolean,
19
+ showLogo?: boolean,
84
20
  }} LogoProps
85
21
  */
22
+
86
23
  /**
87
24
  * @description
88
25
  * @export
@@ -1,85 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from "react";
3
2
  import Box from '@mui/material/Box';
4
3
  import PropTypes from 'prop-types';
5
- var NFTBroken = function NFTBroken(props) {
6
- return /*#__PURE__*/_jsxs("svg", {
7
- ...props,
8
- children: [/*#__PURE__*/_jsxs("g", {
9
- clipPath: "url(#a)",
10
- children: [/*#__PURE__*/_jsx("path", {
11
- fill: "color(display-p3 .9529 .9569 .9647)",
12
- d: "M60 0h60v60H60z"
13
- }), /*#__PURE__*/_jsx("path", {
14
- fill: "color(display-p3 .9765 .9804 .9843)",
15
- d: "M0 0h60v60H0zM180 0h60v60h-60z"
16
- }), /*#__PURE__*/_jsx("path", {
17
- fill: "color(display-p3 .898 .9059 .9216)",
18
- d: "M120 0h60v60h-60zM240 0h60v60h-60zM0 60h60v60H0z"
19
- }), /*#__PURE__*/_jsx("path", {
20
- fill: "color(display-p3 .9765 .9804 .9843)",
21
- d: "M60 60h60v60H60z"
22
- }), /*#__PURE__*/_jsx("path", {
23
- fill: "color(display-p3 .9529 .9569 .9647)",
24
- d: "M120 60h60v60h-60zM240 60h60v60h-60z"
25
- }), /*#__PURE__*/_jsx("path", {
26
- fill: "color(display-p3 .898 .9059 .9216)",
27
- d: "M180 60h60v60h-60z"
28
- }), /*#__PURE__*/_jsx("path", {
29
- fill: "color(display-p3 .9529 .9569 .9647)",
30
- d: "M0 120h60v60H0z"
31
- }), /*#__PURE__*/_jsx("path", {
32
- fill: "color(display-p3 .9765 .9804 .9843)",
33
- d: "M0 180h60v60H0z"
34
- }), /*#__PURE__*/_jsx("path", {
35
- fill: "color(display-p3 .9529 .9569 .9647)",
36
- d: "M0 240h60v60H0z"
37
- }), /*#__PURE__*/_jsx("path", {
38
- fill: "color(display-p3 .898 .9059 .9216)",
39
- d: "M60 120h60v60H60z"
40
- }), /*#__PURE__*/_jsx("path", {
41
- fill: "color(display-p3 .9529 .9569 .9647)",
42
- d: "M60 180h60v60H60z"
43
- }), /*#__PURE__*/_jsx("path", {
44
- fill: "color(display-p3 .898 .9059 .9216)",
45
- d: "M60 240h60v60H60z"
46
- }), /*#__PURE__*/_jsx("path", {
47
- fill: "color(display-p3 .9765 .9804 .9843)",
48
- d: "M120 120h60v60h-60zM180 180h60v60h-60z"
49
- }), /*#__PURE__*/_jsx("path", {
50
- fill: "color(display-p3 .9529 .9569 .9647)",
51
- d: "M120 240h60v60h-60z"
52
- }), /*#__PURE__*/_jsx("path", {
53
- fill: "color(display-p3 .9765 .9804 .9843)",
54
- d: "M240 120h60v60h-60z"
55
- }), /*#__PURE__*/_jsx("path", {
56
- fill: "color(display-p3 .898 .9059 .9216)",
57
- d: "M120 180h60v60h-60zM180 240h60v60h-60z"
58
- }), /*#__PURE__*/_jsx("path", {
59
- fill: "color(display-p3 .9529 .9569 .9647)",
60
- d: "M180 120h60v60h-60zM240 180h60v60h-60z"
61
- }), /*#__PURE__*/_jsx("path", {
62
- fill: "color(display-p3 .9765 .9804 .9843)",
63
- d: "M240 240h60v60h-60z"
64
- })]
65
- }), /*#__PURE__*/_jsx("defs", {
66
- children: /*#__PURE__*/_jsx("clipPath", {
67
- id: "a",
68
- children: /*#__PURE__*/_jsx("path", {
69
- fill: "#fff",
70
- d: "M0 0h300v300H0z"
71
- })
72
- })
73
- })]
74
- });
75
- };
76
- NFTBroken.defaultProps = {
77
- width: "300",
78
- height: "300",
79
- viewBox: "0 0 300 300",
80
- fill: "none",
81
- xmlns: "http://www.w3.org/2000/svg"
82
- };
4
+ // eslint-disable-next-line import/no-unresolved
5
+ import NFTBroken from './NFTBroken.svg?react';
83
6
  import { styled } from '../Theme';
84
7
  export default function Broken({
85
8
  children
@@ -20,6 +20,7 @@ export function getCurrentApp(blocklet?: any): {
20
20
  appLogo: any;
21
21
  appPid: any;
22
22
  appUrl: any;
23
+ currentAppUrl: string | undefined;
23
24
  version: any;
24
25
  sourceAppPid: null;
25
26
  provider: string;
@@ -29,6 +30,7 @@ export function getCurrentApp(blocklet?: any): {
29
30
  appName: any;
30
31
  appDescription: any;
31
32
  appUrl: any;
33
+ currentAppUrl: string;
32
34
  sourceAppPid: null;
33
35
  provider: string;
34
36
  type: string;
@@ -51,6 +53,7 @@ export function getApps(blocklet: any): ({
51
53
  appName: any;
52
54
  appDescription: any;
53
55
  appUrl: any;
56
+ currentAppUrl: string;
54
57
  sourceAppPid: null;
55
58
  provider: string;
56
59
  type: string;
@@ -40,6 +40,10 @@ export function getCurrentApp(blocklet = window.blocklet) {
40
40
  appLogo: blocklet.appLogo,
41
41
  appPid: blocklet.appPid,
42
42
  appUrl: blocklet.appUrl,
43
+ // 该判断条件用于限制非统一登录模式下,当前访问的 url 与应用设置的主 url 不一致情况时有效
44
+ // 页面的请求优先会向当前访问的域名发送,避免产生 cors 的问题
45
+ // 而在统一登录模式下,这个值不应该提供,因为它始终会需要跨域的请求
46
+ currentAppUrl: blocklet === window.blocklet ? window.location.origin : undefined,
43
47
  version: blocklet.version,
44
48
  // NOTICE: null 代表该值置空
45
49
  sourceAppPid: null,
@@ -55,6 +59,8 @@ export function getCurrentApp(blocklet = window.blocklet) {
55
59
  appName: blocklet.appName,
56
60
  appDescription: blocklet.appDescription,
57
61
  appUrl: blocklet.baseUrl,
62
+ // 在 server 的登录环境下,始终提供当前的 url 作为 appUrl
63
+ currentAppUrl: window.location.origin,
58
64
  // NOTICE: null 代表该值置空
59
65
  sourceAppPid: null,
60
66
  provider: 'wallet',
@@ -1,208 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from "react";
3
2
  import PropTypes from 'prop-types';
4
3
  import Typography from '@mui/material/Typography';
5
4
  import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
6
- var AppStoreIcon = function AppStoreIcon(props) {
7
- return /*#__PURE__*/_jsxs("svg", {
8
- ...props,
9
- children: [/*#__PURE__*/_jsx("title", {
10
- children: "Appstore"
11
- }), /*#__PURE__*/_jsxs("g", {
12
- fill: "none",
13
- fillRule: "evenodd",
14
- children: [/*#__PURE__*/_jsx("path", {
15
- d: "M.198 3.792v42.064a3.594 3.594 0 0 0 3.595 3.594h164.414a3.594 3.594 0 0 0 3.595-3.594V3.792a3.594 3.594 0 0 0-3.595-3.594H3.793A3.594 3.594 0 0 0 .198 3.792z",
16
- fill: "#000",
17
- fillRule: "nonzero"
18
- }), /*#__PURE__*/_jsx("path", {
19
- d: "M65.788 38.665h2.924l-6.402-17.73H59.35l-6.402 17.73h2.826l1.634-4.706h6.759l1.622 4.706zm-5.1-14.512h.21l2.567 7.496h-5.357l2.58-7.496zm15.778.91c-1.818 0-3.391.91-4.202 2.433h-.197v-2.212h-2.543v17.719h2.642v-6.365h.209c.7 1.413 2.211 2.248 4.116 2.248 3.38 0 5.53-2.666 5.53-6.918 0-4.251-2.15-6.905-5.555-6.905zm-.75 11.452c-2.21 0-3.6-1.745-3.6-4.534 0-2.802 1.39-4.547 3.613-4.547 2.237 0 3.576 1.708 3.576 4.534 0 2.839-1.34 4.547-3.588 4.547zm14.452-11.452c-1.819 0-3.391.91-4.202 2.433h-.197v-2.212h-2.544v17.719h2.642v-6.365h.21c.7 1.413 2.211 2.248 4.116 2.248 3.379 0 5.529-2.666 5.529-6.918 0-4.251-2.15-6.905-5.554-6.905zm-.75 11.452c-2.211 0-3.6-1.745-3.6-4.534 0-2.802 1.389-4.547 3.613-4.547 2.236 0 3.575 1.708 3.575 4.534 0 2.839-1.339 4.547-3.588 4.547zm11.896-2.617c.197 3.17 2.839 5.197 6.771 5.197 4.202 0 6.832-2.125 6.832-5.517 0-2.666-1.5-4.14-5.136-4.989l-1.954-.479c-2.31-.54-3.244-1.266-3.244-2.531 0-1.598 1.45-2.642 3.625-2.642 2.064 0 3.49 1.02 3.748 2.654h2.678c-.16-2.986-2.789-5.087-6.39-5.087-3.87 0-6.45 2.101-6.45 5.26 0 2.604 1.462 4.152 4.669 4.902l2.286.553c2.346.553 3.379 1.364 3.379 2.716 0 1.572-1.622 2.715-3.834 2.715-2.372 0-4.018-1.069-4.252-2.752h-2.728zm15.877-11.858v3.305h-2.2v2.224h2.2v7.557c0 2.58 1.167 3.613 4.104 3.613.516 0 .995-.061 1.413-.135v-2.2c-.368.037-.577.062-.983.062-1.315 0-1.892-.615-1.892-2.015v-6.882h2.998v-2.224h-2.998V22.04h-2.642zm12.19 14.536c-2.298 0-3.588-1.683-3.588-4.608 0-2.9 1.29-4.595 3.588-4.595 2.286 0 3.588 1.696 3.588 4.595 0 2.913-1.302 4.608-3.588 4.608zm0 2.347c3.908 0 6.304-2.617 6.304-6.955 0-4.313-2.409-6.942-6.304-6.942-3.907 0-6.316 2.63-6.316 6.942 0 4.338 2.396 6.955 6.316 6.955zm7.509-.258h2.642v-7.9c0-1.88 1.413-3.146 3.403-3.146.443 0 1.254.086 1.463.16v-2.606c-.283-.073-.787-.11-1.168-.11-1.745 0-3.22.958-3.6 2.273h-.197v-2.052h-2.543v13.381zm13.456-11.39c1.953 0 3.231 1.363 3.293 3.465h-6.759c.148-2.09 1.512-3.465 3.466-3.465zm3.28 7.778c-.491 1.044-1.585 1.622-3.182 1.622-2.114 0-3.478-1.487-3.564-3.834v-.148h9.45v-.921c0-4.203-2.249-6.746-5.972-6.746-3.773 0-6.169 2.715-6.169 6.992 0 4.276 2.347 6.905 6.181 6.905 3.06 0 5.198-1.474 5.8-3.87h-2.544zM55.423 7.094v8.443h3.048c2.516 0 3.973-1.55 3.973-4.248 0-2.656-1.468-4.195-3.973-4.195h-3.048zm1.31 1.193h1.592c1.75 0 2.785 1.112 2.785 3.02 0 1.936-1.018 3.037-2.785 3.037h-1.592V8.287zm10.323 6.255c-1.094 0-1.708-.801-1.708-2.194 0-1.38.614-2.188 1.708-2.188 1.089 0 1.709.807 1.709 2.188 0 1.387-.62 2.194-1.709 2.194zm0 1.118c1.861 0 3.002-1.246 3.002-3.312 0-2.054-1.147-3.306-3.002-3.306-1.86 0-3.007 1.252-3.007 3.306 0 2.066 1.14 3.312 3.007 3.312zM79.92 9.165H78.66l-1.136 4.863h-.099l-1.31-4.863H74.91l-1.31 4.863h-.094l-1.141-4.863h-1.276l1.755 6.372h1.294l1.31-4.693h.1l1.316 4.693h1.305l1.75-6.372zm1.598 6.372h1.258V11.81c0-.995.62-1.615 1.633-1.615.936 0 1.392.509 1.392 1.533v3.81h1.258v-4.126c0-1.515-.801-2.37-2.223-2.37-.96 0-1.703.427-2.013 1.135h-.094V9.165h-1.21v6.372zm7.667 0h1.258V6.678h-1.258v8.86zm6.133-.995c-1.094 0-1.709-.801-1.709-2.194 0-1.38.615-2.188 1.709-2.188 1.088 0 1.708.807 1.708 2.188 0 1.387-.62 2.194-1.708 2.194zm0 1.118c1.86 0 3.002-1.246 3.002-3.312 0-2.054-1.147-3.306-3.002-3.306-1.86 0-3.008 1.252-3.008 3.306 0 2.066 1.141 3.312 3.008 3.312zm6.894-1.077c-.685 0-1.182-.333-1.182-.907 0-.561.398-.86 1.276-.918l1.556-.1v.533c0 .79-.702 1.392-1.65 1.392zm-.322 1.06c.837 0 1.533-.363 1.913-1.001h.1v.895h1.211v-4.353c0-1.346-.9-2.142-2.498-2.142-1.446 0-2.475.702-2.604 1.797h1.217c.14-.451.626-.708 1.328-.708.86 0 1.305.38 1.305 1.053v.55l-1.726.1c-1.516.093-2.37.754-2.37 1.901 0 1.164.895 1.908 2.124 1.908zm7.643 0c.878 0 1.62-.416 2.001-1.112h.1v1.006h1.205V6.678h-1.258v3.5h-.094c-.345-.703-1.082-1.118-1.954-1.118-1.609 0-2.645 1.275-2.645 3.288 0 2.019 1.024 3.295 2.645 3.295zm.357-5.454c1.053 0 1.714.837 1.714 2.165 0 1.334-.655 2.16-1.714 2.16-1.065 0-1.703-.814-1.703-2.166 0-1.34.644-2.159 1.703-2.159zm11.4 4.353c-1.094 0-1.708-.801-1.708-2.194 0-1.38.614-2.188 1.709-2.188 1.088 0 1.708.807 1.708 2.188 0 1.387-.62 2.194-1.708 2.194zm0 1.118c1.861 0 3.002-1.246 3.002-3.312 0-2.054-1.146-3.306-3.001-3.306-1.861 0-3.008 1.252-3.008 3.306 0 2.066 1.141 3.312 3.008 3.312zm4.812-.123h1.258V11.81c0-.995.62-1.615 1.632-1.615.936 0 1.393.509 1.393 1.533v3.81h1.258v-4.126c0-1.515-.802-2.37-2.224-2.37-.96 0-1.702.427-2.013 1.135h-.093V9.165H126.1v6.372zM137.73 7.62v1.574h-1.048v1.06h1.048v3.598c0 1.229.555 1.72 1.954 1.72.246 0 .474-.029.673-.064V14.46c-.176.017-.275.029-.468.029-.626 0-.901-.293-.901-.96v-3.277h1.427V9.194h-1.427V7.62h-1.258zm4.477 7.917h1.258v-3.721c0-.966.638-1.615 1.668-1.615.947 0 1.421.515 1.421 1.533v3.803h1.258v-4.113c0-1.516-.819-2.376-2.252-2.376-.96 0-1.697.427-2.007 1.141h-.1V6.68h-1.246v8.858zm10.294-5.424c.93 0 1.538.65 1.568 1.65h-3.219c.07-.995.72-1.65 1.65-1.65zm1.562 3.704c-.234.497-.755.772-1.516.772-1.006 0-1.656-.708-1.697-1.825v-.07h4.5v-.44c0-2-1.07-3.212-2.844-3.212-1.796 0-2.937 1.293-2.937 3.33 0 2.036 1.118 3.288 2.943 3.288 1.457 0 2.475-.702 2.762-1.843h-1.211z",
20
- fill: "#FFF"
21
- }), /*#__PURE__*/_jsx("g", {
22
- fill: "#FFF",
23
- children: /*#__PURE__*/_jsx("path", {
24
- d: "M37.747 25.07c-.038-4.285 3.51-6.37 3.672-6.468-2.01-2.93-5.124-3.33-6.218-3.361-2.616-.276-5.153 1.565-6.486 1.565-1.359 0-3.41-1.539-5.622-1.493-2.846.043-5.508 1.691-6.968 4.25-3.013 5.216-.766 12.883 2.121 17.1 1.444 2.066 3.132 4.37 5.34 4.29 2.161-.088 2.969-1.378 5.576-1.378 2.584 0 3.342 1.377 5.595 1.324 2.319-.034 3.779-2.073 5.173-4.158 1.669-2.365 2.339-4.698 2.365-4.818-.053-.017-4.502-1.715-4.548-6.852M33.492 12.467c1.162-1.454 1.958-3.431 1.737-5.438-1.682.075-3.786 1.164-4.998 2.585-1.071 1.253-2.029 3.306-1.781 5.237 1.89.141 3.83-.953 5.042-2.384"
25
- })
26
- })]
27
- })]
28
- });
29
- };
30
- AppStoreIcon.defaultProps = {
31
- width: "172",
32
- height: "50",
33
- viewBox: "0 0 172 50",
34
- xmlns: "http://www.w3.org/2000/svg"
35
- };
36
- var GooglePlayIcon = function GooglePlayIcon(props) {
37
- return /*#__PURE__*/_jsxs("svg", {
38
- ...props,
39
- children: [/*#__PURE__*/_jsx("title", {
40
- children: "Playstore"
41
- }), /*#__PURE__*/_jsxs("defs", {
42
- children: [/*#__PURE__*/_jsxs("linearGradient", {
43
- x1: "50%",
44
- y1: "0%",
45
- x2: "50%",
46
- y2: "38.913%",
47
- id: "b",
48
- children: [/*#__PURE__*/_jsx("stop", {
49
- stopColor: "#FBDA09",
50
- offset: "0%"
51
- }), /*#__PURE__*/_jsx("stop", {
52
- stopColor: "#FFBC00",
53
- offset: "100%"
54
- })]
55
- }), /*#__PURE__*/_jsx("path", {
56
- d: "M28.354 14.689c1.77 1.006 1.77 2.638 0 3.645L3.228 32.625C1.458 33.632.023 32.8.023 30.763V2.26C.023.225 1.458-.609 3.228.398l25.126 14.29z",
57
- id: "a"
58
- }), /*#__PURE__*/_jsxs("linearGradient", {
59
- x1: "0%",
60
- y1: "58.476%",
61
- x2: "69.306%",
62
- y2: "39.083%",
63
- id: "c",
64
- children: [/*#__PURE__*/_jsx("stop", {
65
- stopColor: "#01E2FF",
66
- offset: "0%"
67
- }), /*#__PURE__*/_jsx("stop", {
68
- stopColor: "#01C4FF",
69
- offset: "100%"
70
- })]
71
- }), /*#__PURE__*/_jsxs("linearGradient", {
72
- x1: "20.281%",
73
- y1: "20.102%",
74
- x2: "83.82%",
75
- y2: "83.621%",
76
- id: "e",
77
- children: [/*#__PURE__*/_jsx("stop", {
78
- stopColor: "#28D781",
79
- offset: "0%"
80
- }), /*#__PURE__*/_jsx("stop", {
81
- stopColor: "#02F076",
82
- offset: "100%"
83
- })]
84
- }), /*#__PURE__*/_jsxs("linearGradient", {
85
- x1: "74.488%",
86
- y1: "17.43%",
87
- x2: "10.108%",
88
- y2: "91.184%",
89
- id: "f",
90
- children: [/*#__PURE__*/_jsx("stop", {
91
- stopColor: "#F2414E",
92
- offset: "0%"
93
- }), /*#__PURE__*/_jsx("stop", {
94
- stopColor: "#E02554",
95
- offset: "100%"
96
- })]
97
- })]
98
- }), /*#__PURE__*/_jsxs("g", {
99
- fill: "none",
100
- fillRule: "evenodd",
101
- children: [/*#__PURE__*/_jsx("path", {
102
- d: "M.17 4.852V44.54a4.681 4.681 0 0 0 4.682 4.681h162.296a4.682 4.682 0 0 0 4.682-4.681V4.85a4.681 4.681 0 0 0-4.682-4.68H4.852A4.682 4.682 0 0 0 .17 4.85z",
103
- fill: "#000",
104
- fillRule: "nonzero"
105
- }), /*#__PURE__*/_jsx("g", {
106
- fill: "#FFF",
107
- children: /*#__PURE__*/_jsx("path", {
108
- d: "M91.207 16.084a4.213 4.213 0 1 1 0-8.425 4.213 4.213 0 0 1 0 8.425zm0-1.287a2.925 2.925 0 1 0 0-5.85 2.925 2.925 0 0 0 0 5.85zM62.656 12.34v2.574h3.393v.936h-4.68V8.01h4.68v.936h-3.393v2.457h3.042v.937h-3.042zM70.613 8.946v6.904h-1.288V8.946h-1.989V8.01h5.266v.936h-1.99zM82.08 8.946v6.904h-1.287V8.946h-1.99V8.01h5.266v.936H82.08zM76.346 8.01h1.287v7.84h-1.287zM97.233 8.01h-.76v7.84h1.287V9.731l3.744 6.119h1.288V8.01h-1.288v5.737l-3.51-5.737h-.76zM59.376 8.916c-.686-.723-1.69-1.14-2.883-1.14a4.133 4.133 0 0 0-4.135 4.13 4.135 4.135 0 0 0 4.135 4.13c2.322.022 4.258-1.614 3.871-4.454v-.042h-1.03c.009.119.012.241.01.366.002 2.029-1.168 2.98-2.816 2.98a2.982 2.982 0 0 1-2.983-2.98 2.982 2.982 0 0 1 2.983-2.98c.824 0 1.539.282 2.042.796l.806-.806z"
109
- })
110
- }), /*#__PURE__*/_jsxs("g", {
111
- fill: "#FFF",
112
- children: [/*#__PURE__*/_jsx("path", {
113
- d: "M125.375 22.052h6.634s3.82.65 3.82 5.035-3.82 5.035-3.82 5.035h-6.634v-10.07zm1.287 2.436v5.404h4.504s2.05 0 2.05-2.702-2.05-2.702-2.05-2.702h-4.504z"
114
- }), /*#__PURE__*/_jsx("path", {
115
- d: "M124.79 22.052h2.34v16.382h-2.34zM137.193 22.052h2.34v16.382h-2.34zM148.208 37.262c-.645.532-1.675 1.033-3.303 1.135-3.729.232-3.73-3.17-3.73-3.4 0-.23-.185-3.004 2.782-3.445 2.1-.313 3.571.208 4.251.538v-.481c-.167-.637-.684-1.809-2.235-1.809-2.131 0-2.602 1.152-2.602 1.152l-1.949-1.152s1.09-2.249 4.364-2.249c4.07 0 4.763 2.808 4.763 3.753V38.428h-2.341v-1.166zm-.167-3.508s-4.509-1.216-4.666 1.317c-.156 2.533 4.326 1.317 4.726-.479 0-.57-.06-.838-.06-.838zM154.94 37.812l-2.183 5.185h2.34l6.331-15.038h-2.34l-2.978 7.074-3.002-7.13h-2.34l4.172 9.91zM119.55 31.732l-7.4 3.059s.477 1.692 2.703 1.703c1.742.009 2.726-1.545 2.726-1.545l1.878 1.272s-1.516 2.451-4.62 2.451c-3.813 0-5.493-3.335-5.493-5.5 0-2.087 1.334-5.62 5.257-5.62 3.924 0 4.95 4.18 4.95 4.18zm-2.815-.867s-.931-1.417-2.36-1.155c-3.02.552-2.64 3.196-2.64 3.196l5-2.04zM105.834 22.052h2.476V38.4h-2.476zM101.872 27.907l2.288.02V38.24c0 2.636-1.569 5.418-5.262 5.418-3.694 0-4.887-3.273-4.887-3.273l2.102-.884s.64 2.017 2.894 2.017c2.566 0 2.865-2.334 2.865-3.133v-1.12s-.888 1.39-3.093 1.39c-2.39 0-5.232-2.049-5.232-5.54 0-3.493 2.676-5.49 5.26-5.563 2.07-.058 3.065 1.374 3.065 1.374v-1.02zm-2.897 8.653c1.669 0 3.022-1.53 3.022-3.415 0-1.886-1.353-3.415-3.022-3.415-1.67 0-3.022 1.529-3.022 3.415 0 1.886 1.353 3.415 3.022 3.415zM86.949 38.668a5.564 5.564 0 0 1-5.571-5.558 5.564 5.564 0 0 1 5.57-5.559 5.564 5.564 0 0 1 5.571 5.559 5.564 5.564 0 0 1-5.57 5.558zm-.037-2.18c1.73 0 3.132-1.512 3.132-3.378s-1.402-3.379-3.132-3.379c-1.73 0-3.131 1.513-3.131 3.379s1.402 3.378 3.131 3.378zM74.896 38.668a5.564 5.564 0 0 1-5.57-5.558 5.564 5.564 0 0 1 5.57-5.559 5.564 5.564 0 0 1 5.57 5.559 5.564 5.564 0 0 1-5.57 5.558zm-.036-2.18c1.73 0 3.131-1.512 3.131-3.378S76.59 29.73 74.86 29.73c-1.73 0-3.131 1.513-3.131 3.379s1.401 3.378 3.13 3.378z"
116
- }), /*#__PURE__*/_jsxs("g", {
117
- children: [/*#__PURE__*/_jsx("path", {
118
- d: "M60.512 29.314h7.355l-.073 2.325h-7.282z"
119
- }), /*#__PURE__*/_jsx("path", {
120
- d: "M66.42 23.843c-1.432-1.508-3.526-2.376-6.017-2.376-4.766 0-8.63 3.854-8.63 8.61 0 4.754 3.864 8.602 8.63 8.61 4.845.043 8.886-3.366 8.078-9.287v-.086h-2.149c.018.247.024.501.018.762.005 4.23-2.436 6.212-5.875 6.212-3.438 0-6.226-2.78-6.226-6.212 0-3.43 2.788-6.212 6.226-6.212 1.72 0 3.212.587 4.261 1.658l1.683-1.679z"
121
- })]
122
- })]
123
- }), /*#__PURE__*/_jsxs("g", {
124
- transform: "translate(11.755 8.127)",
125
- children: [/*#__PURE__*/_jsx("mask", {
126
- id: "d",
127
- fill: "#fff",
128
- children: /*#__PURE__*/_jsx("use", {
129
- xlinkHref: "#a"
130
- })
131
- }), /*#__PURE__*/_jsx("use", {
132
- fill: "url(#b)",
133
- xlinkHref: "#a"
134
- }), /*#__PURE__*/_jsx("path", {
135
- fill: "url(#c)",
136
- mask: "url(#d)",
137
- d: "M0-.012l16.357 16.258-16.568 16.9z"
138
- }), /*#__PURE__*/_jsx("path", {
139
- fill: "url(#e)",
140
- mask: "url(#d)",
141
- d: "M-3.364-3.358l19.72 19.609 5.862-5.593z"
142
- }), /*#__PURE__*/_jsx("path", {
143
- fill: "url(#f)",
144
- mask: "url(#d)",
145
- d: "M16.358 16.247l8.975 9.046L-1.48 34.34z"
146
- })]
147
- })]
148
- })]
149
- });
150
- };
151
- GooglePlayIcon.defaultProps = {
152
- width: "172",
153
- height: "50",
154
- viewBox: "0 0 172 50",
155
- xmlns: "http://www.w3.org/2000/svg",
156
- xmlnsXlink: "http://www.w3.org/1999/xlink"
157
- };
158
- var AndroidDownloadIcon = function AndroidDownloadIcon(props) {
159
- return /*#__PURE__*/_jsxs("svg", {
160
- ...props,
161
- children: [/*#__PURE__*/_jsx("title", {
162
- children: "android"
163
- }), /*#__PURE__*/_jsxs("g", {
164
- fill: "none",
165
- fillRule: "evenodd",
166
- children: [/*#__PURE__*/_jsx("path", {
167
- d: "M172 44.328c0 3.133-2.794 5.672-6.24 5.672H6.24c-1.654 0-3.242-.598-4.412-1.661C.658 47.275 0 45.832 0 44.329V5.671C0 2.539 2.794 0 6.24 0h159.52c3.446 0 6.24 2.54 6.24 5.672v38.656",
168
- fill: "#100F0D",
169
- fillRule: "nonzero"
170
- }), /*#__PURE__*/_jsx("text", {
171
- fill: "#FFF",
172
- fontFamily: "Arial-BoldMT, Arial",
173
- fontSize: "23.441",
174
- fontWeight: "bold",
175
- children: /*#__PURE__*/_jsx("tspan", {
176
- x: "63.624",
177
- y: "42.135",
178
- children: "Android"
179
- })
180
- }), /*#__PURE__*/_jsx("text", {
181
- fill: "#FFF",
182
- fillRule: "nonzero",
183
- fontFamily: "ArialMT, Arial",
184
- fontSize: "11.721",
185
- children: /*#__PURE__*/_jsx("tspan", {
186
- x: "64",
187
- y: "19",
188
- children: "Download for"
189
- })
190
- }), /*#__PURE__*/_jsx("g", {
191
- fill: "#9FC732",
192
- fillRule: "nonzero",
193
- children: /*#__PURE__*/_jsx("path", {
194
- d: "M40.48 18.031H20.153a.818.818 0 0 0-.818.817v17.01c0 .45.366.816.818.816h3.625v5.732c0 1.33 1.08 2.409 2.413 2.409a2.411 2.411 0 0 0 2.414-2.409v-5.732h3.376v5.732c0 1.33 1.08 2.409 2.413 2.409a2.41 2.41 0 0 0 2.414-2.409v-5.732h3.674a.82.82 0 0 0 .819-.817V18.848a.818.818 0 0 0-.82-.817m-24.588-.004a2.411 2.411 0 0 0-2.413 2.408v9.782a2.41 2.41 0 0 0 2.413 2.408 2.41 2.41 0 0 0 2.414-2.408v-9.782a2.41 2.41 0 0 0-2.414-2.408M44.877 17.66c-1.33 0-2.41 1.091-2.41 2.436v9.895c0 1.345 1.08 2.436 2.41 2.436s2.41-1.09 2.41-2.436v-9.895c0-1.345-1.08-2.436-2.41-2.436m-19.441-6.768a.924.924 0 0 1 .813.464.945.945 0 0 1 0 .945.924.924 0 0 1-.813.464.932.932 0 0 1-.913-.936c0-.512.406-.93.913-.937zm10.96.937a.939.939 0 0 1-.454.836.918.918 0 0 1-.944 0 .939.939 0 0 1-.454-.836.931.931 0 0 1 .926-.906c.5 0 .91.4.926.906zm-15.902 4.628h19.918c.52 0 .907-.483.8-.998a11.12 11.12 0 0 0-5.37-7.395l1.702-3.106a.44.44 0 0 0-.168-.592.426.426 0 0 0-.585.17l-1.716 3.129a10.856 10.856 0 0 0-4.622-1.027 10.854 10.854 0 0 0-4.622 1.027l-1.716-3.13a.428.428 0 0 0-.58-.16.438.438 0 0 0-.173.582l1.702 3.107a11.123 11.123 0 0 0-5.37 7.395.825.825 0 0 0 .8.998"
195
- })
196
- })]
197
- })]
198
- });
199
- };
200
- AndroidDownloadIcon.defaultProps = {
201
- width: "172",
202
- height: "50",
203
- viewBox: "0 0 172 50",
204
- xmlns: "http://www.w3.org/2000/svg"
205
- };
5
+
6
+ // eslint-disable-next-line import/no-unresolved
7
+ import AppStoreIcon from './images/app-store.svg?react';
8
+ // eslint-disable-next-line import/no-unresolved
9
+ import GooglePlayIcon from './images/google-play.svg?react';
10
+ // eslint-disable-next-line import/no-unresolved
11
+ import AndroidDownloadIcon from './images/android_download.svg?react';
206
12
  import Button from '../Button';
207
13
  import { mergeProps } from '../Util';
208
14
  import { styled } from '../Theme';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.10.61",
3
+ "version": "2.10.63",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -64,12 +64,12 @@
64
64
  "react": ">=18.2.0",
65
65
  "react-router-dom": ">=6.22.3"
66
66
  },
67
- "gitHead": "281ea6ca4acf367c8011e926e5baaf16ea991367",
67
+ "gitHead": "7748c2f30847529e779f6ae6ce34652d99b90d7d",
68
68
  "dependencies": {
69
69
  "@arcblock/did-motif": "^1.1.13",
70
- "@arcblock/icons": "^2.10.61",
71
- "@arcblock/nft-display": "^2.10.61",
72
- "@arcblock/react-hooks": "^2.10.61",
70
+ "@arcblock/icons": "^2.10.63",
71
+ "@arcblock/nft-display": "^2.10.63",
72
+ "@arcblock/react-hooks": "^2.10.63",
73
73
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
74
74
  "@fontsource/inter": "^5.0.16",
75
75
  "@fontsource/ubuntu-mono": "^5.0.18",
@@ -2,17 +2,21 @@ import PropTypes from 'prop-types';
2
2
 
3
3
  import { styled } from '../Theme';
4
4
 
5
- import { ReactComponent as LightLogo } from './images/logo-light-top.svg';
6
- import { ReactComponent as LightText } from './images/logo-light-text.svg';
7
- import { ReactComponent as DarkLogo } from './images/logo-dark-top.svg';
8
- import { ReactComponent as DarkText } from './images/logo-dark-text.svg';
5
+ // eslint-disable-next-line import/no-unresolved
6
+ import LightLogo from './images/logo-light-top.svg?react';
7
+ // eslint-disable-next-line import/no-unresolved
8
+ import LightText from './images/logo-light-text.svg?react';
9
+ // eslint-disable-next-line import/no-unresolved
10
+ import DarkLogo from './images/logo-dark-top.svg?react';
11
+ // eslint-disable-next-line import/no-unresolved
12
+ import DarkText from './images/logo-dark-text.svg?react';
9
13
 
10
14
  /**
11
15
  @typedef {import('react').HTMLAttributes<HTMLSpanElement> & {
12
16
  mode?: 'light' | 'dark',
13
17
  layout?: 'vertical' | 'horizontal',
14
18
  showText?: boolean,
15
- showLogo?: boolean,
19
+ showLogo?: boolean,
16
20
  }} LogoProps
17
21
  */
18
22
 
@@ -1,6 +1,7 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import PropTypes from 'prop-types';
3
- import NFTBroken from './NFTBroken.svg';
3
+ // eslint-disable-next-line import/no-unresolved
4
+ import NFTBroken from './NFTBroken.svg?react';
4
5
  import { styled } from '../Theme';
5
6
 
6
7
  export default function Broken({ children } = {}) {
@@ -48,6 +48,10 @@ export function getCurrentApp(blocklet = window.blocklet) {
48
48
  appLogo: blocklet.appLogo,
49
49
  appPid: blocklet.appPid,
50
50
  appUrl: blocklet.appUrl,
51
+ // 该判断条件用于限制非统一登录模式下,当前访问的 url 与应用设置的主 url 不一致情况时有效
52
+ // 页面的请求优先会向当前访问的域名发送,避免产生 cors 的问题
53
+ // 而在统一登录模式下,这个值不应该提供,因为它始终会需要跨域的请求
54
+ currentAppUrl: blocklet === window.blocklet ? window.location.origin : undefined,
51
55
  version: blocklet.version,
52
56
  // NOTICE: null 代表该值置空
53
57
  sourceAppPid: null,
@@ -63,6 +67,8 @@ export function getCurrentApp(blocklet = window.blocklet) {
63
67
  appName: blocklet.appName,
64
68
  appDescription: blocklet.appDescription,
65
69
  appUrl: blocklet.baseUrl,
70
+ // 在 server 的登录环境下,始终提供当前的 url 作为 appUrl
71
+ currentAppUrl: window.location.origin,
66
72
  // NOTICE: null 代表该值置空
67
73
  sourceAppPid: null,
68
74
  provider: 'wallet',
@@ -2,9 +2,12 @@ import PropTypes from 'prop-types';
2
2
  import Typography from '@mui/material/Typography';
3
3
  import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
4
4
 
5
- import { ReactComponent as AppStoreIcon } from './images/app-store.svg';
6
- import { ReactComponent as GooglePlayIcon } from './images/google-play.svg';
7
- import { ReactComponent as AndroidDownloadIcon } from './images/android_download.svg';
5
+ // eslint-disable-next-line import/no-unresolved
6
+ import AppStoreIcon from './images/app-store.svg?react';
7
+ // eslint-disable-next-line import/no-unresolved
8
+ import GooglePlayIcon from './images/google-play.svg?react';
9
+ // eslint-disable-next-line import/no-unresolved
10
+ import AndroidDownloadIcon from './images/android_download.svg?react';
8
11
 
9
12
  import Button from '../Button';
10
13
  import { mergeProps } from '../Util';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes