From d6cfbec5c94b1ccd2ec1adc21eab00de390b664a Mon Sep 17 00:00:00 2001 From: L-Sun Date: Thu, 23 Jan 2025 10:40:24 +0000 Subject: [PATCH] chore(editor): update notification message of change display mode of doc (#9874) --- .../element-toolbar/change-note-button.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/blocksuite/blocks/src/root-block/widgets/element-toolbar/change-note-button.ts b/blocksuite/blocks/src/root-block/widgets/element-toolbar/change-note-button.ts index 5c0062cdb..d47f0a74b 100644 --- a/blocksuite/blocks/src/root-block/widgets/element-toolbar/change-note-button.ts +++ b/blocksuite/blocks/src/root-block/widgets/element-toolbar/change-note-button.ts @@ -253,13 +253,21 @@ export class EdgelessChangeNoteButton extends WithDisposable(LitElement) { closeNotify(); }; + const title = + newMode !== NoteDisplayMode.EdgelessOnly + ? 'Note displayed in Page Mode' + : 'Note removed from Page Mode'; + const message = + newMode !== NoteDisplayMode.EdgelessOnly + ? 'Content added to your page.' + : 'Content removed from your page.'; + const notification = this.edgeless.std.getOptional(NotificationProvider); notification?.notify({ - title: 'Note displayed in Page Mode', - message: - 'Content added to your page. Find it in the TOC for quick navigation.', + title: title, + message: `${message}. Find it in the TOC for quick navigation.`, accent: 'success', - duration: 1000 * 1000, + duration: 5 * 1000, footer: html`