diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-24 22:25:00 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-24 22:25:00 +0100 |
commit | df4b62f2a1aa616e4038b1511b2e38cd956e6423 (patch) | |
tree | 7a320e08c3a6f3f9b2f944f9158a728c582efc16 /templates | |
parent | 67441f813917d0a9c6624ec04ddc08d89ec2b3bc (diff) | |
download | cats-radio-node-df4b62f2a1aa616e4038b1511b2e38cd956e6423.tar.gz cats-radio-node-df4b62f2a1aa616e4038b1511b2e38cd956e6423.tar.bz2 cats-radio-node-df4b62f2a1aa616e4038b1511b2e38cd956e6423.zip |
Get Chat window working
Diffstat (limited to 'templates')
-rw-r--r-- | templates/chat.html | 27 | ||||
-rw-r--r-- | templates/head.html | 2 |
2 files changed, 14 insertions, 15 deletions
diff --git a/templates/chat.html b/templates/chat.html index 8411b01..f68b1da 100644 --- a/templates/chat.html +++ b/templates/chat.html @@ -1,34 +1,33 @@ {% include "head.html" %} <div class="content h-full"> <h1>Chat</h1> - <div class="section h-[96%]"> + <div class="section h-[90vh]"> <div class="m-2 h-full flex flex-col"> - <div class="flex-1 grow"> + <div id="messagelist" class="flex-1 grow overflow-scroll"> <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 class="p-2 border-l-2 border-sky-100 flex gap-4"> + <div class="msg_timestamp flex-none font-thin text-sm text-sky-400">timestamp</div> + <div class="msg_from flex-none font-bold text-sky-900" onclick="call_clicked(this)">CALL-SSID</div> + <div class="msg_comment flex-1 text-sky-800">COMMENT</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 class="flex-none font-thin text-sm text-sky-400">{{ packet.received_at_iso()|e }}</div> + <div class="flex-none font-bold text-sky-900" onclick="call_clicked(this)">{{ 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="m-2 flex-none grow-0 h-16"> + <div class="flex gap-2"> <div class="flex-none"> - <label for="dest">Message for:</label><input class="textinput" type="text" name="dest" value="" placeholder="callsign-ssid"> + <label for="dest">Message for:</label><input class="textinput" type="text" id="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"> + <input class="textinput w-full" type="text" id="whisker_comment" value="" placeholder="Type your message here"> </div> <div class="flex-none"> <button class="btn" type="button" onclick="btn_chat_send_message()">Send</button> diff --git a/templates/head.html b/templates/head.html index fd0afe4..aabc380 100644 --- a/templates/head.html +++ b/templates/head.html @@ -7,7 +7,7 @@ <link rel="stylesheet" href="/static/style.css" type="text/css"> <link rel="stylesheet" href="/static/font-awesome/css/font-awesome.min.css"> {% for js in page.styles() %} - <script src="/static/{{ js }}.js" defer></script> + <script src="/static/{{ js }}" defer></script> {% endfor %} </head> <body> |