feat: bincio.org hub page (login / app selector) and grants_activity invite toggle
This commit is contained in:
+6
-4
@@ -145,7 +145,7 @@ def prepare_serve() -> None:
|
||||
|
||||
# ── 4. Hand off to bincio dev ─────────────────────────────────────────────────
|
||||
|
||||
def start_dev(mobile: bool = False) -> None:
|
||||
def start_dev(mobile: bool = False, hub: bool = False) -> None:
|
||||
section("Starting bincio dev")
|
||||
print()
|
||||
print(" \033[1mCredentials\033[0m")
|
||||
@@ -162,9 +162,10 @@ def start_dev(mobile: bool = False) -> None:
|
||||
cmd += ["--api-host", "0.0.0.0"]
|
||||
|
||||
env = os.environ.copy()
|
||||
# Show the wiki link in the nav during local dev (wiki typically lands on 4322
|
||||
# when activity already holds 4321). Override with WIKI_DEV_URL if needed.
|
||||
env.setdefault("PUBLIC_WIKI_URL", os.environ.get("WIKI_DEV_URL", "http://localhost:4322"))
|
||||
# --hub: simulate bincio.org hub mode (/ becomes login + app selector)
|
||||
if hub:
|
||||
env.setdefault("PUBLIC_ACTIVITY_URL", "http://localhost:4321")
|
||||
|
||||
try:
|
||||
subprocess.run(cmd, cwd=PROJECT_DIR, env=env)
|
||||
@@ -192,6 +193,7 @@ def main() -> None:
|
||||
parser.add_argument("--fresh", action="store_true", help="Wipe DATA_DIR before starting")
|
||||
parser.add_argument("--no-dev", action="store_true", help="Stop after extract, skip bincio dev")
|
||||
parser.add_argument("--mobile", action="store_true", help="Bind API to 0.0.0.0 for local mobile testing")
|
||||
parser.add_argument("--hub", action="store_true", help="Simulate hub mode: / becomes login+app selector")
|
||||
args = parser.parse_args()
|
||||
|
||||
raise_open_file_limit()
|
||||
@@ -209,7 +211,7 @@ def main() -> None:
|
||||
prepare_serve()
|
||||
|
||||
if not args.no_dev:
|
||||
start_dev(mobile=args.mobile)
|
||||
start_dev(mobile=args.mobile, hub=args.hub)
|
||||
else:
|
||||
print(f"\n\033[32mDone.\033[0m Data ready at {DATA_DIR}")
|
||||
print(f"Run: uv run bincio dev --data-dir {DATA_DIR}\n")
|
||||
|
||||
Reference in New Issue
Block a user