From 6a4be5ae1b89a4e79a83239f184f394efcabeeba Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 24 Feb 2023 17:24:38 +0100 Subject: Invite player system. --- views/join.pug | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'views/join.pug') 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 -- cgit v1.2.3