diff options
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/files-app.js | 19 | ||||
| -rw-r--r-- | packages/meshbay-hub/tests/test_upload_controls_hidden.py | 2 |
2 files changed, 15 insertions, 6 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); diff --git a/packages/meshbay-hub/tests/test_upload_controls_hidden.py b/packages/meshbay-hub/tests/test_upload_controls_hidden.py index 955b47d..94917d2 100644 --- a/packages/meshbay-hub/tests/test_upload_controls_hidden.py +++ b/packages/meshbay-hub/tests/test_upload_controls_hidden.py @@ -47,7 +47,7 @@ def _component(app: str, name: str) -> str: def test_the_files_toolbar_hides_its_upload_button(): page = _component(FILES_APP.read_text(encoding="utf-8"), "FilesPanel") toolbar = page[page.index("file-toolbar"):] - toolbar = toolbar[:toolbar.index("group.mkdir")] + toolbar = toolbar[:toolbar.index("breadcrumbs")] assert "mayUpload &&" in toolbar, "the Upload button is offered regardless" |