Skip to content

Commit

Permalink
Merge pull request #12 from ecrum19/EDC_active
Browse files Browse the repository at this point in the history
fixing routing
  • Loading branch information
ecrum19 authored May 23, 2024
2 parents 962c427 + e150870 commit e2caff3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
run: |
yarn install
yarn run build
yarn run github-post-build
env:
NODE_ENV: production

Expand Down
12 changes: 12 additions & 0 deletions github-post-build-script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import viteConfig from "./vite.config.js";
import * as fs from "fs";

const routes = [
"/menu",
"/watch",
"/auth",
];
const dir = viteConfig.build.outDir;
for (const route of routes) {
fs.cpSync(dir + "/index.html", dir + route + "/index.html");
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"github-post-build": "node github-post-build-script.js",
"lint": "vue-cli-service lint",
"deploy": "gh-pages -d dist"
},
Expand Down
16 changes: 10 additions & 6 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,38 @@ import { isLoggedin } from "./components/login";
const router = createRouter({
history: createWebHistory(),
routes: [
{
path: "/",
redirect: { name: "Home" }
},
{
name: "Login Page",
path: "/login",
path: "login",
components: { default: PodLogin },
},
{
name: "Home",
path: "/",
path: "/TRIPLE_App/",
components: { default: LandingPage },
},
{
name: "Data Upload",
path: "/dataUpload",
path: "dataUpload",
components: { default: PodUpload },
},
{
name: "Pod Browser",
path: "/podBrowser",
path: "podBrowser",
components: { default: PodBrowser },
},
{
name: "Query",
path: "/dataQuery",
path: "dataQuery",
components: { default: DataQuery },
},
{
name: "Data Privacy",
path: "/privacy",
path: "privacy",
components: { default: EditPrivacy },
},
{
Expand Down

0 comments on commit e2caff3

Please sign in to comment.