1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2025-07-19 05:03:49 +02:00

Sessions work good now

This commit is contained in:
TheGreyDiamond
2020-12-28 19:28:07 +01:00
parent cd72c74a68
commit dcc2336463
6 changed files with 333 additions and 23 deletions

View File

@ -226,6 +226,7 @@
<th>Name</th>
<th>Host</th>
<th>Amount of members</th>
<th> </th>
</tr>
</table>
<script>
@ -242,7 +243,7 @@
setInterval(function(){
allSess = ipcRenderer.sendSync("synchronous-message", "SESSION:getAll" )
elmList = document.getElementById("sessionListTa")
elmList.innerHTML = "<tr><th>Name</th><th>Host</th><th>Amount of members</th></tr>"
elmList.innerHTML = "<tr><th>Name</th><th>Host</th><th>Amount of members</th><th> </th></tr>"
SesKeys = Object.keys(allSess)
var i = 0
insBlock = ""
@ -252,6 +253,7 @@
insBlock += "<td>" + allSess[SesKeys[i]].name + "</td>"
insBlock += "<td>" + allSess[SesKeys[i]].host + "</td>"
insBlock += "<td>" + allSess[SesKeys[i]].memberCount + "</td>"
insBlock += "<td><button onclick='console.log(ipcRenderer.sendSync(\"synchronous-message\", \"SESSION:joinSession|" + SesKeys[i] + "\" ))'>Join</button></td>"
insBlock += "</tr>"
elmList.innerHTML = elmList.innerHTML + insBlock
i++;