fix: #765 Page title was not being set

This commit is contained in:
jamesread
2025-11-29 21:16:23 +00:00
parent a91e903873
commit dca8e04518
5 changed files with 76 additions and 4 deletions

View File

@@ -67,7 +67,8 @@ async function getDashboard() {
}
dashboard.value = ret.dashboard
document.title = ret.dashboard.title + ' - OliveTin'
const pageTitle = window.initResponse?.pageTitle || 'OliveTin'
document.title = ret.dashboard.title + ' - ' + pageTitle
// Clear any previous init error since we successfully loaded
initError.value = null
@@ -84,7 +85,8 @@ async function getDashboard() {
// On error, provide a safe fallback state
console.error('Failed to load dashboard', e)
dashboard.value = { title: title || 'Default', contents: [] }
document.title = 'Error - OliveTin'
const pageTitle = window.initResponse?.pageTitle || 'OliveTin'
document.title = 'Error - ' + pageTitle
// Stop the loading timer on error
if (loadingTimer) {