@abtnode/ux 1.16.27 → 1.16.28-beta-bfbab430
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/component/add-component/add-component-core.js +2 -2
- package/lib/blocklet/component/component-cell.js +4 -3
- package/lib/blocklet/component/component-info-dialog.js +8 -13
- package/lib/blocklet/component/configuration.js +4 -3
- package/lib/blocklet/notification/email.js +8 -0
- package/lib/blocklet/notification/index.js +12 -2
- package/lib/blocklet/notification/push-kit.js +251 -0
- package/lib/blocklet/preferences/index.js +1 -1
- package/lib/blocklet/publish/blocklet-card.js +5 -3
- package/lib/blocklet/publish/create-release/header.js +41 -13
- package/lib/blocklet/publish/create-release/index.js +17 -15
- package/lib/blocklet/publish/create-release/resources.js +2 -2
- package/lib/blocklet/publish/project-list.js +15 -15
- package/lib/blocklet/publish/release-list.js +10 -6
- package/lib/blocklet/router/util.js +1 -1
- package/lib/locales/ar.js +12 -1
- package/lib/locales/de.js +12 -1
- package/lib/locales/en.js +14 -0
- package/lib/locales/es.js +12 -1
- package/lib/locales/fr.js +12 -1
- package/lib/locales/hi.js +12 -1
- package/lib/locales/i18n.db +0 -0
- package/lib/locales/id.js +12 -1
- package/lib/locales/ja.js +12 -1
- package/lib/locales/ko.js +12 -1
- package/lib/locales/pt.js +12 -1
- package/lib/locales/ru.js +12 -1
- package/lib/locales/th.js +12 -1
- package/lib/locales/vi.js +12 -1
- package/lib/locales/zh-tw.js +12 -1
- package/lib/locales/zh.js +12 -1
- package/lib/notifications/page.js +4 -19
- package/package.json +7 -8
|
@@ -7,7 +7,7 @@ import Alert from '@arcblock/ux/lib/Alert';
|
|
|
7
7
|
import AnimationWaiter from '@arcblock/ux/lib/AnimationWaiter';
|
|
8
8
|
import Button from '@arcblock/ux/lib/Button';
|
|
9
9
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
10
|
-
import { BLOCKLET_APP_SPACE_REQUIREMENT, BLOCKLET_CONFIGURABLE_KEY, BlockletEvents, BlockletStatus } from '@blocklet/constant';
|
|
10
|
+
import { BLOCKLET_APP_SPACE_REQUIREMENT, BLOCKLET_CONFIGURABLE_KEY, BlockletEvents, BlockletGroup, BlockletStatus } from '@blocklet/constant';
|
|
11
11
|
import { StepProvider } from '@blocklet/launcher-layout/lib/context/step';
|
|
12
12
|
import ResultMessage from '@blocklet/launcher-layout/lib/launch-result-message';
|
|
13
13
|
import PageHeader from '@blocklet/launcher-layout/lib/page-header';
|
|
@@ -851,7 +851,7 @@ export default function AddComponentCore({
|
|
|
851
851
|
}
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
|
-
if (hasStartEngine(meta) && !alreadyInstalled(meta.did)) {
|
|
854
|
+
if (hasStartEngine(meta) && meta.group !== BlockletGroup.engine && !alreadyInstalled(meta.did)) {
|
|
855
855
|
steps.push({
|
|
856
856
|
key: 'config',
|
|
857
857
|
name: t('common.config'),
|
|
@@ -14,6 +14,7 @@ import Box from '@mui/material/Box';
|
|
|
14
14
|
import normalizePathPrefix from '@abtnode/util/lib/normalize-path-prefix';
|
|
15
15
|
import { getComponentMissingConfigs, getDisplayName, isInProgress, hasStartEngine } from '@blocklet/meta/lib/util';
|
|
16
16
|
import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined';
|
|
17
|
+
import { hasMountPoint } from '@blocklet/meta/lib/engine';
|
|
17
18
|
import { useDeletingBlockletContext } from '../../contexts/deleting-blocklets';
|
|
18
19
|
import ComponentConfiguration from './configuration';
|
|
19
20
|
import BlockletStatus from '../status';
|
|
@@ -161,7 +162,7 @@ export default function ComponentCell({
|
|
|
161
162
|
})]
|
|
162
163
|
})]
|
|
163
164
|
})]
|
|
164
|
-
}, blocklet),
|
|
165
|
+
}, blocklet), hasMountPoint(blocklet.meta) && /*#__PURE__*/_jsx(Box, {
|
|
165
166
|
sx: {
|
|
166
167
|
display: {
|
|
167
168
|
xs: 'none',
|
|
@@ -233,13 +234,13 @@ export default function ComponentCell({
|
|
|
233
234
|
disabled: !['starting', 'stopping'].includes(app.status) && isInProgress(app.status)
|
|
234
235
|
}), /*#__PURE__*/_jsx(Actions, {
|
|
235
236
|
"data-cy": "component-actions",
|
|
236
|
-
actions: [hasStartEngine(blocklet.meta) ? {
|
|
237
|
+
actions: [hasStartEngine(blocklet.meta) || isResource(blocklet) ? {
|
|
237
238
|
icon: /*#__PURE__*/_jsx(InfoOutlinedIcon, {}),
|
|
238
239
|
text: t('common.detail'),
|
|
239
240
|
onClick: () => {
|
|
240
241
|
setComponentInfo(blocklet);
|
|
241
242
|
}
|
|
242
|
-
} : null,
|
|
243
|
+
} : null, {
|
|
243
244
|
icon: /*#__PURE__*/_jsx(RestartIcon, {}),
|
|
244
245
|
text: t('common.restart'),
|
|
245
246
|
onClick: () => {
|
|
@@ -2,12 +2,9 @@ import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import Badge from '@mui/material
|
|
6
|
-
import Dialog from '@mui/material/Dialog';
|
|
7
|
-
import DialogContent from '@mui/material/DialogContent';
|
|
8
|
-
import DialogTitle from '@mui/material/DialogTitle';
|
|
5
|
+
import { Badge, Box } from '@mui/material';
|
|
9
6
|
import InfoRow from '@arcblock/ux/lib/InfoRow';
|
|
10
|
-
import
|
|
7
|
+
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
11
8
|
import { getDisplayName, hasStartEngine } from '@blocklet/meta/lib/util';
|
|
12
9
|
import { useDeletingBlockletContext } from '../../contexts/deleting-blocklets';
|
|
13
10
|
import Tag from '../../tag';
|
|
@@ -16,7 +13,7 @@ import DidAddress from '../../did-address';
|
|
|
16
13
|
import BlockletSource from '../blocklet-source';
|
|
17
14
|
import BlockletStatus from '../status';
|
|
18
15
|
import BlockletVersion from '../version';
|
|
19
|
-
import { jsx as _jsx
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
17
|
const isResource = component => !component?.meta?.group;
|
|
21
18
|
const getEngineRows = (engine, t) => {
|
|
22
19
|
if (!engine) {
|
|
@@ -204,18 +201,16 @@ export default function ComponentInfoDialog({
|
|
|
204
201
|
}
|
|
205
202
|
return /*#__PURE__*/_jsx(Dialog, {
|
|
206
203
|
open: true,
|
|
204
|
+
title: t('common.componentBasicInfo'),
|
|
205
|
+
showCloseButton: true,
|
|
207
206
|
fullWidth: true,
|
|
208
207
|
maxWidth: "md",
|
|
209
208
|
onClose: () => {
|
|
210
209
|
onClose(null);
|
|
211
210
|
},
|
|
212
|
-
children: /*#__PURE__*/
|
|
213
|
-
|
|
214
|
-
children:
|
|
215
|
-
children: t('common.componentBasicInfo')
|
|
216
|
-
}), /*#__PURE__*/_jsx(DialogContent, {
|
|
217
|
-
children: renderRows(componentRows)
|
|
218
|
-
})]
|
|
211
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
212
|
+
paddingBottom: 1.5,
|
|
213
|
+
children: renderRows(componentRows)
|
|
219
214
|
}, "dialog-wrapper")
|
|
220
215
|
}, "base-info-dialog");
|
|
221
216
|
}
|
|
@@ -4,7 +4,8 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import IconButton from '@mui/material/IconButton';
|
|
5
5
|
import Box from '@mui/material/Box';
|
|
6
6
|
import EditIcon from '@mui/icons-material/Edit';
|
|
7
|
-
import { getDisplayName
|
|
7
|
+
import { getDisplayName } from '@blocklet/meta/lib/util';
|
|
8
|
+
import { hasMountPoint } from '@blocklet/meta/lib/engine';
|
|
8
9
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
9
10
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
10
11
|
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
@@ -22,7 +23,7 @@ export default function ComponentConfiguration({
|
|
|
22
23
|
t
|
|
23
24
|
} = useLocaleContext();
|
|
24
25
|
const isComponent = !!ancestors.length;
|
|
25
|
-
const [tab, setTab] = useState(
|
|
26
|
+
const [tab, setTab] = useState(hasMountPoint(blocklet?.meta) ? 'settings' : 'environments');
|
|
26
27
|
const name = isComponent ? getDisplayName(blocklet, true) : t('blocklet.component.container');
|
|
27
28
|
if (isInstalling(blocklet.status)) {
|
|
28
29
|
return null;
|
|
@@ -39,7 +40,7 @@ export default function ComponentConfiguration({
|
|
|
39
40
|
setShowDialog(true);
|
|
40
41
|
};
|
|
41
42
|
const tabConfigs = {
|
|
42
|
-
settings:
|
|
43
|
+
settings: hasMountPoint(blocklet.meta) && {
|
|
43
44
|
label: t('blocklet.component.setting'),
|
|
44
45
|
value: 'settings',
|
|
45
46
|
component: /*#__PURE__*/_jsx(ComponentSetting, {
|
|
@@ -115,6 +115,9 @@ function NotificationEmail() {
|
|
|
115
115
|
width: '300px'
|
|
116
116
|
},
|
|
117
117
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
118
|
+
sx: {
|
|
119
|
+
mt: 1
|
|
120
|
+
},
|
|
118
121
|
fullWidth: true,
|
|
119
122
|
name: "testReceiver",
|
|
120
123
|
label: t('notification.email.inputTestReceiver'),
|
|
@@ -219,6 +222,7 @@ function NotificationEmail() {
|
|
|
219
222
|
fullWidth: true,
|
|
220
223
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
221
224
|
...field,
|
|
225
|
+
required: true,
|
|
222
226
|
label: t('notification.email.from'),
|
|
223
227
|
error: !!formState.errors[field.name],
|
|
224
228
|
helperText: formState.errors[field.name]?.message || ' ',
|
|
@@ -237,6 +241,7 @@ function NotificationEmail() {
|
|
|
237
241
|
fullWidth: true,
|
|
238
242
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
239
243
|
...field,
|
|
244
|
+
required: true,
|
|
240
245
|
error: !!formState.errors[field.name],
|
|
241
246
|
label: t('notification.email.host'),
|
|
242
247
|
helperText: formState.errors[field.name]?.message || ' ',
|
|
@@ -255,6 +260,7 @@ function NotificationEmail() {
|
|
|
255
260
|
fullWidth: true,
|
|
256
261
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
257
262
|
...field,
|
|
263
|
+
required: true,
|
|
258
264
|
type: "number",
|
|
259
265
|
error: !!formState.errors[field.name],
|
|
260
266
|
label: t('notification.email.port'),
|
|
@@ -274,6 +280,7 @@ function NotificationEmail() {
|
|
|
274
280
|
fullWidth: true,
|
|
275
281
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
276
282
|
...field,
|
|
283
|
+
required: true,
|
|
277
284
|
error: !!formState.errors[field.name],
|
|
278
285
|
label: t('notification.email.user'),
|
|
279
286
|
helperText: formState.errors[field.name]?.message || ' ',
|
|
@@ -292,6 +299,7 @@ function NotificationEmail() {
|
|
|
292
299
|
fullWidth: true,
|
|
293
300
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
294
301
|
...field,
|
|
302
|
+
required: true,
|
|
295
303
|
type: "password",
|
|
296
304
|
error: !!formState.errors[field.name],
|
|
297
305
|
label: t('notification.email.password'),
|
|
@@ -5,6 +5,7 @@ import { Box } from '@mui/material';
|
|
|
5
5
|
import { useCreation } from 'ahooks';
|
|
6
6
|
import { useContext, useState } from 'react';
|
|
7
7
|
import NotificationEmail from './email';
|
|
8
|
+
import NotificationPushKit from './push-kit';
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const tabs = [{
|
|
10
11
|
label: /*#__PURE__*/_jsx(Box, {
|
|
@@ -13,6 +14,13 @@ const tabs = [{
|
|
|
13
14
|
children: "Email"
|
|
14
15
|
}),
|
|
15
16
|
value: 'email'
|
|
17
|
+
}, {
|
|
18
|
+
label: /*#__PURE__*/_jsx(Box, {
|
|
19
|
+
textAlign: "center",
|
|
20
|
+
width: "100%",
|
|
21
|
+
children: "Push Kit"
|
|
22
|
+
}),
|
|
23
|
+
value: 'pushKit'
|
|
16
24
|
}, {
|
|
17
25
|
label: /*#__PURE__*/_jsx(Box, {
|
|
18
26
|
textAlign: "center",
|
|
@@ -24,16 +32,18 @@ const tabs = [{
|
|
|
24
32
|
function BlockletNotification() {
|
|
25
33
|
const [currentTab, setCurrentTab] = useState(tabs[0].value);
|
|
26
34
|
const {
|
|
27
|
-
t
|
|
35
|
+
t,
|
|
36
|
+
locale
|
|
28
37
|
} = useContext(LocaleContext);
|
|
29
38
|
const contents = useCreation(() => ({
|
|
30
39
|
email: /*#__PURE__*/_jsx(NotificationEmail, {}),
|
|
40
|
+
pushKit: /*#__PURE__*/_jsx(NotificationPushKit, {}),
|
|
31
41
|
more: /*#__PURE__*/_jsx(Box, {
|
|
32
42
|
children: /*#__PURE__*/_jsx(Empty, {
|
|
33
43
|
children: t('notification.comingSoon')
|
|
34
44
|
})
|
|
35
45
|
})
|
|
36
|
-
}), [
|
|
46
|
+
}), [locale]);
|
|
37
47
|
return /*#__PURE__*/_jsxs(Box, {
|
|
38
48
|
children: [/*#__PURE__*/_jsx(Tabs, {
|
|
39
49
|
tabs: tabs,
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { Box, FormControl, FormControlLabel, Switch, TextField } from '@mui/material';
|
|
2
|
+
import pick from 'lodash/pick';
|
|
3
|
+
import { useMemoizedFn, useReactive } from 'ahooks';
|
|
4
|
+
import { Controller, useForm } from 'react-hook-form';
|
|
5
|
+
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
6
|
+
import Toast from '@arcblock/ux/lib/Toast';
|
|
7
|
+
import Button from '@arcblock/ux/lib/Button';
|
|
8
|
+
import isURL from 'validator/lib/isURL';
|
|
9
|
+
import { useNodeContext } from '../../contexts/node';
|
|
10
|
+
import { useBlockletContext } from '../../contexts/blocklet';
|
|
11
|
+
import useConfirm from '../../hooks/confirm';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const defaultFormValues = {
|
|
14
|
+
enabled: false,
|
|
15
|
+
endpoint: '',
|
|
16
|
+
did: undefined,
|
|
17
|
+
pushPath: undefined
|
|
18
|
+
};
|
|
19
|
+
function NotificationPushKit() {
|
|
20
|
+
const {
|
|
21
|
+
api
|
|
22
|
+
} = useNodeContext();
|
|
23
|
+
const {
|
|
24
|
+
blocklet
|
|
25
|
+
} = useBlockletContext();
|
|
26
|
+
const {
|
|
27
|
+
t
|
|
28
|
+
} = useLocaleContext();
|
|
29
|
+
const {
|
|
30
|
+
confirmApi,
|
|
31
|
+
confirmHolder
|
|
32
|
+
} = useConfirm();
|
|
33
|
+
const did = blocklet?.meta?.did;
|
|
34
|
+
const config = Object.assign({
|
|
35
|
+
...defaultFormValues
|
|
36
|
+
}, blocklet?.settings?.notification?.pushKit || {});
|
|
37
|
+
const {
|
|
38
|
+
handleSubmit,
|
|
39
|
+
control,
|
|
40
|
+
formState,
|
|
41
|
+
watch,
|
|
42
|
+
reset
|
|
43
|
+
} = useForm({
|
|
44
|
+
defaultValues: pick(config, Object.keys(defaultFormValues))
|
|
45
|
+
});
|
|
46
|
+
const pageState = useReactive({
|
|
47
|
+
testReceiver: '',
|
|
48
|
+
testReceiverError: ''
|
|
49
|
+
});
|
|
50
|
+
const enabled = watch('enabled');
|
|
51
|
+
const onSubmit = useMemoizedFn(async (data, event, showNotification = true) => {
|
|
52
|
+
try {
|
|
53
|
+
const {
|
|
54
|
+
blocklet: blockletChanged
|
|
55
|
+
} = await api.configNotification({
|
|
56
|
+
input: {
|
|
57
|
+
did,
|
|
58
|
+
notification: JSON.stringify({
|
|
59
|
+
pushKit: data
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const defaultValues = Object.assign({
|
|
64
|
+
...defaultFormValues
|
|
65
|
+
}, blockletChanged?.settings?.notification?.pushKit || {});
|
|
66
|
+
// 将当前表单的默认值重置为新的数据,这样能够修正页面的 isDirty 数据
|
|
67
|
+
reset(defaultValues);
|
|
68
|
+
if (showNotification) {
|
|
69
|
+
Toast.success(t('oauth.saveSuccess'));
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {
|
|
72
|
+
if (showNotification) {
|
|
73
|
+
Toast.error(err.message || t('oauth.saveFailed'));
|
|
74
|
+
} else {
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const onTest = useMemoizedFn(async (data, event) => {
|
|
80
|
+
try {
|
|
81
|
+
// HACK: 如果当前数据有修改,则需要先保存配置,才能测试
|
|
82
|
+
if (formState.isDirty) {
|
|
83
|
+
await onSubmit(data, event, false);
|
|
84
|
+
}
|
|
85
|
+
await api.sendPush({
|
|
86
|
+
input: {
|
|
87
|
+
did,
|
|
88
|
+
receiver: 'z1b9wxs47TXpA5s6VMoGFBk933tF7ujzFDt',
|
|
89
|
+
notification: JSON.stringify({
|
|
90
|
+
title: 'Test push-kit notification',
|
|
91
|
+
body: 'This is message from push-kit config test',
|
|
92
|
+
type: 'passthrough',
|
|
93
|
+
passthroughType: 'messageStatus'
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
Toast.success(t('notification.pushKit.testSuccess'));
|
|
98
|
+
} catch (err) {
|
|
99
|
+
Toast.error(err.message || t('notification.pushKit.testfailed'));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const showTestEmailModal = useMemoizedFn((data, event) => {
|
|
103
|
+
pageState.testReceiver = '';
|
|
104
|
+
pageState.testReceiverError = '';
|
|
105
|
+
confirmApi.open({
|
|
106
|
+
title: t('notification.pushKit.testSend'),
|
|
107
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
108
|
+
content: () => {
|
|
109
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
110
|
+
sx: {
|
|
111
|
+
width: '300px'
|
|
112
|
+
},
|
|
113
|
+
children: /*#__PURE__*/_jsx(TextField, {
|
|
114
|
+
sx: {
|
|
115
|
+
mt: 1
|
|
116
|
+
},
|
|
117
|
+
fullWidth: true,
|
|
118
|
+
name: "testReceiver",
|
|
119
|
+
label: t('notification.pushKit.inputTestReceiver'),
|
|
120
|
+
value: pageState.testReceiver,
|
|
121
|
+
onChange: e => {
|
|
122
|
+
pageState.testReceiver = e.target.value;
|
|
123
|
+
},
|
|
124
|
+
error: !!pageState.testReceiverError,
|
|
125
|
+
helperText: pageState.testReceiverError || ' '
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
async onConfirm(close) {
|
|
130
|
+
const receiver = pageState.testReceiver?.trim();
|
|
131
|
+
if (!receiver) {
|
|
132
|
+
pageState.testReceiverError = t('notification.pushKit.receiverRequired');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
pageState.testReceiverError = '';
|
|
136
|
+
await onTest(data, event);
|
|
137
|
+
close();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
const validateEndpoint = useMemoizedFn(value => {
|
|
142
|
+
const val = value?.trim();
|
|
143
|
+
if (!val) {
|
|
144
|
+
return t('notification.pushKit.endpointRequired');
|
|
145
|
+
}
|
|
146
|
+
if (!isURL(val)) {
|
|
147
|
+
return t('notification.pushKit.endpointInvalid');
|
|
148
|
+
}
|
|
149
|
+
return true;
|
|
150
|
+
});
|
|
151
|
+
const noop = useMemoizedFn(() => true);
|
|
152
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
153
|
+
children: [/*#__PURE__*/_jsxs("form", {
|
|
154
|
+
onSubmit: handleSubmit(onSubmit),
|
|
155
|
+
disabled: true,
|
|
156
|
+
children: [/*#__PURE__*/_jsx(Controller, {
|
|
157
|
+
name: "enabled",
|
|
158
|
+
control: control,
|
|
159
|
+
render: ({
|
|
160
|
+
field
|
|
161
|
+
}) => /*#__PURE__*/_jsx(FormControlLabel, {
|
|
162
|
+
control: /*#__PURE__*/_jsx(Switch, {
|
|
163
|
+
checked: field.value,
|
|
164
|
+
...field
|
|
165
|
+
}),
|
|
166
|
+
label: t('notification.pushKit.enable'),
|
|
167
|
+
sx: {
|
|
168
|
+
marginBottom: '8px'
|
|
169
|
+
}
|
|
170
|
+
})
|
|
171
|
+
}), /*#__PURE__*/_jsx(Controller, {
|
|
172
|
+
name: "endpoint",
|
|
173
|
+
control: control,
|
|
174
|
+
rules: {
|
|
175
|
+
validate: enabled ? validateEndpoint : noop
|
|
176
|
+
},
|
|
177
|
+
render: ({
|
|
178
|
+
field
|
|
179
|
+
}) => /*#__PURE__*/_jsx(FormControl, {
|
|
180
|
+
fullWidth: true,
|
|
181
|
+
children: /*#__PURE__*/_jsx(TextField, {
|
|
182
|
+
...field,
|
|
183
|
+
required: true,
|
|
184
|
+
label: t('notification.pushKit.endpoint'),
|
|
185
|
+
error: !!formState.errors[field.name],
|
|
186
|
+
helperText: formState.errors[field.name]?.message || ' ',
|
|
187
|
+
disabled: !enabled
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
191
|
+
component: "details",
|
|
192
|
+
sx: {
|
|
193
|
+
pl: '1em'
|
|
194
|
+
},
|
|
195
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
196
|
+
component: "summary",
|
|
197
|
+
sx: {
|
|
198
|
+
mb: 1,
|
|
199
|
+
ml: '-1em'
|
|
200
|
+
},
|
|
201
|
+
children: t('notification.pushKit.customOptions')
|
|
202
|
+
}), /*#__PURE__*/_jsx(Controller, {
|
|
203
|
+
name: "did",
|
|
204
|
+
control: control,
|
|
205
|
+
render: ({
|
|
206
|
+
field
|
|
207
|
+
}) => /*#__PURE__*/_jsx(FormControl, {
|
|
208
|
+
fullWidth: true,
|
|
209
|
+
children: /*#__PURE__*/_jsx(TextField, {
|
|
210
|
+
...field,
|
|
211
|
+
label: t('notification.pushKit.did'),
|
|
212
|
+
error: !!formState.errors[field.name],
|
|
213
|
+
helperText: formState.errors[field.name]?.message || ' ',
|
|
214
|
+
disabled: !enabled
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
}), /*#__PURE__*/_jsx(Controller, {
|
|
218
|
+
name: "pushPath",
|
|
219
|
+
control: control,
|
|
220
|
+
render: ({
|
|
221
|
+
field
|
|
222
|
+
}) => /*#__PURE__*/_jsx(FormControl, {
|
|
223
|
+
fullWidth: true,
|
|
224
|
+
children: /*#__PURE__*/_jsx(TextField, {
|
|
225
|
+
...field,
|
|
226
|
+
label: t('notification.pushKit.pushPath'),
|
|
227
|
+
error: !!formState.errors[field.name],
|
|
228
|
+
helperText: formState.errors[field.name]?.message || ' ',
|
|
229
|
+
disabled: !enabled
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
})]
|
|
233
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
234
|
+
variant: "outlined",
|
|
235
|
+
color: "warning",
|
|
236
|
+
onClick: handleSubmit(showTestEmailModal),
|
|
237
|
+
sx: {
|
|
238
|
+
mr: 2
|
|
239
|
+
},
|
|
240
|
+
disabled: !enabled,
|
|
241
|
+
children: t('oauth.runTest')
|
|
242
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
243
|
+
type: "submit",
|
|
244
|
+
variant: "contained",
|
|
245
|
+
disabled: !formState.isDirty,
|
|
246
|
+
children: t('oauth.save')
|
|
247
|
+
})]
|
|
248
|
+
}), confirmHolder]
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
export default NotificationPushKit;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
2
|
-
import { Avatar, Box } from '@mui/material';
|
|
2
|
+
import { Avatar, Box, useMediaQuery } from '@mui/material';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import ShortenLabel from '../component/shorten-label';
|
|
@@ -14,6 +14,7 @@ function BlockletCard({
|
|
|
14
14
|
const uploadLogoPrefix = `${WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${did}/${projectId}/logo/upload`;
|
|
15
15
|
const logoUrl = `${uploadLogoPrefix}/${logo}`;
|
|
16
16
|
const [hover, setHover] = useState(false);
|
|
17
|
+
const isMobile = useMediaQuery(theme => theme.breakpoints.down('md'));
|
|
17
18
|
return /*#__PURE__*/_jsxs(Box, {
|
|
18
19
|
sx: {
|
|
19
20
|
display: 'flex',
|
|
@@ -34,7 +35,8 @@ function BlockletCard({
|
|
|
34
35
|
maxLength: "24",
|
|
35
36
|
sx: {
|
|
36
37
|
fontSize: '14px',
|
|
37
|
-
fontWeight: '500'
|
|
38
|
+
fontWeight: '500',
|
|
39
|
+
color: isMobile ? 'primary.main' : ''
|
|
38
40
|
},
|
|
39
41
|
children: title || '/'
|
|
40
42
|
}), /*#__PURE__*/_jsx(ShortenLabel, {
|
|
@@ -42,7 +44,7 @@ function BlockletCard({
|
|
|
42
44
|
maxLength: "58",
|
|
43
45
|
sx: {
|
|
44
46
|
fontSize: '12px',
|
|
45
|
-
color: hover ? 'primary.main' : 'grey.700'
|
|
47
|
+
color: isMobile || hover ? 'primary.main' : 'grey.700'
|
|
46
48
|
},
|
|
47
49
|
children: describe || '/'
|
|
48
50
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UNOWNED_DID, WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
|
|
2
2
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
3
|
-
import { Box, Breadcrumbs, Button, Typography, Dialog as MaterialDialog } from '@mui/material';
|
|
3
|
+
import { Box, Breadcrumbs, Button, Typography, Dialog as MaterialDialog, IconButton, useMediaQuery } from '@mui/material';
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { Link, useNavigate } from 'react-router-dom';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -14,6 +14,7 @@ import Toast from '@arcblock/ux/lib/Toast/index';
|
|
|
14
14
|
import pAll from 'p-all';
|
|
15
15
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
16
16
|
import pick from 'lodash/pick';
|
|
17
|
+
import { Icon } from '@iconify/react';
|
|
17
18
|
import ConnectStoreList from './connect-store-list';
|
|
18
19
|
import { validateParams } from '../utils/validate-params';
|
|
19
20
|
import { waitGetConnectedStore } from '../utils/wait-connect';
|
|
@@ -22,6 +23,7 @@ import { uploadResource } from './resources';
|
|
|
22
23
|
import ClickToCopy from '../../../click-to-copy';
|
|
23
24
|
import { formatError } from '../../../util';
|
|
24
25
|
import { useNodeContext } from '../../../contexts/node';
|
|
26
|
+
import ShortenLabel from '../../component/shorten-label';
|
|
25
27
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
28
|
const serverEndpoint = window.env?.serverEndpoint;
|
|
27
29
|
function Header({
|
|
@@ -59,6 +61,7 @@ function Header({
|
|
|
59
61
|
const navigate = useNavigate();
|
|
60
62
|
const [showStoreDialog, setShowStoreDialog] = useState(false);
|
|
61
63
|
const [installResourceTip, setInstallResourceTip] = useState();
|
|
64
|
+
const isMobile = useMediaQuery(theme => theme.breakpoints.down('md'));
|
|
62
65
|
const onPublish = () => {
|
|
63
66
|
window.parent.postMessage({
|
|
64
67
|
event: 'studioDialog.uploaded',
|
|
@@ -223,20 +226,39 @@ function Header({
|
|
|
223
226
|
href: url.href,
|
|
224
227
|
target: "_blank",
|
|
225
228
|
rel: "noreferrer",
|
|
226
|
-
children: /*#__PURE__*/_jsx(
|
|
229
|
+
children: isMobile ? /*#__PURE__*/_jsx(IconButton, {
|
|
230
|
+
color: "primary",
|
|
231
|
+
sx: {
|
|
232
|
+
mr: 1
|
|
233
|
+
},
|
|
234
|
+
onClick: () => setInstallResourceTip(blockletMetaUrl),
|
|
235
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
236
|
+
icon: "ic:baseline-install-desktop"
|
|
237
|
+
})
|
|
238
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
227
239
|
variant: "outlined",
|
|
228
|
-
|
|
229
|
-
|
|
240
|
+
sx: {
|
|
241
|
+
mr: 1
|
|
230
242
|
},
|
|
243
|
+
onClick: () => setInstallResourceTip(blockletMetaUrl),
|
|
231
244
|
children: t('common.install')
|
|
232
245
|
})
|
|
233
246
|
});
|
|
234
247
|
} else {
|
|
235
248
|
installButton = /*#__PURE__*/_jsxs(_Fragment, {
|
|
236
|
-
children: [/*#__PURE__*/_jsx(
|
|
249
|
+
children: [isMobile ? /*#__PURE__*/_jsx(IconButton, {
|
|
250
|
+
color: "primary",
|
|
251
|
+
sx: {
|
|
252
|
+
mr: 1
|
|
253
|
+
},
|
|
254
|
+
onClick: () => setInstallResourceTip(blockletMetaUrl),
|
|
255
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
256
|
+
icon: "ic:baseline-install-desktop"
|
|
257
|
+
})
|
|
258
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
237
259
|
variant: "outlined",
|
|
238
|
-
|
|
239
|
-
|
|
260
|
+
sx: {
|
|
261
|
+
mr: 1
|
|
240
262
|
},
|
|
241
263
|
onClick: () => setInstallResourceTip(blockletMetaUrl),
|
|
242
264
|
children: t('blocklet.publish.copyInstallUrl')
|
|
@@ -293,10 +315,16 @@ function Header({
|
|
|
293
315
|
children: t('common.blockletStudio')
|
|
294
316
|
}), projectId === UNOWNED_DID ? /*#__PURE__*/_jsx(Typography, {
|
|
295
317
|
color: "text.primary",
|
|
296
|
-
children:
|
|
318
|
+
children: /*#__PURE__*/_jsx(ShortenLabel, {
|
|
319
|
+
maxLength: isMobile ? 6 : 30,
|
|
320
|
+
children: params?.blockletTitle || 'Blocklet'
|
|
321
|
+
})
|
|
297
322
|
}) : /*#__PURE__*/_jsx(Link, {
|
|
298
323
|
to: `../${projectId}`,
|
|
299
|
-
children:
|
|
324
|
+
children: /*#__PURE__*/_jsx(ShortenLabel, {
|
|
325
|
+
maxLength: isMobile ? 6 : 30,
|
|
326
|
+
children: params?.blockletTitle || 'Blocklet'
|
|
327
|
+
})
|
|
300
328
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
301
329
|
color: "text.primary",
|
|
302
330
|
children: mode === 'create' ? t('common.create') : params?.blockletVersion || t('common.edit')
|
|
@@ -320,10 +348,10 @@ function Header({
|
|
|
320
348
|
}), isPublished && /*#__PURE__*/_jsxs(_Fragment, {
|
|
321
349
|
children: [installButton, /*#__PURE__*/_jsx("a", {
|
|
322
350
|
href: joinURL(`${WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${blocklet.meta.did}/${projectId}/${releaseId}/download/${(release.files || [])[0]}`),
|
|
323
|
-
children: /*#__PURE__*/_jsx(Button, {
|
|
351
|
+
children: isMobile ? null : /*#__PURE__*/_jsx(Button, {
|
|
324
352
|
variant: "outlined",
|
|
325
|
-
|
|
326
|
-
|
|
353
|
+
sx: {
|
|
354
|
+
mr: 1
|
|
327
355
|
},
|
|
328
356
|
children: t('common.download')
|
|
329
357
|
})
|
|
@@ -335,7 +363,7 @@ function Header({
|
|
|
335
363
|
fontSize: '1.3em',
|
|
336
364
|
marginRight: 4
|
|
337
365
|
}
|
|
338
|
-
}), t('common.uploadToStore')]
|
|
366
|
+
}), isMobile ? t('common.upload') : t('common.uploadToStore')]
|
|
339
367
|
})]
|
|
340
368
|
})]
|
|
341
369
|
})
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { UNOWNED_DID } from '@abtnode/constant';
|
|
2
|
+
import QuestionMarkIcon from '@arcblock/icons/lib/QuestionMarkCircle';
|
|
3
|
+
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
4
|
+
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
5
|
+
import Toast from '@arcblock/ux/lib/Toast';
|
|
3
6
|
import styled from '@emotion/styled';
|
|
7
|
+
import { Box, Tooltip, Typography, useMediaQuery } from '@mui/material';
|
|
8
|
+
import pick from 'lodash/pick';
|
|
4
9
|
import PropTypes from 'prop-types';
|
|
10
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
|
+
import { useParams } from 'react-router-dom';
|
|
5
12
|
import useSetState from 'react-use/lib/useSetState';
|
|
6
|
-
import pick from 'lodash/pick';
|
|
7
13
|
import semver from 'semver';
|
|
8
|
-
import { Box, Typography, useMediaQuery, Tooltip } from '@mui/material';
|
|
9
|
-
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
10
|
-
import Toast from '@arcblock/ux/lib/Toast';
|
|
11
|
-
import Tabs from '@arcblock/ux/lib/Tabs';
|
|
12
|
-
import { UNOWNED_DID } from '@abtnode/constant';
|
|
13
|
-
import QuestionMarkIcon from '@arcblock/icons/lib/QuestionMarkCircle';
|
|
14
14
|
import BlockletBundleAvatar from '../../bundle-avatar';
|
|
15
|
-
import { useNodeContext } from '../../../contexts/node';
|
|
16
15
|
import { useBlockletContext } from '../../../contexts/blocklet';
|
|
16
|
+
import { useNodeContext } from '../../../contexts/node';
|
|
17
17
|
import EmptySpinner from '../../../empty-spinner';
|
|
18
18
|
import { formatError } from '../../../util';
|
|
19
|
-
import Resources from './resources';
|
|
20
19
|
import Blocklets from './blocklets';
|
|
21
|
-
import
|
|
20
|
+
import Resources from './resources';
|
|
22
21
|
import Branding from './branding';
|
|
23
|
-
import Version from './version';
|
|
24
22
|
import Header from './header';
|
|
25
|
-
import ReleaseStepper from './release-stepper';
|
|
26
23
|
import Introduction from './introduction';
|
|
24
|
+
import ReleaseStepper from './release-stepper';
|
|
25
|
+
import StopBox from './stop-box';
|
|
26
|
+
import Version from './version';
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
const addComponentTabs = ({
|
|
29
29
|
tabs,
|
|
@@ -321,6 +321,7 @@ export default function CreateRelease({
|
|
|
321
321
|
children: [/*#__PURE__*/_jsx(Header, {
|
|
322
322
|
blocklet: blocklet,
|
|
323
323
|
release: release,
|
|
324
|
+
getData: getData,
|
|
324
325
|
getRelease: getRelease,
|
|
325
326
|
mode: mode,
|
|
326
327
|
params: params,
|
|
@@ -460,7 +461,8 @@ export default function CreateRelease({
|
|
|
460
461
|
onChange: onTabChange,
|
|
461
462
|
sx: {
|
|
462
463
|
ml: -2,
|
|
463
|
-
mt: -1.5
|
|
464
|
+
mt: -1.5,
|
|
465
|
+
maxWidth: isMobile ? window.innerWidth - 24 : '100%'
|
|
464
466
|
}
|
|
465
467
|
}), /*#__PURE__*/_jsx(Box, {
|
|
466
468
|
children: /*#__PURE__*/_jsx(Resources, {
|
|
@@ -6,7 +6,7 @@ import useSetState from 'react-use/lib/useSetState';
|
|
|
6
6
|
import joinUrl from 'url-join';
|
|
7
7
|
import { Box } from '@mui/material';
|
|
8
8
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
9
|
-
import hasStartEngine from '@blocklet/meta/lib/
|
|
9
|
+
import { hasStartEngine } from '@blocklet/meta/lib/engine';
|
|
10
10
|
import pAll from 'p-all';
|
|
11
11
|
import Toast from '@arcblock/ux/lib/Toast/index';
|
|
12
12
|
import { EmptyIcon } from '@arcblock/icons';
|
|
@@ -220,7 +220,7 @@ export default function Resources({
|
|
|
220
220
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
221
221
|
}, [app, initialResources, readOnly]);
|
|
222
222
|
let Empty = null;
|
|
223
|
-
if (!component) {
|
|
223
|
+
if (!component || !resources[component.meta.did]?.length) {
|
|
224
224
|
Empty = /*#__PURE__*/_jsx(StopBox, {
|
|
225
225
|
Icon: EmptyIcon,
|
|
226
226
|
children: t('blocklet.publish.resourceEmptyTip', {
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/* eslint-disable react/no-unstable-nested-components */
|
|
2
|
-
import React, { useState, useEffect } from 'react';
|
|
3
|
-
import { Link, useNavigate, useParams } from 'react-router-dom';
|
|
4
2
|
import styled from '@emotion/styled';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import { Link, useNavigate, useParams } from 'react-router-dom';
|
|
6
6
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
7
|
-
import Box from '@mui/material/Box';
|
|
8
7
|
import AddIcon from '@mui/icons-material/Add';
|
|
9
|
-
import
|
|
8
|
+
import NewFileIcon from '@mui/icons-material/AddBox';
|
|
10
9
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
10
|
+
import ErrorIcon from '@mui/icons-material/Error';
|
|
11
11
|
import VisibilityIcon from '@mui/icons-material/FileOpen';
|
|
12
|
-
import NewFileIcon from '@mui/icons-material/AddBox';
|
|
13
12
|
import HelpOutlineOutlinedIcon from '@mui/icons-material/HelpOutlineOutlined';
|
|
14
|
-
import
|
|
13
|
+
import Box from '@mui/material/Box';
|
|
14
|
+
import IconButton from '@mui/material/IconButton';
|
|
15
15
|
import { UNOWNED_DID } from '@abtnode/constant';
|
|
16
|
-
import
|
|
16
|
+
import DidConnect from '@arcblock/did-connect/lib/Connect';
|
|
17
17
|
import Button from '@arcblock/ux/lib/Button';
|
|
18
|
-
import
|
|
19
|
-
import Tag from '@arcblock/ux/lib/Tag';
|
|
18
|
+
import Datatable from '@arcblock/ux/lib/Datatable';
|
|
20
19
|
import RelativeTime from '@arcblock/ux/lib/RelativeTime';
|
|
21
|
-
import
|
|
20
|
+
import Tag from '@arcblock/ux/lib/Tag';
|
|
21
|
+
import Toast from '@arcblock/ux/lib/Toast';
|
|
22
22
|
import { Tooltip, Typography, useMediaQuery } from '@mui/material';
|
|
23
|
-
import
|
|
23
|
+
import Confirm from '../../confirm';
|
|
24
24
|
import { useBlockletContext } from '../../contexts/blocklet';
|
|
25
25
|
import { useNodeContext } from '../../contexts/node';
|
|
26
|
-
import
|
|
26
|
+
import { useSessionContext } from '../../contexts/session';
|
|
27
27
|
import DidAddress from '../../did-address';
|
|
28
|
-
import
|
|
28
|
+
import EmptySpinner from '../../empty-spinner';
|
|
29
29
|
import BlockletBundleAvatar from '../bundle-avatar';
|
|
30
30
|
import ShortenLabel from '../component/shorten-label';
|
|
31
31
|
import BlockletCard from './blocklet-card';
|
|
@@ -278,7 +278,7 @@ export default function ProjectList({
|
|
|
278
278
|
return /*#__PURE__*/_jsxs(Box, {
|
|
279
279
|
display: "flex",
|
|
280
280
|
children: [/*#__PURE__*/_jsx(Link, {
|
|
281
|
-
to: `${project.id}/
|
|
281
|
+
to: `${project.id}/new-release/${project.lastReleaseId}`,
|
|
282
282
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
283
283
|
title: t('blocklet.publish.createRelease'),
|
|
284
284
|
placement: "top",
|
|
@@ -304,7 +304,7 @@ export default function ProjectList({
|
|
|
304
304
|
style: {
|
|
305
305
|
display: 'flex'
|
|
306
306
|
},
|
|
307
|
-
to: `${project.id}/
|
|
307
|
+
to: `${project.id}/view/${project.lastReleaseId}`,
|
|
308
308
|
children: /*#__PURE__*/_jsx(VisibilityIcon, {
|
|
309
309
|
sx: {
|
|
310
310
|
fontSize: 18
|
|
@@ -5,11 +5,7 @@ import styled from '@emotion/styled';
|
|
|
5
5
|
import joinUrl from 'url-join';
|
|
6
6
|
import upperFirst from 'lodash/upperFirst';
|
|
7
7
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
8
|
-
import Box from '@mui/material
|
|
9
|
-
import IconButton from '@mui/material/IconButton';
|
|
10
|
-
import Typography from '@mui/material/Typography';
|
|
11
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
12
|
-
import Breadcrumbs from '@mui/material/Breadcrumbs';
|
|
8
|
+
import { Box, useMediaQuery, IconButton, Typography, Tooltip, Breadcrumbs } from '@mui/material';
|
|
13
9
|
import DownloadIcon from '@mui/icons-material/Download';
|
|
14
10
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
15
11
|
import AddIcon from '@mui/icons-material/Add';
|
|
@@ -26,6 +22,7 @@ import { useNodeContext } from '../../contexts/node';
|
|
|
26
22
|
import EmptySpinner from '../../empty-spinner';
|
|
27
23
|
import Confirm from '../../confirm';
|
|
28
24
|
import BlockletCard from './blocklet-card';
|
|
25
|
+
import ShortenLabel from '../component/shorten-label';
|
|
29
26
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
30
27
|
export default function ReleaseList() {
|
|
31
28
|
const {
|
|
@@ -42,6 +39,7 @@ export default function ReleaseList() {
|
|
|
42
39
|
const {
|
|
43
40
|
blocklet
|
|
44
41
|
} = useBlockletContext();
|
|
42
|
+
const isMobile = useMediaQuery(theme => theme.breakpoints.down('md'));
|
|
45
43
|
const [releases, setReleases] = useState(null);
|
|
46
44
|
const [project, setProject] = useState(null);
|
|
47
45
|
const [deleteConfirm, setDeleteConfirm] = useState(null);
|
|
@@ -132,7 +130,10 @@ export default function ReleaseList() {
|
|
|
132
130
|
children: t('common.blockletStudio')
|
|
133
131
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
134
132
|
color: "text.primary",
|
|
135
|
-
children:
|
|
133
|
+
children: /*#__PURE__*/_jsx(ShortenLabel, {
|
|
134
|
+
maxLength: isMobile ? 6 : 30,
|
|
135
|
+
children: project.blockletTitle
|
|
136
|
+
})
|
|
136
137
|
})]
|
|
137
138
|
});
|
|
138
139
|
if (!releases.length) {
|
|
@@ -348,6 +349,9 @@ const Main = styled(Box)`
|
|
|
348
349
|
align-items: center;
|
|
349
350
|
justify-content: space-between;
|
|
350
351
|
}
|
|
352
|
+
.main-table {
|
|
353
|
+
margin-top: 24px;
|
|
354
|
+
}
|
|
351
355
|
.main-table > div:first-child {
|
|
352
356
|
display: none;
|
|
353
357
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ROUTING_RULE_TYPES, DEFAULT_IP_DOMAIN_SUFFIX, DOMAIN_FOR_IP_SITE_REGEXP, DOMAIN_FOR_DEFAULT_SITE, DOMAIN_FOR_IP_SITE } from '@abtnode/constant';
|
|
3
3
|
import isPathPrefixEqual from '@abtnode/util/lib/is-path-prefix-equal';
|
|
4
4
|
import { BLOCKLET_DYNAMIC_PATH_PREFIX } from '@blocklet/constant';
|
|
5
|
-
import hasStartEngine from '@blocklet/meta/lib/
|
|
5
|
+
import { hasStartEngine } from '@blocklet/meta/lib/engine';
|
|
6
6
|
const validateRuleByServiceType = (params, localeContext) => {
|
|
7
7
|
if (params.type === ROUTING_RULE_TYPES.REDIRECT) {
|
|
8
8
|
if (!params.url) {
|
package/lib/locales/ar.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'انتهت صلاحية رمز الإلغاء الاشتراك',
|
|
970
970
|
unsubscribeTokenInvalid: 'رمز إلغاء الاشتراك غير صالح',
|
|
971
971
|
installComponentError: 'لم يتم العثور على المكون الملغي {name}',
|
|
972
|
-
installingComponent: 'تثبيت المكون {name}'
|
|
972
|
+
installingComponent: 'تثبيت المكون {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'تفعيل إشعار PushKit',
|
|
975
|
+
endpoint: 'نقطة نهاية PushKit',
|
|
976
|
+
endpointInvalid: 'نقطة نهاية PushKit عنوان URL غير صالح',
|
|
977
|
+
testSuccess: 'تم إرسال اختبار PushKit بنجاح',
|
|
978
|
+
testFailed: 'اختبار PushKit للإرسال فشل',
|
|
979
|
+
testReceiver: 'مستقبل PushKit',
|
|
980
|
+
testSend: 'اختبار إرسال مجموعة الدفع',
|
|
981
|
+
inputTestReceiver: 'الرجاء إدخال مستقبل الاختبار',
|
|
982
|
+
receiverRequired: 'مطلوب مستقبل PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'نطاقات وروابط',
|
package/lib/locales/de.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'Abmeldetoken ist abgelaufen',
|
|
970
970
|
unsubscribeTokenInvalid: 'Das Abonnement-Token ist ungültig',
|
|
971
971
|
installComponentError: 'Nicht gefunden deinstallierte Komponente {name}',
|
|
972
|
-
installingComponent: 'Installiere Komponente {name}'
|
|
972
|
+
installingComponent: 'Installiere Komponente {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'PushKit-Benachrichtigung aktivieren',
|
|
975
|
+
endpoint: 'PushKit-Endpunkt',
|
|
976
|
+
endpointInvalid: 'PushKit-Endpunkt ist eine ungültige URL',
|
|
977
|
+
testSuccess: 'Test PushKit-Versendung erfolgreich',
|
|
978
|
+
testFailed: 'Test PushKit senden fehlgeschlagen',
|
|
979
|
+
testReceiver: 'PushKit-Empfänger',
|
|
980
|
+
testSend: 'Test-Push-Kit senden',
|
|
981
|
+
inputTestReceiver: 'Bitte geben Sie den Test-Empfänger ein',
|
|
982
|
+
receiverRequired: 'PushKit-Empfänger ist erforderlich'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Domains & URLs',
|
package/lib/locales/en.js
CHANGED
|
@@ -922,6 +922,20 @@ export default {
|
|
|
922
922
|
checkingForUpdates: 'Checking for updates...',
|
|
923
923
|
installComponentError: 'Not found uninstalled component {name}',
|
|
924
924
|
installingComponent: 'Installing component {name}',
|
|
925
|
+
pushKit: {
|
|
926
|
+
enable: 'Enable PushKit notification',
|
|
927
|
+
endpoint: 'PushKit endpoint',
|
|
928
|
+
endpointInvalid: 'PushKit endpoint is invalid URL',
|
|
929
|
+
testSuccess: 'Test PushKit send successfully',
|
|
930
|
+
testFailed: 'Test PushKit send failed',
|
|
931
|
+
testReceiver: 'PushKit receiver',
|
|
932
|
+
testSend: 'Test push-kit send',
|
|
933
|
+
inputTestReceiver: 'Please input test receiver did',
|
|
934
|
+
receiverRequired: 'PushKit receiver is required',
|
|
935
|
+
pushPath: 'Api path for push-kit (default /api/push)',
|
|
936
|
+
did: 'PushKit Blocklet DID',
|
|
937
|
+
customOptions: 'Custom Options'
|
|
938
|
+
},
|
|
925
939
|
email: {
|
|
926
940
|
enable: 'Enable email notification',
|
|
927
941
|
from: 'Email sender',
|
package/lib/locales/es.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'El token de cancelación de suscripción ha caducado',
|
|
970
970
|
unsubscribeTokenInvalid: 'El token de cancelación de suscripción no es válido',
|
|
971
971
|
installComponentError: 'Componente {name} no encontrado o desinstalado',
|
|
972
|
-
installingComponent: 'Instalando componente {name}'
|
|
972
|
+
installingComponent: 'Instalando componente {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'Habilitar notificaciones PushKit',
|
|
975
|
+
endpoint: 'Punto final PushKit',
|
|
976
|
+
endpointInvalid: 'El punto final PushKit no es una URL válida',
|
|
977
|
+
testSuccess: 'La prueba de PushKit se envió correctamente',
|
|
978
|
+
testFailed: 'Test PushKit enviar falló',
|
|
979
|
+
testReceiver: 'Receptor PushKit',
|
|
980
|
+
testSend: 'Probar enviar push-kit',
|
|
981
|
+
inputTestReceiver: 'Introduzca el receptor de prueba did',
|
|
982
|
+
receiverRequired: 'Se requiere receptor PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Dominios y URL',
|
package/lib/locales/fr.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'Le jeton de désabonnement a expiré',
|
|
970
970
|
unsubscribeTokenInvalid: 'Le jeton de désabonnement est invalide',
|
|
971
971
|
installComponentError: 'Composant désinstallé {name} non trouvé',
|
|
972
|
-
installingComponent: 'Installation du composant {name}'
|
|
972
|
+
installingComponent: 'Installation du composant {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'Activer les notifications PushKit',
|
|
975
|
+
endpoint: "Point d'extrémité PushKit",
|
|
976
|
+
endpointInvalid: 'Le point de terminaison PushKit est une URL non valide',
|
|
977
|
+
testSuccess: "Le test d'envoi du PushKit a réussi",
|
|
978
|
+
testFailed: 'Test PushKit envoyer a échoué',
|
|
979
|
+
testReceiver: 'Récepteur PushKit',
|
|
980
|
+
testSend: "Tester l'envoi du kit push",
|
|
981
|
+
inputTestReceiver: 'Veuillez saisir le destinataire du test',
|
|
982
|
+
receiverRequired: 'Récepteur PushKit requis'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Domaines et URLs',
|
package/lib/locales/hi.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'अनुवंशीकरण टोकन समाप्त हो गया है',
|
|
970
970
|
unsubscribeTokenInvalid: 'अनुशंसा टोकन अमान्य है',
|
|
971
971
|
installComponentError: 'नहीं मिला अनइंस्टॉल किया गया घटक {name}',
|
|
972
|
-
installingComponent: '{name} कॉम्पोनेंट स्थापित कर रहा है'
|
|
972
|
+
installingComponent: '{name} कॉम्पोनेंट स्थापित कर रहा है',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'पुशकिट अधिसूचना सक्षम करें',
|
|
975
|
+
endpoint: 'पुशकिट एंडपॉइंट',
|
|
976
|
+
endpointInvalid: 'पुष्किट एंडपॉइंट गलत URL है',
|
|
977
|
+
testSuccess: 'टेस्ट पुष्किट भेजना सफल',
|
|
978
|
+
testFailed: 'टेस्ट पुशकिट भेजने में असफल',
|
|
979
|
+
testReceiver: 'पुष्कीत रिसीवर',
|
|
980
|
+
testSend: 'टेस्ट पुश-किट भेजें',
|
|
981
|
+
inputTestReceiver: 'कृपया परीक्षण रिसीवर इनपुट करें',
|
|
982
|
+
receiverRequired: 'पुशकिट रिसीवर ज़रूरी हैं'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'डोमेन और यूआरएल',
|
package/lib/locales/i18n.db
CHANGED
|
Binary file
|
package/lib/locales/id.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'Token berhenti langganan telah kedaluwarsa',
|
|
970
970
|
unsubscribeTokenInvalid: 'Token berhenti berlangganan tidak valid',
|
|
971
971
|
installComponentError: 'Komponen {name} yang telah dihapus tidak ditemukan',
|
|
972
|
-
installingComponent: 'Menginstal komponen {name}'
|
|
972
|
+
installingComponent: 'Menginstal komponen {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'Aktifkan notifikasi PushKit',
|
|
975
|
+
endpoint: 'PushKit endpoint',
|
|
976
|
+
endpointInvalid: 'Endpoint PushKit adalah URL yang tidak valid',
|
|
977
|
+
testSuccess: 'Uji Coba PushKit terkirim dengan sukses',
|
|
978
|
+
testFailed: 'Uji coba PushKit kirim gagal',
|
|
979
|
+
testReceiver: 'Penerima PushKit',
|
|
980
|
+
testSend: 'Uji coba kiriman push-kit',
|
|
981
|
+
inputTestReceiver: 'Masukkan penerima uji',
|
|
982
|
+
receiverRequired: 'Diperlukan penerima PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Domain dan URL',
|
package/lib/locales/ja.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: '退会トークンの有効期限が切れています',
|
|
970
970
|
unsubscribeTokenInvalid: '購読解除トークンが無効です',
|
|
971
971
|
installComponentError: '未発見またはアンインストールされたコンポーネント {name} は見つかりません',
|
|
972
|
-
installingComponent: 'コンポーネント {name} のインストール中'
|
|
972
|
+
installingComponent: 'コンポーネント {name} のインストール中',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'PushKit 通知を有効にする',
|
|
975
|
+
endpoint: 'PushKit エンドポイント',
|
|
976
|
+
endpointInvalid: 'PushKit エンドポイントは有効な URL ではありません',
|
|
977
|
+
testSuccess: 'PushKit のテストが正常に送信されました',
|
|
978
|
+
testFailed: 'テスト PushKit 送信に失敗',
|
|
979
|
+
testReceiver: 'PushKit レシーバー',
|
|
980
|
+
testSend: 'プッシュキットの送信をテストする',
|
|
981
|
+
inputTestReceiver: 'テストレシーバーdidを入力してください',
|
|
982
|
+
receiverRequired: 'PushKit レシーバーが必要です'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'ドメインとURL',
|
package/lib/locales/ko.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: '구독 취소 토큰이 만료되었습니다',
|
|
970
970
|
unsubscribeTokenInvalid: '구독 취소 토큰이 잘못되었습니다',
|
|
971
971
|
installComponentError: '찾을 수 없는 미설치 구성 요소 {name}',
|
|
972
|
-
installingComponent: '{name} 구성 요소를 설치 중입니다.'
|
|
972
|
+
installingComponent: '{name} 구성 요소를 설치 중입니다.',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'PushKit 알림 사용',
|
|
975
|
+
endpoint: 'PushKit 엔드포인트',
|
|
976
|
+
endpointInvalid: 'PushKit 끝점이 유효하지 않은 URL입니다',
|
|
977
|
+
testSuccess: '테스트 PushKit이(가) 성공적으로 전송되었습니다',
|
|
978
|
+
testFailed: '테스트 PushKit 전송 실패',
|
|
979
|
+
testReceiver: '푸시킷 수신기',
|
|
980
|
+
testSend: '푸시 키트 보내기 테스트',
|
|
981
|
+
inputTestReceiver: '테스트 수신자 입력 did',
|
|
982
|
+
receiverRequired: 'PushKit 수신기가 필요함'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: '도메인 및 URL',
|
package/lib/locales/pt.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'O token de cancelamento de inscrição expirou',
|
|
970
970
|
unsubscribeTokenInvalid: 'O token de cancelamento da inscrição é inválido',
|
|
971
971
|
installComponentError: 'Componente {name} desinstalado não encontrado',
|
|
972
|
-
installingComponent: 'Instalando o componente {name}'
|
|
972
|
+
installingComponent: 'Instalando o componente {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'Habilitar notificação PushKit',
|
|
975
|
+
endpoint: 'PushKit endpoint',
|
|
976
|
+
endpointInvalid: 'O endpoint do PushKit é uma URL inválida',
|
|
977
|
+
testSuccess: 'Teste PushKit enviado com sucesso',
|
|
978
|
+
testFailed: 'Teste do envio PushKit falhou',
|
|
979
|
+
testReceiver: 'Receptor PushKit',
|
|
980
|
+
testSend: 'Teste o envio do push-kit',
|
|
981
|
+
inputTestReceiver: 'Digite o receptor de teste',
|
|
982
|
+
receiverRequired: 'É necessário o receptor PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Domínios e URLs',
|
package/lib/locales/ru.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'Срок действия токена отписки истек',
|
|
970
970
|
unsubscribeTokenInvalid: 'Токен отписки недействителен',
|
|
971
971
|
installComponentError: 'Не найден удаленный компонент {name}',
|
|
972
|
-
installingComponent: 'Установка компонента {name}'
|
|
972
|
+
installingComponent: 'Установка компонента {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'Активировать уведомления PushKit',
|
|
975
|
+
endpoint: 'Конечная точка PushKit',
|
|
976
|
+
endpointInvalid: 'Конечная точка PushKit является недействительным URL-адресом',
|
|
977
|
+
testSuccess: 'Тестовая рассылка PushKit успешно',
|
|
978
|
+
testFailed: 'Тест PushKit отправить не удалось',
|
|
979
|
+
testReceiver: 'Приемник PushKit',
|
|
980
|
+
testSend: 'Проверка отправки push-комплекта',
|
|
981
|
+
inputTestReceiver: 'Пожалуйста, введите тестовый приемник',
|
|
982
|
+
receiverRequired: 'Требуется приемник PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Домены и URL',
|
package/lib/locales/th.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'โทเค็นการยกเลิกสมาชิกหมดอายุ',
|
|
970
970
|
unsubscribeTokenInvalid: 'โทเค็นการยกเลิกการสมัครสมาชิกไม่ถูกต้อง',
|
|
971
971
|
installComponentError: 'ไม่พบส่วนประกอบที่ถอนการติดตั้ง {name}',
|
|
972
|
-
installingComponent: 'กำลังติดตั้งส่วนประกอบ {name}'
|
|
972
|
+
installingComponent: 'กำลังติดตั้งส่วนประกอบ {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'เปิดใช้งานการแจ้งเตือน PushKit',
|
|
975
|
+
endpoint: 'PushKit endpoint',
|
|
976
|
+
endpointInvalid: 'จุดสิ้นสุด PushKit เป็น URL ที่ไม่ถูกต้อง',
|
|
977
|
+
testSuccess: 'การทดสอบ PushKit ส่งสำเร็จ',
|
|
978
|
+
testFailed: 'การทดสอบส่ง PushKit ล้มเหลว',
|
|
979
|
+
testReceiver: 'ตัวรับ PushKit',
|
|
980
|
+
testSend: 'ทดสอบการส่ง push-kit',
|
|
981
|
+
inputTestReceiver: 'โปรดป้อนเครื่องรับทดสอบ',
|
|
982
|
+
receiverRequired: 'จำเป็นต้องใช้ตัวรับ PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'โดเมนและ URL',
|
package/lib/locales/vi.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: 'Mã hủy đăng ký đã hết hạn',
|
|
970
970
|
unsubscribeTokenInvalid: 'Mã hủy đăng ký không hợp lệ',
|
|
971
971
|
installComponentError: 'Không tìm thấy thành phần {name} đã gỡ cài đặt',
|
|
972
|
-
installingComponent: 'Đang cài đặt thành phần {name}'
|
|
972
|
+
installingComponent: 'Đang cài đặt thành phần {name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: 'Kích hoạt thông báo PushKit',
|
|
975
|
+
endpoint: 'PushKit endpoint',
|
|
976
|
+
endpointInvalid: 'Điểm cuối PushKit là URL không hợp lệ',
|
|
977
|
+
testSuccess: 'Đẩy thử PushKit thành công',
|
|
978
|
+
testFailed: 'Thử nghiệm gửi PushKit không thành công',
|
|
979
|
+
testReceiver: 'Máy thu PushKit',
|
|
980
|
+
testSend: 'Thử nghiệm đẩy push-kit',
|
|
981
|
+
inputTestReceiver: 'Vui lòng nhập máy thu thử nghiệm',
|
|
982
|
+
receiverRequired: 'Cần có bộ thu PushKit'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: 'Domínio và URL',
|
package/lib/locales/zh-tw.js
CHANGED
|
@@ -969,7 +969,18 @@ export default {
|
|
|
969
969
|
unsubscribeTokenExpired: '退訂令牌已過期',
|
|
970
970
|
unsubscribeTokenInvalid: '退訂令牌無效',
|
|
971
971
|
installComponentError: '未找到已卸載的組件 {name}',
|
|
972
|
-
installingComponent: '安裝元件{name}'
|
|
972
|
+
installingComponent: '安裝元件{name}',
|
|
973
|
+
pushKit: {
|
|
974
|
+
enable: '啟用 PushKit 通知',
|
|
975
|
+
endpoint: 'PushKit 端點',
|
|
976
|
+
endpointInvalid: 'PushKit 端點不是一個有效的網址',
|
|
977
|
+
testSuccess: 'Test PushKit 送出成功',
|
|
978
|
+
testFailed: '測試 PushKit 傳送失敗',
|
|
979
|
+
testReceiver: 'PushKit 接收者',
|
|
980
|
+
testSend: '測試推播套件發送',
|
|
981
|
+
inputTestReceiver: '請輸入測試接收者 DID',
|
|
982
|
+
receiverRequired: '需要 PushKit 接收者 DID'
|
|
983
|
+
}
|
|
973
984
|
},
|
|
974
985
|
router: {
|
|
975
986
|
routerSetting: '網域和網址',
|
package/lib/locales/zh.js
CHANGED
|
@@ -972,7 +972,18 @@ export default {
|
|
|
972
972
|
unsubscribeTokenExpired: '取消订阅链接已过期',
|
|
973
973
|
unsubscribeTokenInvalid: '取消订阅链接有误',
|
|
974
974
|
installComponentError: '未找到卸载的组件 {name}',
|
|
975
|
-
installingComponent: '安装组件{name}'
|
|
975
|
+
installingComponent: '安装组件{name}',
|
|
976
|
+
pushKit: {
|
|
977
|
+
enable: '启用 PushKit 通知',
|
|
978
|
+
endpoint: 'PushKit 端点',
|
|
979
|
+
endpointInvalid: 'PushKit 端点不是一个有效的网址',
|
|
980
|
+
testSuccess: 'Test PushKit 发送成功',
|
|
981
|
+
testFailed: '测试 PushKit 发送失败',
|
|
982
|
+
testReceiver: 'PushKit 接收器',
|
|
983
|
+
testSend: '测试推送',
|
|
984
|
+
inputTestReceiver: '请输入测试接收者 DID',
|
|
985
|
+
receiverRequired: '需要 PushKit 接收者 DID'
|
|
986
|
+
}
|
|
976
987
|
},
|
|
977
988
|
router: {
|
|
978
989
|
routerSetting: '域名和网址',
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-one-expression-per-line */
|
|
2
|
-
/* eslint-disable operator-linebreak */
|
|
3
1
|
import { useState, useContext } from 'react';
|
|
4
2
|
import styled from '@emotion/styled';
|
|
5
3
|
import { Link } from 'react-router-dom';
|
|
6
4
|
import PropTypes from 'prop-types';
|
|
7
5
|
import { format } from 'timeago.js';
|
|
8
|
-
import List from '@mui/material
|
|
9
|
-
import
|
|
10
|
-
import ListItemText from '@mui/material/ListItemText';
|
|
11
|
-
import Spinner from '@mui/material/CircularProgress';
|
|
12
|
-
import ListItemAvatar from '@mui/material/ListItemAvatar';
|
|
13
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
14
|
-
import Avatar from '@mui/material/Avatar';
|
|
15
|
-
import Divider from '@mui/material/Divider';
|
|
16
|
-
import Typography from '@mui/material/Typography';
|
|
17
|
-
import Checkbox from '@mui/material/Checkbox';
|
|
18
|
-
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
19
|
-
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
|
20
|
-
import IconButton from '@mui/material/IconButton';
|
|
6
|
+
import { Avatar, Box, Checkbox, CircularProgress, Divider, FormControlLabel, IconButton, List, ListItem, ListItemSecondaryAction, ListItemText, ListItemAvatar, Tooltip, Typography } from '@mui/material';
|
|
7
|
+
import { Pagination } from '@mui/lab';
|
|
21
8
|
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
|
22
|
-
import Box from '@mui/material/Box';
|
|
23
|
-
import Pagination from '@mui/lab/Pagination';
|
|
24
9
|
import Button from '@arcblock/ux/lib/Button';
|
|
25
10
|
import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
26
11
|
import NotificationTag from './tag';
|
|
@@ -116,7 +101,7 @@ export default function NotificationsPage({
|
|
|
116
101
|
disabled: isMarkingAll,
|
|
117
102
|
onClick: onUnreadNotifications,
|
|
118
103
|
className: "",
|
|
119
|
-
children: [isMarkingAll && /*#__PURE__*/_jsx(
|
|
104
|
+
children: [isMarkingAll && /*#__PURE__*/_jsx(CircularProgress, {
|
|
120
105
|
size: 16,
|
|
121
106
|
style: {
|
|
122
107
|
marginRight: '1em'
|
|
@@ -127,7 +112,7 @@ export default function NotificationsPage({
|
|
|
127
112
|
})]
|
|
128
113
|
}), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsxs(List, {
|
|
129
114
|
className: "notification-list",
|
|
130
|
-
children: [loading && /*#__PURE__*/_jsx(
|
|
115
|
+
children: [loading && /*#__PURE__*/_jsx(CircularProgress, {
|
|
131
116
|
size: [32, 20],
|
|
132
117
|
style: {
|
|
133
118
|
opacity: '0.8',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/ux",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.28-beta-bfbab430",
|
|
4
4
|
"description": "UX components shared across abtnode packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"prebuild": "rm -rf lib/ es/",
|
|
18
18
|
"build:core-ux": "npm run build",
|
|
19
19
|
"build": "babel --config-file ./babel.config.es.js src --out-dir lib --copy-files",
|
|
20
|
-
"autoexports": "node tools/auto-exports.js",
|
|
21
20
|
"watch": "npm run build -- -w",
|
|
22
21
|
"coverage": "npm run test -- --coverage",
|
|
23
22
|
"test": "node tools/jest.js"
|
|
@@ -26,9 +25,9 @@
|
|
|
26
25
|
"author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
26
|
"license": "Apache-2.0",
|
|
28
27
|
"dependencies": {
|
|
29
|
-
"@abtnode/auth": "1.16.
|
|
30
|
-
"@abtnode/constant": "1.16.
|
|
31
|
-
"@abtnode/util": "1.16.
|
|
28
|
+
"@abtnode/auth": "1.16.28-beta-bfbab430",
|
|
29
|
+
"@abtnode/constant": "1.16.28-beta-bfbab430",
|
|
30
|
+
"@abtnode/util": "1.16.28-beta-bfbab430",
|
|
32
31
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
33
32
|
"@arcblock/did": "^1.18.123",
|
|
34
33
|
"@arcblock/did-connect": "^2.9.90",
|
|
@@ -38,10 +37,10 @@
|
|
|
38
37
|
"@arcblock/react-hooks": "^2.9.90",
|
|
39
38
|
"@arcblock/terminal": "^2.9.90",
|
|
40
39
|
"@arcblock/ux": "^2.9.90",
|
|
41
|
-
"@blocklet/constant": "1.16.
|
|
40
|
+
"@blocklet/constant": "1.16.28-beta-bfbab430",
|
|
42
41
|
"@blocklet/launcher-layout": "2.3.21",
|
|
43
42
|
"@blocklet/list": "^0.12.111",
|
|
44
|
-
"@blocklet/meta": "1.16.
|
|
43
|
+
"@blocklet/meta": "1.16.28-beta-bfbab430",
|
|
45
44
|
"@blocklet/ui-react": "^2.9.90",
|
|
46
45
|
"@blocklet/uploader": "^0.1.6",
|
|
47
46
|
"@emotion/react": "^11.10.4",
|
|
@@ -109,5 +108,5 @@
|
|
|
109
108
|
"jest": "^29.7.0",
|
|
110
109
|
"jest-environment-jsdom": "^29.7.0"
|
|
111
110
|
},
|
|
112
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "f1fbf0752de46be00d1faa0d54eb7d28016e0bb9"
|
|
113
112
|
}
|