changeset 61:d4d154b404f8

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 04 Mar 2025 21:29:17 -0700
parents 3521166513b3
children ad9772fc588a
files src/account.html.luan src/add_post.js.luan src/chat.js
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.html.luan	Tue Mar 04 20:31:00 2025 -0700
+++ b/src/account.html.luan	Tue Mar 04 21:29:17 2025 -0700
@@ -81,7 +81,7 @@
 
 			function showVoice() {
 				let span = document.querySelector('span[voice]');
-				span.textContent = voice ? `Your voice URL: ${voice}` : 'No voice URL';
+				span.textContent = voice ? `Your voice URL is ${voice}` : 'No voice URL';
 			}
 
 			function editVoice() {
@@ -142,10 +142,10 @@
 		<div content>
 			<h1>Your Account</h1>
 			<p><a href="about.html">About Luan Chat</a></p>
-			<p>Your URL: <%= base_url() %>/chat?with=<%=user.email%></p>
-			<p>Your username: <span username></span> <a href="javascript:editUsername()">Edit</a></p>
+			<p>Your username is <span username></span> <a href="javascript:editUsername()">Edit</a></p>
 			<p><span notify></span> <a href="javascript:editNotify()">Edit</a></p>
 			<p><span voice></span> <a href="javascript:editVoice()">Edit</a></p>
+			<p>Your chat URL is <%= base_url() %>/chat?with=<%=user.email%></p>
 			<p><a href="javascript:logout()">Logout</a></p>
 			<p><a href="javascript:deleteUser()">Delete account</a></p>
 		</div>
--- a/src/add_post.js.luan	Tue Mar 04 20:31:00 2025 -0700
+++ b/src/add_post.js.luan	Tue Mar 04 21:29:17 2025 -0700
@@ -39,7 +39,6 @@
 		chat.updated = now
 		chat.save()
 	end )
-	chat.read(user)
 	Notify.add(chat)
 	local html = `post_html(post)`
 	local js = "added("..json_string(html)..")"
--- a/src/chat.js	Tue Mar 04 20:31:00 2025 -0700
+++ b/src/chat.js	Tue Mar 04 21:29:17 2025 -0700
@@ -179,6 +179,7 @@
 		if( current ) {
 			current.setAttribute('selected','');
 			current.scrollIntoViewIfNeeded(false);
+			clearUnread();
 		} else {
 			currentChatId = null;
 			document.querySelector('div[posts]').innerHTML = '';