summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-24 17:24:38 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-26 12:53:53 +0100
commit6a4be5ae1b89a4e79a83239f184f394efcabeeba (patch)
tree4344f14f8b9911af91e5bb978fd75f334e495b34 /views
parent9e068aa062bb07f1f1b8704beffefbcaba260eb7 (diff)
downloadserver-6a4be5ae1b89a4e79a83239f184f394efcabeeba.tar.gz
Invite player system.
Diffstat (limited to 'views')
-rw-r--r--views/join.pug15
1 files changed, 15 insertions, 0 deletions
diff --git a/views/join.pug b/views/join.pug
index 90f0db7..abbaf2c 100644
--- a/views/join.pug
+++ b/views/join.pug
@@ -11,11 +11,13 @@ html
table { min-width: 0; }
th,td { border: 1px solid black; }
td a.red { text-decoration: none; color: brown; font-size: 15px; float: right; }
+ td a.green { text-decoration: none; color: green; font-size: 15px; float: right; }
td a { text-decoration: underline; color: blue; }
th { white-space: nowrap; background-color: gainsboro; }
td { width: 180px; background-color: white; }
#message { background-color: whitesmoke; }
.hide { display: none; }
+ td.is_invite { color: gray }
td.enemy { background-color: #f66 }
td.enemy::before { content: "\1f6ab "; color: #000; font-size: 15px; }
script.
@@ -25,6 +27,7 @@ html
let user_id = !{ user.user_id }
let whitelist = !{ JSON.stringify(whitelist) }
let blacklist = !{ JSON.stringify(blacklist) }
+ let friends = !{ JSON.stringify(friends) }
let ready = !{ ready }
script(src="/join.js")
body
@@ -50,6 +53,18 @@ html
br(clear="left")
+ dialog(id="invite")
+ | Invite a friend:
+ br
+ input(id="invite_user" type="text" list="friends" onchange="send_invite()")
+ datalist(id="friends")
+ if friends
+ each who in friends
+ option= who
+ br
+ button(onclick="send_invite()") Invite
+ button(onclick="hide_invite()") Cancel
+
p
table
tbody