@abtnode/ux 1.16.43 → 1.16.44-beta-20250513-030435-c2d99062
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/access-key/component.js +2 -1
- package/lib/blocklet/access-key/detail.js +11 -3
- package/lib/blocklet/access-key/index.js +1 -0
- package/lib/blocklet/audit-log-cell.js +15 -3
- package/lib/blocklet/component/component-info-dialog.js +16 -4
- package/lib/blocklet/notification-records/index.js +40 -1
- package/lib/blocklet/notification-records/notification.js +3 -2
- package/lib/blocklet/oauth/detail.js +11 -4
- package/lib/blocklet/overview.js +7 -2
- package/lib/team/members/member.js +14 -6
- package/lib/team/members/passports.js +36 -23
- package/lib/team/passports/new/detail.js +16 -3
- package/package.json +19 -19
|
@@ -10,6 +10,7 @@ import Typography from '@mui/material/Typography';
|
|
|
10
10
|
import Stack from '@mui/material/Stack';
|
|
11
11
|
import UserCard from '@arcblock/ux/lib/UserCard';
|
|
12
12
|
import { CardType, InfoType } from '@arcblock/ux/lib/UserCard/types';
|
|
13
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
13
14
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
14
15
|
import { useRequest } from 'ahooks';
|
|
15
16
|
import { getDisplayName } from '@blocklet/meta/lib/util';
|
|
@@ -18,7 +19,6 @@ import BlockletBundleAvatar from '../bundle-avatar';
|
|
|
18
19
|
import { parseAvatar } from '../../team/members/util';
|
|
19
20
|
import DidAddress from '../../did-address';
|
|
20
21
|
import { renderRole } from '../../team/passports/new/passport-item';
|
|
21
|
-
import { formatToDatetime } from '../../util';
|
|
22
22
|
import { useTeamContext } from '../../contexts/team';
|
|
23
23
|
import { useNodeContext } from '../../contexts/node';
|
|
24
24
|
import { useBlockletContext } from '../../contexts/blocklet';
|
|
@@ -150,10 +150,18 @@ function BaseInfo({
|
|
|
150
150
|
title: t('common.timeInfo'),
|
|
151
151
|
items: [{
|
|
152
152
|
label: t('common.createdAt'),
|
|
153
|
-
content: accessKey.createdAt ?
|
|
153
|
+
content: accessKey.createdAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
154
|
+
value: accessKey.createdAt,
|
|
155
|
+
type: "all",
|
|
156
|
+
locale: locale
|
|
157
|
+
}) : '-'
|
|
154
158
|
}, {
|
|
155
159
|
label: t('common.lastUsedAt'),
|
|
156
|
-
content: accessKey.lastUsedAt ?
|
|
160
|
+
content: accessKey.lastUsedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
161
|
+
value: accessKey.lastUsedAt,
|
|
162
|
+
type: "all",
|
|
163
|
+
locale: locale
|
|
164
|
+
}) : '-'
|
|
157
165
|
}, {
|
|
158
166
|
label: t('common.expiredAt'),
|
|
159
167
|
content: accessKey.expireAt ? /*#__PURE__*/_jsx(ExpiredAt, {
|
|
@@ -3,6 +3,7 @@ import { useMemo, useState, useRef, useEffect } from 'react';
|
|
|
3
3
|
import { Link } from 'react-router-dom';
|
|
4
4
|
import MarkdownPreview from '@uiw/react-markdown-preview';
|
|
5
5
|
import rehypeExternalLinks from 'rehype-external-links';
|
|
6
|
+
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
7
|
import Box from '@mui/material/Box';
|
|
7
8
|
import Typography from '@mui/material/Typography';
|
|
8
9
|
import { Avatar, IconButton, Tooltip, useTheme } from '@mui/material';
|
|
@@ -12,7 +13,7 @@ import CloseFullscreenIcon from '@mui/icons-material/CloseFullscreen';
|
|
|
12
13
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
13
14
|
import debounce from 'lodash/debounce';
|
|
14
15
|
import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
15
|
-
import RelativeTime from '
|
|
16
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
16
17
|
import ShortenLabel from './component/shorten-label';
|
|
17
18
|
import extractMarkdownLinks from '../util/extract-markdown-links';
|
|
18
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -46,6 +47,9 @@ export default function AuditLogCell({
|
|
|
46
47
|
avatarUrl,
|
|
47
48
|
inService
|
|
48
49
|
}) {
|
|
50
|
+
const {
|
|
51
|
+
locale
|
|
52
|
+
} = useLocaleContext();
|
|
49
53
|
const {
|
|
50
54
|
palette
|
|
51
55
|
} = useTheme();
|
|
@@ -187,9 +191,17 @@ export default function AuditLogCell({
|
|
|
187
191
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
188
192
|
component: "span",
|
|
189
193
|
color: "textSecondary",
|
|
190
|
-
fontSize: 13,
|
|
191
194
|
children: /*#__PURE__*/_jsx(RelativeTime, {
|
|
192
|
-
value: createdAt
|
|
195
|
+
value: createdAt,
|
|
196
|
+
locale: locale,
|
|
197
|
+
type: "all",
|
|
198
|
+
showUTCPrefix: false,
|
|
199
|
+
sx: {
|
|
200
|
+
fontSize: 12,
|
|
201
|
+
'& > span:nth-last-child(-n+2)': {
|
|
202
|
+
display: 'none'
|
|
203
|
+
}
|
|
204
|
+
}
|
|
193
205
|
})
|
|
194
206
|
})]
|
|
195
207
|
}), /*#__PURE__*/_jsx(Box, {
|
|
@@ -8,9 +8,9 @@ import Dialog from '@arcblock/ux/lib/Dialog';
|
|
|
8
8
|
import { getDisplayName, hasStartEngine } from '@blocklet/meta/lib/util';
|
|
9
9
|
import { formatPerson } from '@blocklet/meta/lib/fix';
|
|
10
10
|
import ExternalLink from '@mui/material/Link';
|
|
11
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
11
12
|
import { useDeletingBlockletContext } from '../../contexts/deleting-blocklets';
|
|
12
13
|
import Tag from '../../tag';
|
|
13
|
-
import { formatToDatetime } from '../../util';
|
|
14
14
|
import DidAddress from '../../did-address';
|
|
15
15
|
import BlockletSource from '../blocklet-source';
|
|
16
16
|
import BlockletStatus from '../status';
|
|
@@ -151,13 +151,25 @@ export default function ComponentInfoDialog({
|
|
|
151
151
|
})
|
|
152
152
|
}, blocklet.status === 'running' ? {
|
|
153
153
|
name: t('blocklet.startedAt'),
|
|
154
|
-
value:
|
|
154
|
+
value: blocklet.startedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
155
|
+
value: blocklet.startedAt,
|
|
156
|
+
type: "all",
|
|
157
|
+
locale: locale
|
|
158
|
+
}) : '-'
|
|
155
159
|
} : null, blocklet.status !== 'running' ? {
|
|
156
160
|
name: t('blocklet.stoppedAt'),
|
|
157
|
-
value:
|
|
161
|
+
value: blocklet.stoppedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
162
|
+
value: blocklet.stoppedAt,
|
|
163
|
+
type: "all",
|
|
164
|
+
locale: locale
|
|
165
|
+
}) : '-'
|
|
158
166
|
} : null, blocklet.installedAt ? {
|
|
159
167
|
name: t('blocklet.installedAt'),
|
|
160
|
-
value:
|
|
168
|
+
value: blocklet.installedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
169
|
+
value: blocklet.installedAt,
|
|
170
|
+
type: "all",
|
|
171
|
+
locale: locale
|
|
172
|
+
}) : '-'
|
|
161
173
|
} : null, hasStartEngine(blocklet.meta) ? {
|
|
162
174
|
name: t('common.mountPoint'),
|
|
163
175
|
value: mountPoint
|
|
@@ -17,6 +17,11 @@ import { useCreation } from 'ahooks';
|
|
|
17
17
|
import PropTypes from 'prop-types';
|
|
18
18
|
import Avatar from '@arcblock/did-connect/lib/Avatar';
|
|
19
19
|
import AvatarGroup from '@mui/material/AvatarGroup';
|
|
20
|
+
import Typography from '@mui/material/Typography';
|
|
21
|
+
import IconButton from '@mui/material/IconButton';
|
|
22
|
+
import SettingsIcon from '@mui/icons-material/Settings';
|
|
23
|
+
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
24
|
+
import NotificationSettings from '../notification';
|
|
20
25
|
import { NotificationRecordsProvider, useNotificationRecordsContext } from '../../contexts/notification-records';
|
|
21
26
|
import ShortenLabel from '../component/shorten-label';
|
|
22
27
|
import Notification from './notification';
|
|
@@ -33,6 +38,7 @@ import FilterChip from './table/filter-chip';
|
|
|
33
38
|
import SeverityFilter from './table/severity-filter';
|
|
34
39
|
import { parseAvatar } from '../../team/members/util';
|
|
35
40
|
import NotificationStatistics from './statistics';
|
|
41
|
+
import useMobile from '../../hooks/use-mobile';
|
|
36
42
|
|
|
37
43
|
// eslint-disable-next-line react/prop-types
|
|
38
44
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -57,6 +63,8 @@ function NotificationRecords({
|
|
|
57
63
|
const datatableRef = useRef(null);
|
|
58
64
|
const [notificationDialog, setNotificationDialog] = useState(null);
|
|
59
65
|
const [openTab, setOpenTab] = useState('info');
|
|
66
|
+
const isMobile = useMobile();
|
|
67
|
+
const [open, setOpen] = useState(false);
|
|
60
68
|
const durableKey = `notification-records-${blocklet.meta?.did}`;
|
|
61
69
|
const tableDurableData = getDurableData(durableKey);
|
|
62
70
|
const [search, setSearch] = useState({
|
|
@@ -429,7 +437,20 @@ function NotificationRecords({
|
|
|
429
437
|
page: 1
|
|
430
438
|
}));
|
|
431
439
|
};
|
|
432
|
-
const customButtons = [
|
|
440
|
+
const customButtons = [/*#__PURE__*/_jsxs(Box, {
|
|
441
|
+
display: "flex",
|
|
442
|
+
alignItems: "center",
|
|
443
|
+
gap: 1.5,
|
|
444
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
445
|
+
onClick: () => setOpen(true),
|
|
446
|
+
sx: {
|
|
447
|
+
p: isMobile ? 0 : undefined
|
|
448
|
+
},
|
|
449
|
+
children: /*#__PURE__*/_jsx(SettingsIcon, {})
|
|
450
|
+
}, "settings"), isMobile ? /*#__PURE__*/_jsx(Typography, {
|
|
451
|
+
children: t('common.setting')
|
|
452
|
+
}) : null]
|
|
453
|
+
}), ...(customTableButtons || [])];
|
|
433
454
|
return /*#__PURE__*/_jsxs(Box, {
|
|
434
455
|
ref: datatableRef,
|
|
435
456
|
sx: {
|
|
@@ -496,6 +517,24 @@ function NotificationRecords({
|
|
|
496
517
|
notification: notificationDialog,
|
|
497
518
|
blocklet: blocklet,
|
|
498
519
|
tab: openTab
|
|
520
|
+
}), /*#__PURE__*/_jsx(Dialog, {
|
|
521
|
+
title: `${t('common.notification')} ${t('common.setting')}`,
|
|
522
|
+
fullWidth: true,
|
|
523
|
+
maxWidth: "md",
|
|
524
|
+
open: open,
|
|
525
|
+
onClose: () => setOpen(false),
|
|
526
|
+
PaperProps: {
|
|
527
|
+
style: {
|
|
528
|
+
minHeight: '500px'
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
532
|
+
sx: {
|
|
533
|
+
mt: '-16px',
|
|
534
|
+
overflowY: 'hidden'
|
|
535
|
+
},
|
|
536
|
+
children: /*#__PURE__*/_jsx(NotificationSettings, {})
|
|
537
|
+
})
|
|
499
538
|
})]
|
|
500
539
|
});
|
|
501
540
|
}
|
|
@@ -12,11 +12,11 @@ import colors from '@arcblock/ux/lib/Colors/themes/default';
|
|
|
12
12
|
import InfoRow from '@arcblock/ux/lib/InfoRow';
|
|
13
13
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
14
14
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
15
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
15
16
|
import ShortenLabel from '../component/shorten-label';
|
|
16
17
|
import { SendComponentAvatar } from '../../notifications/pages/list';
|
|
17
18
|
import NotificationContent from '../../notifications/pages/content';
|
|
18
19
|
import { useNotificationRecordsContext } from '../../contexts/notification-records';
|
|
19
|
-
import RelativeTime from '../../relative-time';
|
|
20
20
|
import NotificationSeverity from './severity';
|
|
21
21
|
import Receivers from './receivers';
|
|
22
22
|
import Statistics from './statistics';
|
|
@@ -145,7 +145,8 @@ function Notification({
|
|
|
145
145
|
value: /*#__PURE__*/_jsx(RelativeTime, {
|
|
146
146
|
value: notification.createdAt,
|
|
147
147
|
locale: locale,
|
|
148
|
-
shouldUpdate: true
|
|
148
|
+
shouldUpdate: true,
|
|
149
|
+
type: "all"
|
|
149
150
|
})
|
|
150
151
|
}];
|
|
151
152
|
return rows.map(row => /*#__PURE__*/_jsx(InfoRow, {
|
|
@@ -67,7 +67,8 @@ export default function OauthClientDetail({
|
|
|
67
67
|
onClose
|
|
68
68
|
}) {
|
|
69
69
|
const {
|
|
70
|
-
t
|
|
70
|
+
t,
|
|
71
|
+
locale
|
|
71
72
|
} = useLocaleContext();
|
|
72
73
|
const {
|
|
73
74
|
teamDid
|
|
@@ -221,17 +222,23 @@ export default function OauthClientDetail({
|
|
|
221
222
|
items: [{
|
|
222
223
|
label: t('oauth.client.clientIdIssuedAt'),
|
|
223
224
|
value: clientIdIssuedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
224
|
-
value: clientIdIssuedAt * 1000
|
|
225
|
+
value: clientIdIssuedAt * 1000,
|
|
226
|
+
type: "all",
|
|
227
|
+
locale: locale
|
|
225
228
|
}) : '-'
|
|
226
229
|
}, {
|
|
227
230
|
label: t('oauth.client.clientSecretExpiresAt'),
|
|
228
231
|
value: clientSecretExpiresAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
229
|
-
value: clientSecretExpiresAt * 1000
|
|
232
|
+
value: clientSecretExpiresAt * 1000,
|
|
233
|
+
type: "all",
|
|
234
|
+
locale: locale
|
|
230
235
|
}) : '-'
|
|
231
236
|
}, {
|
|
232
237
|
label: t('common.updatedAt'),
|
|
233
238
|
value: updatedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
234
|
-
value: updatedAt
|
|
239
|
+
value: updatedAt,
|
|
240
|
+
type: "all",
|
|
241
|
+
locale: locale
|
|
235
242
|
}) : '-'
|
|
236
243
|
}]
|
|
237
244
|
}].filter(Boolean);
|
package/lib/blocklet/overview.js
CHANGED
|
@@ -25,13 +25,14 @@ import Tag from '@arcblock/ux/lib/Tag';
|
|
|
25
25
|
import Grid from '@mui/material/Grid';
|
|
26
26
|
import useAsyncRetry from 'react-use/lib/useAsyncRetry';
|
|
27
27
|
import { joinURL } from 'ufo';
|
|
28
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
28
29
|
import { useBlockletContext } from '../contexts/blocklet';
|
|
29
30
|
import { useNodeContext } from '../contexts/node';
|
|
30
31
|
import { useTeamContext } from '../contexts/team';
|
|
31
32
|
import DidAddress from '../did-address';
|
|
32
33
|
import VaultStatus from './vault/status';
|
|
33
34
|
import Metric from '../component/metric';
|
|
34
|
-
import {
|
|
35
|
+
import { getExplorerLink } from '../util';
|
|
35
36
|
import { isServerless } from './util';
|
|
36
37
|
import { getSpaceBackupEndpoint } from '../util/spaces';
|
|
37
38
|
import { useUpTime } from './uptime';
|
|
@@ -326,7 +327,11 @@ export default function BlockletOverview() {
|
|
|
326
327
|
})
|
|
327
328
|
} : null, {
|
|
328
329
|
name: t('blocklet.installedAt'),
|
|
329
|
-
value:
|
|
330
|
+
value: blocklet.installedAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
331
|
+
value: blocklet.installedAt,
|
|
332
|
+
type: "all",
|
|
333
|
+
locale: locale
|
|
334
|
+
}) : '-'
|
|
330
335
|
}, {
|
|
331
336
|
name: t('blocklet.config.walletType.name'),
|
|
332
337
|
value: WalletType[chainType || 'arcblock'] || chainType
|
|
@@ -21,12 +21,13 @@ import { Icon } from '@iconify/react';
|
|
|
21
21
|
import { USER_TYPE } from '@abtnode/constant';
|
|
22
22
|
import { PROVIDER_NAME, TeamEvents } from '@blocklet/constant';
|
|
23
23
|
import { Button } from '@mui/material';
|
|
24
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
24
25
|
import Tag from '../../tag';
|
|
25
26
|
import DidAddress from '../../did-address';
|
|
26
27
|
import Permission from '../../permission';
|
|
27
28
|
import { useNodeContext } from '../../contexts/node';
|
|
28
29
|
import { useTeamContext } from '../../contexts/team';
|
|
29
|
-
import { formatError,
|
|
30
|
+
import { formatError, BlockletAdminRoles } from '../../util';
|
|
30
31
|
import PassportIssuances from './passport-issuances';
|
|
31
32
|
import Passports from './passports';
|
|
32
33
|
import ToggleAccess from './toggle-access';
|
|
@@ -35,7 +36,6 @@ import { parseAvatar } from './util';
|
|
|
35
36
|
import blockletSdk from '../../util/sdk';
|
|
36
37
|
import UserConnections from './connections';
|
|
37
38
|
import { useSessionContext } from '../../contexts/session';
|
|
38
|
-
|
|
39
39
|
// eslint-disable-next-line react/prop-types
|
|
40
40
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
41
41
|
function VerifiedInfo({
|
|
@@ -195,15 +195,23 @@ export default function Member({
|
|
|
195
195
|
}, {
|
|
196
196
|
name: t('team.member.allowAccess'),
|
|
197
197
|
value: pageState.user.approved ? t('common.yes') : t('common.no')
|
|
198
|
+
}, {
|
|
199
|
+
name: t('common.createdAt'),
|
|
200
|
+
value: pageState.user.createdAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
201
|
+
value: pageState.user.createdAt,
|
|
202
|
+
type: "all",
|
|
203
|
+
locale: locale
|
|
204
|
+
}) : '-'
|
|
198
205
|
}, {
|
|
199
206
|
name: t('team.member.lastLogin'),
|
|
200
|
-
value:
|
|
207
|
+
value: pageState.user.lastLoginAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
208
|
+
value: pageState.user.lastLoginAt,
|
|
209
|
+
type: "all",
|
|
210
|
+
locale: locale
|
|
211
|
+
}) : '-'
|
|
201
212
|
}, {
|
|
202
213
|
name: t('team.member.lastLoginIp'),
|
|
203
214
|
value: pageState.user.lastLoginIp || ''
|
|
204
|
-
}, {
|
|
205
|
-
name: t('common.createdAt'),
|
|
206
|
-
value: formatToDatetime(pageState.user.createdAt, locale)
|
|
207
215
|
}, {
|
|
208
216
|
name: t('common.remark'),
|
|
209
217
|
value: pageState.user.remark || '-'
|
|
@@ -173,6 +173,41 @@ export default function Passports({
|
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
175
|
const filteredPassports = passports.filter(x => !search || x.title.includes(search) || x.name.includes(search));
|
|
176
|
+
const renderAction = (can, x) => {
|
|
177
|
+
if (x.status === PASSPORT_STATUS.EXPIRED) {
|
|
178
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
179
|
+
variant: "outlined",
|
|
180
|
+
disabled: true,
|
|
181
|
+
children: t('common.expired')
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (revokeInfo(can, x).revokable) {
|
|
185
|
+
return /*#__PURE__*/_jsxs(Button, {
|
|
186
|
+
variant: "outlined",
|
|
187
|
+
color: x.revoked ? 'primary' : 'secondary',
|
|
188
|
+
onClick: () => confirmToggle(x),
|
|
189
|
+
children: [x.revoked ? /*#__PURE__*/_jsx(AddIcon, {
|
|
190
|
+
style: {
|
|
191
|
+
fontSize: 16,
|
|
192
|
+
marginRight: 4
|
|
193
|
+
}
|
|
194
|
+
}) : /*#__PURE__*/_jsx(RevokeIcon, {
|
|
195
|
+
style: {
|
|
196
|
+
height: 16,
|
|
197
|
+
marginRight: 4
|
|
198
|
+
}
|
|
199
|
+
}), x.revoked ? t('common.enable') : t('common.revoke')]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
203
|
+
title: revokeInfo(can, x).message,
|
|
204
|
+
children: /*#__PURE__*/_jsx(ErrorOutlineIcon, {
|
|
205
|
+
style: {
|
|
206
|
+
color: theme.palette.grey[600]
|
|
207
|
+
}
|
|
208
|
+
})
|
|
209
|
+
});
|
|
210
|
+
};
|
|
176
211
|
return /*#__PURE__*/_jsxs(Div, {
|
|
177
212
|
children: [/*#__PURE__*/_jsxs(ListHeader, {
|
|
178
213
|
children: [/*#__PURE__*/_jsx("div", {
|
|
@@ -236,29 +271,7 @@ export default function Passports({
|
|
|
236
271
|
})]
|
|
237
272
|
})
|
|
238
273
|
}), /*#__PURE__*/_jsx(Box, {
|
|
239
|
-
children:
|
|
240
|
-
variant: "outlined",
|
|
241
|
-
color: x.revoked ? 'primary' : 'secondary',
|
|
242
|
-
onClick: () => confirmToggle(x),
|
|
243
|
-
children: [x.revoked ? /*#__PURE__*/_jsx(AddIcon, {
|
|
244
|
-
style: {
|
|
245
|
-
fontSize: 16,
|
|
246
|
-
marginRight: 4
|
|
247
|
-
}
|
|
248
|
-
}) : /*#__PURE__*/_jsx(RevokeIcon, {
|
|
249
|
-
style: {
|
|
250
|
-
height: 16,
|
|
251
|
-
marginRight: 4
|
|
252
|
-
}
|
|
253
|
-
}), x.revoked ? t('common.enable') : t('common.revoke')]
|
|
254
|
-
}) : /*#__PURE__*/_jsx(Tooltip, {
|
|
255
|
-
title: revokeInfo(can, x).message,
|
|
256
|
-
children: /*#__PURE__*/_jsx(ErrorOutlineIcon, {
|
|
257
|
-
style: {
|
|
258
|
-
color: theme.palette.grey[600]
|
|
259
|
-
}
|
|
260
|
-
})
|
|
261
|
-
})
|
|
274
|
+
children: renderAction(can, x)
|
|
262
275
|
})]
|
|
263
276
|
})
|
|
264
277
|
}, x.id)), !filteredPassports.length && /*#__PURE__*/_jsx(Empty, {
|
|
@@ -19,6 +19,7 @@ import Alert from '@mui/material/Alert';
|
|
|
19
19
|
import Divider from '@mui/material/Divider';
|
|
20
20
|
import dayjs from '@abtnode/util/lib/dayjs';
|
|
21
21
|
import { PASSPORT_LOG_ACTION, PASSPORT_ISSUE_ACTION } from '@abtnode/constant';
|
|
22
|
+
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
22
23
|
import DidAddress from '../../../did-address';
|
|
23
24
|
import { useTeamContext } from '../../../contexts/team';
|
|
24
25
|
import { useNodeContext } from '../../../contexts/node';
|
|
@@ -185,13 +186,25 @@ function BaseInfo({
|
|
|
185
186
|
title: t('common.timeInfo'),
|
|
186
187
|
items: [{
|
|
187
188
|
label: t('team.passport.issuanceTime'),
|
|
188
|
-
content: passport.issuanceDate ?
|
|
189
|
+
content: passport.issuanceDate ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
190
|
+
value: passport.issuanceDate,
|
|
191
|
+
type: "all",
|
|
192
|
+
locale: locale
|
|
193
|
+
}) : '-'
|
|
189
194
|
}, {
|
|
190
195
|
label: t('team.member.lastLogin'),
|
|
191
|
-
content: passport.lastLoginAt ?
|
|
196
|
+
content: passport.lastLoginAt ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
197
|
+
value: passport.lastLoginAt,
|
|
198
|
+
type: "all",
|
|
199
|
+
locale: locale
|
|
200
|
+
}) : '-'
|
|
192
201
|
}, {
|
|
193
202
|
label: t('common.expires'),
|
|
194
|
-
content: passport.expirationDate ?
|
|
203
|
+
content: passport.expirationDate ? /*#__PURE__*/_jsx(RelativeTime, {
|
|
204
|
+
value: passport.expirationDate,
|
|
205
|
+
type: "all",
|
|
206
|
+
locale: locale
|
|
207
|
+
}) : '-'
|
|
195
208
|
}]
|
|
196
209
|
}, {
|
|
197
210
|
title: t('blocklet.overview.source'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.44-beta-20250513-030435-c2d99062",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,31 +25,31 @@
|
|
|
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/docker-utils": "1.16.
|
|
31
|
-
"@abtnode/util": "1.16.
|
|
28
|
+
"@abtnode/auth": "1.16.44-beta-20250513-030435-c2d99062",
|
|
29
|
+
"@abtnode/constant": "1.16.44-beta-20250513-030435-c2d99062",
|
|
30
|
+
"@abtnode/docker-utils": "1.16.44-beta-20250513-030435-c2d99062",
|
|
31
|
+
"@abtnode/util": "1.16.44-beta-20250513-030435-c2d99062",
|
|
32
32
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
33
33
|
"@arcblock/did": "1.20.8",
|
|
34
|
-
"@arcblock/did-connect": "^2.13.
|
|
34
|
+
"@arcblock/did-connect": "^2.13.29",
|
|
35
35
|
"@arcblock/did-ext": "^1.20.8",
|
|
36
36
|
"@arcblock/did-motif": "^1.1.13",
|
|
37
|
-
"@arcblock/icons": "^2.13.
|
|
38
|
-
"@arcblock/nft-display": "^2.13.
|
|
39
|
-
"@arcblock/react-hooks": "^2.13.
|
|
40
|
-
"@arcblock/terminal": "^2.13.
|
|
41
|
-
"@arcblock/ux": "^2.13.
|
|
37
|
+
"@arcblock/icons": "^2.13.29",
|
|
38
|
+
"@arcblock/nft-display": "^2.13.29",
|
|
39
|
+
"@arcblock/react-hooks": "^2.13.29",
|
|
40
|
+
"@arcblock/terminal": "^2.13.29",
|
|
41
|
+
"@arcblock/ux": "^2.13.29",
|
|
42
42
|
"@arcblock/validator": "1.20.8",
|
|
43
|
-
"@blocklet/constant": "1.16.
|
|
43
|
+
"@blocklet/constant": "1.16.44-beta-20250513-030435-c2d99062",
|
|
44
44
|
"@blocklet/did-domain-react": "^0.3.117",
|
|
45
45
|
"@blocklet/did-space-react": "^1.0.51",
|
|
46
|
-
"@blocklet/js-sdk": "1.16.
|
|
47
|
-
"@blocklet/launcher-layout": "^2.13.
|
|
46
|
+
"@blocklet/js-sdk": "1.16.44-beta-20250513-030435-c2d99062",
|
|
47
|
+
"@blocklet/launcher-layout": "^2.13.29",
|
|
48
48
|
"@blocklet/list": "^0.16.48",
|
|
49
|
-
"@blocklet/meta": "1.16.
|
|
50
|
-
"@blocklet/theme": "^2.13.
|
|
51
|
-
"@blocklet/ui-react": "^2.13.
|
|
52
|
-
"@blocklet/uploader": "^0.1.
|
|
49
|
+
"@blocklet/meta": "1.16.44-beta-20250513-030435-c2d99062",
|
|
50
|
+
"@blocklet/theme": "^2.13.29",
|
|
51
|
+
"@blocklet/ui-react": "^2.13.29",
|
|
52
|
+
"@blocklet/uploader": "^0.1.90",
|
|
53
53
|
"@emotion/react": "^11.10.4",
|
|
54
54
|
"@emotion/styled": "^11.10.4",
|
|
55
55
|
"@iconify-icons/logos": "^1.2.36",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"jest": "^29.7.0",
|
|
128
128
|
"jest-environment-jsdom": "^29.7.0"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "c3a3efef44ccf08705abb47875edba6169e76faa"
|
|
131
131
|
}
|