From 4a3e84e5e836ecb4e6ea94387be222993322c24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20R=C3=B6hrl?= Date: Fri, 19 Jun 2020 12:51:42 +0200 Subject: [PATCH] show card details in modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakob Röhrl --- src/App.vue | 34 +- src/components/card/CardSidebar.vue | 179 +---- src/components/card/CardSidebarTabDetails.vue | 613 ++++++++++++++++++ src/store/main.js | 8 + 4 files changed, 666 insertions(+), 168 deletions(-) create mode 100644 src/components/card/CardSidebarTabDetails.vue diff --git a/src/App.vue b/src/App.vue index c5237165f..dfc2ff2fe 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,7 +26,14 @@
- + + + + + + @@ -34,6 +41,7 @@ import { mapState } from 'vuex' import AppNavigation from './components/navigation/AppNavigation' +import { Modal } from '@nextcloud/vue' import { BoardApi } from './services/BoardApi' const boardApi = new BoardApi() @@ -42,6 +50,7 @@ export default { name: 'App', components: { AppNavigation, + Modal, }, data() { return { @@ -67,6 +76,7 @@ export default { navShown: state => state.navShown, sidebarShownState: state => state.sidebarShown, currentBoard: state => state.currentBoard, + cardDetailsInModal: state => state.cardDetailsInModal, }), // TODO: properly handle sidebar showing for route subview and board sidebar sidebarRouterView() { @@ -77,15 +87,20 @@ export default { return this.sidebarRouterView || this.sidebarShownState }, }, + created() { + this.$store.dispatch('loadBoards') + this.$store.dispatch('loadSharees') + }, + methods: { + hideModal() { + this.$store.dispatch('setCardDetailsInModal', false) + }, + }, provide() { return { boardApi, } }, - created() { - this.$store.dispatch('loadBoards') - this.$store.dispatch('loadSharees') - }, } @@ -124,4 +139,13 @@ export default { .multiselect { width: 100%; } + + .modal__content { + width: 800px; + height: 600px; + min-width: 450px; + min-height: 450px; + margin: 20px 20px 60px 20px; + padding-bottom: 20px; + } diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 9f59c61ca..14172f492 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -25,139 +25,17 @@ :title="currentCard.title" :subtitle="subtitle" @close="closeSidebar"> - diff --git a/src/components/card/CardSidebarTabDetails.vue b/src/components/card/CardSidebarTabDetails.vue new file mode 100644 index 000000000..ad317b1be --- /dev/null +++ b/src/components/card/CardSidebarTabDetails.vue @@ -0,0 +1,613 @@ + + + + + + + + + diff --git a/src/store/main.js b/src/store/main.js index d66149cf5..92ad5f79f 100644 --- a/src/store/main.js +++ b/src/store/main.js @@ -59,6 +59,7 @@ export default new Vuex.Store({ showArchived: false, navShown: true, compactMode: localStorage.getItem('deck.compactMode') === 'true', + cardDetailsInModal: false, sidebarShown: false, currentBoard: null, currentCard: null, @@ -184,6 +185,9 @@ export default new Vuex.Store({ state.compactMode = !state.compactMode localStorage.setItem('deck.compactMode', state.compactMode) }, + setCardDetailsInModal(state, show) { + state.cardDetailsInModal = show + }, setBoards(state, boards) { state.boards = boards }, @@ -258,6 +262,7 @@ export default new Vuex.Store({ Vue.delete(state.currentBoard.acl, removeIndex) } }, + }, actions: { setFilter({ commit }, filter) { @@ -368,6 +373,9 @@ export default new Vuex.Store({ toggleCompactMode({ commit }) { commit('toggleCompactMode') }, + setCardDetailsInModal({ commit }, show) { + commit('setCardDetailsInModal', show) + }, setCurrentBoard({ commit }, board) { commit('setCurrentBoard', board) },