Add login route and enhance login page functionality

Added a new `/login/{**catch-all}` route in `yarp.json` for the `receiver-ui` cluster. Updated `Login.razor` with a modernized UI, including a gradient header, improved error handling, and a toggle for password visibility. Integrated `AuthService` for API-based login validation.

Refactored `Login.razor` logic to handle login outcomes (`Success`, `InvalidCode`, `NotFound`, `Error`) using the new `EnvelopeLoginResult` enum. Added `LoginEnvelopeReceiverAsync` method in `AuthService` to handle login requests via `POST /api/Auth/envelope-receiver/{key}`. Improved code maintainability and user experience.
This commit is contained in:
2026-05-31 09:23:07 +02:00
parent de8d363c27
commit 1c7ca765cb
3 changed files with 147 additions and 27 deletions

View File

@@ -9,6 +9,14 @@
"Methods": [ "GET", "HEAD" ]
}
},
"receiver-ui-login": {
"ClusterId": "receiver-ui",
"Order": 100,
"Match": {
"Path": "/login/{**catch-all}",
"Methods": [ "GET", "HEAD" ]
}
},
"receiver-ui-sender": {
"ClusterId": "receiver-ui",
"Order": 100,