Files
dify/web/app/components/plugins/update-plugin/downgrade-warning.tsx
yyhGitHubCodingOnStarautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>Coding On Stardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>-LAN-statxc
bbe975c6bc feat: enhance model plugin workflow checks and model provider management UX (#33289)
Signed-off-by: yyh <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: CodingOnStar <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Coding On Star <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <[email protected]>
Co-authored-by: statxc <[email protected]>
2026-03-18 10:16:15 +08:00

36 lines
1.2 KiB
TypeScript

import { useTranslation } from 'react-i18next'
import Button from '@/app/components/base/button'
const i18nPrefix = 'autoUpdate.pluginDowngradeWarning'
type Props = {
onCancel: () => void
onJustDowngrade: () => void
onExcludeAndDowngrade: () => void
}
const DowngradeWarningModal = ({
onCancel,
onJustDowngrade,
onExcludeAndDowngrade,
}: Props) => {
const { t } = useTranslation()
return (
<>
<div className="flex flex-col items-start gap-2 self-stretch">
<div className="text-text-primary title-2xl-semi-bold">{t(`${i18nPrefix}.title`, { ns: 'plugin' })}</div>
<div className="text-text-secondary system-md-regular">
{t(`${i18nPrefix}.description`, { ns: 'plugin' })}
</div>
</div>
<div className="mt-9 flex items-start justify-end space-x-2 self-stretch">
<Button variant="secondary" onClick={() => onCancel()}>{t('newApp.Cancel', { ns: 'app' })}</Button>
<Button variant="secondary" destructive onClick={onJustDowngrade}>{t(`${i18nPrefix}.downgrade`, { ns: 'plugin' })}</Button>
<Button variant="primary" onClick={onExcludeAndDowngrade}>{t(`${i18nPrefix}.exclude`, { ns: 'plugin' })}</Button>
</div>
</>
)
}
export default DowngradeWarningModal