3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-06-16 11:05:03 +00:00

Initial port to vue 3

This commit is contained in:
TheKodeToad 2025-03-12 15:56:04 +00:00
parent e1966534d5
commit 454981fa1f
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
14 changed files with 1906 additions and 1804 deletions

View file

@ -1,14 +1,11 @@
import Vue from "vue";
import VueRouter from "vue-router";
import { createRouter, createWebHistory } from "vue-router";
import { authGuard, authRedirectGuard, loginCallbackGuard } from "./auth";
Vue.use(VueRouter);
export const router = new VueRouter({
mode: "history",
export const router = createRouter({
history: createWebHistory(),
routes: [
{ path: "/login", beforeEnter: authRedirectGuard },
{ path: "/login-callback", beforeEnter: loginCallbackGuard },
{ path: "/login", components: {}, beforeEnter: authRedirectGuard },
{ path: "/login-callback", component: {}, beforeEnter: loginCallbackGuard },
// Privacy policy
{
@ -97,12 +94,12 @@ export const router = new VueRouter({
scrollBehavior(to, from, savedPosition) {
if (to.hash) {
return {
selector: to.hash,
el: to.hash,
};
} else if (savedPosition) {
return savedPosition;
} else {
return { x: 0, y: 0 };
return { left: 0, top: 0 };
}
},
});