@blocklet/ui-react 2.10.82 → 2.10.84

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.10.82",
3
+ "version": "2.10.84",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -32,9 +32,9 @@
32
32
  "url": "https://github.com/ArcBlock/ux/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@arcblock/bridge": "^2.10.82",
36
- "@arcblock/react-hooks": "^2.10.82",
37
- "@blocklet/did-space-react": "^0.5.77",
35
+ "@arcblock/bridge": "^2.10.84",
36
+ "@arcblock/react-hooks": "^2.10.84",
37
+ "@blocklet/did-space-react": "^0.5.78",
38
38
  "@iconify-icons/logos": "^1.2.36",
39
39
  "@iconify-icons/material-symbols": "^1.2.58",
40
40
  "@iconify/react": "^4.1.1",
@@ -80,5 +80,5 @@
80
80
  "jest": "^29.7.0",
81
81
  "unbuild": "^2.0.0"
82
82
  },
83
- "gitHead": "25840ab8e0b037d16ef4fa8ead378ff81db95c46"
83
+ "gitHead": "1311dd7d9ce3a6b0164404de828e64dcd900ce6d"
84
84
  }
@@ -5,10 +5,12 @@ import PropTypes from 'prop-types';
5
5
 
6
6
  export default function InstallerItem({ optionalComponent, index, installStatus, hasPermission, t }) {
7
7
  const handleInstall = () => {
8
+ // 这里是安全的
8
9
  window.open(optionalComponent?.installUrl, '_blank');
9
10
  };
10
11
 
11
12
  const handleOpenStore = () => {
13
+ // 这里是安全的
12
14
  window.open(optionalComponent?.storeUrl, '_blank');
13
15
  };
14
16
 
@@ -79,6 +79,7 @@ function Dashboard({ meta, fallbackUrl, invalidPathFallback, headerAddons, sessi
79
79
  // 未认证 (user 为空) 时不做处理, 这种情况的页面跳转逻辑一般由应用自行处理
80
80
  useLayoutEffect(() => {
81
81
  if (!!user && !flattened?.length && fallbackUrl) {
82
+ // 这里是安全的
82
83
  window.location.href = fallbackUrl;
83
84
  }
84
85
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -148,6 +149,7 @@ Dashboard.defaultProps = {
148
149
  showRole: true,
149
150
  // dashboard 默认退出登录行为: 跳转到 (root) blocklet 首页
150
151
  onLogout: () => {
152
+ // 这里是安全的
151
153
  window.location.href = publicPath;
152
154
  },
153
155
  },
@@ -173,6 +173,7 @@ export default function UserCenter({
173
173
  const handleChangeTab = useMemoizedFn((value) => {
174
174
  const findTab = userCenterTabs.find((x) => x.value === value);
175
175
  if (findTab) {
176
+ // 这里是安全的
176
177
  window.location.href = withQuery(findTab.url, {
177
178
  did: isMyself ? undefined : currentDid,
178
179
  });