Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to register card actions #2772

Merged
merged 1 commit into from Feb 15, 2021
Merged

Add API to register card actions #2772

merged 1 commit into from Feb 15, 2021

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl 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

Signed-off-by: Julius Härtl <jus@bitgrid.net>
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.

None yet

3 participants