From db571ffd1654965489d5ba805b78ae09680065bf Mon Sep 17 00:00:00 2001 From: Adam Procter <adamprocter@researchnot.es> Date: Sat, 14 Mar 2020 16:03:15 +0000 Subject: [PATCH] updated for history mode fixed button on onboarding to stop Safari refresh --- app/src/components/BaseButton.vue | 2 +- app/src/components/OnBoard.vue | 12 ++++++------ app/src/router/index.js | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/components/BaseButton.vue b/app/src/components/BaseButton.vue index ffb2d12..4404fce 100644 --- a/app/src/components/BaseButton.vue +++ b/app/src/components/BaseButton.vue @@ -1,7 +1,7 @@ <template> <div> <!-- FIXME: Maybe need to use $attrs at somepoint --> - <button v-on="$listeners" class="button" :class="buttonClass"> + <button v-on="$listeners" class="button" :class="buttonClass" type="button"> <slot>DEFAULT</slot> </button> </div> diff --git a/app/src/components/OnBoard.vue b/app/src/components/OnBoard.vue index 9f85902..053180c 100644 --- a/app/src/components/OnBoard.vue +++ b/app/src/components/OnBoard.vue @@ -4,7 +4,9 @@ nodenogg.in is a <span>work in progress</span> collaborative co-creation research and design thinking tool, read more details and links in the - <a href="/#/about">about</a> section. + <a + href="/about" + >about</a> section. </p> <form v-show="parta"> @@ -25,9 +27,7 @@ autocapitalize="none" autofocus /> - <BaseButton buttonClass="onboard" @click="createMicrocosm(), setFocus()" - >+</BaseButton - > + <BaseButton buttonClass="onboard" @click="createMicrocosm(), setFocus()">+</BaseButton> </form> <form v-show="partb"> @@ -82,8 +82,8 @@ export default { methods: { createMicrocosm() { - ;(this.partb = true), - this.$store.dispatch('createMicrocosm', this.localmicrocosm) + this.partb = true + this.$store.dispatch('createMicrocosm', this.localmicrocosm) localStorage.setItem('mylastMicrocosm', this.localmicrocosm) }, setClient() { diff --git a/app/src/router/index.js b/app/src/router/index.js index 0dd1d64..ec5793e 100644 --- a/app/src/router/index.js +++ b/app/src/router/index.js @@ -22,6 +22,7 @@ const routes = [ ] const router = new VueRouter({ + mode: 'history', routes }) -- GitLab