mirror of
https://github.com/romancm/gamebrary
synced 2024-11-27 05:30:22 +00:00
Clean up
This commit is contained in:
parent
1d38a80e2c
commit
ae5a1a3b67
1 changed files with 16 additions and 4 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue