@abtnode/ux 1.16.32-beta-5463e017 → 1.16.32-beta-93e1a798

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.
Files changed (2) hide show
  1. package/lib/store/item.js +12 -3
  2. package/package.json +9 -9
package/lib/store/item.js CHANGED
@@ -4,11 +4,12 @@ import LaunchIcon from '@mui/icons-material/Launch';
4
4
  import LinkOutlinedIcon from '@mui/icons-material/LinkOutlined';
5
5
  import DoneIcon from '@mui/icons-material/Done';
6
6
  import PropTypes from 'prop-types';
7
- import { useEffect, useState } from 'react';
7
+ import { useEffect, useMemo, useState } from 'react';
8
8
  import { joinURL } from 'ufo';
9
9
  import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
10
10
  import Toast from '@arcblock/ux/lib/Toast';
11
11
  import PublishIcon from '@mui/icons-material/BackupOutlined';
12
+ import { isInServerlessMode } from '@abtnode/util/lib/serverless';
12
13
  import DeleteStore from './delete';
13
14
  import { useNodeContext } from '../contexts/node';
14
15
  import { formatError } from '../util';
@@ -112,7 +113,9 @@ export default function StoreItem({
112
113
  t
113
114
  } = useLocaleContext();
114
115
  const {
115
- api
116
+ api,
117
+ info: nodeInfo,
118
+ inService
116
119
  } = useNodeContext();
117
120
  const [loading, setLoading] = useState(false);
118
121
  const openWindow = usePromiseWindowOpen({
@@ -212,6 +215,12 @@ export default function StoreItem({
212
215
  setLoading(false);
213
216
  }
214
217
  }, [connected]);
218
+ const showDeleteButton = useMemo(() => {
219
+ if (inService && isInServerlessMode(nodeInfo)) {
220
+ return false;
221
+ }
222
+ return true;
223
+ }, [inService, nodeInfo]);
215
224
  return /*#__PURE__*/_jsxs("div", {
216
225
  className: classes.box,
217
226
  children: [!isPublish && loading && /*#__PURE__*/_jsx(CircularProgress, {
@@ -375,7 +384,7 @@ export default function StoreItem({
375
384
  zoom: 0.9
376
385
  }
377
386
  })
378
- }), !store.protected && /*#__PURE__*/_jsx(DeleteStore, {
387
+ }), !store.protected && showDeleteButton && /*#__PURE__*/_jsx(DeleteStore, {
379
388
  store: store,
380
389
  onDelete: onDelete,
381
390
  teamDid: teamDid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.32-beta-5463e017",
3
+ "version": "1.16.32-beta-93e1a798",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,9 +25,9 @@
25
25
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@abtnode/auth": "1.16.32-beta-5463e017",
29
- "@abtnode/constant": "1.16.32-beta-5463e017",
30
- "@abtnode/util": "1.16.32-beta-5463e017",
28
+ "@abtnode/auth": "1.16.32-beta-93e1a798",
29
+ "@abtnode/constant": "1.16.32-beta-93e1a798",
30
+ "@abtnode/util": "1.16.32-beta-93e1a798",
31
31
  "@ahooksjs/use-url-state": "^3.5.1",
32
32
  "@arcblock/did": "^1.18.135",
33
33
  "@arcblock/did-connect": "^2.10.33",
@@ -37,11 +37,11 @@
37
37
  "@arcblock/react-hooks": "^2.10.33",
38
38
  "@arcblock/terminal": "^2.10.33",
39
39
  "@arcblock/ux": "^2.10.33",
40
- "@blocklet/constant": "1.16.32-beta-5463e017",
41
- "@blocklet/js-sdk": "1.16.32-beta-5463e017",
40
+ "@blocklet/constant": "1.16.32-beta-93e1a798",
41
+ "@blocklet/js-sdk": "1.16.32-beta-93e1a798",
42
42
  "@blocklet/launcher-layout": "2.10.33",
43
- "@blocklet/list": "^0.13.25",
44
- "@blocklet/meta": "1.16.32-beta-5463e017",
43
+ "@blocklet/list": "^0.13.26",
44
+ "@blocklet/meta": "1.16.32-beta-93e1a798",
45
45
  "@blocklet/ui-react": "^2.10.33",
46
46
  "@blocklet/uploader": "0.1.34",
47
47
  "@emotion/react": "^11.10.4",
@@ -108,5 +108,5 @@
108
108
  "jest": "^29.7.0",
109
109
  "jest-environment-jsdom": "^29.7.0"
110
110
  },
111
- "gitHead": "aff2d89d663ccd842757ff664fb80e1d7ae05029"
111
+ "gitHead": "608fab914e6ee5cb5659c11ab3d0713945ab99a0"
112
112
  }