@abtnode/ux 1.16.41 → 1.16.42-beta-20250402-131159-7647e64d
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/appearance.js +27 -9
- package/lib/blocklet/component/add-component/step-connect.js +3 -1
- package/lib/blocklet/component/component-cell-mount-poin.js +1 -1
- package/lib/blocklet/component/index.js +0 -1
- package/lib/blocklet/component/store-blocklet-list.js +2 -10
- package/lib/exchange-passport.js +4 -1
- package/lib/invitation/invitation.js +3 -2
- package/lib/issue-passport.js +4 -1
- package/lib/locales/ar.js +7 -3
- package/lib/locales/de.js +7 -3
- package/lib/locales/en.js +6 -2
- package/lib/locales/es.js +7 -3
- package/lib/locales/fr.js +7 -3
- package/lib/locales/hi.js +7 -3
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +7 -3
- package/lib/locales/ja.js +7 -3
- package/lib/locales/ko.js +7 -3
- package/lib/locales/pt.js +7 -3
- package/lib/locales/ru.js +7 -3
- package/lib/locales/th.js +7 -3
- package/lib/locales/vi.js +7 -3
- package/lib/locales/zh-tw.js +6 -2
- package/lib/locales/zh.js +7 -3
- package/lib/notifications/notification.js +1 -0
- package/lib/notifications/pages/activity/index.js +2 -0
- package/lib/notifications/pages/activity/use-title.js +24 -5
- package/lib/notifications/pages/avatars/actor.js +18 -10
- package/lib/notifications/pages/empty.js +65 -0
- package/lib/notifications/pages/filter.js +6 -5
- package/lib/notifications/pages/list.js +6 -5
- package/package.json +23 -23
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import Iframe from 'react-iframe';
|
|
2
2
|
import { joinURL } from 'ufo';
|
|
3
3
|
import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { CircularProgress, Box } from '@mui/material';
|
|
4
6
|
import { useNodeContext } from '../contexts/node';
|
|
5
7
|
import { useBlockletContext } from '../contexts/blocklet';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
9
|
export default function BlockletAppearance() {
|
|
8
10
|
const {
|
|
9
11
|
info,
|
|
@@ -12,6 +14,8 @@ export default function BlockletAppearance() {
|
|
|
12
14
|
const {
|
|
13
15
|
blocklet
|
|
14
16
|
} = useBlockletContext();
|
|
17
|
+
const height = 'calc(100vh - 430px)';
|
|
18
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
15
19
|
let pathPrefix = '';
|
|
16
20
|
if (inService) {
|
|
17
21
|
pathPrefix = WELLKNOWN_SERVICE_PATH_PREFIX;
|
|
@@ -23,13 +27,27 @@ export default function BlockletAppearance() {
|
|
|
23
27
|
urlSearchParams.set('authKey', '__sst');
|
|
24
28
|
}
|
|
25
29
|
urlSearchParams.set('schemaKey', joinURL(window.location.origin, pathPrefix, `/api/theme?id=${encodeURIComponent(blocklet.appDid)}`));
|
|
26
|
-
return /*#__PURE__*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
31
|
+
children: [isLoading && /*#__PURE__*/_jsx(Box, {
|
|
32
|
+
sx: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
height
|
|
37
|
+
},
|
|
38
|
+
children: /*#__PURE__*/_jsx(CircularProgress, {})
|
|
39
|
+
}), /*#__PURE__*/_jsx(Iframe, {
|
|
40
|
+
url: `${joinURL(window.location.origin, pathPrefix, '/hosted/theme-builder/')}?${urlSearchParams.toString()}`,
|
|
41
|
+
frameBorder: 0,
|
|
42
|
+
styles: {
|
|
43
|
+
border: 0,
|
|
44
|
+
width: '100%',
|
|
45
|
+
height,
|
|
46
|
+
display: isLoading ? 'none' : 'block'
|
|
47
|
+
},
|
|
48
|
+
onLoad: () => {
|
|
49
|
+
setIsLoading(false);
|
|
50
|
+
}
|
|
51
|
+
})]
|
|
34
52
|
});
|
|
35
53
|
}
|
|
@@ -3,7 +3,7 @@ import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
|
3
3
|
import { forwardRef, useEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import Layout from '@blocklet/launcher-layout';
|
|
5
5
|
import { useStepContext } from '@blocklet/launcher-layout/lib/context/step';
|
|
6
|
-
import { Box } from '@mui/material';
|
|
6
|
+
import { Box, useTheme } from '@mui/material';
|
|
7
7
|
import styled from '@emotion/styled';
|
|
8
8
|
import { getBlockletLogoUrl } from '../../../util';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,6 +12,7 @@ const StepContent = /*#__PURE__*/forwardRef(({
|
|
|
12
12
|
isMobile,
|
|
13
13
|
onStepChange
|
|
14
14
|
}, ref) => {
|
|
15
|
+
const theme = useTheme();
|
|
15
16
|
const {
|
|
16
17
|
steps,
|
|
17
18
|
activeStep,
|
|
@@ -57,6 +58,7 @@ const StepContent = /*#__PURE__*/forwardRef(({
|
|
|
57
58
|
baseUrl: meta.registryUrl,
|
|
58
59
|
logoPath: meta.logo
|
|
59
60
|
}) : null,
|
|
61
|
+
theme: theme,
|
|
60
62
|
stepTip: t('blocklet.component.add'),
|
|
61
63
|
children: /*#__PURE__*/_jsx(RightContent, {
|
|
62
64
|
children: typeof step?.body === 'function' ? step.body() : step?.body
|
|
@@ -5,6 +5,7 @@ import Blocklet from '@arcblock/ux/lib/BlockletV2';
|
|
|
5
5
|
import Button from '@arcblock/ux/lib/Button';
|
|
6
6
|
import { ErrorFallback } from '@arcblock/ux/lib/ErrorBoundary';
|
|
7
7
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
8
|
+
import { createTheme } from '@arcblock/ux/lib/Theme';
|
|
8
9
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
9
10
|
import InnerList from '@blocklet/list';
|
|
10
11
|
import { isFreeBlocklet } from '@blocklet/meta/lib/util';
|
|
@@ -14,7 +15,7 @@ import BasketDollar from '@iconify-icons/tabler/basket-dollar';
|
|
|
14
15
|
import BrandDocker from '@iconify-icons/tabler/brand-docker';
|
|
15
16
|
import ChevronsUp from '@iconify-icons/tabler/chevrons-up';
|
|
16
17
|
import { Icon } from '@iconify/react';
|
|
17
|
-
import { Box,
|
|
18
|
+
import { Box, ThemeProvider } from '@mui/material';
|
|
18
19
|
import PropTypes from 'prop-types';
|
|
19
20
|
import { useEffect, useState } from 'react';
|
|
20
21
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
@@ -27,14 +28,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
27
28
|
const rootStyle = getComputedStyle(document.documentElement);
|
|
28
29
|
const theme = createTheme({
|
|
29
30
|
palette: {
|
|
30
|
-
primary: {
|
|
31
|
-
main: '#1DC1C7',
|
|
32
|
-
contrastText: '#fff'
|
|
33
|
-
},
|
|
34
|
-
secondary: {
|
|
35
|
-
main: '#030712',
|
|
36
|
-
contrastText: '#fff'
|
|
37
|
-
},
|
|
38
31
|
storeSecondary: {
|
|
39
32
|
main: '#EBFEFF',
|
|
40
33
|
contrastText: '#fff'
|
|
@@ -48,7 +41,6 @@ const theme = createTheme({
|
|
|
48
41
|
}
|
|
49
42
|
},
|
|
50
43
|
typography: {
|
|
51
|
-
fontSize: 14,
|
|
52
44
|
button: {
|
|
53
45
|
textTransform: 'none'
|
|
54
46
|
},
|
package/lib/exchange-passport.js
CHANGED
|
@@ -71,6 +71,8 @@ function ExchangePassport({
|
|
|
71
71
|
height: '100%'
|
|
72
72
|
},
|
|
73
73
|
children: /*#__PURE__*/_jsx(DidConnect, {
|
|
74
|
+
popup: true,
|
|
75
|
+
open: true,
|
|
74
76
|
className: "connect",
|
|
75
77
|
action: "exchange-passport",
|
|
76
78
|
checkFn: api.get,
|
|
@@ -86,7 +88,8 @@ function ExchangePassport({
|
|
|
86
88
|
success: t('exchangePassport.dialog.success')
|
|
87
89
|
},
|
|
88
90
|
extraParams: extraParams,
|
|
89
|
-
extraContent: null
|
|
91
|
+
extraContent: null,
|
|
92
|
+
hideCloseButton: true
|
|
90
93
|
})
|
|
91
94
|
})
|
|
92
95
|
});
|
|
@@ -84,12 +84,13 @@ const Root = styled.div`
|
|
|
84
84
|
height: 80%;
|
|
85
85
|
display: flex;
|
|
86
86
|
flex-direction: column;
|
|
87
|
+
margin: auto;
|
|
88
|
+
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
|
|
87
89
|
.page-invite__card {
|
|
88
90
|
background-color: #fff;
|
|
89
|
-
border-radius:
|
|
91
|
+
border-radius: 12px;
|
|
90
92
|
flex: 1;
|
|
91
93
|
padding: 20px 30px;
|
|
92
|
-
margin-top: 10px;
|
|
93
94
|
}
|
|
94
95
|
.page-invite__app {
|
|
95
96
|
margin-top: 20px;
|
package/lib/issue-passport.js
CHANGED
|
@@ -101,6 +101,8 @@ function IssuePassport({
|
|
|
101
101
|
height: '100%'
|
|
102
102
|
},
|
|
103
103
|
children: /*#__PURE__*/_jsx(DidConnect, {
|
|
104
|
+
popup: true,
|
|
105
|
+
open: true,
|
|
104
106
|
className: "connect",
|
|
105
107
|
action: "issue-passport",
|
|
106
108
|
forceConnected: false,
|
|
@@ -118,7 +120,8 @@ function IssuePassport({
|
|
|
118
120
|
confirm: t('issuePassport.dialog.confirm'),
|
|
119
121
|
success: t('issuePassport.dialog.success')
|
|
120
122
|
},
|
|
121
|
-
extraParams: extraParams
|
|
123
|
+
extraParams: extraParams,
|
|
124
|
+
hideCloseButton: true
|
|
122
125
|
})
|
|
123
126
|
})
|
|
124
127
|
})
|
package/lib/locales/ar.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'تم التبديل بنجاح'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'اتصل',
|
|
58
58
|
scan: 'صاحب الخادم والأعضاء المعتمدون فقط هم من يمكنهم الوصول إلى لوحة التحكم.',
|
|
59
59
|
confirm: 'قم بتأكيد على محفظتك الرقمية',
|
|
60
60
|
success: 'لقد تم توصيلك بنجاح'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'تم إلغاء التحقق من الوصول',
|
|
68
68
|
description: 'تحتاج إلى تقديم جواز سفر {roles} لإجراء هذه العملية، سوف يُطلب منك التحقق مرة أخرى بعد ساعة واحدة من عدم النشاط.',
|
|
69
69
|
descriptionForDestroy: 'يجب عليك تقديم جواز سفر {roles} لإجراء هذه العملية الخطيرة لضمان السلامة.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'اتصل',
|
|
72
|
+
termsOfUse: 'شروط الاستخدام',
|
|
73
|
+
agreeTermsOfUse: 'أقر أنني قرأت ووافقت على الشروط المعمول بها'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'ادّعِ الخادم بملّكية NFT',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'تحذير',
|
|
1262
1265
|
error: 'خطأ'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'مسح'
|
|
1267
|
+
clear: 'مسح',
|
|
1268
|
+
allDone: 'انتهى'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'نطاقات وروابط',
|
package/lib/locales/de.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Erfolgreich gewechselt'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Verbinden',
|
|
58
58
|
scan: 'Nur der Serverbesitzer und genehmigte Mitglieder können auf das Dashboard zugreifen.',
|
|
59
59
|
confirm: 'Bestätige in deinem DID Wallet',
|
|
60
60
|
success: 'Du bist erfolgreich verbunden'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'Zugriffsüberprüfung abgebrochen',
|
|
68
68
|
description: 'Sie müssen {roles} Reisepass vorlegen, um diesen Vorgang durchzuführen. Sie werden nur nach 1 Stunde Inaktivität erneut um eine Bestätigung gebeten.',
|
|
69
69
|
descriptionForDestroy: 'Sie müssen einen {roles} Reisepass vorlegen, um diese gefährliche Operation durchzuführen und die Sicherheit zu gewährleisten.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Verbinden',
|
|
72
|
+
termsOfUse: 'Nutzungsbedingungen',
|
|
73
|
+
agreeTermsOfUse: 'Ich bestätige, dass ich die geltenden gelesen und akzeptiert habe'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Behauptung Server mit Ownership NFT',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Warnung',
|
|
1262
1265
|
error: 'Fehler'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Löschen'
|
|
1267
|
+
clear: 'Löschen',
|
|
1268
|
+
allDone: 'Fertig'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Domains & URLs',
|
package/lib/locales/en.js
CHANGED
|
@@ -349,6 +349,9 @@ export default {
|
|
|
349
349
|
redirectButton: 'Take me to dashboard!'
|
|
350
350
|
},
|
|
351
351
|
login: {
|
|
352
|
+
login: 'Connect',
|
|
353
|
+
termsOfUse: 'Terms of Use',
|
|
354
|
+
agreeTermsOfUse: 'I acknowledge that I have read and agree to the applicable',
|
|
352
355
|
loginTo: 'Connect to',
|
|
353
356
|
description: 'Only server owner and approved members can access the dashboard',
|
|
354
357
|
switchDid: {
|
|
@@ -364,7 +367,7 @@ export default {
|
|
|
364
367
|
success: 'Successfully switched'
|
|
365
368
|
},
|
|
366
369
|
connect: {
|
|
367
|
-
title: '
|
|
370
|
+
title: 'Connect',
|
|
368
371
|
scan: 'Only server owner and approved members can access the dashboard',
|
|
369
372
|
confirm: 'Confirm on your DID Wallet',
|
|
370
373
|
success: 'You are successfully connected'
|
|
@@ -1274,7 +1277,8 @@ export default {
|
|
|
1274
1277
|
warning: 'Warning',
|
|
1275
1278
|
error: 'Error'
|
|
1276
1279
|
},
|
|
1277
|
-
clear: 'Clear'
|
|
1280
|
+
clear: 'Clear',
|
|
1281
|
+
allDone: "You're all done"
|
|
1278
1282
|
},
|
|
1279
1283
|
router: {
|
|
1280
1284
|
routerSetting: 'Domains & URLs',
|
package/lib/locales/es.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Cambiado con éxito'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Conectar',
|
|
58
58
|
scan: 'Solo el propietario del servidor y los miembros aprobados pueden acceder al panel',
|
|
59
59
|
confirm: 'Confirma en tu billetera DID',
|
|
60
60
|
success: 'Estás conectado exitosamente'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'Verificación de acceso abortada',
|
|
68
68
|
description: 'Debe proporcionar el pasaporte de {roles} para realizar esta operación, solo se le pedirá verificar nuevamente después de 1 hora de inactividad.',
|
|
69
69
|
descriptionForDestroy: 'Necesitas proporcionar el pasaporte de {roles} para realizar esta operación peligrosa para garantizar la seguridad.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Conectar',
|
|
72
|
+
termsOfUse: 'Términos de Uso',
|
|
73
|
+
agreeTermsOfUse: 'Reconozco que he leído y acepto lo aplicable'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Reclamar servidor con NFT de propiedad',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Advertencia',
|
|
1262
1265
|
error: 'Error'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Limpiar'
|
|
1267
|
+
clear: 'Limpiar',
|
|
1268
|
+
allDone: 'Todo listo'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Dominios y URL',
|
package/lib/locales/fr.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Passage réussi'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Connecter',
|
|
58
58
|
scan: 'Seul le propriétaire du serveur et les membres approuvés peuvent accéder au tableau de bord.',
|
|
59
59
|
confirm: 'Confirmez sur votre portefeuille DID',
|
|
60
60
|
success: 'Vous êtes connecté avec succès'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: "Vérification d'accès annulée",
|
|
68
68
|
description: "Vous devez fournir le passeport {roles} pour effectuer cette opération, vous ne serez invité à vérifier à nouveau qu'après 1 heure d'inactivité.",
|
|
69
69
|
descriptionForDestroy: "Vous devez fournir un passeport {roles} pour effectuer cette opération dangereuse afin d'assurer la sécurité."
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Connecter',
|
|
72
|
+
termsOfUse: "Conditions d'utilisation",
|
|
73
|
+
agreeTermsOfUse: 'Je confirme avoir lu et accepté les conditions applicables'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Revendiquer le serveur avec la propriété NFT',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Avertissement',
|
|
1262
1265
|
error: 'Erreur'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Effacer'
|
|
1267
|
+
clear: 'Effacer',
|
|
1268
|
+
allDone: 'Terminé'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Domaines et URLs',
|
package/lib/locales/hi.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'सफलतापूर्वक स्विच किया गया'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'जुड़ें',
|
|
58
58
|
scan: 'केवल सर्वर स्वामी और अनुमोदित सदस्य ही डैशबोर्ड तक पहुँच सकते हैं।',
|
|
59
59
|
confirm: 'अपने डीआईडब्ल्यू वॉलेट पर पुष्टि करें',
|
|
60
60
|
success: 'आप सफलतापूर्वक कनेक्ट हो गए हैं'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'पहुँच सत्यापन रद्द',
|
|
68
68
|
description: 'इस ऑपरेशन को करने के लिए आपको {roles} पासपोर्ट प्रस्तुत करना होगा, और आपको केवल 1 घंटे की निष्क्रियता के बाद फिर से सत्यापन के लिए कहा जाएगा।',
|
|
69
69
|
descriptionForDestroy: 'सुरक्षा सुनिश्चित करने के लिए यह खतरनाक ऑपरेशन करने हेतु आपको {roles} पासपोर्ट प्रस्तुत करना होगा।'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'जुड़ें',
|
|
72
|
+
termsOfUse: 'प्रयोग की शर्तें',
|
|
73
|
+
agreeTermsOfUse: 'मैं यह स्वीकार करता/करती हूँ कि मैंने लागू नियमों को पढ़ लिया है और उनसे सहमत हूँ'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'स्वामित्व एनएफटी के साथ सर्वर का दावा करें',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'चेतावनी',
|
|
1262
1265
|
error: 'त्रुटि'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'साफ़ करें'
|
|
1267
|
+
clear: 'साफ़ करें',
|
|
1268
|
+
allDone: 'हो गया'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'डोमेन और यूआरएल',
|
package/lib/locales/i18n.db
CHANGED
|
Binary file
|
package/lib/locales/id.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Berhasil beralih'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Sambungkan',
|
|
58
58
|
scan: 'Hanya pemilik server dan anggota yang disetujui yang dapat mengakses dasbor',
|
|
59
59
|
confirm: 'Konfirmasi di dompet DID Anda',
|
|
60
60
|
success: 'Anda berhasil terhubung'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'Verifikasi akses dibatalkan',
|
|
68
68
|
description: 'Anda perlu memberikan paspor {roles} untuk melakukan operasi ini, Anda hanya akan diminta untuk memverifikasi lagi setelah 1 jam tidak aktif.',
|
|
69
69
|
descriptionForDestroy: 'Anda perlu menyediakan paspor {roles} untuk melakukan operasi berbahaya ini demi memastikan keselamatan.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Sambungkan',
|
|
72
|
+
termsOfUse: 'Syarat Penggunaan',
|
|
73
|
+
agreeTermsOfUse: 'Saya mengakui bahwa saya telah membaca dan menyetujui yang berlaku'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Klaim Server dengan NFT Kepemilikan',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Peringatan',
|
|
1262
1265
|
error: 'Kesalahan'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Bersihkan'
|
|
1267
|
+
clear: 'Bersihkan',
|
|
1268
|
+
allDone: 'Selesai'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Domain dan URL',
|
package/lib/locales/ja.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: '正常に切り替えられました'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: '接続',
|
|
58
58
|
scan: 'サーバー所有者と承認されたメンバーのみがダッシュボードにアクセスできます',
|
|
59
59
|
confirm: 'DIDウォレットで確認してください',
|
|
60
60
|
success: '接続に成功しました'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'アクセス検証が中止されました',
|
|
68
68
|
description: '{roles} パスポートを提供する必要があります。操作を実行するため、1 時間の非アクティビティの後に再度確認を求められます。',
|
|
69
69
|
descriptionForDestroy: '{roles} のパスポートを提供して、この危険な操作を安全に行う必要があります。'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: '接続',
|
|
72
|
+
termsOfUse: '利用規約',
|
|
73
|
+
agreeTermsOfUse: '適用する内容を読み、同意します'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: '所有権NFTを使用してサーバーを請求する',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: '警告',
|
|
1262
1265
|
error: 'エラー'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'クリア'
|
|
1267
|
+
clear: 'クリア',
|
|
1268
|
+
allDone: '完了です'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'ドメインとURL',
|
package/lib/locales/ko.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: '성공적으로 전환되었습니다'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: '연결',
|
|
58
58
|
scan: '서버 소유주와 승인된 멤버만 대시보드에 접근할 수 있습니다',
|
|
59
59
|
confirm: 'DID 지갑에서 확인하세요',
|
|
60
60
|
success: '연결이 성공적으로 되었습니다'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: '접근 인증이 중단되었습니다',
|
|
68
68
|
description: '이 작업을 수행하려면 {roles} 여권을 제공해야 하며, 1시간 동안 활동이 없으면 다시 확인 요청을 받게 됩니다.',
|
|
69
69
|
descriptionForDestroy: '안전을 보장하기 위해 {roles} 여권을 제공하여 이 위험한 작업을 수행해야 합니다.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: '연결',
|
|
72
|
+
termsOfUse: '이용 약관',
|
|
73
|
+
agreeTermsOfUse: '해당 사항을 읽고 동의합니다'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: '소유권 NFT로 서버를 요청',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: '경고',
|
|
1262
1265
|
error: '오류'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: '지우기'
|
|
1267
|
+
clear: '지우기',
|
|
1268
|
+
allDone: '완료되었습니다'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: '도메인 및 URL',
|
package/lib/locales/pt.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Troca realizada com sucesso'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Conectar',
|
|
58
58
|
scan: 'Apenas o dono do servidor e membros aprovados podem acessar o painel',
|
|
59
59
|
confirm: 'Confirme em sua carteira DID',
|
|
60
60
|
success: 'Você está conectado com sucesso'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'Verificação de acesso abortada',
|
|
68
68
|
description: 'Você precisa fornecer o passaporte {roles} para realizar esta operação, você será solicitado a verificar novamente após 1 hora de inatividade.',
|
|
69
69
|
descriptionForDestroy: 'Você precisa fornecer o passaporte {roles} para realizar esta operação perigosa para garantir a segurança.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Conectar',
|
|
72
|
+
termsOfUse: 'Termos de Uso',
|
|
73
|
+
agreeTermsOfUse: 'Confirmo que li e aceito o aplicável'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Reivindique o servidor com NFT de propriedade',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Aviso',
|
|
1262
1265
|
error: 'Erro'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Limpar'
|
|
1267
|
+
clear: 'Limpar',
|
|
1268
|
+
allDone: 'Concluído'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Domínios e URLs',
|
package/lib/locales/ru.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Успешно переключено'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Подключить',
|
|
58
58
|
scan: 'Только владелец сервера и утвержденные участники могут получить доступ к информационной панели.',
|
|
59
59
|
confirm: 'Подтвердите в своем кошельке DID',
|
|
60
60
|
success: 'Вы успешно подключены'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'Проверка доступа прервана',
|
|
68
68
|
description: 'Вам необходимо предоставить паспорт {roles}, чтобы выполнить эту операцию, повторно вас попросят подтвердить только после 1 часа бездействия.',
|
|
69
69
|
descriptionForDestroy: 'Вам нужно предоставить паспорт {roles}, чтобы выполнить эту опасную операцию для обеспечения безопасности.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Подключить',
|
|
72
|
+
termsOfUse: 'Условия использования',
|
|
73
|
+
agreeTermsOfUse: 'Я подтверждаю, что ознакомлен(а) и согласен(а) с применимыми'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Претендуйте на сервер с правом собственности NFT',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Предупреждение',
|
|
1262
1265
|
error: 'Ошибка'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Очистить'
|
|
1267
|
+
clear: 'Очистить',
|
|
1268
|
+
allDone: 'Готово'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Домены и URL',
|
package/lib/locales/th.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'สลับสำเร็จ'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'เชื่อมต่อ',
|
|
58
58
|
scan: 'เฉพาะเจ้าของเซิร์ฟเวอร์และสมาชิกที่ได้รับอนุมัติเท่านั้นที่สามารถเข้าถึงแดชบอร์ดได้',
|
|
59
59
|
confirm: 'ยืนยันในกระเป๋าเงินดิจิตอลของคุณ',
|
|
60
60
|
success: 'คุณเชื่อมต่อสำเร็จแล้ว'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'ยกเลิกการตรวจสอบการเข้าถึง',
|
|
68
68
|
description: 'คุณต้องแสดงหนังสือเดินทาง {roles} เพื่อดำเนินการนี้ คุณจะถูกขอให้ยืนยันอีกครั้งหลังจากไม่ใช้งาน 1 ชั่วโมง.',
|
|
69
69
|
descriptionForDestroy: 'คุณจำเป็นต้องให้หนังสือเดินทาง {roles} เพื่อดำเนินการอันตรายนี้เพื่อให้แน่ใจว่าปลอดภัย.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'เชื่อมต่อ',
|
|
72
|
+
termsOfUse: 'ข้อกำหนดการใช้งาน',
|
|
73
|
+
agreeTermsOfUse: 'ข้าพเจ้ารับทราบและยินยอมต่อข้อกำหนดที่เกี่ยวข้อง'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'เรียกร้องเซิร์ฟเวอร์ด้วย NFT เจ้าของ',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'คำเตือน',
|
|
1262
1265
|
error: 'ข้อผิดพลาด'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'ล้าง'
|
|
1267
|
+
clear: 'ล้าง',
|
|
1268
|
+
allDone: 'เสร็จสิ้น'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'โดเมนและ URL',
|
package/lib/locales/vi.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
success: 'Chuyển đổi thành công'
|
|
55
55
|
},
|
|
56
56
|
connect: {
|
|
57
|
-
title: '
|
|
57
|
+
title: 'Kết nối',
|
|
58
58
|
scan: 'Chỉ chủ sở hữu máy chủ và các thành viên được phê duyệt mới có thể truy cập bảng điều khiển',
|
|
59
59
|
confirm: 'Xác nhận trên ví DID của bạn',
|
|
60
60
|
success: 'Bạn đã kết nối thành công'
|
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: 'Xác minh truy cập đã bị hủy',
|
|
68
68
|
description: 'Bạn cần cung cấp hộ chiếu {roles} để thực hiện thao tác này, bạn chỉ cần xác minh lại sau 1 giờ không hoạt động.',
|
|
69
69
|
descriptionForDestroy: 'Bạn cần cung cấp hộ chiếu {roles} để thực hiện hoạt động nguy hiểm này nhằm đảm bảo an toàn.'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: 'Kết nối',
|
|
72
|
+
termsOfUse: 'Điều khoản sử dụng',
|
|
73
|
+
agreeTermsOfUse: 'Tôi xác nhận rằng tôi đã đọc và đồng ý với điều khoản áp dụng'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: 'Thu thập máy chủ với NFT Sở hữu',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: 'Cảnh báo',
|
|
1262
1265
|
error: 'Lỗi'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: 'Xóa'
|
|
1267
|
+
clear: 'Xóa',
|
|
1268
|
+
allDone: 'Hoàn tất'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: 'Domínio và URL',
|
package/lib/locales/zh-tw.js
CHANGED
|
@@ -67,7 +67,10 @@ export default {
|
|
|
67
67
|
abort: '存取驗證已中止',
|
|
68
68
|
description: '您需要提供 {roles} 通行證才能執行此操作,在 1 小時的非活動狀態後才會再次要求驗證。',
|
|
69
69
|
descriptionForDestroy: '您需要提供 {roles} 通行證以繼續此操作以確保安全。'
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
login: '連接',
|
|
72
|
+
termsOfUse: '使用條款',
|
|
73
|
+
agreeTermsOfUse: '我已閱讀並同意適用的'
|
|
71
74
|
},
|
|
72
75
|
acceptServer: {
|
|
73
76
|
title: '使用所有權NFT索取伺服器',
|
|
@@ -1261,7 +1264,8 @@ export default {
|
|
|
1261
1264
|
warning: '警告',
|
|
1262
1265
|
error: '錯誤'
|
|
1263
1266
|
},
|
|
1264
|
-
clear: '清除'
|
|
1267
|
+
clear: '清除',
|
|
1268
|
+
allDone: '全部完成'
|
|
1265
1269
|
},
|
|
1266
1270
|
router: {
|
|
1267
1271
|
routerSetting: '網域和網址',
|
package/lib/locales/zh.js
CHANGED
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
redirectButton: '查看节点仪表盘'
|
|
40
40
|
},
|
|
41
41
|
login: {
|
|
42
|
+
login: '登录',
|
|
43
|
+
termsOfUse: '服务条款',
|
|
44
|
+
agreeTermsOfUse: '我已阅读并同意',
|
|
42
45
|
loginTo: '连接 DID Wallet ',
|
|
43
46
|
description: '只有节点的所有者和成员可以访问仪表盘',
|
|
44
47
|
switchDid: {
|
|
@@ -54,10 +57,10 @@ export default {
|
|
|
54
57
|
success: '切换成功'
|
|
55
58
|
},
|
|
56
59
|
connect: {
|
|
57
|
-
title: '登录
|
|
60
|
+
title: '登录',
|
|
58
61
|
scan: '只有节点所有者和成员才能访问控制面板',
|
|
59
62
|
confirm: '在您的 DID Wallet 上确认',
|
|
60
|
-
success: '
|
|
63
|
+
success: '登录成功'
|
|
61
64
|
},
|
|
62
65
|
verify: {
|
|
63
66
|
title: '验证访问',
|
|
@@ -1274,7 +1277,8 @@ export default {
|
|
|
1274
1277
|
warning: '警告',
|
|
1275
1278
|
error: '错误'
|
|
1276
1279
|
},
|
|
1277
|
-
clear: '清空'
|
|
1280
|
+
clear: '清空',
|
|
1281
|
+
allDone: '全部完成'
|
|
1278
1282
|
},
|
|
1279
1283
|
router: {
|
|
1280
1284
|
routerSetting: '域名和网址',
|
|
@@ -50,6 +50,7 @@ export function SingleActivity({
|
|
|
50
50
|
const activityTitle = useActivityTitle({
|
|
51
51
|
activity,
|
|
52
52
|
users: [notification?.actorInfo],
|
|
53
|
+
actors: [notification?.activity?.actor],
|
|
53
54
|
mountPoint
|
|
54
55
|
});
|
|
55
56
|
if (isEmpty(activity) || !activity.type || !activity.actor || isEmpty(activity.target)) {
|
|
@@ -91,6 +92,7 @@ export function MultipleActivity({
|
|
|
91
92
|
const activityTitle = useActivityTitle({
|
|
92
93
|
activity,
|
|
93
94
|
users: items.map(item => item?.actorInfo),
|
|
95
|
+
actors: items.map(item => item?.activity?.actor),
|
|
94
96
|
mountPoint
|
|
95
97
|
});
|
|
96
98
|
const metaLink = useMemoizedFn(item => {
|
|
@@ -6,7 +6,6 @@ import Link from '@mui/material/Link';
|
|
|
6
6
|
import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
7
7
|
import { joinURL, withQuery } from 'ufo';
|
|
8
8
|
import isEmpty from 'lodash/isEmpty';
|
|
9
|
-
import uniqBy from 'lodash/uniqBy';
|
|
10
9
|
import { getActivityLink } from './utils';
|
|
11
10
|
/**
|
|
12
11
|
* Activity types enum for type safety
|
|
@@ -97,6 +96,7 @@ UserLink.displayName = 'UserLink';
|
|
|
97
96
|
export default function useActivityTitle({
|
|
98
97
|
activity,
|
|
99
98
|
users,
|
|
99
|
+
actors,
|
|
100
100
|
extra = {},
|
|
101
101
|
mountPoint = ''
|
|
102
102
|
}) {
|
|
@@ -111,12 +111,31 @@ export default function useActivityTitle({
|
|
|
111
111
|
linkColor = colors.textBase
|
|
112
112
|
} = extra || {};
|
|
113
113
|
|
|
114
|
-
//
|
|
115
|
-
const
|
|
116
|
-
if (!Array.isArray(users)) return
|
|
117
|
-
|
|
114
|
+
// Create a map of users by their DID for efficient lookup
|
|
115
|
+
const usersMap = useCreation(() => {
|
|
116
|
+
if (!Array.isArray(users)) return new Map();
|
|
117
|
+
const map = new Map();
|
|
118
|
+
users.forEach(user => {
|
|
119
|
+
if (user?.did && !map.has(user.did)) {
|
|
120
|
+
map.set(user.did, user);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return map;
|
|
118
124
|
}, [users]);
|
|
119
125
|
|
|
126
|
+
// Get unique users from actors, using the map and providing fallback for missing users
|
|
127
|
+
const uniqueUsers = useCreation(() => {
|
|
128
|
+
if (!Array.isArray(actors)) return [];
|
|
129
|
+
return actors.map(actorId => {
|
|
130
|
+
if (!actorId) return null;
|
|
131
|
+
// If user exists in map, return the user object, otherwise create a basic object with DID
|
|
132
|
+
return usersMap.get(actorId) || {
|
|
133
|
+
did: actorId,
|
|
134
|
+
fullName: actorId?.substring(0, 8)
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
}, [actors, usersMap]);
|
|
138
|
+
|
|
120
139
|
// Memoized function to format user names with links
|
|
121
140
|
const formatLinkedUserNames = useMemoizedFn(() => {
|
|
122
141
|
if (!Array.isArray(uniqueUsers) || uniqueUsers.length === 0) {
|
|
@@ -28,8 +28,11 @@ function SingleAvatar({
|
|
|
28
28
|
inService,
|
|
29
29
|
showName
|
|
30
30
|
}) {
|
|
31
|
-
const avatar = parseAvatar(actor.avatar, teamDid, inService);
|
|
31
|
+
const avatar = actor?.avatar ? parseAvatar(actor.avatar, teamDid, inService) : null;
|
|
32
32
|
const handleClick = e => {
|
|
33
|
+
if (!actor) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
33
36
|
e.stopPropagation();
|
|
34
37
|
window.open(withQuery(joinURL(WELLKNOWN_SERVICE_PATH_PREFIX, 'user'), {
|
|
35
38
|
did: actor.did
|
|
@@ -45,12 +48,12 @@ function SingleAvatar({
|
|
|
45
48
|
style: {
|
|
46
49
|
cursor: 'pointer'
|
|
47
50
|
},
|
|
48
|
-
title: actor
|
|
49
|
-
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
50
|
-
alt: actor
|
|
51
|
+
title: actor?.fullName || '',
|
|
52
|
+
children: [avatar ? /*#__PURE__*/_jsx(Avatar, {
|
|
53
|
+
alt: actor?.fullName || '',
|
|
51
54
|
src: `${avatar}?imageFilter=resize&w=${size * 1.5}&h=${size * 1.5}`,
|
|
52
55
|
size: size,
|
|
53
|
-
did: actor
|
|
56
|
+
did: actor?.did,
|
|
54
57
|
shape: "circle",
|
|
55
58
|
sx: {
|
|
56
59
|
width: size,
|
|
@@ -62,8 +65,13 @@ function SingleAvatar({
|
|
|
62
65
|
transform: 'scale(1.1)'
|
|
63
66
|
}
|
|
64
67
|
}
|
|
68
|
+
}) : /*#__PURE__*/_jsx(Avatar, {
|
|
69
|
+
sx: {
|
|
70
|
+
width: size,
|
|
71
|
+
height: size
|
|
72
|
+
}
|
|
65
73
|
}), showName && /*#__PURE__*/_jsx("span", {
|
|
66
|
-
children: actor
|
|
74
|
+
children: actor?.fullName
|
|
67
75
|
})]
|
|
68
76
|
});
|
|
69
77
|
}
|
|
@@ -105,11 +113,11 @@ export default function ActorAvatar({
|
|
|
105
113
|
// 如果actors是单个对象而不是数组,将其转换为数组
|
|
106
114
|
const actorsArray = useCreation(() => {
|
|
107
115
|
const actorsList = Array.isArray(actors) ? actors : [actors];
|
|
108
|
-
return uniqBy(actorsList, 'did');
|
|
116
|
+
return uniqBy(actorsList, 'did').filter(Boolean);
|
|
109
117
|
}, [actors]);
|
|
110
118
|
|
|
111
119
|
// 如果只有一个用户,直接显示Avatar
|
|
112
|
-
if (actorsArray.length === 1) {
|
|
120
|
+
if (actorsArray.length === 1 || !actorsArray.length) {
|
|
113
121
|
return /*#__PURE__*/_jsx(SingleAvatar, {
|
|
114
122
|
actor: actorsArray[0],
|
|
115
123
|
size: size,
|
|
@@ -144,11 +152,11 @@ export default function ActorAvatar({
|
|
|
144
152
|
zIndex: 2
|
|
145
153
|
}
|
|
146
154
|
},
|
|
147
|
-
children: actorsArray.map(actor => /*#__PURE__*/_jsx(SingleAvatar, {
|
|
155
|
+
children: actorsArray.map((actor, index) => /*#__PURE__*/_jsx(SingleAvatar, {
|
|
148
156
|
actor: actor,
|
|
149
157
|
size: size,
|
|
150
158
|
teamDid: teamDid,
|
|
151
159
|
inService: inService
|
|
152
|
-
}, actor
|
|
160
|
+
}, actor?.did || index))
|
|
153
161
|
});
|
|
154
162
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { useNodeContext } from '../../contexts/node';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const Wrapper = styled(Box)`
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100%;
|
|
12
|
+
min-height: 100px;
|
|
13
|
+
color: #999;
|
|
14
|
+
.empty-icon {
|
|
15
|
+
margin: 10px 0;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Empty component to display empty state
|
|
21
|
+
* @typedef {{
|
|
22
|
+
* color?: string;
|
|
23
|
+
* size?: number;
|
|
24
|
+
* children?: import('react').ReactNode;
|
|
25
|
+
* } & import('react').ComponentPropsWithoutRef<"div"> } EmptyProps
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Empty state component
|
|
30
|
+
* @param {EmptyProps} props
|
|
31
|
+
* @returns {JSX.Element}
|
|
32
|
+
*/
|
|
33
|
+
function Empty({
|
|
34
|
+
color,
|
|
35
|
+
children,
|
|
36
|
+
...rest
|
|
37
|
+
}) {
|
|
38
|
+
const node = useNodeContext();
|
|
39
|
+
return /*#__PURE__*/_jsxs(Wrapper, {
|
|
40
|
+
...rest,
|
|
41
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
42
|
+
src: `${node.imgPrefix}/all-done.png`,
|
|
43
|
+
alt: "All Done",
|
|
44
|
+
style: {
|
|
45
|
+
maxHeight: '100%',
|
|
46
|
+
maxWidth: '100%'
|
|
47
|
+
},
|
|
48
|
+
onError: e => {
|
|
49
|
+
e.target.style.display = 'none';
|
|
50
|
+
}
|
|
51
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
52
|
+
className: "empty-content",
|
|
53
|
+
children: children
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
Empty.propTypes = {
|
|
58
|
+
color: PropTypes.string,
|
|
59
|
+
children: PropTypes.any
|
|
60
|
+
};
|
|
61
|
+
Empty.defaultProps = {
|
|
62
|
+
color: 'inherit',
|
|
63
|
+
children: null
|
|
64
|
+
};
|
|
65
|
+
export default Empty;
|
|
@@ -263,7 +263,7 @@ export default function NotificationFilter({
|
|
|
263
263
|
},
|
|
264
264
|
children: [enableMarkAllAsRead && /*#__PURE__*/_jsx(Box, {
|
|
265
265
|
display: "flex",
|
|
266
|
-
gap:
|
|
266
|
+
gap: 1.5,
|
|
267
267
|
children: readFilterTabs.map(tab => /*#__PURE__*/_jsxs(Button, {
|
|
268
268
|
disabled: loading,
|
|
269
269
|
onClick: () => handleTabClick(tab.value),
|
|
@@ -316,7 +316,7 @@ export default function NotificationFilter({
|
|
|
316
316
|
// 增加弹出层宽度
|
|
317
317
|
maxHeight: 500,
|
|
318
318
|
overflowY: 'auto',
|
|
319
|
-
borderRadius:
|
|
319
|
+
borderRadius: 1,
|
|
320
320
|
boxShadow: '0px 6px 24px rgba(0, 0, 0, 0.15)'
|
|
321
321
|
}
|
|
322
322
|
},
|
|
@@ -368,7 +368,7 @@ export default function NotificationFilter({
|
|
|
368
368
|
display: 'flex',
|
|
369
369
|
justifyContent: 'space-between',
|
|
370
370
|
alignItems: 'center',
|
|
371
|
-
mb:
|
|
371
|
+
mb: 3
|
|
372
372
|
},
|
|
373
373
|
children: /*#__PURE__*/_jsx(FormGroup, {
|
|
374
374
|
sx: {
|
|
@@ -420,21 +420,22 @@ export default function NotificationFilter({
|
|
|
420
420
|
justifyContent: "space-between",
|
|
421
421
|
gap: 2,
|
|
422
422
|
mb: 1.5,
|
|
423
|
-
height: "28px",
|
|
424
423
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
425
424
|
variant: "subtitle1",
|
|
426
425
|
fontWeight: "bold",
|
|
426
|
+
width: "calc(100% - 36px)",
|
|
427
427
|
children: t('notification.from')
|
|
428
428
|
}), /*#__PURE__*/_jsx(Box, {
|
|
429
429
|
display: "flex",
|
|
430
430
|
alignItems: "center",
|
|
431
|
+
width: "calc(100% - 36px)",
|
|
431
432
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
432
433
|
size: "small",
|
|
433
434
|
placeholder: "search",
|
|
434
435
|
value: searchTerm,
|
|
435
436
|
onChange: handleSearchChange,
|
|
436
437
|
sx: {
|
|
437
|
-
width:
|
|
438
|
+
width: '100%',
|
|
438
439
|
'& .MuiOutlinedInput-input': {
|
|
439
440
|
padding: '6px 4px 6px 0'
|
|
440
441
|
},
|
|
@@ -5,13 +5,13 @@ import Link from '@mui/material/Link';
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useMemoizedFn } from 'ahooks';
|
|
8
|
-
import Empty from '@arcblock/ux/lib/Empty';
|
|
9
8
|
import { useLocaleContext, LocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
10
9
|
import useTheme from '@mui/material/styles/useTheme';
|
|
11
10
|
import { ServerLogoNotext } from '@arcblock/icons';
|
|
12
11
|
import { Divider, IconButton, Typography } from '@mui/material';
|
|
13
12
|
import { CopyButton } from '@arcblock/ux/lib/ClickToCopy';
|
|
14
13
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
14
|
+
import { temp as colors } from '@arcblock/ux/lib/Colors';
|
|
15
15
|
import BlockletBundleAvatar from '../../blocklet/bundle-avatar';
|
|
16
16
|
import BlockletAppAvatar from '../../blocklet/app-avatar';
|
|
17
17
|
import RelativeTime from '../../relative-time';
|
|
@@ -22,6 +22,7 @@ import Activity from './activity';
|
|
|
22
22
|
import { mergeAdjacentNotifications, isIncludeActivity, canAutoRead } from './activity/utils';
|
|
23
23
|
import ActorAvatar from './avatars/actor';
|
|
24
24
|
import { getNotificationLink, checkIfNotificationIsRead, getComponentMountPoint } from './preview/utils';
|
|
25
|
+
import Empty from './empty';
|
|
25
26
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
27
|
NotificationList.propTypes = {
|
|
27
28
|
data: PropTypes.array,
|
|
@@ -136,9 +137,9 @@ export function NotificationItem({
|
|
|
136
137
|
return [];
|
|
137
138
|
}
|
|
138
139
|
if (isMultiple) {
|
|
139
|
-
return notificationItems.map(item => item.actorInfo);
|
|
140
|
+
return notificationItems.map(item => item.actorInfo).filter(Boolean);
|
|
140
141
|
}
|
|
141
|
-
return notification.actorInfo;
|
|
142
|
+
return notification.actorInfo ?? [];
|
|
142
143
|
}, [notificationItems, notification.actorInfo, isMultiple, includeActivity]);
|
|
143
144
|
const componentDid = useMemo(() => {
|
|
144
145
|
return blocklet?.did || blocklet?.meta?.did || '';
|
|
@@ -568,7 +569,7 @@ export default function NotificationList({
|
|
|
568
569
|
}, [setupObserver, inDialog]);
|
|
569
570
|
if (!mergedData?.length) {
|
|
570
571
|
return /*#__PURE__*/_jsx(Empty, {
|
|
571
|
-
children: t('
|
|
572
|
+
children: t('notification.allDone')
|
|
572
573
|
});
|
|
573
574
|
}
|
|
574
575
|
return /*#__PURE__*/_jsx(Box, {
|
|
@@ -611,7 +612,7 @@ export const StyledNotificationRow = styled('div')`
|
|
|
611
612
|
cursor: pointer;
|
|
612
613
|
animation: ${props => props.highlight ? 'flash-bg 3s ease-out 0s 1 normal none running' : 'none'};
|
|
613
614
|
background-color: ${props => props.isRead ? 'transparent' : props.theme.palette.primary.lightest || 'rgba(239, 246, 255, 0.5)'};
|
|
614
|
-
border-bottom: 1px solid ${
|
|
615
|
+
border-bottom: 1px solid ${colors.dividerColor};
|
|
615
616
|
&:last-child {
|
|
616
617
|
border-bottom: none;
|
|
617
618
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.42-beta-20250402-131159-7647e64d",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,29 +25,29 @@
|
|
|
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.42-beta-20250402-131159-7647e64d",
|
|
29
|
+
"@abtnode/constant": "1.16.42-beta-20250402-131159-7647e64d",
|
|
30
|
+
"@abtnode/docker-utils": "1.16.42-beta-20250402-131159-7647e64d",
|
|
31
|
+
"@abtnode/util": "1.16.42-beta-20250402-131159-7647e64d",
|
|
32
32
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
33
|
-
"@arcblock/did": "^1.19.
|
|
34
|
-
"@arcblock/did-connect": "^2.12.
|
|
33
|
+
"@arcblock/did": "^1.19.16",
|
|
34
|
+
"@arcblock/did-connect": "^2.12.57",
|
|
35
35
|
"@arcblock/did-motif": "^1.1.13",
|
|
36
|
-
"@arcblock/icons": "^2.12.
|
|
37
|
-
"@arcblock/nft-display": "^2.12.
|
|
38
|
-
"@arcblock/react-hooks": "^2.12.
|
|
39
|
-
"@arcblock/terminal": "^2.12.
|
|
40
|
-
"@arcblock/ux": "^2.12.
|
|
41
|
-
"@arcblock/validator": "^1.19.
|
|
42
|
-
"@blocklet/constant": "1.16.
|
|
43
|
-
"@blocklet/did-domain-react": "^0.3.
|
|
44
|
-
"@blocklet/did-space-react": "^1.0.
|
|
45
|
-
"@blocklet/js-sdk": "1.16.
|
|
46
|
-
"@blocklet/launcher-layout": "^2.12.
|
|
47
|
-
"@blocklet/list": "^0.16.
|
|
48
|
-
"@blocklet/meta": "1.16.
|
|
49
|
-
"@blocklet/ui-react": "^2.12.
|
|
50
|
-
"@blocklet/uploader": "^0.1.
|
|
36
|
+
"@arcblock/icons": "^2.12.57",
|
|
37
|
+
"@arcblock/nft-display": "^2.12.57",
|
|
38
|
+
"@arcblock/react-hooks": "^2.12.57",
|
|
39
|
+
"@arcblock/terminal": "^2.12.57",
|
|
40
|
+
"@arcblock/ux": "^2.12.57",
|
|
41
|
+
"@arcblock/validator": "^1.19.16",
|
|
42
|
+
"@blocklet/constant": "1.16.42-beta-20250402-131159-7647e64d",
|
|
43
|
+
"@blocklet/did-domain-react": "^0.3.81",
|
|
44
|
+
"@blocklet/did-space-react": "^1.0.38",
|
|
45
|
+
"@blocklet/js-sdk": "1.16.42-beta-20250402-131159-7647e64d",
|
|
46
|
+
"@blocklet/launcher-layout": "^2.12.57",
|
|
47
|
+
"@blocklet/list": "^0.16.38",
|
|
48
|
+
"@blocklet/meta": "1.16.42-beta-20250402-131159-7647e64d",
|
|
49
|
+
"@blocklet/ui-react": "^2.12.57",
|
|
50
|
+
"@blocklet/uploader": "^0.1.82",
|
|
51
51
|
"@emotion/react": "^11.10.4",
|
|
52
52
|
"@emotion/styled": "^11.10.4",
|
|
53
53
|
"@iconify-icons/logos": "^1.2.36",
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"jest": "^29.7.0",
|
|
123
123
|
"jest-environment-jsdom": "^29.7.0"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "f90e7dc430b14d99a8861d972967fb4b4c83c8ea"
|
|
126
126
|
}
|