5e43b6b246
Adds floating Herman assistant with voice, Hermes technical KPI dashboard with file explorer, and a wins/kansen analytics pulse with Hermes findings hooks. Includes optional local HTTPS via Caddy for mic permissions (public certs only).
25 lines
713 B
Python
25 lines
713 B
Python
from fastapi import APIRouter, Request
|
|
from fastapi.templating import Jinja2Templates
|
|
from pathlib import Path
|
|
|
|
router = APIRouter(tags=["settings"])
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|
|
templates = Jinja2Templates(directory=str(BASE_DIR / "templates"))
|
|
|
|
|
|
@router.get("/settings")
|
|
async def settings_page(request: Request, tab: str = "email"):
|
|
allowed = ("email", "general", "permissions", "social")
|
|
active = tab if tab in allowed else "email"
|
|
if tab == "ai":
|
|
active = "email"
|
|
return templates.TemplateResponse(
|
|
"settings.html",
|
|
{
|
|
"request": request,
|
|
"page_title": "Settings",
|
|
"active_tab": active,
|
|
},
|
|
)
|