Store cardDetailsInModal in config instead of state
Signed-off-by: Dmitriy Ivanko <tmwsls12@gmail.com>
This commit is contained in:
committed by
Julius Härtl
parent
25dee609b5
commit
51bcbdb87d
@@ -31,7 +31,7 @@
|
||||
@submit-title="handleSubmitTitle"
|
||||
@close="closeSidebar">
|
||||
<template #secondary-actions>
|
||||
<ActionButton v-if="cardDetailsInModal" icon="icon-menu-sidebar" @click.stop="showModal()">
|
||||
<ActionButton v-if="cardDetailsInModal" icon="icon-menu-sidebar" @click.stop="closeModal()">
|
||||
{{ t('deck', 'Open in sidebar view') }}
|
||||
</ActionButton>
|
||||
<ActionButton v-else icon="icon-external" @click.stop="showModal()">
|
||||
@@ -131,7 +131,6 @@ export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
currentBoard: state => state.currentBoard,
|
||||
cardDetailsInModal: state => state.cardDetailsInModal,
|
||||
}),
|
||||
...mapGetters(['canEdit', 'assignables', 'cardActions', 'stackById']),
|
||||
title() {
|
||||
@@ -152,6 +151,14 @@ export default {
|
||||
link: window.location.protocol + '//' + window.location.host + generateUrl('/apps/deck/') + `#/board/${this.currentBoard.id}/card/${this.currentCard.id}`,
|
||||
}
|
||||
},
|
||||
cardDetailsInModal: {
|
||||
get() {
|
||||
return this.$store.getters.config('cardDetailsInModal')
|
||||
},
|
||||
set(newValue) {
|
||||
this.$store.dispatch('setConfig', { cardDetailsInModal: newValue })
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleUpdateTitleEditable(value) {
|
||||
@@ -177,7 +184,10 @@ export default {
|
||||
},
|
||||
|
||||
showModal() {
|
||||
this.$store.dispatch('setCardDetailsInModal', true)
|
||||
this.$store.dispatch('setConfig', { cardDetailsInModal: true })
|
||||
},
|
||||
closeModal() {
|
||||
this.$store.dispatch('setConfig', { cardDetailsInModal: false })
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user