From 71b2199dd4c9aeae8d4544e0a34e9cf5bea2285a Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 13 Jul 2024 15:00:04 +0200 Subject: [PATCH] Include prefix in browser title --- web/editor_ui.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/editor_ui.tsx b/web/editor_ui.tsx index 7af62e82..8e362d1b 100644 --- a/web/editor_ui.tsx +++ b/web/editor_ui.tsx @@ -77,9 +77,11 @@ export class MainUI { useEffect(() => { if (viewState.currentPage) { - document.title = viewState.currentPage; + document.title = + (viewState.currentPageMeta?.pageDecorations?.prefix ?? "") + + viewState.currentPage; } - }, [viewState.currentPage]); + }, [viewState.currentPage, viewState.currentPageMeta]); useEffect(() => { client.tweakEditorDOM( @@ -314,7 +316,8 @@ export class MainUI { style={{ flex: viewState.panels.lhs.mode }} /> )} - pageNamePrefix={viewState.currentPageMeta?.pageDecorations?.prefix ?? ""} + pageNamePrefix={viewState.currentPageMeta?.pageDecorations?.prefix ?? + ""} />
{!!viewState.panels.lhs.mode && (