mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 16:09:43 +02:00
feat(file-viewer): show hidden files and folders
The tree endpoint has accepted `showHidden=true` since it was written; the panel hardcoded `showHidden=false`, so dot-prefixed entries were unreachable from the File Viewer and opening one meant guessing its path. Adds a `.*` toggle to the panel header. It re-fetches instead of re-rendering the cached tree (the filtering is server-side), preserves the expanded directories so toggling does not collapse the tree, and persists per-device to its own `codeman:fileBrowserShowHidden` key. That key is deliberately not part of the app-settings object, which `saveAppSettings()` rebuilds from the settings-modal DOM and would drop it on the next save. Default is OFF, so an untouched install behaves exactly as before. Closes #221 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -615,6 +615,11 @@ class CodemanApp {
|
||||
this.fileBrowserFilter = '';
|
||||
this.fileBrowserAllExpanded = false;
|
||||
this.fileBrowserDragListeners = null;
|
||||
// Show hidden (dot-prefixed) files and folders in the File Viewer tree.
|
||||
// Per-device, persisted to its own localStorage key by panels-ui.js. Safe to
|
||||
// call a mixin method here: instantiation is deferred to DOMContentLoaded,
|
||||
// so every module's Object.assign has already run.
|
||||
this.fileBrowserShowHidden = this._loadFileBrowserShowHidden?.() ?? false;
|
||||
this.filePreviewContent = '';
|
||||
|
||||
// Toast container cache (methods in panels-ui.js)
|
||||
|
||||
Reference in New Issue
Block a user