feat(frontend): in-page Casdoor login form + env-gated Developer Mode panel

- redesigned /login (Tailwind, RTL): centered username/password/organization
  form posting to POST /api/v1/auth/login — session starts without leaving
  the page; PM lands on the inventory panel, others on the procurement office
- Developer Mode button fixed top-left opens a role/project test panel
  (admin role added) gated by VITE_ENABLE_DEV_LOGIN (DEV_LOGIN_ENABLED build
  arg in Docker, default enabled)
- removed the old Casdoor redirect button, the PKCE ?code= callback, and the
  public casdoor-config.js — the client secret is no longer shipped to the
  browser; backend mediates the password grant instead
This commit is contained in:
ali_mohaghegh
2026-08-29 14:44:13 +03:30
parent fde2168606
commit 9caa4d804e
8 changed files with 262 additions and 174 deletions
+5
View File
@@ -3,3 +3,8 @@
# For local dev against a remote backend, set e.g.:
# VITE_API_BASE_URL=http://localhost:8000/api/v1
VITE_API_BASE_URL=
# Show the "Developer Mode" panel on the login page.
# true (default) / false — in Docker builds this is controlled by the
# DEV_LOGIN_ENABLED build arg (see docker-compose.yml), not this file.
VITE_ENABLE_DEV_LOGIN=true