feat: 前端卡片用户名后显示编辑时间
updated_at 列(创建/更新均由 dnfs2 填入本地时间),新增节点时等于创建时间。 css/theme.css 新增 .owner-time 样式(小字号 / 三级灰)。
This commit is contained in:
1 parent
01c699e7a6
commit
141e2e1ef0
2 files changed
+12
No files matched your search
@@ -366,6 +366,11 @@ input[type="button"]:disabled {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.owner-time {
|
||||
font-size: 0.7rem;
|
||||
color: var(--fg-tertiary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ===== Card Stats (dnfs 互动统计:观看/点赞/分享) ===== */
|
||||
.card-stats {
|
||||
|
||||
@@ -1005,6 +1005,13 @@ function renderCards(list) {
|
||||
owner_name.textContent = owner_text;
|
||||
wrt_div.appendChild(owner_avatar);
|
||||
wrt_div.appendChild(owner_name);
|
||||
// 最后编辑时间(新增时 created_at = updated_at,仅更新时 updated_at 变化)
|
||||
let time_span = document.createElement('span');
|
||||
time_span.className = "owner-time";
|
||||
if (item.updated_at) {
|
||||
time_span.textContent = ' · ' + item.updated_at.substring(0, 16);
|
||||
}
|
||||
wrt_div.appendChild(time_span);
|
||||
// 互动统计:眼睛=观看数(后端 views 列)、爱心=点赞、转发=子节点数(后端 child_count)。
|
||||
// views / child_count 由 dnfs2 get_notes 返回;like_count 后端暂无字段,缺省显示 0。
|
||||
let sts_div = document.createElement('div');
|
||||
|
||||
Reference in new issue
Block a user