gamebrary/src/components/AuthModal.vue

71 lines
1.4 KiB
Vue
Raw Normal View History

<!-- TODO: add actions, e.g. clone board, clone list, add to favorites, like board, etc... -->
<template lang="html">
<b-modal
id="authModal"
hide-footer
centered
>
<template v-slot:modal-header="{ close }">
<modal-header
:title="user ? 'Forbidden' : 'Gamebrary'"
@close="close"
>
<template v-slot:header>
<img
class="logo mr-2"
src="/static/gamebrary-logo.png"
/>
</template>
</modal-header>
</template>
<b-alert v-if="user" show variant="warning">
Not allowed
</b-alert>
<div class="text-center" v-else>
<b-img
src="/static/img/screenshot-1.jpg"
class="rounded shadow w-75 ml-auto mr-auto mt-2 mb-3"
block
/>
<h2>Hi 👋!</h2>
<p>Gamebrary is an open source tool to organize video game collections.</p>
<b-button
2021-04-16 23:16:19 +00:00
@click="getStarted"
variant="success"
>
2021-04-16 23:16:19 +00:00
<i class="fas fa-rocket fa-fw" aria-hidden />
Get started!
</b-button>
</div>
</b-modal>
</template>
2021-04-16 23:16:19 +00:00
<script>
import { mapState } from 'vuex';
2021-04-16 23:16:19 +00:00
export default {
computed: {
...mapState(['user']),
},
2021-04-16 23:16:19 +00:00
methods: {
getStarted() {
this.$bvModal.hide('authModal');
this.$router.push({ name: 'auth' });
},
},
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
.logo {
float: left;
height: 40px;
}
</style>