Skip to content
Snippets Groups Projects
actions.js 783 B
Newer Older
  • Learn to ignore specific revisions
  • Tobias Ullerich's avatar
    Tobias Ullerich committed
    module.exports = function (self) {
    
        self.setActionDefinitions({
    
            pad_trigger_action: {
    
                name: 'Trigger Pad',
                options: [
                    {
    
                        id: 'name',
                        type: 'textinput',
                        label: 'Pad Name',
                        default: '',
    
                    },
                ],
                callback: async (event) => {
    
                    const pad = self.currentProject.findPadByName(event.options.name);
                    if (!pad) {
                        self.log('warning', 'Cannot find a pad with name ' + event.options.name);
    
                    self.sendToWebSocket('cart-action', {
    
    Tobias Ullerich's avatar
    Tobias Ullerich committed
    }