Hide currentboard in selector (fixes #967)

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-04-10 17:17:19 +02:00
parent d9305fc347
commit 7ea0f70fe8
3 changed files with 16 additions and 6 deletions

View File

@@ -25,7 +25,7 @@
<div id="modal-inner" :class="{ 'icon-loading': loading }">
<h1>Select a board to add to the collection</h1>
<ul v-if="!loading">
<li v-for="board in boards" @click="selectedBoard=board.id" :class="{'selected': (selectedBoard === board.id) }">
<li v-for="board in boards" v-if="currentBoard && ''+board.id !== ''+currentBoard" @click="selectedBoard=board.id" :class="{'selected': (selectedBoard === board.id) }">
<span class="board-bullet" :style="{ 'backgroundColor': '#' + board.color }"></span>
<span>{{ board.title }}</span>
</li>
@@ -84,10 +84,14 @@
boards: [],
selectedBoard: null,
loading: true,
currentBoard: null,
}
},
beforeMount() {
this.fetchBoards();
if (angular.element('#board')) {
this.currentBoard = angular.element('#board').scope().boardservice.id || null;
}
},
methods: {
fetchBoards() {