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/config.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/config.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/config.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/config.py b/packages/meshbay-node/src/meshbay_node/config.py index c0326f0..8372e5c 100644 --- a/packages/meshbay-node/src/meshbay_node/config.py +++ b/packages/meshbay-node/src/meshbay_node/config.py @@ -70,6 +70,10 @@ quic_port = 19010 # and its files stay in the index, # rather than looking deleted +# upload_dir: a separate directory for uploads. Files land directly in it, +# not in an "uploads" subdirectory. It appears as its own root in the index. +# upload_dir = "/home/user/Incoming" + # The single-directory form still works and means the same thing — one root, # named after the directory, receiving uploads. [[groups]] @@ -125,6 +129,7 @@ class RootSpec: name: str = "" # empty → the directory's basename, derived at load kind: str = "generic" # generic|video|audio|photo — a view hint, unused for now upload: bool = False # exactly one root per group receives uploads + direct: bool = False # uploads land at root path, not in a subdirectory @dataclass @@ -137,6 +142,7 @@ class GroupConfig: # unprefixed shape. roots: list[RootSpec] = field(default_factory=list) shared_dir: str = "" # legacy single-root form, migrated at load + upload_dir: str = "" # separate filesystem path for uploads visibility: str = "private" # public|private — discoverability, not admission # Admission. "invite" (default) means a newcomer needs a one-time pairing code # before the node wraps the group key for them; "open" means the node pins @@ -160,6 +166,11 @@ class GroupConfig: """ if not self.roots and self.shared_dir.strip(): self.roots = [RootSpec(path=self.shared_dir.strip(), upload=True)] + if self.upload_dir.strip(): + for r in self.roots: + r.upload = False + self.roots.append(RootSpec( + path=self.upload_dir.strip(), upload=True, direct=True)) @dataclass @@ -275,6 +286,7 @@ def load_config(path: Path = DEFAULT_CONFIG_PATH) -> Config: # Ignored when roots are given explicitly (warned about in # _read_roots); otherwise __post_init__ migrates it. shared_dir="" if _read_roots(g) else g.get("shared_dir", ""), + upload_dir=g.get("upload_dir", ""), visibility=g.get("visibility", "private"), join_policy=g.get("join_policy", "invite"), quic_port=g.get("quic_port", cfg.node.quic_port), |