diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 951e964..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.gitignore b/.gitignore
index 1316eed..bed10c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -129,4 +129,5 @@ dist
.yarn/install-state.gz
.pnp.*
-behringer-routing/
\ No newline at end of file
+behringer-routing/
+.DS_Store
diff --git a/index.html b/index.html
index 2ed806f..8fd1150 100644
--- a/index.html
+++ b/index.html
@@ -1,20 +1,37 @@
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 6942a63..ff84471 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,13 +1,12 @@
{
"name": "mixers-routing-tool",
- "version": "1.0.0",
+ "version": "0.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mixers-routing-tool",
- "version": "1.0.0",
- "hasInstallScript": true,
+ "version": "0.0.2",
"license": "GPL-3.0",
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
diff --git a/preload.js b/preload.js
index 57f2dc9..70d0a38 100644
--- a/preload.js
+++ b/preload.js
@@ -1,4 +1,5 @@
-const { contextBridge, ipcRenderer } = require('electron')
+const { contextBridge, ipcRenderer } = require('electron');
+const { link } = require('fs');
const path = require('path')
// Uncomment for npm start command
@@ -10,6 +11,11 @@ const publicPath =
: path.join(process.resourcesPath, 'public');
const imagesPath = path.join(publicPath, "assets", "images");
+const AES50 = {
+ A: "A",
+ B: "B"
+};
+
class Device {
constructor(x, y, type, id, name) {
this.x = x;
@@ -18,17 +24,24 @@ class Device {
this.id = id;
this.name = name;
this.visible = true;
+
+
+ this.AES50A = id;
+ this.AES50B = id;
}
show() {
if (this.visible)
+ {
return "
";
+ "px; left: " + this.x + "px;'>" +
+ "
A
" +
+ "
B
" +
+ "
";
+ }
else return "";
}
@@ -41,6 +54,56 @@ class Device {
// this.visible = false;
//}
}
+
+class Link {
+ constructor(dev1, aes50_1, dev2, aes50_2) {
+ this.valid = true
+ this.device1 = dev1;
+ this.device2 = dev2;
+ this.aes50_1 = aes50_1;
+ this.aes50_2 = aes50_2;
+ this.check();
+ }
+
+ /// Check if link is valable
+ check() {
+ console.log("CHECK")
+ links.forEach(link => {
+ // if link already on aes50
+ if ((this.device1 == link.device1 && this.aes50_1 == link.aes50_1) ||
+ (this.device1 == link.device2 && this.aes50_1 == link.aes50_2)) {
+ console.log("LINK ALREADY CREATED")
+ link.delete()
+ }
+ else if ((this.device2 == link.device1 && this.aes50_2 == link.aes50_1) ||
+ (this.device2 == link.device2 && this.aes50_2 == link.aes50_2)) {
+ console.log("LINK ALREADY CREATED")
+ link.delete()
+ }
+ });
+ }
+
+ delete() {
+ this.valid = false;
+ this.device1 = -1;
+ this.aes50_1 = -1;
+ this.device2 = -1;
+ this.aes50_2 = -2;
+ }
+
+ show() {
+ if (this.valid) {
+ let x1offset = this.aes50_1 == AES50.A ? 58 : 78;
+ let x2offset = this.aes50_2 == AES50.A ? 58 : 78;
+ //return "