From 233c919738a0e32d4ec83cb547b1eb5463d25661 Mon Sep 17 00:00:00 2001 From: Furrium Network Date: Mon, 10 Aug 2026 10:36:48 +0800 Subject: [PATCH] Update post.js --- js/post.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/js/post.js b/js/post.js index c9b1c1f..9426147 100644 --- a/js/post.js +++ b/js/post.js @@ -54,7 +54,6 @@ async function renderPostDetail(postId) { imagesHtml += ''; } - // Markdown 渲染(安全处理) let renderedContent = post.content || ''; try { if (typeof marked !== 'undefined' && marked.parse) { @@ -73,7 +72,13 @@ async function renderPostDetail(postId) { ${username} ${time} ${post.edited_at ? `(已编辑 ${new Date(post.edited_at).toLocaleString('zh-CN')})` : ''} + ${post.is_pinned ? '📌 置顶' : ''}
+ ${currentUser && currentUser.role === 'admin' ? ` + + ` : ''} ${currentUser && currentUser.id === post.user_id ? `` : ''} ${currentUser && currentUser.id === post.user_id ? `