2018-10-19 05:15:28 +00:00
|
|
|
<template lang="html">
|
2020-09-15 22:37:32 +00:00
|
|
|
<b-navbar class="px-3 py-2 border-0 shadow-none" fixed="top">
|
2020-09-06 14:53:04 +00:00
|
|
|
<b-navbar-brand :to="{ name: 'home' }" class="border-0 p-0 mr-1">
|
2020-07-22 15:52:09 +00:00
|
|
|
<img src="/static/gamebrary-logo.png" height="30" />
|
2020-08-25 04:23:34 +00:00
|
|
|
|
2020-09-06 14:53:04 +00:00
|
|
|
<b-dropdown
|
|
|
|
v-if="showBoardsDropdown"
|
|
|
|
variant="transparent"
|
|
|
|
toggle-class="p-0 px-1"
|
|
|
|
:text="board.name"
|
|
|
|
>
|
|
|
|
<b-dropdown-item
|
|
|
|
:to="`/board/${id}`"
|
|
|
|
:key="id"
|
|
|
|
variant="outline-primary"
|
|
|
|
v-for="{ name, id } in sortedBoards"
|
|
|
|
:active="board.id === id"
|
|
|
|
>
|
|
|
|
{{ name }}
|
|
|
|
</b-dropdown-item>
|
|
|
|
</b-dropdown>
|
2020-07-22 15:52:09 +00:00
|
|
|
|
2020-09-06 14:53:04 +00:00
|
|
|
<b-button
|
|
|
|
v-else-if="showBoardTitle"
|
|
|
|
class="p-0 px-1"
|
|
|
|
variant="transparent"
|
2020-09-01 17:47:56 +00:00
|
|
|
>
|
2020-09-06 14:53:04 +00:00
|
|
|
{{ board.name }}
|
|
|
|
</b-button>
|
|
|
|
</b-navbar-brand>
|
2020-09-01 17:47:56 +00:00
|
|
|
|
2020-09-06 14:53:04 +00:00
|
|
|
<settings />
|
2020-07-22 15:52:09 +00:00
|
|
|
</b-navbar>
|
2018-10-19 05:15:28 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-01 17:47:56 +00:00
|
|
|
import { mapState, mapGetters } from 'vuex';
|
2020-08-18 18:56:10 +00:00
|
|
|
import Settings from '@/components/Settings';
|
2018-10-19 05:15:28 +00:00
|
|
|
|
|
|
|
export default {
|
2019-11-08 19:56:03 +00:00
|
|
|
components: {
|
2020-08-18 18:56:10 +00:00
|
|
|
Settings,
|
2019-11-08 19:56:03 +00:00
|
|
|
},
|
2019-02-05 07:31:40 +00:00
|
|
|
|
2019-11-08 19:56:03 +00:00
|
|
|
computed: {
|
2020-08-25 04:23:34 +00:00
|
|
|
...mapState(['board']),
|
2020-09-01 17:47:56 +00:00
|
|
|
...mapGetters(['sortedBoards']),
|
2020-08-25 04:23:34 +00:00
|
|
|
|
|
|
|
showBoardTitle() {
|
|
|
|
return this.$route.name === 'board' && this.board.name;
|
|
|
|
},
|
2020-09-06 14:53:04 +00:00
|
|
|
|
|
|
|
showBoardsDropdown() {
|
|
|
|
return this.showBoardTitle && this.sortedBoards.length > 1;
|
|
|
|
},
|
2019-11-08 19:56:03 +00:00
|
|
|
},
|
2018-10-19 05:15:28 +00:00
|
|
|
};
|
|
|
|
</script>
|