Mercurial Hosting > chat
comparison src/account.html.luan @ 5:a49866b52cc2
login to chat
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 29 Oct 2024 13:10:47 -0600 |
| parents | 2da10ece826f |
| children | e22a1ba4b2ed |
comparison
equal
deleted
inserted
replaced
| 4:2da10ece826f | 5:a49866b52cc2 |
|---|---|
| 3 local Io = require "luan:Io.luan" | 3 local Io = require "luan:Io.luan" |
| 4 local Http = require "luan:http/Http.luan" | 4 local Http = require "luan:http/Http.luan" |
| 5 local Shared = require "site:/lib/Shared.luan" | 5 local Shared = require "site:/lib/Shared.luan" |
| 6 local head = Shared.head or error() | 6 local head = Shared.head or error() |
| 7 local header = Shared.header or error() | 7 local header = Shared.header or error() |
| 8 local Utils = require "site:/lib/Utils.luan" | |
| 9 local base_url = Utils.base_url or error() | |
| 10 local User = require "site:/lib/User.luan" | |
| 11 local current_user = User.current_required or error() | |
| 8 | 12 |
| 9 | 13 |
| 10 return function() | 14 return function() |
| 15 local user = current_user() | |
| 16 if user == nil then return end | |
| 11 Io.stdout = Http.response.text_writer() | 17 Io.stdout = Http.response.text_writer() |
| 12 %> | 18 %> |
| 13 <!doctype html> | 19 <!doctype html> |
| 14 <html> | 20 <html> |
| 15 <head> | 21 <head> |
| 18 <body> | 24 <body> |
| 19 <% header() %> | 25 <% header() %> |
| 20 <div content> | 26 <div content> |
| 21 <h1>Your Account</h1> | 27 <h1>Your Account</h1> |
| 22 <p><a href="chat.html">Your Chats</a></p> | 28 <p><a href="chat.html">Your Chats</a></p> |
| 29 <p>Your URL: <%= base_url() %>/chat.html?with=<%=user.email%></p> | |
| 23 <p><a href="javascript:logout()">Logout</a></p> | 30 <p><a href="javascript:logout()">Logout</a></p> |
| 24 </div> | 31 </div> |
| 25 </body> | 32 </body> |
| 26 </html> | 33 </html> |
| 27 <% | 34 <% |
