add new statistic page

This commit is contained in:
Adrian Zürcher
2026-02-08 08:39:17 +01:00
parent db6168b84c
commit edc2190581
7 changed files with 236 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ export default defineRouter(function (/* { store, ssrContext } */) {
Router.beforeEach((to, from, next) => {
const userStore = useUserStore();
const isLoggedIn = userStore.isAuthenticated;
if (!userStore.$state.firstLogin && to.path === '/firstlogin') {
next('/login');
@@ -51,7 +52,11 @@ export default defineRouter(function (/* { store, ssrContext } */) {
to.meta.requiresAdmin &&
!userStore.isPermittedTo(to.path.replace('/', ''), 'read')
) {
next('/');
if (to.meta.noBackendAdmin) {
next();
} else {
next('/');
}
} else {
next();
}