diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-06 02:48:28 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-06 02:48:28 +0200 |
| commit | e2885fec8dcb3cd452899e2628d6e9ad5c70b01e (patch) | |
| tree | 3a41bb77d52d1a0c1205709ee288d2ed0160ebc3 /packages/meshbay-hub/src/meshbay_hub/static/files-app.js | |
| parent | 15c52d91f2efa73f3d1b6b06afed840fada29d8e (diff) | |
| download | meshbay-e2885fec8dcb3cd452899e2628d6e9ad5c70b01e.tar.gz | |
feat(node): add ".." parent row in file explorer, hide mkdir button
Show a ".." row at the top of subdirectory listings to navigate back to
the parent. No path traversal risk — currentPath is internal state built
from the node's own index. Hide the mkdir button (not useful yet); update
the upload-controls test marker accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/files-app.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/files-app.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/files-app.js b/packages/meshbay-hub/src/meshbay_hub/static/files-app.js index d6cb3b9..195c385 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/files-app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/files-app.js @@ -345,11 +345,6 @@ function FilesPanel({ onChange=${uploadFile} /> </label> `} - ${canCreateDir && html` - <button class="tb-btn" onClick=${makeDirectory}> - <${Icon} name="folder-plus" /> ${t('group.mkdir')} - </button> - `} </div> <div class="breadcrumbs"> @@ -406,6 +401,20 @@ function FilesPanel({ </tr> </thead> <tbody> + ${currentPath && html` + <tr class="file-row dir-row" key="__parent__" onClick=${() => { + const parts = currentPath.split('/'); + setCurrentPath(parts.slice(0, -1).join('/')); + }}> + <td class="sel-cell"></td> + <td>${'\u{1F4C1}'}</td> + <td>..</td> + <td class="file-size"></td> + ${showGroup && html`<td></td>`} + <td class="td-type"></td> + <td class="td-date"></td> + </tr> + `} ${subdirs.map(d => { const full = currentPath ? currentPath + '/' + d : d; const inside = entriesUnder(entries, full); |