1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2025-07-18 04:33:50 +02:00
Files
Enlight/ui_templates/sessions.html
2020-11-24 22:05:23 +01:00

19 lines
816 B
HTML

<h1>Sessions</h1>
yes.
<button onclick='ipcRenderer.sendSync("synchronous-message", "PAGE:change.index");'>Go back</button>
<state>Sessionstate: <state id = "sessionStateText">unknown</state></state>
<script>
connectionStatesAsText = {"-1": "Unknown", "0": "Not connected to a session", "1": "Connecting...", "2": "Hosting", "3": "Connected", "4": "Connection failed"};
setInterval(function(){
connectionState = ipcRenderer.sendSync("synchronous-message", "SESSION:get.state");
document.getElementById("sessionStateText").innerHTML = connectionStatesAsText[String(connectionState)];
}, 1000);
</script>
<button onclick='ipcRenderer.sendSync("synchronous-message", "SESSION:createNew");''>
Create new session
</button>
</body>
</html>