changeset 17:19901d6fb56f

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 30 Jul 2025 15:01:31 -0600
parents f5425a3c1898
children 820136c5ee33
files src/chats.html.luan src/delete_chat.js.luan src/index.html.luan src/list.html.luan
diffstat 4 files changed, 43 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/chats.html.luan	Wed Jul 30 15:01:31 2025 -0600
@@ -0,0 +1,41 @@
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local ipairs = Luan.ipairs or 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 User = require "site:/lib/User.luan"
+local current_user = User.current or error()
+local Chat = require "site:/lib/Chat.luan"
+local chat_search = Chat.search or error()
+
+
+return function()
+	local user = current_user()
+	if user == nil then
+		Http.response.send_redirect("/login.html")
+		return
+	end
+	local chats = chat_search( "chat_user_id:"..user.id, "chat_updated desc" )
+	Io.stdout = Http.response.text_writer()
+%>
+<!doctype html>
+<html lang="en">
+	<head>
+<%		head() %>
+	</head>
+	<body>
+<%		header() %>
+		<div content>
+			<h1>Your Chats</h1>
+			<p><a href="chat.html">new chat</a></p>
+<%	for _, chat in ipairs(chats) do %>
+			<p><a href="chat.html?chat=<%=chat.id%>"><%= chat.name_html() %></a></p>
+<%	end %>
+		</div>
+	</body>
+</html>
+<%
+end
--- a/src/delete_chat.js.luan	Wed Jul 30 10:38:27 2025 -0600
+++ b/src/delete_chat.js.luan	Wed Jul 30 15:01:31 2025 -0600
@@ -15,6 +15,6 @@
 	chat.delete()
 	Io.stdout = Http.response.text_writer()
 %>
-	location = '/list.html';
+	location = '/chats.html';
 <%
 end
--- a/src/index.html.luan	Wed Jul 30 10:38:27 2025 -0600
+++ b/src/index.html.luan	Wed Jul 30 15:01:31 2025 -0600
@@ -25,7 +25,7 @@
 <%	if user == nil then %>
 				<p><a href="login.html">Register / Login</a> to use this.</p>
 <%	else %>
-				<p><a href="list.html">See your chats</a></p>
+				<p><a href="chats.html">See your chats</a></p>
 <%	end %>
 			<p>More later...</p>
 		</div>
--- a/src/list.html.luan	Wed Jul 30 10:38:27 2025 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-local Luan = require "luan:Luan.luan"
-local error = Luan.error
-local ipairs = Luan.ipairs or 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 User = require "site:/lib/User.luan"
-local current_user = User.current or error()
-local Chat = require "site:/lib/Chat.luan"
-local chat_search = Chat.search or error()
-
-
-return function()
-	local user = current_user()
-	if user == nil then
-		Http.response.send_redirect("/login.html")
-		return
-	end
-	local chats = chat_search( "chat_user_id:"..user.id, "chat_updated desc" )
-	Io.stdout = Http.response.text_writer()
-%>
-<!doctype html>
-<html lang="en">
-	<head>
-<%		head() %>
-	</head>
-	<body>
-<%		header() %>
-		<div content>
-			<h1>Your Chats</h1>
-			<p><a href="chat.html">new chat</a></p>
-<%	for _, chat in ipairs(chats) do %>
-			<p><a href="chat.html?chat=<%=chat.id%>"><%= chat.name_html() %></a></p>
-<%	end %>
-		</div>
-	</body>
-</html>
-<%
-end