Skip to content

Commit

Permalink
fix: open card with direct link
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <luka@nextcloud.com>
  • Loading branch information
luka-nextcloud committed Sep 4, 2023
1 parent d21c6e1 commit 6a61c14
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/components/card/CardSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,17 @@ export default {
titleEditing: '',
hasActivity: capabilities && capabilities.activity,
locale: getLocale(),
currentCard: null,
}
},
computed: {
...mapState({
currentBoard: state => state.currentBoard,
}),
...mapGetters(['canEdit', 'assignables', 'cardActions', 'stackById']),
...mapGetters(['canEdit', 'assignables', 'cardActions', 'stackById', 'cardById']),
title() {
return this.titleEditable ? this.titleEditing : this.currentCard.title
},
currentCard() {
return this.$store.getters.cardById(this.id)
},
subtitle() {
return t('deck', 'Modified') + ': ' + this.relativeDate(this.currentCard.lastModified * 1000) + ' ⸱ ' + t('deck', 'Created') + ': ' + this.relativeDate(this.currentCard.createdAt * 1000)
},
Expand All @@ -182,6 +180,16 @@ export default {
},
},
},
mounted() {
this.currentCard = this.cardById(this.id)
const interval = setInterval(() => {
if (!this.currentCard) {
this.currentCard = this.cardById(this.id)
} else {
clearInterval(interval)
}
}, 1000)
},
methods: {
handleUpdateTitleEditable(value) {
this.titleEditable = value
Expand Down

0 comments on commit 6a61c14

Please sign in to comment.