Skip to content

Commit 5b6f8b6

Browse files
committed
Add a button to the modal to switch back to the sidebar view
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
1 parent 4685ecd commit 5b6f8b6

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export default {
9393
},
9494
methods: {
9595
hideModal() {
96-
// this.$store.dispatch('setCardDetailsInModal', false)
9796
this.$router.push({ name: 'board' })
9897
},
9998
},

src/components/card/CardSidebar.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@
2424
<AppSidebar v-if="currentBoard && currentCard && copiedCard"
2525
:title="currentCard.title"
2626
:subtitle="subtitle"
27+
:class="{ 'app-sidebar-modal': cardDetailsInModal}"
2728
@close="closeSidebar">
2829
<template #secondary-actions>
29-
<ActionButton icon="icon-external" @click.stop="showModal()">
30+
<ActionButton v-if="cardDetailsInModal" icon="icon-menu-sidebar" @click.stop="showModal()">
31+
{{ t('deck', 'Open in sidebar view') }}
32+
</ActionButton>
33+
34+
<ActionButton v-else icon="icon-external" @click.stop="showModal()">
3035
{{ t('deck', 'Open in bigger view') }}
3136
</ActionButton>
3237
</template>
@@ -139,6 +144,7 @@ export default {
139144
computed: {
140145
...mapState({
141146
currentBoard: state => state.currentBoard,
147+
cardDetailsInModal: state => state.cardDetailsInModal,
142148
}),
143149
...mapGetters(['canEdit', 'assignables']),
144150
attachments() {
@@ -384,6 +390,12 @@ export default {
384390
</style>
385391

386392
<style lang="scss" scoped>
393+
.app-sidebar-modal {
394+
border-left: 0;
395+
width: 800px;
396+
max-width: 780px;
397+
top: 0px;
398+
}
387399
388400
h5 {
389401
border-bottom: 1px solid var(--color-border);

0 commit comments

Comments
 (0)