diff src/lib/Shared.luan @ 34:62d04ca486dd

UI
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 12 Nov 2024 16:08:24 -0700
parents e2b7f6393dab
children 27c41f22d2a9
line wrap: on
line diff
--- a/src/lib/Shared.luan	Sun Nov 10 19:57:14 2024 -0700
+++ b/src/lib/Shared.luan	Tue Nov 12 16:08:24 2024 -0700
@@ -94,23 +94,22 @@
 function Shared.post_html(post)
 	local author_id = post.author_id
 	local user = current_user() or error()
-	local mine = user.id == author_id
 	local author = get_user_by_id(author_id)
 	local id = post.id
 %>
 		<div post="<%=id%>">
-			<div who>
+			<div who="<%=author.id%>">
 				<span author><%=author.email%></span>
-				<span when fix><%=post.date%></span>
-<%	if mine then %>
-				<span pulldown>
-					<img onclick="clickMenu(this)" src="/images/more_vert.svg">
-					<div>
-						<span onclick="editPost('<%=id%>')">Edit</span>
-						<span onclick="deletePost('<%=id%>')">Delete</span>
-					</div>
-				<span>
-<%	end %>
+				<span right>
+					<span when fix><%=post.date%></span>
+					<span pulldown>
+						<img onclick="clickMenu(this)" src="/images/more_vert.svg">
+						<div>
+							<span onclick="editPost('<%=id%>')">Edit</span>
+							<span onclick="deletePost('<%=id%>')">Delete</span>
+						</div>
+					</span>
+				</span>
 			</div>
 			<div text fix><%= html_encode(post.content) %></div>
 		</div>
@@ -128,7 +127,7 @@
 			else
 				%>, <%
 			end
-			%><%= other_user.email %><span online="<%= other_user.id %>"></span><%
+			%><span email><%= other_user.email %></span><span online="<%= other_user.id %>"></span><%
 		end
 	end
 end