@abtnode/ux 1.16.33 → 1.16.34-beta-20241120-080738-bbbe036c
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/lib/blocklet/actions.js +1 -2
- package/lib/blocklet/did-spaces/index.js +64 -36
- package/lib/blocklet/did-spaces/storage/index.js +1 -0
- package/lib/blocklet/disk-info.js +1 -1
- package/lib/store/add.js +1 -0
- package/lib/store/delete.js +2 -1
- package/lib/store/item.js +1 -0
- package/package.json +8 -8
package/lib/blocklet/actions.js
CHANGED
|
@@ -381,8 +381,7 @@ function BlockletActions({
|
|
|
381
381
|
}
|
|
382
382
|
}),
|
|
383
383
|
name: t('sidebar.dashboard'),
|
|
384
|
-
handler: handleOpenDashboard
|
|
385
|
-
disabled: disableStart || blocklet.status !== 'running'
|
|
384
|
+
handler: handleOpenDashboard
|
|
386
385
|
} : null].filter(Boolean);
|
|
387
386
|
if (tab === EXTERNAL) {
|
|
388
387
|
// eslint-disable-next-line no-return-assign
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
1
2
|
import { useCreation } from 'ahooks';
|
|
2
3
|
import { useSearchParams } from 'react-router-dom';
|
|
3
4
|
import { Grid, Box, Stack, styled } from '@mui/material';
|
|
@@ -11,7 +12,10 @@ import useMobile from '../../hooks/use-mobile';
|
|
|
11
12
|
import BlockletBackup from './backup';
|
|
12
13
|
import BlockletStorage from './storage';
|
|
13
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
export default function BlockletDIDSpaces(
|
|
15
|
+
export default function BlockletDIDSpaces({
|
|
16
|
+
navOrientation,
|
|
17
|
+
...rest
|
|
18
|
+
}) {
|
|
15
19
|
const {
|
|
16
20
|
t,
|
|
17
21
|
locale
|
|
@@ -25,6 +29,7 @@ export default function BlockletDIDSpaces() {
|
|
|
25
29
|
});
|
|
26
30
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
27
31
|
const current = searchParams.get('tab') || 'backup';
|
|
32
|
+
const orientation = isMobile ? 'horizontal' : navOrientation;
|
|
28
33
|
const tabs = useCreation(() => {
|
|
29
34
|
const results = [{
|
|
30
35
|
label: /*#__PURE__*/_jsxs(Stack, {
|
|
@@ -58,7 +63,7 @@ export default function BlockletDIDSpaces() {
|
|
|
58
63
|
});
|
|
59
64
|
}
|
|
60
65
|
return results;
|
|
61
|
-
}, [locale]);
|
|
66
|
+
}, [locale, orientation]);
|
|
62
67
|
const contentMaps = useCreation(() => ({
|
|
63
68
|
backup: /*#__PURE__*/_jsx(BlockletBackup, {}),
|
|
64
69
|
storage: /*#__PURE__*/_jsx(BlockletStorage, {})
|
|
@@ -79,45 +84,68 @@ export default function BlockletDIDSpaces() {
|
|
|
79
84
|
children: content
|
|
80
85
|
});
|
|
81
86
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
87
|
+
const nav = /*#__PURE__*/_jsx(Tabs, {
|
|
88
|
+
tabs: tabs,
|
|
89
|
+
current: current,
|
|
90
|
+
orientation: orientation,
|
|
91
|
+
onChange: onTabChange,
|
|
92
|
+
sx: [{
|
|
93
|
+
borderRight: 1,
|
|
94
|
+
height: '100%',
|
|
95
|
+
borderColor: 'divider'
|
|
96
|
+
}, orientation === 'horizontal' && {
|
|
97
|
+
borderRight: 0
|
|
98
|
+
}]
|
|
99
|
+
});
|
|
100
|
+
if (orientation === 'vertical') {
|
|
101
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
102
|
+
...rest,
|
|
103
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
104
|
+
container: true,
|
|
105
|
+
columnSpacing: 4,
|
|
106
|
+
columns: 24,
|
|
107
|
+
sx: {
|
|
108
|
+
mt: -1
|
|
109
|
+
},
|
|
110
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
111
|
+
item: true,
|
|
112
|
+
md: 5,
|
|
113
|
+
lg: 4,
|
|
114
|
+
children: nav
|
|
115
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
116
|
+
item: true,
|
|
117
|
+
md: 19,
|
|
118
|
+
lg: 20,
|
|
119
|
+
children: /*#__PURE__*/_jsx(ContentBox, {
|
|
120
|
+
sx: {
|
|
121
|
+
mt: 1
|
|
122
|
+
},
|
|
123
|
+
children: content
|
|
124
|
+
})
|
|
125
|
+
})]
|
|
106
126
|
})
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
children: /*#__PURE__*/_jsx(ContentBox, {
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
if (orientation === 'horizontal') {
|
|
130
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
131
|
+
...rest,
|
|
132
|
+
children: [nav, /*#__PURE__*/_jsx(ContentBox, {
|
|
133
|
+
sx: {
|
|
134
|
+
mt: 2
|
|
135
|
+
},
|
|
113
136
|
children: content
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
}
|
|
137
|
+
})]
|
|
138
|
+
});
|
|
139
|
+
}
|
|
117
140
|
}
|
|
141
|
+
BlockletDIDSpaces.propTypes = {
|
|
142
|
+
navOrientation: PropTypes.oneOf(['vertical', 'horizontal'])
|
|
143
|
+
};
|
|
144
|
+
BlockletDIDSpaces.defaultProps = {
|
|
145
|
+
navOrientation: 'vertical'
|
|
146
|
+
};
|
|
118
147
|
const ContentBox = styled(Box)`
|
|
119
148
|
position: relative;
|
|
120
149
|
min-height: 66vh;
|
|
121
|
-
height: 100%;
|
|
122
150
|
overflow: hidden;
|
|
123
151
|
`;
|
package/lib/store/add.js
CHANGED
package/lib/store/delete.js
CHANGED
|
@@ -43,7 +43,7 @@ export default function DeleteStore({
|
|
|
43
43
|
scope
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
await blockletContext?.actions
|
|
46
|
+
await blockletContext?.actions?.refreshBlocklet();
|
|
47
47
|
if (onDelete && typeof onDelete === 'function') {
|
|
48
48
|
onDelete();
|
|
49
49
|
}
|
|
@@ -81,6 +81,7 @@ export default function DeleteStore({
|
|
|
81
81
|
onClick: onMenuItemClick,
|
|
82
82
|
children: children
|
|
83
83
|
}) : /*#__PURE__*/_jsx(Button, {
|
|
84
|
+
"data-cy": "store-action-delete",
|
|
84
85
|
color: "primary",
|
|
85
86
|
disabled: loading,
|
|
86
87
|
onClick: onMenuItemClick,
|
package/lib/store/item.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
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.
|
|
29
|
-
"@abtnode/constant": "1.16.
|
|
30
|
-
"@abtnode/util": "1.16.
|
|
28
|
+
"@abtnode/auth": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
29
|
+
"@abtnode/constant": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
30
|
+
"@abtnode/util": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
31
31
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
32
32
|
"@arcblock/did": "^1.18.139",
|
|
33
33
|
"@arcblock/did-connect": "^2.10.65",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@arcblock/react-hooks": "^2.10.65",
|
|
38
38
|
"@arcblock/terminal": "^2.10.65",
|
|
39
39
|
"@arcblock/ux": "^2.10.65",
|
|
40
|
-
"@blocklet/constant": "1.16.
|
|
40
|
+
"@blocklet/constant": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
41
41
|
"@blocklet/did-space-react": "^0.5.65",
|
|
42
|
-
"@blocklet/js-sdk": "1.16.
|
|
42
|
+
"@blocklet/js-sdk": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
43
43
|
"@blocklet/launcher-layout": "2.10.65",
|
|
44
44
|
"@blocklet/list": "^0.14.18",
|
|
45
|
-
"@blocklet/meta": "1.16.
|
|
45
|
+
"@blocklet/meta": "1.16.34-beta-20241120-080738-bbbe036c",
|
|
46
46
|
"@blocklet/ui-react": "^2.10.65",
|
|
47
47
|
"@blocklet/uploader": "0.1.51",
|
|
48
48
|
"@emotion/react": "^11.10.4",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"jest": "^29.7.0",
|
|
112
112
|
"jest-environment-jsdom": "^29.7.0"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "4bc345b51743e28a95bf09f7e0c0740838b39ad3"
|
|
115
115
|
}
|