mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
[PhotonClient] Vite and Typescript complete refactor (#884)
This commit is contained in:
48
photon-client/src/router/index.ts
Normal file
48
photon-client/src/router/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
|
||||
import DashboardView from "@/views/DashboardView.vue";
|
||||
import CameraSettingsView from "@/views/CameraSettingsView.vue";
|
||||
import GeneralSettingsView from "@/views/GeneralSettingsView.vue";
|
||||
import DocsView from "@/views/DocsView.vue";
|
||||
import NotFoundView from "@/views/NotFoundView.vue";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: "history",
|
||||
base: import.meta.env.BASE_URL,
|
||||
routes: [
|
||||
{
|
||||
path: "/",
|
||||
redirect: "/dashboard"
|
||||
},
|
||||
{
|
||||
path: "/dashboard",
|
||||
name: "Dashboard",
|
||||
component: DashboardView
|
||||
},
|
||||
{
|
||||
path: "/cameras",
|
||||
name: "Cameras",
|
||||
component: CameraSettingsView
|
||||
},
|
||||
{
|
||||
path: "/settings",
|
||||
name: "Settings",
|
||||
component: GeneralSettingsView
|
||||
},
|
||||
{
|
||||
path: "/docs",
|
||||
name: "Docs",
|
||||
component: DocsView
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
name: "NotFound",
|
||||
component: NotFoundView
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user