handle authed and unathed states in auth modal

This commit is contained in:
Gamebrary 2021-04-22 14:40:12 -07:00
parent da10257e85
commit 174228a02a

View file

@ -1,4 +1,4 @@
<!-- TODO: remove, redirect to auth page and show banner instead --> <!-- TODO: add actions, e.g. clone board, clone list, add to favorites, like board, etc... -->
<template lang="html"> <template lang="html">
<b-modal <b-modal
id="authModal" id="authModal"
@ -7,8 +7,7 @@
> >
<template v-slot:modal-header="{ close }"> <template v-slot:modal-header="{ close }">
<modal-header <modal-header
title="Gamebrary" :title="user ? 'Forbidden' : 'Gamebrary'"
subtitle="Ditch the spreadsheet. Organize your games with Gamebrary!"
@close="close" @close="close"
> >
<template v-slot:header> <template v-slot:header>
@ -20,7 +19,11 @@
</modal-header> </modal-header>
</template> </template>
<div class="text-center"> <b-alert v-if="user" show variant="warning">
Not allowed
</b-alert>
<div class="text-center" v-else>
<b-img <b-img
src="/static/img/screenshot-1.jpg" src="/static/img/screenshot-1.jpg"
class="rounded shadow w-75 ml-auto mr-auto mt-2 mb-3" class="rounded shadow w-75 ml-auto mr-auto mt-2 mb-3"
@ -43,7 +46,13 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex';
export default { export default {
computed: {
...mapState(['user']),
},
methods: { methods: {
getStarted() { getStarted() {
this.$bvModal.hide('authModal'); this.$bvModal.hide('authModal');