From 141e2e1ef0f2b97292fcc1aaef69e353e31501cd Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Tue, 11 Aug 2026 10:38:39 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E5=90=8E=E6=98=BE=E7=A4=BA=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updated_at 列(创建/更新均由 dnfs2 填入本地时间),新增节点时等于创建时间。 css/theme.css 新增 .owner-time 样式(小字号 / 三级灰)。 --- fsys/public/css/theme.css | 5 +++++ fsys/public/js/dnfs.js | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/fsys/public/css/theme.css b/fsys/public/css/theme.css index 98d9d99..6b65a3f 100644 --- a/fsys/public/css/theme.css +++ b/fsys/public/css/theme.css @@ -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 { diff --git a/fsys/public/js/dnfs.js b/fsys/public/js/dnfs.js index 8d2330b..7c1076b 100644 --- a/fsys/public/js/dnfs.js +++ b/fsys/public/js/dnfs.js @@ -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');