Merge pull request #5610 from nextcloud/fix/5286/stable27-talk-plugin

[stable27] fix(CardMenu): introduce cardRichObject in CardMenu
This commit is contained in:
Julius Härtl
2024-02-20 20:05:33 +01:00
committed by GitHub

View File

@@ -127,6 +127,7 @@ export default {
'isArchived', 'isArchived',
'boards', 'boards',
'cardActions', 'cardActions',
'stackById',
]), ]),
...mapState({ ...mapState({
showArchived: state => state.showArchived, showArchived: state => state.showArchived,
@@ -155,6 +156,18 @@ export default {
boardId() { boardId() {
return this.card?.boardId ? this.card.boardId : this.$route.params.id return this.card?.boardId ? this.card.boardId : this.$route.params.id
}, },
currentCard() {
return this.$store.getters.cardById(this.card.id)
},
cardRichObject() {
return {
id: '' + this.currentCard.id,
name: this.currentCard.title,
boardname: this.currentBoard.title,
stackname: this.stackById(this.currentCard.stackId)?.title,
link: window.location.protocol + '//' + window.location.host + generateUrl('/apps/deck/') + `#/board/${this.currentBoard.id}/card/${this.currentCard.id}`,
}
},
}, },
methods: { methods: {
openCard() { openCard() {