From 54311833e4c67c0daed99c06240b8890f525950e Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Tue, 5 Apr 2022 10:51:26 -0400 Subject: [PATCH 1/4] Use history mode instead of hash mode --- web/netlify.toml | 5 +++++ web/src/router.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/web/netlify.toml b/web/netlify.toml index a9c54b677..cf6c13740 100644 --- a/web/netlify.toml +++ b/web/netlify.toml @@ -9,3 +9,8 @@ command = "yarn run build" VUE_APP_DANDI_API_ROOT = "https://api-staging.dandiarchive.org/api/" VUE_APP_SENTRY_DSN = "https://425b9a012300493d867e97785fae7b88@o308436.ingest.sentry.io/5196549" VUE_APP_SENTRY_ENVIRONMENT = "staging" + +[[redirects]] +from = "/*" +to = "/index.html" +status = 200 diff --git a/web/src/router.ts b/web/src/router.ts index ad4bd5ada..5e48b263b 100644 --- a/web/src/router.ts +++ b/web/src/router.ts @@ -51,4 +51,4 @@ const routes: RouteConfig[] = [ }, ]; -export default new Router({ routes }); +export default new Router({ mode: 'history', routes }); From 07dc0f04554da7fb8cbd828aa847556821f7506d Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Wed, 6 Apr 2022 17:55:01 -0400 Subject: [PATCH 2/4] Redirect old hash URLs to correct ones --- web/src/views/HomeView/HomeView.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/web/src/views/HomeView/HomeView.vue b/web/src/views/HomeView/HomeView.vue index 25d6b4e83..9908ac2de 100644 --- a/web/src/views/HomeView/HomeView.vue +++ b/web/src/views/HomeView/HomeView.vue @@ -50,11 +50,25 @@ From 03f0a2276d3439972349fa971566a085dc77ee37 Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Wed, 6 Apr 2022 17:58:42 -0400 Subject: [PATCH 3/4] Remove href to hash url --- web/src/views/HomeView/StatsBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/views/HomeView/StatsBar.vue b/web/src/views/HomeView/StatsBar.vue index f2f69b96b..06cf05060 100644 --- a/web/src/views/HomeView/StatsBar.vue +++ b/web/src/views/HomeView/StatsBar.vue @@ -51,7 +51,7 @@ export default defineComponent({ name: 'dandisets', value: dandisets.value, description: 'A DANDI dataset including files and dataset-level metadata', - href: '/#/dandiset', + href: '/dandiset', }, { name: 'users', value: users.value }, { name: 'total data size', value: filesize(size.value, { round: 0, base: 10, standard: 'iec' }) }, From 4876516c648de6ac8c6a59b9d265fafb53b557e3 Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Fri, 8 Apr 2022 15:34:14 -0400 Subject: [PATCH 4/4] Fix template type checking --- web/src/views/HomeView/HomeView.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/views/HomeView/HomeView.vue b/web/src/views/HomeView/HomeView.vue index 9908ac2de..6a41316e2 100644 --- a/web/src/views/HomeView/HomeView.vue +++ b/web/src/views/HomeView/HomeView.vue @@ -68,6 +68,11 @@ export default defineComponent({ router.replace(trimmed); } }); + + return { + // Hack to satisfy template type checker + $vuetify: (ctx.root as any).$vuetify, + }; }, });