add user session reclaiming

In its current state the implementation should allow a user to resume
their session if the websocket connection is reset, for whatever reason.
This could be expanded to allow session sharing (multiple agents logging
in to the same client), or manual session resume via some sort of
password (encode uid & key to some pass-phrase kinda thing, or QR code).
This commit is contained in:
ducklet 2021-01-31 00:19:35 +01:00
parent 476f3d7a49
commit 4908b1fc6e
10 changed files with 376 additions and 77 deletions

View file

@ -1,6 +1,10 @@
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="buzzer.css" />
<body>
<div id="error">
Error:
<code></code>
</div>
<div id="info">
<label
>You:
@ -11,7 +15,9 @@
placeholder="Please put your name here ..."
/></label>
<h2>All Players</h2>
<ul></ul>
<ul>
<!-- players will be inserted here -->
</ul>
</div>
<div id="buzzbox">
<p id="active">BZZZZZ!</p>
@ -20,4 +26,8 @@
</div>
</body>
<template id="player">
<li data-cid="client ID">player name</li>
</template>
<script type="module" src="./buzzer.js"></script>