Mercurial Hosting > chat
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 64:bc9f452ee168 | 65:6cfef9850520 |
|---|---|
| 21 Http.response.send_redirect("/login.html") | 21 Http.response.send_redirect("/login.html") |
| 22 return | 22 return |
| 23 end | 23 end |
| 24 local user_id = user.id | 24 local user_id = user.id |
| 25 local chat = Http.request.parameters.chat | 25 local chat = Http.request.parameters.chat |
| 26 local selected = nil | 26 chat = chat and get_chat_by_id(chat) |
| 27 if chat ~= nil then | |
| 28 selected = get_chat_by_id(chat) | |
| 29 end | |
| 30 Io.stdout = Http.response.text_writer() | 27 Io.stdout = Http.response.text_writer() |
| 31 %> | 28 %> |
| 32 <!doctype html> | 29 <!doctype html> |
| 33 <html> | 30 <html> |
| 34 <head> | 31 <head> |
| 99 <p>We have sent an invite to <span email></span></p> | 96 <p>We have sent an invite to <span email></span></p> |
| 100 <div buttons> | 97 <div buttons> |
| 101 <button onclick="gotoInvite(this)">Close</button> | 98 <button onclick="gotoInvite(this)">Close</button> |
| 102 </div> | 99 </div> |
| 103 </dialog> | 100 </dialog> |
| 101 <dialog people> | |
| 102 <h2>People in the chat</h2> | |
| 103 <div people></div> | |
| 104 <div buttons> | |
| 105 <button onclick="closeModal(this)">Close</button> | |
| 106 </div> | |
| 107 </dialog> | |
| 104 <input type="file" required onchange="loadedFile(this)"> | 108 <input type="file" required onchange="loadedFile(this)"> |
| 105 <script> | 109 <script> |
| 106 'use strict'; | 110 'use strict'; |
| 107 | 111 |
| 108 <% | 112 <% |
| 109 if selected ~= nil then | 113 if chat ~= nil then |
| 110 %> | 114 %> |
| 111 selectChat('<%=selected.id%>'); | 115 selectChat('<%=chat.id%>'); |
| 112 <% | 116 <% |
| 113 end | 117 end |
| 114 %> | 118 %> |
| 115 setUserEventSource(<%=user_id%>); | 119 setUserEventSource(<%=user_id%>); |
| 116 lastUpdate = <%=user.last_update()%>; | 120 lastUpdate = <%=user.last_update()%>; |
