Add tiled homepage; rename Business→Businesses; link footer copyright

- Home page (home.html) at / shows the sidebar sections as tiles; reachable by
  clicking the 'SimpleX Manager' brand in the sidebar (was redirecting to /users).
- Rename the category to 'Businesses' (route /businesses, tab/nav/_category),
  keeping the per-account bot_type 'business'. Fix profile back-link label.
- Footer: link 'Bournemouth Technology Ltd' -> bournemouthtechnology.co.uk and
  'SimpleX Network' -> simplex.chat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jon
2026-06-05 17:45:28 +01:00
parent 2194aa0f82
commit 270766b99b
5 changed files with 88 additions and 17 deletions

View File

@@ -71,9 +71,9 @@ def _enrich(profiles: list[dict]) -> list[dict]:
def _category(bot_type: str) -> str:
"""Which sidebar category a profile belongs to: users / business / bots."""
"""Which sidebar category a profile belongs to: users / businesses / bots."""
if bot_type in pm.BUSINESS_TYPES:
return "business"
return "businesses"
if bot_type in pm.USER_TYPES:
return "users"
return "bots"
@@ -106,7 +106,9 @@ async def logout():
@app.get("/", response_class=HTMLResponse)
async def index(request: Request):
return RedirectResponse("/users", status_code=302)
if redir := _redirect_if_unauth(request):
return redir
return TEMPLATES.TemplateResponse(request, "home.html", {"nav_active": "home"})
@app.get("/users", response_class=HTMLResponse)
@@ -120,14 +122,14 @@ async def users_page(request: Request):
})
@app.get("/business", response_class=HTMLResponse)
async def business_page(request: Request):
@app.get("/businesses", response_class=HTMLResponse)
async def businesses_page(request: Request):
if redir := _redirect_if_unauth(request):
return redir
items = _enrich([p for p in db.list_profiles() if p["bot_type"] in pm.BUSINESS_TYPES])
return TEMPLATES.TemplateResponse(request, "list.html", {
"tab": "business", "items": items, "create_types": pm.BUSINESS_TYPES,
"nav_active": "business",
"tab": "businesses", "items": items, "create_types": pm.BUSINESS_TYPES,
"nav_active": "businesses",
})