diff --git a/HTML/dmxmaster.html b/HTML/dmxmaster.html index 4338260..0ba8f1e 100644 --- a/HTML/dmxmaster.html +++ b/HTML/dmxmaster.html @@ -5,55 +5,31 @@ + ~name~ -
-
+
DMX1
-
- -
+
DMX2
-
- -
+
@@ -64,91 +40,7 @@ - - + + \ No newline at end of file diff --git a/HTML/dmxsettings.html b/HTML/dmxsettings.html new file mode 100644 index 0000000..d6e3b7d --- /dev/null +++ b/HTML/dmxsettings.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + ~name~ + + + + + +
+
+
+
+
+
+
DMX1 CONFIG
+ +
+
+ +
+
+
DMX2 CONFIG
+ +
+
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/HTML/espfs.paths b/HTML/espfs.paths index 7ef8f5e..d20f20a 100644 --- a/HTML/espfs.paths +++ b/HTML/espfs.paths @@ -1,35 +1,39 @@ -adapters.html -api -api/dbg.json -api/dbg2.json -api/gendata.json -api/mem.json -api/set1.json -api/set2.json -api/set3.json -api/stat.json -api/status.json -api/tmr.json -api/users.json -api/wifiscan.json -application.html -dmxmaster.html -favicon.ico -index.html -info.html -reboot.html -res -res/appstyles.css -res/ca_cert.pem -res/cron.js -res/crondata.js -res/dynamic.css -res/iconsfont.css -res/iconsfont.woff2 -res/logo.png -res/main.js -res/res.js -res/styles.css -res/vue.global.prod.js -services.html +adapters.html +api +api/dbg.json +api/dbg2.json +api/gendata.json +api/mem.json +api/set1.json +api/set2.json +api/set3.json +api/stat.json +api/status.json +api/tmr.json +api/users.json +api/wifiscan.json +application.html +dmxmaster.html +dmxsettings.html +favicon.ico +index.html +info.html +reboot.html +res +res/appstyles.css +res/ca_cert.pem +res/cron.js +res/crondata.js +res/dmx.css +res/dmx.js +res/dynamic.css +res/iconsfont.css +res/iconsfont.woff2 +res/logo.png +res/main.js +res/res.js +res/sha256.js +res/styles.css +res/vue.global.prod.js +services.html system.html \ No newline at end of file diff --git a/HTML/res/appstyles.css b/HTML/res/appstyles.css index 7233ef0..a70f66b 100644 --- a/HTML/res/appstyles.css +++ b/HTML/res/appstyles.css @@ -120,7 +120,7 @@ input:checked + span{background-color: var(--accent-color);} .rngval { -webkit-appearance: none; margin: auto 10px; - width: 80%; + width: 70%; height: 5px; border: none; background: var(--accent-color); diff --git a/HTML/res/dmx.css b/HTML/res/dmx.css new file mode 100644 index 0000000..1f841d9 --- /dev/null +++ b/HTML/res/dmx.css @@ -0,0 +1,20 @@ + .svldetails{ + height: 60px; + width: 60px; + margin: 2px; + padding: 2px; + background-color: var(--first-color); + border-radius: 5px; + border: 1px solid var(--border-color); + overflow: hidden; + float: left; + } + + .selection { + border: 3px solid var(--accent-color); + } + .svldetails p{ + margin: 0px; + vertical-align: middle; + } + \ No newline at end of file diff --git a/HTML/res/dmx.js b/HTML/res/dmx.js new file mode 100644 index 0000000..dfcd6ac --- /dev/null +++ b/HTML/res/dmx.js @@ -0,0 +1,151 @@ +const app = Vue.createApp({ + data() { + return { + slvdevices: [], + slvdevices2: [], + selecteddevs: [], + sliderdata: [ + { id: 0, name: 'ch1', val: 0, min: 0, max: 255 }, + { id: 1, name: 'ch2', val: 2, min: 0, max: 255 }, + { id: 2, name: 'ch3', val: 4, min: 0, max: 255 }, + { id: 3, name: 'ch4', val: 8, min: 0, max: 255 }, + { id: 4, name: 'ch5', val: 16, min: 0, max: 255 }, + { id: 5, name: 'ch6', val: 32, min: 0, max: 255 }, + { id: 6, name: 'ch7', val: 64, min: 0, max: 255 }, + { id: 7, name: 'ch8', val: 128, min: 0, max: 255 }, + { id: 8, name: 'ch9', val: 255, min: 0, max: 255 } + ], + sliderdata2: [ + { id: 9, name: 'ch1', val: 255, min: 0, max: 255 }, + { id: 10, name: 'ch2', val: 128, min: 0, max: 255 }, + { id: 11, name: 'ch3', val: 64, min: 0, max: 255 }, + { id: 12, name: 'ch4', val: 32, min: 0, max: 255 }, + { id: 13, name: 'ch5', val: 16, min: 0, max: 255 }, + { id: 14, name: 'ch6', val: 8, min: 0, max: 255 }, + { id: 15, name: 'ch7', val: 4, min: 0, max: 255 }, + { id: 16, name: 'ch8', val: 2, min: 0, max: 255 }, + { id: 17, name: 'ch9', val: 0, min: 0, max: 255 } + ] + } + } +}); + +app.component('onesl', { + props: ["onesldat"], + methods: { + SliderChange() { + + }, + InputChange() { + + } + }, + template: `
+ +
` +}); + + +app.component('sliders', { + data() { + return { + + chnum: 4 + } + }, + + props: ["sldat"], + methods: { + + }, + template: `
+ +
` +}); + +app.component('svldetails', { + props: ["slvdev"], + methods: { + SelDev() { + this.slvdev.sel = !this.slvdev.sel; + } + }, + template: `
+

{{slvdev.type}}

+

{{slvdev.addr}}

+
` +}); +app.component('devlist', { + data() { + return { + devtypes: [ + { type: 'RGBW', chls: ["RED", "GREEN", "BLUE", "WHITE"] }, + { type: 'RGB', chls: ["RED", "GREEN", "BLUE"] }, + { type: 'D', chls: ["CH1"] }, + { type: 'DIMMER', chls: ["CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "BRIGHT", "GAMMA", "SCENE"] } + ], + selectedtype: 'RGB', + addrforadd: 1 + } + }, + props: ["slvdevices", "key"], + + methods: + { + + AddDevice() { + this.slvdevices.push({ type: this.selectedtype, addr: this.addrforadd, sel: false }); + for (i = 0; i < this.devtypes.length; i++) + if (this.devtypes[i].type == this.selectedtype) + this.addrforadd += this.devtypes[i].chls.length; + }, + DelDevice() { + for (i = 0; i < this.slvdevices.length; i++) { + while (this.slvdevices[i].sel == true) + this.slvdevices.splice(i, 1); + } + }, + PostData() { + + //uuid = uuidv4(); + time = new Date().toISOString(); + var mess = { data:{}}; + mess.data.msgid = Math.floor(Date.now()/1000); + mess.data.time = time; + mess.data.msgtype = 1; + mess.data.payloadtype = 1; + var pload = {}; + pload.devices = this.slvdevices; + mess.data.payload = pload; + //var hash = crypto.sha256.hmac.create(GetVal("shakey")); + //hash.update(JSON.stringify(mess.data)); + //mess.signature = (hash.hex()).toUpperCase(); + mess.signature = "123"; + fetch("/api", { + method: 'post', + headers: { "Content-type": "application/json" }, + body: JSON.stringify(mess) + }); + } + }, + computed: { + selected: function() { + this.selecteddevs = this.slvdevices.filter(function(n) { + return this.slvdevices[n].sel; + }) + } + }, + template: `
+ + + +
+ +
+ + +
` +}); +app.mount('#app'); diff --git a/HTML/res/sha256.js b/HTML/res/sha256.js new file mode 100644 index 0000000..81bb16f Binary files /dev/null and b/HTML/res/sha256.js differ diff --git a/components/webguiapp b/components/webguiapp index 49bab0e..51db569 160000 --- a/components/webguiapp +++ b/components/webguiapp @@ -1 +1 @@ -Subproject commit 49bab0ea5c2144896bf8537abe32168b0f7dede3 +Subproject commit 51db5691cea130f8fe5b09c5ca2604942a8b96d0