add online time and deaths to player card
This commit is contained in:
parent
4a826e5ac2
commit
b19568b1ab
3 changed files with 10 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ from main import TelemetrySnapshot
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
wait = 10
|
wait = 10
|
||||||
online_time = -10
|
online_time = 24 * 3600 # start at 1 day
|
||||||
ew = 0
|
ew = 0
|
||||||
ns = 0
|
ns = 0
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,8 @@ function render(players) {
|
||||||
<span class="stat kph">${p.kills_per_hour}</span>
|
<span class="stat kph">${p.kills_per_hour}</span>
|
||||||
<span class="stat rares">${p.rares_found}</span>
|
<span class="stat rares">${p.rares_found}</span>
|
||||||
<span class="stat meta">${p.vt_state}</span>
|
<span class="stat meta">${p.vt_state}</span>
|
||||||
|
<span class="stat onlinetime">${p.onlinetime}</span>
|
||||||
|
<span class="stat deaths">${p.deaths}</span>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
li.addEventListener('click', () => selectPlayer(p, x, y));
|
li.addEventListener('click', () => selectPlayer(p, x, y));
|
||||||
|
|
|
||||||
|
|
@ -156,11 +156,12 @@ body {
|
||||||
#playerList li {
|
#playerList li {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"name loc"
|
"name loc"
|
||||||
"kills kph"
|
"kills kph"
|
||||||
"rares meta";
|
"rares meta"
|
||||||
|
"onlinetime deaths";
|
||||||
gap: 4px 8px;
|
gap: 4px 8px;
|
||||||
margin: 6px 0;
|
margin: 6px 0;
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
|
|
@ -178,6 +179,8 @@ body {
|
||||||
.stat.kph { grid-area: kph; }
|
.stat.kph { grid-area: kph; }
|
||||||
.stat.rares { grid-area: rares; }
|
.stat.rares { grid-area: rares; }
|
||||||
.stat.meta { grid-area: meta; }
|
.stat.meta { grid-area: meta; }
|
||||||
|
.stat.onlinetime { grid-area: onlinetime; }
|
||||||
|
.stat.deaths { grid-area: deaths; }
|
||||||
|
|
||||||
/* pill styling */
|
/* pill styling */
|
||||||
#playerList li .stat {
|
#playerList li .stat {
|
||||||
|
|
@ -198,6 +201,8 @@ body {
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
color: #111;
|
color: #111;
|
||||||
}
|
}
|
||||||
|
.stat.onlinetime::before { content: "🕑 "}
|
||||||
|
.stat.deaths::before { content: "💀 "}
|
||||||
|
|
||||||
/* hover & selected states */
|
/* hover & selected states */
|
||||||
#playerList li:hover { background: var(--card-hov); }
|
#playerList li:hover { background: var(--card-hov); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue