fixed title (#2356)

This commit is contained in:
Myzel394 2021-11-19 12:03:12 +00:00 committed by GitHub
parent 83f125a79f
commit 21854b4a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,12 +129,12 @@ export default class TabManager extends Component {
window.history.pushState(null, "", url);
}
document.title = "Trilium Notes";
if (activeNoteContext.note) {
const titleFragments = [
// it helps navigating in history if note title is included in the title
document.title += " - " + activeNoteContext.note.title;
}
activeNoteContext.note?.title,
"Trilium Notes"
].filter(Boolean);
document.title = titleFragments.join(" - ");
this.triggerEvent('activeNoteChanged'); // trigger this even in on popstate event
}