Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): handle incorrect style of the confirm delete button (#11725)

JimmFly178954a18cd2
diff --git a/packages/frontend/core/src/components/hooks/affine/use-register-blocksuite-editor-commands.tsx b/packages/frontend/core/src/components/hooks/affine/use-register-blocksuite-editor-commands.tsx
index ed6d8670ba..f5af5954bb 100644
--- a/packages/frontend/core/src/components/hooks/affine/use-register-blocksuite-editor-commands.tsx
+++ b/packages/frontend/core/src/components/hooks/affine/use-register-blocksuite-editor-commands.tsx
@@ -76,6 +76,9 @@ export function useRegisterBlocksuiteEditorCommands(
title: doc.title$.value || t['Untitled'](),
}),
cancelText: t['com.affine.confirmModal.button.cancel'](),
+ confirmButtonOptions: {
+ variant: 'error',
+ },
confirmText: t.Delete(),
onConfirm: async () => {
try {
diff --git a/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/journal/index.tsx b/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/journal/index.tsx
index 5543b1bd5f..6af375742f 100644
--- a/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/journal/index.tsx
+++ b/packages/frontend/core/src/desktop/pages/workspace/detail-page/tabs/journal/index.tsx
@@ -328,6 +328,9 @@ const ConflictList = ({
title: docRecord.title$.value || t['Untitled'](),
}),
cancelText: t['com.affine.confirmModal.button.cancel'](),
+ confirmButtonOptions: {
+ variant: 'error',
+ },
confirmText: t.Delete(),
onConfirm: () => {
docRecord.moveToTrash();