Hide currentboard in selector (fixes #967)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -22,6 +22,11 @@
|
||||
|
||||
import app from '../app/App.js';
|
||||
import Vue from 'vue';
|
||||
|
||||
Vue.prototype.t = t;
|
||||
Vue.prototype.n = n;
|
||||
Vue.prototype.OC = OC;
|
||||
|
||||
import CollaborationView from '../views/CollaborationView';
|
||||
|
||||
/* global oc_defaults oc_config OC OCP OCA */
|
||||
|
||||
@@ -29,17 +29,18 @@ __webpack_nonce__ = btoa(OC.requestToken);
|
||||
__webpack_public_path__ = OC.linkTo('deck', 'js/build/');
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
Vue.prototype.$ = $
|
||||
Vue.prototype.t = t
|
||||
Vue.prototype.n = n
|
||||
Vue.prototype.OC = OC
|
||||
|
||||
import BoardSelector from './views/BoardSelector';
|
||||
|
||||
import './../css/collections.css';
|
||||
|
||||
((function(OCP) {
|
||||
|
||||
Vue.prototype.$ = $
|
||||
Vue.prototype.t = t
|
||||
Vue.prototype.n = n
|
||||
Vue.prototype.OC = OC
|
||||
|
||||
OCP.Collaboration.registerType('deck', {
|
||||
action: () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user