Skip to content

Commit

Permalink
fix: fix preview location choosing
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo Vidal committed Dec 24, 2020
1 parent bb1545c commit 4906f7d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/views/_Preview.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-main>
<v-main ref="main">
<v-slide-x-reverse-transition>
<panel
v-if="locationSelect"
Expand Down Expand Up @@ -34,7 +34,7 @@
<v-col
cols="12"
md="6"
xl="10">
xl="8">
<template v-if="data.type === 'route'">
<p class="text-h3">{{ data.name }}</p>
<v-chip
Expand All @@ -53,7 +53,7 @@
<v-col
cols="12"
md="6"
xl="2"
xl="4"
:class="{ 'mt-15': $vuetify.breakpoint.smAndDown }"
:style="$vuetify.breakpoint.mdAndUp && 'min-height: 100%'">
<v-row
Expand All @@ -71,7 +71,8 @@
<card
role="switch"
:aria-checked="keepScannedLocation"
top>
top
@click="keepScannedLocation = !keepScannedLocation">
<template #title>{{ $t('qr.preview.keepLocation') }}</template>
<template #action>
<v-switch
Expand Down Expand Up @@ -139,10 +140,12 @@ export default {
let raw = decodeURIComponent(this.$route.fullPath.replace('/preview/', ''))
this.data = decodeData(raw)
if (!this.locations.length) this.keepScannedLocation = true
console.log(this.$refs.main.$refs.main)
},
computed: {
...mapState(['locations']),
hook() { return this.$refs.main },
hook() { return this.$refs.main.$refs.main },
valid() { return this.keepScannedLocation || this.location !== '' }
},
methods: {
Expand Down

0 comments on commit 4906f7d

Please sign in to comment.