Inbox Message & bugs

This commit is contained in:
2026-05-13 13:58:08 +08:00
parent 4dfd27c785
commit 9e42918d5e
26 changed files with 1262 additions and 140 deletions
+59
View File
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>私信收件箱 - Jiscuss</title>
<meta name="_csrf" content="${_csrf.token}"/>
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<#include "comm/commjs.ftl"/>
</head>
<body style="background:#f7f8fa;">
<#include "comm/header.ftl"/>
<div class="ui container" style="margin-top:2em; margin-bottom:4em;">
<h2 class="ui header">
<i class="envelope icon"></i>
<div class="content">私信收件箱
<#if unreadMsgCount?? && (unreadMsgCount > 0)>
<span class="ui mini red label">${unreadMsgCount} 未读</span>
</#if>
</div>
</h2>
<div class="ui divider"></div>
<#if inboxItems?has_content>
<div class="ui relaxed divided list">
<#list inboxItems as item>
<a class="item" href="/messages/${item.otherId}"
style="padding:1em 0; display:flex; align-items:center; gap:1em; color:inherit; text-decoration:none; cursor:pointer;">
<div class="ui circular label"
style="min-width:40px;height:40px;line-height:40px;text-align:center;font-size:1.1em;background:#2185d0;color:#fff;">
${(item.otherUsername?has_content)?then(item.otherUsername?substring(0,1)?upper_case, "?")}
</div>
<div style="flex:1; overflow:hidden;">
<div style="font-weight:bold;">${item.otherUsername}</div>
<div style="color:#888; font-size:0.9em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:450px;">
${item.lastContent}
</div>
</div>
<div style="color:#aaa; font-size:0.85em; white-space:nowrap;">
<#if item.lastTime??>${item.lastTime?string("MM-dd HH:mm")}</#if>
</div>
<#if item.hasUnread>
<span class="ui mini red label">未读</span>
</#if>
</a>
</#list>
</div>
<#else>
<div class="ui placeholder segment">
<div class="ui icon header">
<i class="envelope open outline icon"></i>
暂无私信
</div>
</div>
</#if>
</div>
<#include "comm/footer.ftl"/>
</body>
</html>