diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-19 16:36:29 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-19 16:36:29 +0200 |
| commit | 90c3c6a01f46c9b29c5d92702d7383f32e8951d7 (patch) | |
| tree | 779f5ee3557d5111e0a7f1fdc211a2845bc3bc69 /packages/meshbay-node/src/meshbay_node/ops.py | |
| parent | 9498ce0a34cc363e8cf9a42575c8fcf7dfe0fd1a (diff) | |
| download | meshbay-90c3c6a01f46c9b29c5d92702d7383f32e8951d7.tar.gz | |
feat(ui): 11-point UI overhaul — tabs, transfers, settings, uploads
Hub/UI:
- Icon-only group tabs (chat, files, settings) with per-group default tab
- Transfer widget: filename becomes a clickable link to open completed downloads
- Pulse animation on transfer icon (pale→dark green) while active
- Download button feedback in FilePreview (spinner, auto-reset)
- Group mute toggle persists across navigation
- Login page autofocus, chat refocus after send
- Theme toggle closes menu, status badge and duplicate connecting removed
- Create-folder restricted to operators, download-path note removed
- User preferences API (CRUD) with Alembic migration
- Profile: email display/edit via PATCH /v1/users/me
- Settings: "Defaults" section for default tab selector
- All 10 locale files updated
Node:
- upload_dir in node.toml: separate filesystem path for uploads
- Root.direct flag: uploads land at root path, no subdirectory
- CLI --upload-dir flag on `group add`
- Admin UI accepts upload_dir
Client (Electron):
- shell.openPath bridge for opening completed downloads
- platform.js passes open callback from native save
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/ops.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/ops.py | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/ops.py b/packages/meshbay-node/src/meshbay_node/ops.py index c111581..20345bb 100644 --- a/packages/meshbay-node/src/meshbay_node/ops.py +++ b/packages/meshbay-node/src/meshbay_node/ops.py @@ -315,7 +315,8 @@ async def list_groups(state: dict) -> dict: return {"groups": out} -async def attach_group(state: dict, name: str, shared_dir: str) -> dict: +async def attach_group(state: dict, name: str, shared_dir: str, + upload_dir: str = "") -> dict: """ Write a new [[groups]] block into node.toml. @@ -360,19 +361,30 @@ async def attach_group(state: dict, name: str, shared_dir: str) -> dict: block = (f'\n[[groups]]\n' f'id = "{group["id"]}"\n' f'name = "{group["name"]}"\n' - f'visibility = "{group.get("visibility", "private")}"\n' - f'\n [[groups.roots]]\n' - f' path = "{path}"\n' - f' upload = true\n') + f'visibility = "{group.get("visibility", "private")}"\n') + if upload_dir: + upload_path = Path(upload_dir).expanduser() + try: + upload_path.mkdir(parents=True, exist_ok=True) + except OSError as e: + raise OpError(f"Cannot create {upload_path}: {e}") from e + block += f'upload_dir = "{upload_path}"\n' + block += (f'\n [[groups.roots]]\n' + f' path = "{path}"\n') + if not upload_dir: + block += f' upload = true\n' try: with conf_path.open("a") as f: f.write(block) except OSError as e: raise OpError(f"Cannot write {conf_path}: {e}", status=500) from e - return {"group_id": group["id"], "name": group["name"], - "shared_dir": str(path), "config": str(conf_path), - "note": "restart the node to pick it up"} + result = {"group_id": group["id"], "name": group["name"], + "shared_dir": str(path), "config": str(conf_path), + "note": "restart the node to pick it up"} + if upload_dir: + result["upload_dir"] = str(upload_path) + return result async def add_root(state: dict, group_id: str, path: str, *, |