diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-24 17:29:33 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-24 17:29:33 +0100 |
commit | 67441f813917d0a9c6624ec04ddc08d89ec2b3bc (patch) | |
tree | 8071903dc1c6982daa2fd84e2cc867e276c1160e /templates/chat.html | |
parent | 82f6ce1b1f003903c0e8ffceafe17682ecd7fb88 (diff) | |
download | cats-radio-node-67441f813917d0a9c6624ec04ddc08d89ec2b3bc.tar.gz cats-radio-node-67441f813917d0a9c6624ec04ddc08d89ec2b3bc.tar.bz2 cats-radio-node-67441f813917d0a9c6624ec04ddc08d89ec2b3bc.zip |
Work on chat page
Diffstat (limited to 'templates/chat.html')
-rw-r--r-- | templates/chat.html | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/templates/chat.html b/templates/chat.html index 584bde5..8411b01 100644 --- a/templates/chat.html +++ b/templates/chat.html @@ -1,6 +1,42 @@ {% include "head.html" %} -<div class="content"> +<div class="content h-full"> <h1>Chat</h1> + <div class="section h-[96%]"> + <div class="m-2 h-full flex flex-col"> + <div class="flex-1 grow"> + <template id="message_template"> + <div class="p-2 m-2 border-l-1 border-sky-100"> + <div class="font-thin text-sky-400">Timestamp</div> + <div class="font-bold text-sky-900">FROM</div> + <div class="text-sky-800">Message</div> + </div> + </template> + {% for packet in packets %} + {% match packet.comment %}{% when Some with (comment) %} + <div class="p-2 border-l-2 border-sky-100 flex gap-4"> + <div class="flex-none font-thin text-sky-400">{{ packet.received_at_iso()|e }}</div> + <div class="flex-none font-bold text-sky-900">{{ packet.from_callsign|e }}-{{ packet.from_ssid|e }}</div> + <div class="flex-1 text-sky-800">{{ comment|e }} + </div> + </div> + {% when None %}{% endmatch %} + {% endfor %} + </div> + <div class="flex-none grow-0 h-12"> + <div class="flex"> + <div class="flex-none"> + <label for="dest">Message for:</label><input class="textinput" type="text" name="dest" value="" placeholder="callsign-ssid"> + </div> + <div class="flex-1"> + <input class="textinput w-full" type="text" name="message" value="" placeholder="Type your message here"> + </div> + <div class="flex-none"> + <button class="btn" type="button" onclick="btn_chat_send_message()">Send</button> + </div> + </div> + </div> + </div> + </div> </div> {% include "foot.html" %} {# vi:set et sw=2 ts=2: #} |