Fix eslint

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-12-17 22:43:44 +01:00
parent a7bc10277e
commit 76fbe7a0ea
25 changed files with 221 additions and 167 deletions

View File

@@ -25,14 +25,17 @@
<div id="modal-inner" :class="{ 'icon-loading': loading }">
<h1>{{ t('deck', 'Select the board to link to a project') }}</h1>
<ul v-if="!loading">
<li v-for="board in boards" v-if="!currentBoard || ''+board.id !== ''+currentBoard" :key="board.id"
<li v-for="board in availableBoards" :key="board.id"
:class="{'selected': (selectedBoard === board.id) }"
@click="selectedBoard=board.id">
@click="selectedBoard=board.id"
>
<span :style="{ 'backgroundColor': '#' + board.color }" class="board-bullet" />
<span>{{ board.title }}</span>
</li>
</ul>
<button v-if="!loading" class="primary" @click="select">{{ t('deck', 'Select board') }}</button>
<button v-if="!loading" class="primary" @click="select">
{{ t('deck', 'Select board') }}
</button>
</div>
</Modal>
</template>
@@ -71,15 +74,13 @@
</style>
<script>
/* global OC */
import { Modal } from '@nextcloud/vue/dist/Components/Modal'
import { Avatar } from '@nextcloud/vue/dist/Components/Avatar'
import axios from 'nextcloud-axios'
export default {
name: 'CollaborationView',
components: {
Modal, Avatar
Modal
},
data() {
return {
@@ -89,6 +90,11 @@ export default {
currentBoard: null
}
},
computed: {
availableBoards() {
return this.boards.filter((board) => ('' + board.id !== '' + this.currentBoard))
}
},
beforeMount() {
this.fetchBoards()
this.currentBoard = window.location.hash.match(/\/boards\/([0-9]+)/)[1] || null