From 7ba117ed9ae19c4133db2eb03021a1bb8bd6e974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BE=8E=E6=9C=AF=E5=B8=88?= Date: Wed, 2 Sep 2026 21:37:16 +0800 Subject: [PATCH] HEL-405: make directory rows fully clickable and show all archives Directory management rows are now one hit target except rename/delete, and the selected-directory table lists every archive instead of the first six. Co-authored-by: Cursor Co-authored-by: multica-agent --- public/assets/fusion.css | 23 ++++++++++++++--------- public/assets/fusion.js | 7 +++++++ public/index.php | 15 ++++++++++----- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/public/assets/fusion.css b/public/assets/fusion.css index 50c3b09..c81f56a 100644 --- a/public/assets/fusion.css +++ b/public/assets/fusion.css @@ -740,14 +740,19 @@ img { display: block; } .v-fusion .dir-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--hairline); } .v-fusion .dir-col-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-2); } .v-fusion .dir-col-title small { color: var(--text-3); font-weight: 500; margin-left: 6px; letter-spacing: 0; } -.v-fusion .dir-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--hairline); cursor: pointer; text-align: left; transition: background-color 120ms ease; } -.v-fusion .dir-row:last-child { border-bottom: 0; } -@media (hover: hover) and (pointer: fine) { .v-fusion .dir-row:hover { background: var(--row-hover); } } -.v-fusion .dir-row[data-active] { background: var(--accent-soft); } -.v-fusion .dir-row[data-active] .dir-name { color: var(--accent); } -.v-fusion .dir-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.v-fusion .dir-row[data-disabled] .dir-name { color: var(--text-3); font-weight: 500; } -.v-fusion .dir-acts { margin-left: auto; display: flex; gap: 2px; flex: 0 0 auto; } +.v-fusion .dir-row-wrap { display: flex; align-items: center; border-bottom: 1px solid var(--hairline); transition: background-color 120ms ease; } +.v-fusion .dir-row-wrap:last-child { border-bottom: 0; } +@media (hover: hover) and (pointer: fine) { .v-fusion .dir-row-wrap:hover { background: var(--row-hover); } } +.v-fusion .dir-row-wrap[data-active] { background: var(--accent-soft); } +.v-fusion .dir-row-wrap[data-active] .dir-name { color: var(--accent); } +.v-fusion .dir-row { + display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; width: 100%; + padding: 9px 14px; font-size: 13px; cursor: pointer; text-align: left; color: inherit; +} +.v-fusion .dir-row:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: 6px; } +.v-fusion .dir-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; } +.v-fusion .dir-row-wrap[data-disabled] .dir-name, .v-fusion .dir-row[data-disabled] .dir-name { color: var(--text-3); font-weight: 500; } +.v-fusion .dir-acts { margin-left: 0; display: flex; gap: 2px; flex: 0 0 auto; position: relative; z-index: 1; padding-right: 8px; } .v-fusion .dir-acts button { font-size: 11.5px; color: var(--text-3); padding: 2px 6px; border-radius: 5px; transition: background-color 120ms ease, color 120ms ease; } @media (hover: hover) and (pointer: fine) { .v-fusion .dir-acts button:hover { background: var(--hover); color: var(--accent); } } .v-fusion .dir-rename { height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--focus-ring); background: var(--surface); font-size: 12.5px; outline: none; max-width: 150px; } @@ -1291,4 +1296,4 @@ img { display: block; } /* 目录行操作链接与样板 button 同形 */ .v-fusion .dir-acts a { font-size: 11.5px; color: var(--text-3); padding: 2px 6px; border-radius: 5px; transition: background-color 120ms ease, color 120ms ease; } @media (hover: hover) and (pointer: fine) { .v-fusion .dir-acts a:hover { background: var(--hover); color: var(--accent); } } -.v-fusion .dir-row a.nav-badge { color: inherit; } +.v-fusion .dir-row .nav-badge { color: inherit; flex: 0 0 auto; } diff --git a/public/assets/fusion.js b/public/assets/fusion.js index 920cd0f..314addd 100644 --- a/public/assets/fusion.js +++ b/public/assets/fusion.js @@ -1079,6 +1079,7 @@ document.addEventListener("click", (e) => { const openModalBtn = t.closest("[data-open-modal]"); if (openModalBtn) { openModal(openModalBtn.dataset.openModal, openModalBtn); return; } if (t.closest("[data-close-modal]")) { closeModal(); return; } + if (t.closest(".dir-acts")) return; const opener = t.closest("[data-open-detail]"); if (opener) { if (!t.closest("a,button,input,select,textarea,label")) openDetail(opener.dataset.openDetail); return; } if (t.closest("[data-close-drawer]")) { closeOverlays(); return; } @@ -1102,6 +1103,12 @@ document.addEventListener("input", (e) => { document.addEventListener("keydown", (e) => { if (e.key === "Enter" && e.target.matches && e.target.matches("[data-open-detail]")) openDetail(e.target.dataset.openDetail); + if (e.target.matches && e.target.matches("a.dir-row") && (e.key === "Enter" || e.key === " ")) { + if (e.key === " ") { + e.preventDefault(); + e.target.click(); + } + } if (popKind === "menu" && menuEl && !menuEl.hidden) { const opts = $$(".jn-menu-opt:not(:disabled)", menuEl); if (e.key === "Escape") { e.preventDefault(); closePops(); return; } diff --git a/public/index.php b/public/index.php index 062031f..52e75bf 100755 --- a/public/index.php +++ b/public/index.php @@ -2737,9 +2737,14 @@ if ($action === 'home' && $view === 'dirs') { if ($level >= 2) { $qs['d2'] = $level === 2 ? $id : $d2; } if ($level >= 3) { $qs['d3'] = $id; } $href = 'index.php?' . http_build_query($qs); - $html .= '
' - . '' . e((string)$n['name']) . '' - . '' . $dirArchiveCount($id) . ''; + $name = (string)$n['name']; + $html .= '
' + . '' + . '' . e($name) . '' + . '' . $dirArchiveCount($id) . '' + . ''; if ($isAdmin) { $html .= '' . '改名' @@ -2787,7 +2792,7 @@ if ($action === 'home' && $view === 'dirs') { - @@ -2802,7 +2807,7 @@ if ($action === 'home' && $view === 'dirs') {
档案名称借款人贷款机构类型剩余额度状态
- 6 ? '仅显示前 6 笔 · 共 ' . count($previewRows) . ' 笔' : '共 ' . count($previewRows) . ' 笔' ?> + 共 笔 在档案列表中查看 ›