blob: 257752b06abf3df947c26ca738793044633bd3cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
//- vim:ts=4:sw=4:
-
var n_live = 0, n_fast = 0, n_slow = 0
for (let t of tickets) {
if (t.pace === 1) n_live ++
if (t.pace === 2) n_fast ++
if (t.pace === 3) n_slow ++
}
mixin show_ticket(ticket)
- var setup = SETUP_TABLE[ticket.setup_id]
div
label
input(type="checkbox" name="tickets" value=ticket.ticket_id)
| #{setup.setup_name}
doctype html
html
head
include head
title Matches
style.
div.buttons { margin-top: 8px }
body
include header
article
h1 Matchmaking
if tickets.length > 0
form(method="post" action="/games/match/unqueue")
if n_live > 0
h3 Tickets - Live
each ticket in tickets
if ticket.pace === 1
+show_ticket(ticket)
div.buttons
button(name="pace" value="1") Remove all
button(type="submit") Remove
if n_fast > 0
h3 Tickets - Fast
each ticket in tickets
if ticket.pace === 2
+show_ticket(ticket)
div.buttons
button(name="pace" value="2") Remove All
button(type="submit") Remove
if n_slow > 0
h3 Tickets - Slow
each ticket in tickets
if ticket.pace === 3
+show_ticket(ticket)
div.buttons
button(name="pace" value="3") Remove All
button(type="submit") Remove
p
else
h3 Tickets
p You have not queued for any matches.
h3 Matches
if limit
p.error= limit
else
p Select what you want to play:
form(method="post" action="/games/match/queue")
p
each title in TITLE_LIST
each setup in title.setups
label
input(type="checkbox" name="setups" value=setup.setup_id)
| #{setup.setup_name}
br
p
button(name="pace" value=1) #{EMOJI_LIVE} Play Live
button(name="pace" value=2) #{EMOJI_FAST} Play Fast
button(name="pace" value=3) #{EMOJI_SLOW} Play Slow
|