diff --git a/frontend/src/plugins/router.js b/frontend/src/plugins/router.js index 52ff11719..b1e969a87 100644 --- a/frontend/src/plugins/router.js +++ b/frontend/src/plugins/router.js @@ -15,27 +15,27 @@ const routes = [ { path: "/", name: "dashboard", - component: () => import("@/views/Dashboard.vue"), + component: () => import("@/views/Dashboard/Base.vue"), }, { path: "/platform/:platform", name: "platform", - component: () => import("@/views/Gallery.vue"), + component: () => import("@/views/Gallery/Base.vue"), }, { path: "/platform/:platform/:rom", name: "rom", - component: () => import("@/views/Details.vue"), + component: () => import("@/views/Details/Base.vue"), }, { path: "/library/scan", name: "scan", - component: () => import("@/views/library/Scan.vue"), + component: () => import("@/views/Library/Scan.vue"), }, { path: "/settings/control-panel", name: "controlPanel", - component: () => import("@/views/settings/ControlPanel.vue"), + component: () => import("@/views/Settings/ControlPanel.vue"), }, { path: "/:pathMatch(.*)*", @@ -56,15 +56,14 @@ function isAuthenticated() { } router.beforeEach(async (to, from) => { - - const publicPages = ['/login']; + const publicPages = ["/login"]; const authRequired = !publicPages.includes(to.path); if (!isAuthenticated() && to.name !== "login" && authRequired) { return { name: "login" }; } else if (isAuthenticated() && to.name === "login") { return { name: "dashboard" }; - } else if (to.name == "noMatch"){ + } else if (to.name == "noMatch") { return { name: "dashboard" }; } }); diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue deleted file mode 100644 index f8e190dc5..000000000 --- a/frontend/src/views/Dashboard.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/frontend/src/views/Dashboard/Base.vue b/frontend/src/views/Dashboard/Base.vue new file mode 100644 index 000000000..0da30b922 --- /dev/null +++ b/frontend/src/views/Dashboard/Base.vue @@ -0,0 +1,27 @@ + + + diff --git a/frontend/src/views/Dashboard/Platforms.vue b/frontend/src/views/Dashboard/Platforms.vue new file mode 100644 index 000000000..02742de1b --- /dev/null +++ b/frontend/src/views/Dashboard/Platforms.vue @@ -0,0 +1,33 @@ + + diff --git a/frontend/src/views/Dashboard/Summary.vue b/frontend/src/views/Dashboard/Summary.vue new file mode 100644 index 000000000..7caecdc54 --- /dev/null +++ b/frontend/src/views/Dashboard/Summary.vue @@ -0,0 +1,27 @@ + + diff --git a/frontend/src/views/Details.vue b/frontend/src/views/Details/Base.vue similarity index 100% rename from frontend/src/views/Details.vue rename to frontend/src/views/Details/Base.vue diff --git a/frontend/src/views/Gallery.vue b/frontend/src/views/Gallery/Base.vue similarity index 97% rename from frontend/src/views/Gallery.vue rename to frontend/src/views/Gallery/Base.vue index 0c976c421..c41ce8776 100644 --- a/frontend/src/views/Gallery.vue +++ b/frontend/src/views/Gallery/Base.vue @@ -237,10 +237,10 @@ onBeforeRouteUpdate(async (to, _) => { diff --git a/frontend/src/views/library/Scan.vue b/frontend/src/views/Library/Scan.vue similarity index 100% rename from frontend/src/views/library/Scan.vue rename to frontend/src/views/Library/Scan.vue diff --git a/frontend/src/views/settings/ControlPanel.vue b/frontend/src/views/Settings/ControlPanel.vue similarity index 90% rename from frontend/src/views/settings/ControlPanel.vue rename to frontend/src/views/Settings/ControlPanel.vue index 0310f6e30..d306c008a 100644 --- a/frontend/src/views/settings/ControlPanel.vue +++ b/frontend/src/views/Settings/ControlPanel.vue @@ -1,7 +1,7 @@