Record / Convert tabs — now gated behind PUBLIC_MOBILE_APP=true. Hidden by default in VPS/dev mode; only show when explicitly opted into the mobile app build.

Edit/Upload UI — split into two concepts:
  - PUBLIC_EDIT_URL — the server base URL (empty = use proxy at /api/)
  - PUBLIC_EDIT_ENABLED=true — whether to show the edit/upload buttons at all

  bincio dev now sets PUBLIC_EDIT_ENABLED=true when instance.db exists (multi-user mode), so the upload button, edit button, and edit drawer all appear. The fetch calls already produce  correct relative URLs (${''}/api/upload = /api/upload) which the Vite proxy forwards to bincio serve.
This commit is contained in:
Davide Scaini
2026-04-09 13:16:00 +02:00
parent 2501c9e0f6
commit fb202b4edf
4 changed files with 22 additions and 10 deletions
+4 -2
View File
@@ -148,8 +148,10 @@ def dev(
env = {
**os.environ,
"BINCIO_DATA_DIR": str(data),
"PUBLIC_EDIT_URL": "", # empty = proxy /api/* to bincio serve
"VITE_API_PORT": str(api_port), # picked up by astro.config.mjs if needed
"PUBLIC_EDIT_URL": "", # empty = proxy /api/* to bincio serve
"PUBLIC_EDIT_ENABLED": "true" if has_auth else "", # show edit/upload UI in VPS mode
"PUBLIC_MOBILE_APP": "", # Record/Convert tabs off by default
"VITE_API_PORT": str(api_port), # picked up by astro.config.mjs
}
# Start astro dev in foreground (Ctrl+C stops everything)