update module to newer and more aligned to template structure

This commit is contained in:
2025-01-14 11:42:29 +01:00
parent c7eccd3571
commit 9dc24f2d7b
13 changed files with 169 additions and 147 deletions

View File

@@ -1,58 +1,56 @@
import { combineRgb } from '@companion-module/base'
export function updatePresets() {
let presets = {}
presets['Start'] = {
type: 'button',
category: 'Timer',
name: 'Start',
style: {
text: 'Start Timer',
size: '18',
color: combineRgb(255, 255, 255),
bgcolor: combineRgb(0, 0, 0),
},
steps: [
{
down: [
{
actionId: 'startNewTimer',
options: {
description: '',
project: '0',
export default function (self) {
self.setPresetDefinitions({
Start: {
type: 'button',
category: 'Timer',
name: 'Start',
style: {
text: 'Start Timer',
size: '18',
color: combineRgb(255, 255, 255),
bgcolor: combineRgb(0, 0, 0),
},
steps: [
{
down: [
{
actionId: 'startNewTimer',
options: {
description: '',
project: '0',
},
},
},
],
up: [],
},
],
feedbacks: [],
}
presets['Stop'] = {
type: 'button',
category: 'Timer',
name: 'Stop',
style: {
text: 'Stop Timer',
size: '18',
color: combineRgb(255, 255, 255),
bgcolor: combineRgb(0, 0, 0),
],
up: [],
},
],
feedbacks: [],
},
steps: [
{
down: [
{
actionId: 'stopCurrentTimer',
options: {},
},
],
up: [],
},
],
feedbacks: [],
}
this.setPresetDefinitions(presets)
Stop: {
type: 'button',
category: 'Timer',
name: 'Stop',
style: {
text: 'Stop Timer',
size: '18',
color: combineRgb(255, 255, 255),
bgcolor: combineRgb(0, 0, 0),
},
steps: [
{
down: [
{
actionId: 'stopCurrentTimer',
options: {},
},
],
up: [],
},
],
feedbacks: [],
},
})
}