@@ -148,14 +141,21 @@ const ConfigList = ({ diff, isLoading }) => {
{rows.map((row, index) => (
- {
- checkedItems[index] = !checkedItems[index];
- setCheckedItems([...checkedItems]);
- }}
+ oldValue={originalConfig}
+ newValue={newConfig}
+ configName={cName}
+ trigger={(
+ {
+ checkedItems[index] = !checkedItems[index];
+ setCheckedItems([...checkedItems]);
+ }}
+ />
+ )}
/>
))}
diff --git a/admin/src/components/ConfirmModal/index.jsx b/admin/src/components/ConfirmModal/index.jsx
index 162edcc..b17f483 100644
--- a/admin/src/components/ConfirmModal/index.jsx
+++ b/admin/src/components/ConfirmModal/index.jsx
@@ -10,69 +10,69 @@ import {
Checkbox,
Divider,
Box,
+ Field,
} from '@strapi/design-system';
import { WarningCircle } from '@strapi/icons';
-const ConfirmModal = ({ isOpen, onClose, onSubmit, type }) => {
+const ConfirmModal = ({ onClose, onSubmit, type, trigger }) => {
const soft = useSelector((state) => state.getIn(['config', 'appEnv', 'config', 'soft'], false));
const [force, setForce] = useState(false);
const { formatMessage } = useIntl();
- if (!isOpen) return null;
-
return (
-
- }>
-
-
-
- {formatMessage({ id: `config-sync.popUpWarning.warning.${type}_1` })}
- {formatMessage({ id: `config-sync.popUpWarning.warning.${type}_2` })}
-
+
+
+ {trigger}
+
+
+ {formatMessage({ id: "config-sync.popUpWarning.Confirmation" })}
+
+
+
+
+
+ {formatMessage({ id: `config-sync.popUpWarning.warning.${type}_1` })}
+ {formatMessage({ id: `config-sync.popUpWarning.warning.${type}_2` })}
+
+
-
-
- {(soft && type === 'import') && (
-
-
-
- setForce(value)}
- value={force}
- name="force"
- hint="Check this to ignore the soft setting."
+ {(soft && type === 'import') && (
+
+
+
+
+ setForce(value)}
+ value={force}
+ name="force"
+ >
+ {formatMessage({ id: 'config-sync.popUpWarning.force' })}
+
+
+
+
+
+ )}
+
+
+
+
+
+
+
-
-
- )}
- {
- onClose();
- }}
- variant="tertiary"
- >
- {formatMessage({ id: 'config-sync.popUpWarning.button.cancel' })}
-
- )}
- endAction={(
-
- )} />
+ {formatMessage({ id: `config-sync.popUpWarning.button.${type}` })}
+
+
+
+
);
};
diff --git a/admin/src/components/FirstExport/index.jsx b/admin/src/components/FirstExport/index.jsx
index 151ea35..446468a 100644
--- a/admin/src/components/FirstExport/index.jsx
+++ b/admin/src/components/FirstExport/index.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React from 'react';
import { useIntl } from 'react-intl';
import { useDispatch } from 'react-redux';
import { getFetchClient, useNotification } from '@strapi/strapi/admin';
@@ -13,20 +13,21 @@ const FirstExport = () => {
const { post, get } = getFetchClient();
const { toggleNotification } = useNotification();
const dispatch = useDispatch();
- const [modalIsOpen, setModalIsOpen] = useState(false);
const { formatMessage } = useIntl();
return (
- setModalIsOpen(false)}
- type="export"
- onSubmit={() => dispatch(exportAllConfig([], toggleNotification, formatMessage, post, get))}
- />
setModalIsOpen(true)}>{formatMessage({ id: 'config-sync.FirstExport.Button' })}}
+ action={(
+ dispatch(exportAllConfig([], toggleNotification, formatMessage, post, get))}
+ trigger={(
+
+ )}
+ />
+ )}
icon={}
/>