Include prefix in browser title

pull/951/head
Zef Hemel 2024-07-13 15:00:04 +02:00
parent dcde6aaf7c
commit 71b2199dd4
1 changed files with 6 additions and 3 deletions

View File

@ -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 ??
""}
/>
<div id="sb-main">
{!!viewState.panels.lhs.mode && (