use id as title fallback on gallery view

This commit is contained in:
lightling 2024-08-14 02:32:14 -04:00
parent 7a0d229e67
commit 23a35c4265

View file

@ -73,8 +73,8 @@ const onButtonClicked = (event: Event | null, direction: number, override?: numb
onMounted(async () => {
let config = await fetchAndParseYaml<ListWithEntries<GalleryEntry>>(routeConfig.config)
resolved.value = await fetchConfigByIdFromList(config, currentRoute.query.id as string)
document.title = routeSubConfig.fullTitle?.replace('$ENTRY', resolved.value.title)
routeStore.setBreadcrumbs(currentRoute, resolved.value.title)
document.title = routeSubConfig.fullTitle?.replace('$ENTRY', resolved.value.title || currentRoute.query.id as string)
routeStore.setBreadcrumbs(currentRoute, resolved.value.title || currentRoute.query.id as string)
window.routeConfig = {...routeConfig}
window.routeSubConfig = {...routeSubConfig}
window.routeContentConfig = {...resolved.value}