From 8c5680fd113df2f750999b532201369f341b60d8 Mon Sep 17 00:00:00 2001 From: Sylvain Gay Date: Tue, 13 Jun 2023 17:53:30 +0200 Subject: [PATCH] Started Issue #16 There is now a "blurred" status that does nothing. --- static/admin.html | 22 ++++++++++++++-------- traque.js | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/static/admin.html b/static/admin.html index bcd61d9..9bcfa8f 100644 --- a/static/admin.html +++ b/static/admin.html @@ -49,6 +49,7 @@ ID Visible + Brouillé Tracker Npc Last Update @@ -96,6 +97,7 @@ function sendUpdate(id){ var state = {}; state.shown = document.getElementById(`${id}.shown`).checked; + state.blurred = document.getElementById(`${id}.blurred`).checked; state.tracker = document.getElementById(`${id}.tracker`).checked; state.npc = document.getElementById(`${id}.npc`).value; socket.emit('setState', { id: id, state: state }); @@ -105,20 +107,24 @@ var id = data.id; if(!(id in equipes)){ var row = `${id}`; - row = row + `` - row = row + `` - row = row + `` + row += `` + row += `` + row += `` - row = row + `` + row += `` info_table.innerHTML = info_table.innerHTML + `${row}` } equipes[id] = data.state; document.getElementById(`${id}.shown`).checked = data.state.shown; + document.getElementById(`${id}.blurred`).checked = data.state.blurred; document.getElementById(`${id}.tracker`).checked = data.state.tracker; document.getElementById(`${id}.npc`).value = data.state.npc; var now = new Date(); diff --git a/traque.js b/traque.js index f6dce87..c9961b4 100644 --- a/traque.js +++ b/traque.js @@ -5,6 +5,7 @@ "vieux": bool, "state" : { "shown" : bool, + "blurred": bool, "tracker" : bool, "npc" : int } @@ -180,6 +181,7 @@ function default_team(team_id, valid) { var equipe = {}; var state = {}; state.shown = valid == 0; + state.blurred = false; state.tracker = false; state.npc = valid; equipe.state = state;