This commit is contained in:
Roman Cervantes 2019-05-08 15:38:30 -07:00
parent 1d38a80e2c
commit ae5a1a3b67

View file

@ -3,7 +3,7 @@
<router-link <router-link
tag="button" tag="button"
class="logo" class="logo"
:to="{ name: homeRoute }" :to="{ name: logoRoute }"
> >
<img src='/static/gamebrary-logo.png' /> <img src='/static/gamebrary-logo.png' />
@ -11,9 +11,13 @@
</router-link> </router-link>
<modal popover> <modal popover>
<gravatar :email="user.email" class="avatar" v-if="user && user.email" /> <gravatar
:email="user.email"
class="avatar"
v-if="isLoggedIn"
/>
<settings slot="content" v-if="settings && user" /> <settings slot="content" v-if="hasSettings" />
</modal> </modal>
</nav> </nav>
</template> </template>
@ -35,6 +39,14 @@ export default {
...mapState(['user', 'platform', 'settings']), ...mapState(['user', 'platform', 'settings']),
...mapGetters(['darkModeEnabled']), ...mapGetters(['darkModeEnabled']),
isLoggedIn() {
return this.user && this.user.email;
},
hasSettings() {
return this.settings && this.user;
},
title() { title() {
if (this.$route.name === 'share-list') { if (this.$route.name === 'share-list') {
return this.$route.query && this.$route.query.list return this.$route.query && this.$route.query.list
@ -47,7 +59,7 @@ export default {
: 'GAMEBRARY'; : 'GAMEBRARY';
}, },
homeRoute() { logoRoute() {
if (this.$route.name === 'share-list') { if (this.$route.name === 'share-list') {
return null; return null;
} }