diff --git a/l4d2web/l4d2web/static/css/components.css b/l4d2web/l4d2web/static/css/components.css
index dbac026..32cdcbf 100644
--- a/l4d2web/l4d2web/static/css/components.css
+++ b/l4d2web/l4d2web/static/css/components.css
@@ -254,6 +254,23 @@ dialog.modal::backdrop {
padding-left: calc(1ch + var(--space-xs));
}
+.file-tree-name-button {
+ background: none;
+ border: 0;
+ padding: 0;
+ font: inherit;
+ color: var(--color-link);
+ cursor: pointer;
+ text-align: left;
+ text-decoration: underline;
+ text-underline-offset: 2px;
+}
+
+.file-tree-name-button:hover,
+.file-tree-name-button:focus-visible {
+ text-decoration-thickness: 2px;
+}
+
.file-tree-toggle[aria-expanded="true"] .chevron {
transform: rotate(90deg);
}
@@ -583,8 +600,7 @@ button.danger-outline:hover {
display: inline-flex;
align-items: center;
gap: var(--space-xs);
- margin-left: auto;
- padding-left: var(--space-m);
+ padding-left: var(--space-s);
opacity: 0;
pointer-events: none;
transition: opacity 80ms ease;
diff --git a/l4d2web/l4d2web/static/js/files-overlay.js b/l4d2web/l4d2web/static/js/files-overlay.js
index 27ccb88..27f4eca 100644
--- a/l4d2web/l4d2web/static/js/files-overlay.js
+++ b/l4d2web/l4d2web/static/js/files-overlay.js
@@ -3,7 +3,8 @@
// overlay is type='files' and the user can edit). The script binds:
//
// * Per-row hover actions: + new file, + new folder, ⬇ zip, ✕ on
-// folders; edit, ✕ on files (download is a regular ).
+// folders; ⬇ (download), ✕ on files. Clicking the filename opens
+// the editor (binary fallback for non-editable files).
// * Drag-and-drop: dragging from the OS uploads (one POST per file,
// queue with concurrency 3); dragging a row inside the tree moves
// (rename/move via /files/move).
@@ -977,7 +978,9 @@
// ---------- click delegation: action buttons ----------------------------
document.addEventListener("click", (event) => {
- const action = event.target?.closest?.(".files-row-action[data-action]");
+ const action = event.target?.closest?.(
+ ".files-row-action[data-action], .file-tree-name-button[data-action]"
+ );
if (!action) return;
if (!manager.contains(action)) return;
const op = action.dataset.action;
diff --git a/l4d2web/l4d2web/templates/_overlay_file_node.html b/l4d2web/l4d2web/templates/_overlay_file_node.html
index e8e980a..a03d1bd 100644
--- a/l4d2web/l4d2web/templates/_overlay_file_node.html
+++ b/l4d2web/l4d2web/templates/_overlay_file_node.html
@@ -24,7 +24,9 @@
{{ entry.name }}
broken link
{% else %}
- {% if download_supported %}
+ {% if files_overlay %}
+
+ {% elif download_supported %}
{{ entry.name }}
{% else %}
{{ entry.name }}
@@ -34,7 +36,6 @@
{% endif %}
{% if files_overlay and not entry.broken %}
-
⬇