navigation state is more nicely and completely serialized into URL

This commit is contained in:
zadam
2023-04-11 21:41:55 +02:00
parent 9e71c44c76
commit 17128c5874
12 changed files with 183 additions and 99 deletions

View File

@@ -618,7 +618,7 @@ export default class TabRowWidget extends BasicWidget {
}
/** @param {NoteContext} noteContext */
updateTab($tab, noteContext) {
async updateTab($tab, noteContext) {
if (!$tab.length) {
return;
}
@@ -652,11 +652,7 @@ export default class TabRowWidget extends BasicWidget {
return;
}
const viewMode = noteContext.viewScope?.viewMode;
const title = (viewMode && viewMode !== 'default')
? `${viewMode}: ${note.title}`
: note.title;
const title = await noteContext.getNavigationTitle();
this.updateTitle($tab, title);
$tab.addClass(note.getCssClass());