@abtnode/ux 1.16.30-beta-5d9c2c41 → 1.16.30-beta-e7a90fb2

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.
@@ -31,6 +31,8 @@ import { formatError, isDownloading, sleep } from '../util';
31
31
  import Icons from './icons';
32
32
  import { getServerUrl } from './util';
33
33
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
34
+ const INTERNAL = 'internal';
35
+ const EXTERNAL = 'external';
34
36
  export default function BlockletActions({
35
37
  blocklet,
36
38
  onStart,
@@ -55,6 +57,7 @@ export default function BlockletActions({
55
57
  loading: recommendedUrlLoading,
56
58
  recommendedUrl
57
59
  } = useBlockletUrlEvaluation(blocklet);
60
+ const [tab] = useLocalStorage('blocklet-type-filter', INTERNAL);
58
61
  const inProgress = isInProgress(blocklet.status);
59
62
  const [disableStart, setDisableStart] = useState(false);
60
63
  useEffect(() => {
@@ -332,7 +335,7 @@ export default function BlockletActions({
332
335
  handler: createHandler('cancelDownload', node.api.cancelDownloadBlocklet, true)
333
336
  };
334
337
  const missingRequiredConfigs = getAppMissingConfigs(blocklet);
335
- const actions = [{
338
+ let actions = [{
336
339
  action: 'start',
337
340
  icon: Icons.Start,
338
341
  name: t('common.start'),
@@ -362,6 +365,10 @@ export default function BlockletActions({
362
365
  },
363
366
  disabled: isDownloading(blocklet.status)
364
367
  } : null].filter(Boolean);
368
+ if (tab === EXTERNAL) {
369
+ // eslint-disable-next-line no-return-assign
370
+ actions = actions.filter(x => x.onlyInMenu);
371
+ }
365
372
  if (variant === 'menu') {
366
373
  return /*#__PURE__*/_jsxs(Div, {
367
374
  "data-cy": "blocklet-actions",
@@ -17,7 +17,7 @@ import { useReactive } from 'ahooks';
17
17
  import { Icon } from '@iconify/react';
18
18
  import { USER_TYPE } from '@abtnode/constant';
19
19
  import { LOGIN_PROVIDER, PROVIDER_NAME, TeamEvents } from '@blocklet/constant';
20
- import { Button } from '@mui/material';
20
+ import { Button, Tooltip } from '@mui/material';
21
21
  import Tag from '../../tag';
22
22
  import DidAddress from '../../did-address';
23
23
  import Permission from '../../permission';
@@ -315,11 +315,16 @@ export default function Member({
315
315
  display: 'flex',
316
316
  flexDirection: 'row',
317
317
  alignItems: 'center',
318
- justifyContent: 'space-between'
318
+ justifyContent: 'space-between',
319
+ overflow: 'hidden'
319
320
  },
320
321
  children: [/*#__PURE__*/_jsxs(Box, {
321
- display: "flex",
322
- alignItems: "center",
322
+ sx: {
323
+ display: 'flex',
324
+ alignItems: 'center',
325
+ width: '100%',
326
+ overflow: 'hidden'
327
+ },
323
328
  className: "info",
324
329
  children: [/*#__PURE__*/_jsx(Avatar, {
325
330
  src: pageState.user.avatar,
@@ -330,12 +335,26 @@ export default function Member({
330
335
  marginRight: 16
331
336
  }
332
337
  }), /*#__PURE__*/_jsxs(Box, {
333
- children: [/*#__PURE__*/_jsx(Box, {
334
- className: "name",
335
- children: pageState.user.fullName
338
+ sx: {
339
+ flex: 1,
340
+ overflow: 'hidden'
341
+ },
342
+ children: [/*#__PURE__*/_jsx(Tooltip, {
343
+ title: pageState.user.fullName,
344
+ children: /*#__PURE__*/_jsx(Box, {
345
+ className: "name",
346
+ sx: {
347
+ flex: 1,
348
+ overflow: 'hidden',
349
+ textOverflow: 'ellipsis'
350
+ },
351
+ children: pageState.user.fullName
352
+ })
336
353
  }), /*#__PURE__*/_jsx(Box, {
337
354
  className: "did",
338
- mt: 1,
355
+ sx: {
356
+ mt: 1
357
+ },
339
358
  children: /*#__PURE__*/_jsx(DidAddress, {
340
359
  compact: true,
341
360
  responsive: false,
@@ -344,10 +363,14 @@ export default function Member({
344
363
  })
345
364
  })]
346
365
  })]
347
- }), !!inService && /*#__PURE__*/_jsx("a", {
366
+ }), !!inService && /*#__PURE__*/_jsx(Box, {
348
367
  href: profileUrl,
349
368
  target: "_blank",
350
369
  rel: "noreferrer",
370
+ component: "a",
371
+ sx: {
372
+ flexShrink: 0
373
+ },
351
374
  children: /*#__PURE__*/_jsxs(Button, {
352
375
  variant: "contained",
353
376
  color: "primary",
@@ -36,11 +36,11 @@ export default function ToggleUserApproval({
36
36
  const [loading, setLoading] = useState(false);
37
37
  const [show, setShow] = useState(false);
38
38
  const open = () => setShow(true);
39
- const updateUserApproval = async d => {
39
+ const updateUserApproval = async _user => {
40
40
  const {
41
41
  did,
42
42
  approved
43
- } = d;
43
+ } = _user;
44
44
  if (loading) {
45
45
  return;
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/ux",
3
- "version": "1.16.30-beta-5d9c2c41",
3
+ "version": "1.16.30-beta-e7a90fb2",
4
4
  "description": "UX components shared across abtnode packages",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,25 +25,25 @@
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.30-beta-5d9c2c41",
29
- "@abtnode/constant": "1.16.30-beta-5d9c2c41",
30
- "@abtnode/util": "1.16.30-beta-5d9c2c41",
28
+ "@abtnode/auth": "1.16.30-beta-e7a90fb2",
29
+ "@abtnode/constant": "1.16.30-beta-e7a90fb2",
30
+ "@abtnode/util": "1.16.30-beta-e7a90fb2",
31
31
  "@ahooksjs/use-url-state": "^3.5.1",
32
- "@arcblock/did": "^1.18.130",
33
- "@arcblock/did-connect": "^2.10.21",
32
+ "@arcblock/did": "^1.18.132",
33
+ "@arcblock/did-connect": "^2.10.22",
34
34
  "@arcblock/did-motif": "^1.1.13",
35
- "@arcblock/icons": "^2.10.21",
36
- "@arcblock/nft-display": "2.10.21",
37
- "@arcblock/react-hooks": "^2.10.21",
38
- "@arcblock/terminal": "^2.10.21",
39
- "@arcblock/ux": "^2.10.21",
40
- "@blocklet/constant": "1.16.30-beta-5d9c2c41",
41
- "@blocklet/js-sdk": "1.16.30-beta-5d9c2c41",
42
- "@blocklet/launcher-layout": "2.10.21",
35
+ "@arcblock/icons": "^2.10.22",
36
+ "@arcblock/nft-display": "2.10.22",
37
+ "@arcblock/react-hooks": "^2.10.22",
38
+ "@arcblock/terminal": "^2.10.22",
39
+ "@arcblock/ux": "^2.10.22",
40
+ "@blocklet/constant": "1.16.30-beta-e7a90fb2",
41
+ "@blocklet/js-sdk": "1.16.30-beta-e7a90fb2",
42
+ "@blocklet/launcher-layout": "2.10.22",
43
43
  "@blocklet/list": "^0.13.18",
44
- "@blocklet/meta": "1.16.30-beta-5d9c2c41",
45
- "@blocklet/ui-react": "^2.10.21",
46
- "@blocklet/uploader": "0.1.21",
44
+ "@blocklet/meta": "1.16.30-beta-e7a90fb2",
45
+ "@blocklet/ui-react": "^2.10.22",
46
+ "@blocklet/uploader": "0.1.23",
47
47
  "@emotion/react": "^11.10.4",
48
48
  "@emotion/styled": "^11.10.4",
49
49
  "@iconify-icons/logos": "^1.2.36",
@@ -56,7 +56,7 @@
56
56
  "@mui/styles": "^5.15.11",
57
57
  "@mui/x-date-pickers": "^6.19.0",
58
58
  "@mui/x-tree-view": "^6.17.0",
59
- "@ocap/client": "1.18.130",
59
+ "@ocap/client": "1.18.132",
60
60
  "@uiw/react-markdown-preview": "^5.1.1",
61
61
  "ahooks": "^3.7.8",
62
62
  "axios": "^1.7.2",
@@ -108,5 +108,5 @@
108
108
  "jest": "^29.7.0",
109
109
  "jest-environment-jsdom": "^29.7.0"
110
110
  },
111
- "gitHead": "d9227f08e11c1d82969880b30b2a2e3639e88def"
111
+ "gitHead": "c97ba97d694f553afc9f5336c9f3ddfae73cf955"
112
112
  }