2018-10-19 05:15:28 +00:00
|
|
|
<template lang="html">
|
2018-12-21 21:52:11 +00:00
|
|
|
<nav :class="{ dark: darkModeEnabled }">
|
2018-11-21 02:43:10 +00:00
|
|
|
<router-link
|
|
|
|
tag="button"
|
|
|
|
class="logo"
|
2019-01-24 06:16:08 +00:00
|
|
|
:to="{ name: homeRoute }"
|
2018-11-21 02:43:10 +00:00
|
|
|
>
|
2019-01-11 21:27:07 +00:00
|
|
|
<img src='/static/gamebrary-logo.png' />
|
2018-11-21 02:43:10 +00:00
|
|
|
GAMEBRARY
|
|
|
|
</router-link>
|
|
|
|
|
2019-02-05 07:31:40 +00:00
|
|
|
<modal
|
|
|
|
title="Settings"
|
|
|
|
:show-close="false"
|
|
|
|
v-if="user"
|
2019-01-17 06:22:30 +00:00
|
|
|
>
|
2019-02-05 07:31:40 +00:00
|
|
|
<button>
|
|
|
|
<i class="fas fa-cog" />
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<settings slot="content" v-if="settings" />
|
|
|
|
</modal>
|
2018-10-19 05:15:28 +00:00
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-02-05 07:31:40 +00:00
|
|
|
import Settings from '@/components/Settings/Settings';
|
|
|
|
import Modal from '@/components/Modal/Modal';
|
2018-12-21 21:52:11 +00:00
|
|
|
import { mapState, mapGetters } from 'vuex';
|
2018-10-19 05:15:28 +00:00
|
|
|
|
|
|
|
export default {
|
2019-02-05 07:31:40 +00:00
|
|
|
components: {
|
|
|
|
Settings,
|
|
|
|
Modal,
|
|
|
|
},
|
|
|
|
|
2018-10-19 05:15:28 +00:00
|
|
|
computed: {
|
2019-02-05 07:31:40 +00:00
|
|
|
...mapState(['user', 'platform', 'settings']),
|
2018-12-21 21:52:11 +00:00
|
|
|
...mapGetters(['darkModeEnabled']),
|
2018-10-25 06:33:15 +00:00
|
|
|
|
2019-01-24 06:16:08 +00:00
|
|
|
isAuthRoute() {
|
|
|
|
return this.$route.name === 'auth';
|
|
|
|
},
|
|
|
|
|
|
|
|
homeRoute() {
|
|
|
|
return this.$route.name === 'settings' && this.platform
|
|
|
|
? 'game-board'
|
|
|
|
: 'platforms';
|
2019-01-11 21:52:08 +00:00
|
|
|
},
|
2018-10-19 05:15:28 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
|
|
@import "~styles/styles.scss";
|
|
|
|
nav {
|
2018-11-08 03:49:04 +00:00
|
|
|
user-select: none;
|
|
|
|
width: 100vw;
|
2018-11-17 22:23:33 +00:00
|
|
|
height: $navHeight;
|
2018-10-19 05:15:28 +00:00
|
|
|
display: flex;
|
2019-01-17 06:22:30 +00:00
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
2018-11-17 22:23:33 +00:00
|
|
|
background: $color-white;
|
2018-10-25 06:33:15 +00:00
|
|
|
|
2018-10-29 23:53:49 +00:00
|
|
|
.logo {
|
2018-11-08 03:49:04 +00:00
|
|
|
height: $navHeight;
|
2018-10-29 23:53:49 +00:00
|
|
|
font-weight: bold;
|
2019-01-11 21:27:07 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
img {
|
|
|
|
height: 24px;
|
|
|
|
margin-right: $gp / 4;
|
|
|
|
}
|
2018-11-08 03:49:04 +00:00
|
|
|
}
|
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
&.dark {
|
|
|
|
background: $color-darkest-gray;
|
|
|
|
color: $color-gray !important;
|
2018-10-19 05:15:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
2018-11-21 02:39:49 +00:00
|
|
|
|