mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
9df77bdcc2
@ -248,6 +248,29 @@ const Tasks = () => {
|
|||||||
) : null;
|
) : null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const Retry = () => {
|
||||||
|
const { t } = useUserDataSyncSourceTranslation();
|
||||||
|
const record = useCollectionRecordData();
|
||||||
|
if (record.status !== 'failed') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<SchemaComponent
|
||||||
|
scope={{ t }}
|
||||||
|
schema={{
|
||||||
|
type: 'void',
|
||||||
|
properties: {
|
||||||
|
retry: {
|
||||||
|
title: '{{ t("Retry") }}',
|
||||||
|
'x-component': 'Action.Link',
|
||||||
|
'x-use-component-props': 'useRetryActionProps',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export const UserDataSyncSource: React.FC = () => {
|
export const UserDataSyncSource: React.FC = () => {
|
||||||
const { t } = useUserDataSyncSourceTranslation();
|
const { t } = useUserDataSyncSourceTranslation();
|
||||||
const [types, setTypes] = useState([]);
|
const [types, setTypes] = useState([]);
|
||||||
@ -277,7 +300,7 @@ export const UserDataSyncSource: React.FC = () => {
|
|||||||
<ExtendCollectionsProvider collections={[sourceCollection]}>
|
<ExtendCollectionsProvider collections={[sourceCollection]}>
|
||||||
<SchemaComponent
|
<SchemaComponent
|
||||||
schema={userDataSyncSourcesSchema}
|
schema={userDataSyncSourcesSchema}
|
||||||
components={{ AddNew, Options, Tasks }}
|
components={{ AddNew, Options, Tasks, Retry }}
|
||||||
scope={{
|
scope={{
|
||||||
types,
|
types,
|
||||||
t,
|
t,
|
||||||
|
@ -290,10 +290,7 @@ export const tasksTableBlockSchema: ISchema = {
|
|||||||
properties: {
|
properties: {
|
||||||
sync: {
|
sync: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
title: '{{ t("Retry") }}',
|
'x-component': 'Retry',
|
||||||
'x-component': 'Action.Link',
|
|
||||||
'x-use-component-props': 'useRetryActionProps',
|
|
||||||
'x-display': '{{ $record.status === "failed" ? "visible" : "hidden" }}',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user