diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-05 19:37:52 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-05 19:37:52 +0200 |
commit | 4da3272bf7893760f6710c9a1ec7de02358136e6 (patch) | |
tree | 92eb961bf20a7ef9f7c0650ba288baf512986fca /src/frontend/router/index.js | |
parent | 4e3074dfd752dd52951d300090c642aee76cfaac (diff) |
Reorganized into a monorepo, refactored the frontend again, goodbye Parcel
Diffstat (limited to 'src/frontend/router/index.js')
-rw-r--r-- | src/frontend/router/index.js | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/frontend/router/index.js b/src/frontend/router/index.js deleted file mode 100644 index fc332cd..0000000 --- a/src/frontend/router/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import { createRouter, createWebHistory } from "vue-router"; -import Home from "../views/Home"; -import Repository from "../views/Repository"; -import RepositoryLog from "../views/RepositoryLog"; -import RepositoryCommit from "../views/RepositoryCommit"; -import RepositoryTree from "../views/RepositoryTree"; - -const routes = [ - { - name: "Home", - path: "/", - component: Home - }, - { - name: "Repository", - path: '/:repo([a-zA-Z0-9\\.\\-_]+)', - component: Repository, - props: route => ({ repository: route.params.repo }), - children: [ - { - name: "Repository Log", - path: "log", - component: RepositoryLog - }, - { - name: "Commit", - path: "log/:commit([a-fA-F0-9]{40}$)", - component: RepositoryCommit, - props: route => ({ commit: route.params.commit }) - }, - { - name: "Tree Entry", - path: "tree/:path*", - component: RepositoryTree, - props: route => ({ pathArr: route.params.path ? route.params.path : [] }) - } - ] - } -]; - -const router = createRouter({ - history: createWebHistory(process.env.BASE_URL), - routes -}); - -export default router;
\ No newline at end of file |