refactor: scenery view back button routing; component setup script

This commit is contained in:
2025-06-02 01:35:09 +02:00
parent c8d481a952
commit a91a00f88a
2 changed files with 89 additions and 117 deletions
+5 -2
View File
@@ -36,7 +36,10 @@ const routes: Array<RouteRecordRaw> = [
props: (route) => ({
region: route.query.region,
station: route.query.station
})
}),
beforeEnter: (to, from) => {
to.meta['prevPath'] = from.fullPath;
}
},
{
path: '/journal',
@@ -72,7 +75,7 @@ const router = createRouter({
from.query['view'] === undefined &&
!savedPosition
)
return { el: `.scenery-left`, behavior: 'instant', top: 3 };
return { el: `.app_main`, behavior: 'instant', top: -13 };
if (savedPosition) return savedPosition;
},