diff --git a/dist/index.html b/dist/index.html
index b2d2a97..3ddf6bf 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -36,22 +36,22 @@
@@ -65,21 +65,21 @@
Do you want to reset the vm?
-
+
Vote ends in seconds
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/index.js b/src/index.js
index 07baab4..c5c4e34 100644
--- a/src/index.js
+++ b/src/index.js
@@ -25,6 +25,7 @@ const buttons = {
endTurn: window.document.getElementById("endTurnBtn"),
qemuMonitor: window.document.getElementById("qemuMonitorBtn"),
qemuMonitorSend: window.document.getElementById("qemuMonitorSendBtn"),
+ sendChat: window.document.getElementById("sendChatBtn"),
}
var hasTurn = false;
var vm;
@@ -205,7 +206,7 @@ class CollabVMClient {
curr.turn = -1;
curr.element.classList = "";
});
- buttons.takeTurn.innerText = "Take Turn";
+ buttons.takeTurn.innerHTML = " Take Turn";
turn = -1;
if (!msgArr.includes(username))
turnstatus.innerText = "";
@@ -254,9 +255,9 @@ class CollabVMClient {
}
}
if (turn === -1) {
- buttons.takeTurn.innerText = "Take Turn";
+ buttons.takeTurn.innerHTML = " Take Turn";
} else {
- buttons.takeTurn.innerText = "End Turn";
+ buttons.takeTurn.innerHTML = " End Turn";
}
this.reloadUsers();
break;
@@ -596,6 +597,10 @@ chatinput.addEventListener("keypress", (e) => {
chatinput.value = "";
}
});
+buttons.sendChat.addEventListener('click', () => {
+ vm.chat(chatinput.value);
+ chatinput.value = "";
+});
buttons.changeUsername.addEventListener('click', () => {
var newuser = window.prompt("Enter new username", window.username);
if (newuser == null) return;