From bfc8b93a96f2973e1ffe8cda5a2ec21ecaa5756b Mon Sep 17 00:00:00 2001 From: forehalo Date: Tue, 12 Nov 2024 04:11:12 +0000 Subject: [PATCH] fix(core): add missing confirm button variants (#8786) fix AF-1628 --- .../components/blocksuite/block-suite-header/menu/index.tsx | 3 +++ .../src/components/page-list/docs/virtualized-page-list.tsx | 3 +++ .../core/src/components/page-list/operation-cell.tsx | 3 +++ .../pages/workspace/detail/menu/journal-conflicts.tsx | 3 +++ packages/frontend/i18n/src/i18n-completenesses.json | 6 +++--- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx index ba7f85212b..7da6cb59ee 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-header/menu/index.tsx @@ -155,6 +155,9 @@ export const PageHeaderMenuButton = ({ }), cancelText: t['com.affine.confirmModal.button.cancel'](), confirmText: t.Delete(), + confirmButtonOptions: { + variant: 'error', + }, onConfirm: () => { editorService.editor.doc.moveToTrash(); }, diff --git a/packages/frontend/core/src/components/page-list/docs/virtualized-page-list.tsx b/packages/frontend/core/src/components/page-list/docs/virtualized-page-list.tsx index 40a977f50f..cc0204c536 100644 --- a/packages/frontend/core/src/components/page-list/docs/virtualized-page-list.tsx +++ b/packages/frontend/core/src/components/page-list/docs/virtualized-page-list.tsx @@ -141,6 +141,9 @@ export const VirtualizedPageList = ({ }), cancelText: t['com.affine.confirmModal.button.cancel'](), confirmText: t.Delete(), + confirmButtonOptions: { + variant: 'error', + }, onConfirm: () => { for (const docId of filteredSelectedPageIds) { const doc = docsService.list.doc$(docId).value; diff --git a/packages/frontend/core/src/components/page-list/operation-cell.tsx b/packages/frontend/core/src/components/page-list/operation-cell.tsx index fc09b9d3e7..225bcf0ada 100644 --- a/packages/frontend/core/src/components/page-list/operation-cell.tsx +++ b/packages/frontend/core/src/components/page-list/operation-cell.tsx @@ -119,6 +119,9 @@ export const PageOperationCell = ({ }), cancelText: t['com.affine.confirmModal.button.cancel'](), confirmText: t.Delete(), + confirmButtonOptions: { + variant: 'error', + }, onConfirm: () => { docRecord.moveToTrash(); }, diff --git a/packages/frontend/core/src/mobile/pages/workspace/detail/menu/journal-conflicts.tsx b/packages/frontend/core/src/mobile/pages/workspace/detail/menu/journal-conflicts.tsx index cced189998..dbcc6f85b9 100644 --- a/packages/frontend/core/src/mobile/pages/workspace/detail/menu/journal-conflicts.tsx +++ b/packages/frontend/core/src/mobile/pages/workspace/detail/menu/journal-conflicts.tsx @@ -36,6 +36,9 @@ const ResolveConflictOperations = ({ docRecord }: { docRecord: DocRecord }) => { }), cancelText: t['com.affine.confirmModal.button.cancel'](), confirmText: t.Delete(), + confirmButtonOptions: { + variant: 'error', + }, onConfirm: () => { docRecord.moveToTrash(); }, diff --git a/packages/frontend/i18n/src/i18n-completenesses.json b/packages/frontend/i18n/src/i18n-completenesses.json index e9ee3fbba9..06848f1050 100644 --- a/packages/frontend/i18n/src/i18n-completenesses.json +++ b/packages/frontend/i18n/src/i18n-completenesses.json @@ -2,7 +2,7 @@ "ar": 79, "ca": 6, "da": 6, - "de": 30, + "de": 29, "en": 100, "es-AR": 14, "es-CL": 16, @@ -10,10 +10,10 @@ "fr": 70, "hi": 2, "it": 1, - "ja": 94, + "ja": 93, "ko": 83, "pl": 0, - "pt-BR": 91, + "pt-BR": 90, "ru": 77, "sv-SE": 5, "ur": 3,