Skip to content

Conversation

@juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Feb 2, 2021

Part of #2630 to allow apps registering custom card actions that will be added to the actions menu in the card sidebar.

The callback will be called with an object following the deck-card rich object string definition from https://github.com/nextcloud/server/blob/078ecac188525490f7bc560c212070167249263b/lib/public/RichObjectStrings/Definitions.php#L247-L283

The action can be registered with:

window.OCA.Deck.registerCardAction({
	label: 'Send mail',
	icon: 'icon-mail',
	callback: (card) => {
		console.debug('Received send mail action for card', card)
	},
})

image

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}`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently we cannot get the absolute URL from the @nextcloud/router package yet for general routes.

@PVince81
Copy link
Member

PVince81 commented Feb 9, 2021

I've raised nextcloud/spreed#5106 for the Talk side

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants