From c919823000d090a5c017421dbcb2528c249a89d7 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 24 Jun 2025 15:36:10 +0800 Subject: [PATCH] feat: downgrade modal --- .../update-plugin/downgrade-warning-modal.tsx | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 web/app/components/plugins/update-plugin/downgrade-warning-modal.tsx diff --git a/web/app/components/plugins/update-plugin/downgrade-warning-modal.tsx b/web/app/components/plugins/update-plugin/downgrade-warning-modal.tsx new file mode 100644 index 0000000000..fa5e90d182 --- /dev/null +++ b/web/app/components/plugins/update-plugin/downgrade-warning-modal.tsx @@ -0,0 +1,37 @@ +import { useTranslation } from 'react-i18next' +import Modal from '@/app/components/base/modal' +import Button from '@/app/components/base/button' + +type Props = { + onCancel: () => void + onSave: () => void + confirmDisabled?: boolean +} +const DowngradeWarningModal = ({ + onCancel, + onSave, + confirmDisabled = false, +}: Props) => { + const { t } = useTranslation() + + return ( + onCancel()} + className='w-[480px]' + > +
+
Plugin Downgrade
+
+ Auto-update is currently enabled for this plugin. Downgrading the version may cause your changes to be overwritten during the next automatic update. +
+
+
+ + +
+
+ ) +} + +export default DowngradeWarningModal