fix init after login, keep browser state

This commit is contained in:
jb-alvarado 2024-08-23 11:22:18 +02:00
parent fd85411c77
commit cd58c0581a
4 changed files with 6 additions and 5 deletions

View File

@ -132,7 +132,6 @@ async function onSubmitChannel() {
if (update.status) {
indexStore.msgAlert('success', t('config.updateChannelSuccess'), 2)
await configStore.getPlayoutConfig()
} else {
indexStore.msgAlert('error', t('config.updateChannelFailed'), 2)
}

View File

@ -96,8 +96,10 @@ defineProps({
},
})
onMounted(() => {
mediaStore.getTree('')
onMounted(async () => {
if (!mediaStore.folderTree.parent || !mediaStore.currentPath) {
await mediaStore.getTree('')
}
})
watch([id], () => {

View File

@ -127,7 +127,7 @@ async function login() {
}, 3000)
}
await configStore.nuxtClientInit()
await configStore.configInit()
} catch (e) {
formError.value = e as string
}

View File

@ -368,7 +368,7 @@ onMounted(async () => {
extensions.value = exts.join(', ')
if (!mediaStore.folderTree.parent) {
if (!mediaStore.folderTree.parent || !mediaStore.currentPath) {
await mediaStore.getTree('')
}
})