diff --git a/dashboard/src/views/AppConfigureView.vue b/dashboard/src/views/AppConfigureView.vue index 104a3de74..a76aa3b6d 100644 --- a/dashboard/src/views/AppConfigureView.vue +++ b/dashboard/src/views/AppConfigureView.vue @@ -179,6 +179,16 @@ async function onStopAppTask() { const views = ref([]); +function hashChange() { + const tmp = window.location.hash.slice('#/app/'.length); + if (!tmp) return; + + const parts = tmp.split('/'); + if (parts.length !== 2) return; + + onSetView(parts[1] || 'info'); +} + onMounted(async () => { const tmp = window.location.hash.slice('#/app/'.length); if (!tmp) return; @@ -213,13 +223,15 @@ onMounted(async () => { views.value.push({ enabled: true, id: 'eventlog', display: t('app.eventlogTabTitle'), }); if (app.value.accessLevel === 'admin') views.value.push({ enabled: true, id: 'uninstall', display: t('app.uninstallTabTitle'), }); - onSetView(parts[1] || 'info'); + hashChange(); + window.addEventListener('hashchange', hashChange); busy.value = false; }); onBeforeUnmount(() => { if (refreshTimer) clearTimeout(refreshTimer); + window.removeEventListener('hashchange', hashChange); }); @@ -260,7 +272,10 @@ onBeforeUnmount(() => {