Compare commits
No commits in common. "40dd6ea8654bb18dd60893b419ccf95d7e39f678" and "5f3cad8884f3bcfbb12df6d6dcce3f65f39acdef" have entirely different histories.
40dd6ea865
...
5f3cad8884
2
main.py
2
main.py
@ -70,7 +70,7 @@ async def _(request: aiohttp.web.Request):
|
||||
await ws.prepare(request)
|
||||
|
||||
print(f'[WS] client {client} connected, {ws=}')
|
||||
await model.subscribe(client, ws)
|
||||
model.subscribe(client, ws)
|
||||
|
||||
async for msg in ws:
|
||||
print(f'[WS] incoming message from client {client}, {ws=}, {msg=}')
|
||||
|
@ -7,11 +7,7 @@ ws.onmessage = function(event) {
|
||||
|
||||
console.log(msg);
|
||||
|
||||
if (msg.hasOwnProperty('currentsession')) {
|
||||
document.getElementById('current_session').innerText = msg.currentsession;
|
||||
}
|
||||
|
||||
if (msg.hasOwnProperty('allsessions')) {
|
||||
document.getElementById('all_sessions').innerText = msg.allsessions.join(', ');
|
||||
if (msg.hasOwnProperty('session')) {
|
||||
document.getElementById('current_session').innerText = msg.session;
|
||||
}
|
||||
};
|
4
ui.html
4
ui.html
@ -9,8 +9,8 @@
|
||||
<body>
|
||||
this is the UI
|
||||
<br>
|
||||
<span id="current_session">You are not in any session.</span><br>
|
||||
<span id="all_sessions"></span><br>
|
||||
<span id="current_session">You are not in any session.</span>
|
||||
<br>
|
||||
<br>
|
||||
<button id="btn_create_session">Create session</button>
|
||||
<br><br><br>
|
||||
|
Loading…
Reference in New Issue
Block a user