From 84c480c4c6e6e2107ac5fb01aa973b37c0b3a53a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 5 Mar 2025 21:42:34 +0200 Subject: [PATCH] feat(in-app-help): remove "contextual-help" suffix --- src/public/app/components/note_context.ts | 3 ++- src/public/app/widgets/note_title.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/public/app/components/note_context.ts b/src/public/app/components/note_context.ts index 7cc8040b9..0b4798cea 100644 --- a/src/public/app/components/note_context.ts +++ b/src/public/app/components/note_context.ts @@ -369,7 +369,8 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded"> const { note, viewScope } = this; - let title = viewScope?.viewMode === "default" ? note.title : `${note.title}: ${viewScope?.viewMode}`; + const isNormalView = (viewScope?.viewMode === "default" || viewScope?.viewMode === "contextual-help"); + let title = (isNormalView ? note.title : `${note.title}: ${viewScope?.viewMode}`); if (viewScope?.attachmentId) { // assuming the attachment has been already loaded diff --git a/src/public/app/widgets/note_title.ts b/src/public/app/widgets/note_title.ts index 9d7656f31..56ff57472 100644 --- a/src/public/app/widgets/note_title.ts +++ b/src/public/app/widgets/note_title.ts @@ -89,7 +89,10 @@ export default class NoteTitleWidget extends NoteContextAwareWidget { } async refreshWithNote(note: FNote) { - const isReadOnly = (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) || utils.isLaunchBarConfig(note.noteId) || this.noteContext?.viewScope?.viewMode !== "default"; + const isReadOnly = + (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) + || utils.isLaunchBarConfig(note.noteId) + || this.noteContext?.viewScope?.viewMode !== "default"; this.$noteTitle.val(isReadOnly ? await this.noteContext?.getNavigationTitle() || "" : note.title); this.$noteTitle.prop("readonly", isReadOnly);