From 468369e6da99b6f8affefa705562309354d19da4 Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Mon, 28 Oct 2024 05:40:53 -0400 Subject: [PATCH 1/3] fix Eos version display --- plugins/eos/template.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/eos/template.ejs b/plugins/eos/template.ejs index 751cce9..7b17967 100644 --- a/plugins/eos/template.ejs +++ b/plugins/eos/template.ejs @@ -1,6 +1,6 @@

<%= listName %>

-

Eos <%= data.version %>

+

Eos <%= data.EOS.version %>

<% for(var i in data.EOS.cueLists){ %> From 9b4a3bfabaec8e5fc14a2f7019ef3014d8df53b8 Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Mon, 28 Oct 2024 05:41:17 -0400 Subject: [PATCH 2/3] add numberinput plugin field type --- src/view.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/view.js b/src/view.js index 003bfc0..d04d993 100644 --- a/src/view.js +++ b/src/view.js @@ -253,6 +253,14 @@ function updateFields() { const rowHTML = `${field.label}:`; document.getElementById('device-settings-fields').insertAdjacentHTML('beforeend', rowHTML); document.getElementById(field.key).appendChild($elem); + } else if (field.type === 'numberinput') { + $elem.type = 'number'; + $elem.min = 1; + $elem.max = 99; + $elem.step = 1; + const rowHTML = `${field.label}:`; + document.getElementById('device-settings-fields').insertAdjacentHTML('beforeend', rowHTML); + document.getElementById(field.key).appendChild($elem); } }); } From 5bf747d24aed83855e1565b64d4a7c171552adb7 Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Mon, 28 Oct 2024 05:41:37 -0400 Subject: [PATCH 3/3] add cue list filter --- plugins/eos/main.js | 15 +++++++++++++++ plugins/eos/template.ejs | 2 ++ 2 files changed, 17 insertions(+) diff --git a/plugins/eos/main.js b/plugins/eos/main.js index 57e01fb..f16b406 100644 --- a/plugins/eos/main.js +++ b/plugins/eos/main.js @@ -18,6 +18,19 @@ exports.config = { return msg.toString().includes('/eos/out'); }, }, + fields: [ + { + key: 'cueListFilter', + label: 'Q List', + type: 'numberinput', + value: '', + action(_device) { + const device = _device; + device.data.cueListFilter = device.fields.cueListFilter; + device.draw(); + }, + }, + ], }; exports.ready = function ready(_device) { @@ -26,6 +39,8 @@ exports.ready = function ready(_device) { device.templates = { cue: _.template(fs.readFileSync(path.join(__dirname, `cue.ejs`))), }; + device.data.cueListFilter = device.fields.cueListFilter; + device.send('/eos/get/cuelist/count'); device.send('/eos/get/version'); device.send('/eos/subscribe', [{ type: 'i', value: 1 }]); diff --git a/plugins/eos/template.ejs b/plugins/eos/template.ejs index 7b17967..ab6873e 100644 --- a/plugins/eos/template.ejs +++ b/plugins/eos/template.ejs @@ -4,6 +4,7 @@ <% for(var i in data.EOS.cueLists){ %> + <% if(data.cueListFilter == i || data.cueListFilter.length==0){ %>
List <%= i %>
@@ -38,5 +39,6 @@ <% } %>
+ <% } %> <% } %>