fix(admin-web): break /admin/login returnTo redirect loop in dev

vite dev only proxied /api and /auth, so /admin/login hit the SPA root
layout, re-ran loadSession, got 401, and redirected back to /admin/login
with an ever-nesting returnTo. Proxy /admin/login to the backend (which
owns it before the SPA fallback) and guard redirectToLogin against
re-entering /admin/login.

Replace the only emoji-as-icon (the back-arrow on project detail) with
the Icon component (new arrow-left glyph).

Add scripts/dev-bootstrap.ts for seeding a local Silo (stub probes) so
npm run dev can start on a fresh dev DB.
This commit is contained in:
2026-07-15 17:39:22 +08:00
parent 11de9e81db
commit fb66614e38
5 changed files with 74 additions and 6 deletions
+1
View File
@@ -52,6 +52,7 @@ export function resolveLoginOrgSlug(): string | null {
}
export function redirectToLogin(): void {
if (window.location.pathname === '/admin/login') return;
const ret = encodeURIComponent(
window.location.pathname + window.location.search + window.location.hash,
);