Add setting to toggle between the modal and the sidebar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -27,13 +27,13 @@
|
|||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Modal v-if="cardDetailsInModal" :title="t('deck', 'Card details')" @close="hideModal()">
|
<Modal v-if="cardDetailsInModal && $route.params.cardId" :title="t('deck', 'Card details')" @close="hideModal()">
|
||||||
<div class="modal__content">
|
<div class="modal__content">
|
||||||
<router-view name="sidebar" />
|
<router-view name="sidebar" />
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<router-view v-show="!cardDetailsInModal" name="sidebar" />
|
<router-view v-show="!cardDetailsInModal || !$route.params.cardId" name="sidebar" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -93,7 +93,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.$store.dispatch('setCardDetailsInModal', false)
|
// this.$store.dispatch('setCardDetailsInModal', false)
|
||||||
|
this.$router.push({ name: 'board' })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
|
|||||||
@@ -52,6 +52,13 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<AppNavigationSettings>
|
<AppNavigationSettings>
|
||||||
<div>
|
<div>
|
||||||
|
<input id="toggle-modal"
|
||||||
|
v-model="cardDetailsInModal"
|
||||||
|
type="checkbox"
|
||||||
|
class="checkbox">
|
||||||
|
<label for="toggle-modal">
|
||||||
|
{{ t('deck', 'Use modal card view') }}
|
||||||
|
</label>
|
||||||
<Multiselect v-model="groupLimit"
|
<Multiselect v-model="groupLimit"
|
||||||
:class="{'icon-loading-small': groupLimitDisabled}"
|
:class="{'icon-loading-small': groupLimitDisabled}"
|
||||||
open-direction="bottom"
|
open-direction="bottom"
|
||||||
@@ -119,6 +126,14 @@ export default {
|
|||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
return OC.isUserAdmin()
|
return OC.isUserAdmin()
|
||||||
},
|
},
|
||||||
|
cardDetailsInModal: {
|
||||||
|
get() {
|
||||||
|
return this.$store.getters.cardDetailsInModal
|
||||||
|
},
|
||||||
|
set(newValue) {
|
||||||
|
this.$store.dispatch('setCardDetailsInModal', newValue)
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
if (this.isAdmin) {
|
if (this.isAdmin) {
|
||||||
|
|||||||
Reference in New Issue
Block a user