control via admin what players to show in monitor
This commit is contained in:
parent
2bf3d301e6
commit
893f3dc87b
3 changed files with 34 additions and 40 deletions
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<div id="points-admin" class="admin-only">
|
||||
<h2>Admin</h2>
|
||||
<div><a href="monitor.html">Monitor</a></div>
|
||||
<div><a href="monitor.html" onclick="this.href='monitor.html'+location.hash">Monitor</a></div>
|
||||
<div>
|
||||
<label>points: <input type="number" name="points" value="0" /></label>
|
||||
<button data-eval="named.points.valueAsNumber += 100">+ 100</button>
|
||||
|
|
@ -17,6 +17,10 @@
|
|||
<div>
|
||||
<label>tokens: <input type="number" name="tokens" value="0" /></label>
|
||||
</div>
|
||||
<div>
|
||||
<label>monitored: <input type="text" name="monitored" value="[]" /></label>
|
||||
<button data-eval="conn.send('control', {targets: JSON.parse(named.monitored.value), action: 'monitor'})">resubmit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="info">
|
||||
<label class="myname player-only"
|
||||
|
|
@ -44,7 +48,9 @@
|
|||
<span class="name">player name</span>
|
||||
<div class="admin-only">
|
||||
(<span class="points">points</span> pts) (<span class="tokens">tokens</span> tks)
|
||||
<button data-eval="conn.send('control', {target: client.id, action: 'monitor'})">
|
||||
<button data-eval="let monitored = JSON.parse(named.monitored.value).concat(client.id);
|
||||
named.monitored.value = JSON.stringify(monitored);
|
||||
conn.send('control', {targets: monitored, action: 'monitor'})">
|
||||
monitor
|
||||
</button>
|
||||
<button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue