Mercurial Hosting > chat
diff 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 |
line wrap: on
line diff
--- a/src/account.html.luan Sun Oct 27 20:39:18 2024 -0600 +++ b/src/account.html.luan Tue Oct 29 13:10:47 2024 -0600 @@ -5,9 +5,15 @@ local Shared = require "site:/lib/Shared.luan" local head = Shared.head or error() local header = Shared.header or error() +local Utils = require "site:/lib/Utils.luan" +local base_url = Utils.base_url or error() +local User = require "site:/lib/User.luan" +local current_user = User.current_required or error() return function() + local user = current_user() + if user == nil then return end Io.stdout = Http.response.text_writer() %> <!doctype html> @@ -20,6 +26,7 @@ <div content> <h1>Your Account</h1> <p><a href="chat.html">Your Chats</a></p> + <p>Your URL: <%= base_url() %>/chat.html?with=<%=user.email%></p> <p><a href="javascript:logout()">Logout</a></p> </div> </body>