Mercurial Hosting > chat
view src/account.html.luan @ 6:e22a1ba4b2ed
misc
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Oct 2024 16:47:11 -0600 |
parents | a49866b52cc2 |
children | dade6a560494 |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" 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> <html> <head> <% head() %> </head> <body> <% header() %> <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:ajax('delete_user.js')">Delete account</a></p> <p><a href="javascript:logout()">Logout</a></p> </div> </body> </html> <% end