Newer
Older

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
}
self.sendToWebSocket('cart-action', {

Tobias Ullerich
committed
'pad': pad.id
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
page_action: {
name: 'Set Page',
options: [
{
id: 'page',
type: 'number',
label: 'Page Number',
default: '',
},
],
callback: async (event) => {
self.sendToWebSocket('page-action', {
'page': event.options.page - 1
});
},
},
navigate_action: {
name: 'Navigate',
options: [
{
id: 'type',
type: 'dropdown',
choices: [
{ id: 'PREVIOUS', label: 'Previous' },
{ id: 'NEXT', label: 'Next' }
],
label: 'Action',
default: '',
},
],
callback: async (event) => {
self.sendToWebSocket('navigate-action', {
'action': event.options.type
});
},
},
stop_action: {
name: 'Stop All',
options: [],
callback: async (event) => {
self.sendToWebSocket('stop-action', {});
},