Newer
Older
self.setActionDefinitions({
sample_action: {
name: 'Trigger Pad',
options: [
{

Tobias Ullerich
committed
id: 'name',
type: 'textinput',
label: 'Pad Name',
default: '',
},
],
callback: async (event) => {

Tobias Ullerich
committed
const pad = self.currentProject.findPadByName(event.options.name);
if (!pad) {
self.log('warning', 'Cannot find a pad with name ' + event.options.name);
}

Tobias Ullerich
committed
'pad': pad.id
self.sendToWebSocket('cart-action', payload)