diff src/index.html.luan @ 65:6cfef9850520

people popup
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 05 Mar 2025 22:30:35 -0700
parents afd5ab5b02a2
children bce0480721c1
line wrap: on
line diff
--- a/src/index.html.luan	Wed Mar 05 21:43:11 2025 -0700
+++ b/src/index.html.luan	Wed Mar 05 22:30:35 2025 -0700
@@ -23,10 +23,7 @@
 	end
 	local user_id = user.id
 	local chat = Http.request.parameters.chat
-	local selected = nil
-	if chat ~= nil then
-		selected = get_chat_by_id(chat)
-	end
+	chat = chat and get_chat_by_id(chat)
 	Io.stdout = Http.response.text_writer()
 %>
 <!doctype html>
@@ -101,14 +98,21 @@
 				<button onclick="gotoInvite(this)">Close</button>
 			</div>
 		</dialog>
+		<dialog people>
+			<h2>People in the chat</h2>
+			<div people></div>
+			<div buttons>
+				<button onclick="closeModal(this)">Close</button>
+			</div>
+		</dialog>
 		<input type="file" required onchange="loadedFile(this)">
 		<script>
 			'use strict';
 
 <%
-	if selected ~= nil then
+	if chat ~= nil then
 %>
-			selectChat('<%=selected.id%>');
+			selectChat('<%=chat.id%>');
 <%
 	end
 %>