Redesign login page with improved UX and branding
Refactored `LoginSenderPage.razor` to introduce a modern layout, dynamic branding support, and enhanced validation. Updated localization files (`de-DE`, `en-US`, `fr-FR`) with new keys for improved messaging. Added client-side validation for required fields and error handling for invalid credentials. Enabled anonymous access to `CustomImagesController` for displaying branding before authentication. Updated CSS for consistent theming and responsive design. Cleaned up redundant code and improved maintainability. Footer now dynamically displays the current year and company name.
This commit is contained in:
@@ -772,13 +772,18 @@
|
||||
<data name="SenderEditor_Validation_SignatureFieldRequired" xml:space="preserve"><value>Bitte platzieren Sie mindestens ein Signaturfeld.</value></data>
|
||||
<data name="SenderEditor_Validation_TitleRequired" xml:space="preserve"><value>Bitte geben Sie einen Titel ein.</value></data>
|
||||
<data name="SenderEditor_Validation_UploadPdf" xml:space="preserve"><value>Bitte laden Sie zuerst ein PDF-Dokument hoch.</value></data>
|
||||
<data name="SenderLogin_Description" xml:space="preserve"><value>Bitte melden Sie sich mit Ihren Zugangsdaten an, um auf das Sender-Dashboard zuzugreifen.</value></data>
|
||||
<data name="SenderLogin_BackToHome" xml:space="preserve"><value>← Zurück zur Startseite</value></data>
|
||||
<data name="SenderLogin_Description" xml:space="preserve"><value>Melden Sie sich mit denselben Zugangsdaten an wie an Ihrem Arbeitsplatz-PC.</value></data>
|
||||
<data name="SenderLogin_FooterHelp" xml:space="preserve"><value>Bei Problemen wenden Sie sich bitte an den Administrator.</value></data>
|
||||
<data name="SenderLogin_InvalidCredentials_Body" xml:space="preserve"><value>Benutzername oder Passwort ist falsch. Bitte versuchen Sie es erneut.</value></data>
|
||||
<data name="SenderLogin_InvalidCredentials_Title" xml:space="preserve"><value>Ungültige Anmeldedaten.</value></data>
|
||||
<data name="SenderLogin_Password_Placeholder" xml:space="preserve"><value>Passwort eingeben</value></data>
|
||||
<data name="SenderLogin_Subtitle" xml:space="preserve"><value>Sicherer Zugang zum Sender-Dashboard</value></data>
|
||||
<data name="SenderLogin_Title" xml:space="preserve"><value>Sender Anmeldung</value></data>
|
||||
<data name="SenderLogin_RequiredFields_Body" xml:space="preserve"><value>Bitte Benutzername und Passwort eingeben.</value></data>
|
||||
<data name="SenderLogin_RequiredFields_Title" xml:space="preserve"><value>Pflichtfelder fehlen.</value></data>
|
||||
<data name="SenderLogin_Subtitle" xml:space="preserve"><value>Dokumente zur Unterschrift vorbereiten und versenden</value></data>
|
||||
<data name="SenderLogin_Title" xml:space="preserve"><value>Anmeldung</value></data>
|
||||
<data name="SenderLogin_Username_Label" xml:space="preserve"><value>Benutzername, z. B. m.mustermann</value></data>
|
||||
<data name="SenderLogin_Username_Placeholder" xml:space="preserve"><value>z. B. m.mustermann</value></data>
|
||||
<data name="SenderLogin_Username_Placeholder" xml:space="preserve"><value>Benutzername eingeben</value></data>
|
||||
<data name="ServerError" xml:space="preserve"><value>Serverfehler.</value></data>
|
||||
<data name="Signed" xml:space="preserve"><value>Unterschrieben</value></data>
|
||||
|
||||
@@ -772,13 +772,18 @@
|
||||
<data name="SenderEditor_Validation_SignatureFieldRequired" xml:space="preserve"><value>Please place at least one signature field.</value></data>
|
||||
<data name="SenderEditor_Validation_TitleRequired" xml:space="preserve"><value>Please enter a title.</value></data>
|
||||
<data name="SenderEditor_Validation_UploadPdf" xml:space="preserve"><value>Please upload a PDF document first.</value></data>
|
||||
<data name="SenderLogin_Description" xml:space="preserve"><value>Please sign in with your credentials to access the sender dashboard.</value></data>
|
||||
<data name="SenderLogin_BackToHome" xml:space="preserve"><value>← Back to home page</value></data>
|
||||
<data name="SenderLogin_Description" xml:space="preserve"><value>Sign in with the same credentials you use on your workplace PC.</value></data>
|
||||
<data name="SenderLogin_FooterHelp" xml:space="preserve"><value>If you have issues, please contact the administrator.</value></data>
|
||||
<data name="SenderLogin_InvalidCredentials_Body" xml:space="preserve"><value>Username or password is incorrect. Please try again.</value></data>
|
||||
<data name="SenderLogin_InvalidCredentials_Title" xml:space="preserve"><value>Invalid credentials.</value></data>
|
||||
<data name="SenderLogin_Password_Placeholder" xml:space="preserve"><value>Enter password</value></data>
|
||||
<data name="SenderLogin_Subtitle" xml:space="preserve"><value>Secure access to sender dashboard</value></data>
|
||||
<data name="SenderLogin_Title" xml:space="preserve"><value>Sender login</value></data>
|
||||
<data name="SenderLogin_RequiredFields_Body" xml:space="preserve"><value>Please enter username and password.</value></data>
|
||||
<data name="SenderLogin_RequiredFields_Title" xml:space="preserve"><value>Required fields are missing.</value></data>
|
||||
<data name="SenderLogin_Subtitle" xml:space="preserve"><value>Prepare and send documents for signature</value></data>
|
||||
<data name="SenderLogin_Title" xml:space="preserve"><value>Sign in</value></data>
|
||||
<data name="SenderLogin_Username_Label" xml:space="preserve"><value>Username, e.g. m.mustermann</value></data>
|
||||
<data name="SenderLogin_Username_Placeholder" xml:space="preserve"><value>e.g. m.mustermann</value></data>
|
||||
<data name="SenderLogin_Username_Placeholder" xml:space="preserve"><value>Enter username</value></data>
|
||||
<data name="ServerError" xml:space="preserve"><value>Server error.</value></data>
|
||||
<data name="Signed" xml:space="preserve"><value>Signed</value></data>
|
||||
|
||||
@@ -772,13 +772,18 @@
|
||||
<data name="SenderEditor_Validation_SignatureFieldRequired" xml:space="preserve"><value>Veuillez placer au moins un champ de signature.</value></data>
|
||||
<data name="SenderEditor_Validation_TitleRequired" xml:space="preserve"><value>Veuillez saisir un titre.</value></data>
|
||||
<data name="SenderEditor_Validation_UploadPdf" xml:space="preserve"><value>Veuillez d'abord téléverser un document PDF.</value></data>
|
||||
<data name="SenderLogin_Description" xml:space="preserve"><value>Veuillez vous connecter avec vos identifiants pour accéder au tableau de bord expéditeur.</value></data>
|
||||
<data name="SenderLogin_BackToHome" xml:space="preserve"><value>← Retour à la page d'accueil</value></data>
|
||||
<data name="SenderLogin_Description" xml:space="preserve"><value>Connectez-vous avec les mêmes identifiants que sur votre PC professionnel.</value></data>
|
||||
<data name="SenderLogin_FooterHelp" xml:space="preserve"><value>En cas de problème, veuillez contacter l'administrateur.</value></data>
|
||||
<data name="SenderLogin_InvalidCredentials_Body" xml:space="preserve"><value>Le nom d'utilisateur ou le mot de passe est incorrect. Veuillez réessayer.</value></data>
|
||||
<data name="SenderLogin_InvalidCredentials_Title" xml:space="preserve"><value>Identifiants invalides.</value></data>
|
||||
<data name="SenderLogin_Password_Placeholder" xml:space="preserve"><value>Saisir le mot de passe</value></data>
|
||||
<data name="SenderLogin_Subtitle" xml:space="preserve"><value>Accès sécurisé au tableau de bord expéditeur</value></data>
|
||||
<data name="SenderLogin_Title" xml:space="preserve"><value>Connexion expéditeur</value></data>
|
||||
<data name="SenderLogin_RequiredFields_Body" xml:space="preserve"><value>Veuillez saisir le nom d'utilisateur et le mot de passe.</value></data>
|
||||
<data name="SenderLogin_RequiredFields_Title" xml:space="preserve"><value>Champs obligatoires manquants.</value></data>
|
||||
<data name="SenderLogin_Subtitle" xml:space="preserve"><value>Préparer et envoyer des documents à signer</value></data>
|
||||
<data name="SenderLogin_Title" xml:space="preserve"><value>Connexion</value></data>
|
||||
<data name="SenderLogin_Username_Label" xml:space="preserve"><value>Nom d'utilisateur, p. ex. m.mustermann</value></data>
|
||||
<data name="SenderLogin_Username_Placeholder" xml:space="preserve"><value>p. ex. m.mustermann</value></data>
|
||||
<data name="SenderLogin_Username_Placeholder" xml:space="preserve"><value>Saisir le nom d'utilisateur</value></data>
|
||||
<data name="ServerError" xml:space="preserve"><value>Erreur serveur.</value></data>
|
||||
<data name="Signed" xml:space="preserve"><value>Signé</value></data>
|
||||
|
||||
@@ -6,137 +6,161 @@
|
||||
@inject AuthService AuthService
|
||||
@inject NavigationManager Navigation
|
||||
@inject IStringLocalizer<Resource> UiLocalizer
|
||||
@inject CustomImagesService CustomImagesService
|
||||
|
||||
<div class="login-page-wrapper d-flex align-items-center justify-content-center min-vh-100">
|
||||
<div class="login-card card shadow border-0" style="max-width: 440px; width: 100%;">
|
||||
<div class="sender-login-page d-flex align-items-center justify-content-center min-vh-100">
|
||||
<div class="sender-login-content">
|
||||
<div class="login-card sender-login-card card shadow border-0" style="max-width: 440px; width: 100%;">
|
||||
|
||||
<div class="card-header text-white text-center py-4 border-0" style="background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;">
|
||||
<div class="mb-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
|
||||
<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h5 class="mb-0 fw-semibold">@L("SenderLogin_Title", "Sender Anmeldung")</h5>
|
||||
<p class="mb-0 mt-1 opacity-75" style="font-size: 0.85rem;">@L("SenderLogin_Subtitle", "Sicherer Zugang zum Sender-Dashboard")</p>
|
||||
</div>
|
||||
|
||||
<div class="card-body p-4">
|
||||
|
||||
<p class="text-muted mb-4" style="font-size: 0.875rem; line-height: 1.5;">
|
||||
@L("SenderLogin_Description", "Bitte melden Sie sich mit Ihren Zugangsdaten an, um auf das Sender-Dashboard zuzugreifen.")
|
||||
</p>
|
||||
|
||||
@if (LoginResult == SenderLoginResult.InvalidCredentials) {
|
||||
<div class="alert alert-danger d-flex align-items-start gap-2 py-2" role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="flex-shrink-0 mt-1" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<strong>@L("SenderLogin_InvalidCredentials_Title", "Ungültige Anmeldedaten.")</strong><br />
|
||||
<span style="font-size:0.85rem;">@L("SenderLogin_InvalidCredentials_Body", "Benutzername oder Passwort ist falsch. Bitte versuchen Sie es erneut.")</span>
|
||||
</div>
|
||||
</div>
|
||||
} else if (LoginResult == SenderLoginResult.Error) {
|
||||
<div class="alert alert-secondary d-flex align-items-start gap-2 py-2" role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="flex-shrink-0 mt-1" viewBox="0 0 16 16">
|
||||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
|
||||
<path d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<strong>@L("ServerError", "Serverfehler.")</strong><br />
|
||||
<span style="font-size:0.85rem;">@L("UnexpectedErrorTryAgainLater", "Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.")</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-medium" for="login-username">
|
||||
@L("UserName", "Benutzername")
|
||||
<span class="text-danger ms-1">*</span>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" viewBox="0 0 16 16">
|
||||
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/>
|
||||
<div class="card-header text-white text-center py-4 border-0" style="border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;">
|
||||
<div class="mb-2">
|
||||
@if (_appLogo is not null && !string.IsNullOrEmpty(_appLogo.Src))
|
||||
{
|
||||
<img src="@_appLogo.Src"
|
||||
style="height: @_appLogo.Height"
|
||||
class="@_appLogo.GetClass("Main")"
|
||||
alt="signFLOW" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input id="login-username"
|
||||
type="text"
|
||||
class="form-control @(LoginResult == SenderLoginResult.InvalidCredentials ? "is-invalid" : null)"
|
||||
placeholder="@L("SenderLogin_Username_Placeholder", "Benutzername eingeben")"
|
||||
@bind="Username"
|
||||
@bind:event="oninput"
|
||||
@onkeydown="OnKeyDownAsync"
|
||||
disabled="@IsLoading"
|
||||
autocomplete="username" />
|
||||
}
|
||||
</div>
|
||||
<h5 class="mb-0 fw-semibold">@L("SenderLogin_Title", "Anmeldung")</h5>
|
||||
<p class="mb-0 mt-1 opacity-75" style="font-size: 0.85rem;">@L("SenderLogin_Subtitle", "Dokumente zur Unterschrift vorbereiten und versenden")</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-medium" for="login-password">
|
||||
@L("Password", "Passwort")
|
||||
<span class="text-danger ms-1">*</span>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" viewBox="0 0 16 16">
|
||||
<path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"/>
|
||||
<div class="card-body p-4">
|
||||
<a class="sender-login-back-link" href="/">@L("SenderLogin_BackToHome", "← Zurück zur Startseite")</a>
|
||||
|
||||
<p class="text-muted mb-4 mt-3" style="font-size: 0.875rem; line-height: 1.5;">
|
||||
@L("SenderLogin_Description", "Melden Sie sich mit denselben Zugangsdaten an wie an Ihrem Arbeitsplatz-PC.")
|
||||
</p>
|
||||
|
||||
@if (ShowRequiredValidation && (string.IsNullOrWhiteSpace(Username) || string.IsNullOrWhiteSpace(Password)))
|
||||
{
|
||||
<div class="alert alert-warning d-flex align-items-start gap-2 py-2" role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="flex-shrink-0 mt-1" viewBox="0 0 16 16">
|
||||
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input id="login-password"
|
||||
type="@(ShowPassword ? "text" : "password")"
|
||||
class="form-control border-start-0 border-end-0 @(LoginResult == SenderLoginResult.InvalidCredentials ? "is-invalid" : null)"
|
||||
placeholder="@L("SenderLogin_Password_Placeholder", "Passwort eingeben")"
|
||||
@bind="Password"
|
||||
@bind:event="oninput"
|
||||
@onkeydown="OnKeyDownAsync"
|
||||
disabled="@IsLoading"
|
||||
autocomplete="current-password" />
|
||||
<button type="button"
|
||||
class="btn btn-outline-secondary border-start-0"
|
||||
style="border-left: none;"
|
||||
tabindex="-1"
|
||||
@onclick="() => ShowPassword = !ShowPassword">
|
||||
@if (ShowPassword) {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
|
||||
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
||||
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709z"/>
|
||||
<path fill-rule="evenodd" d="M13.646 14.354l-12-12 .708-.708 12 12-.708.708z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<strong>@L("SenderLogin_RequiredFields_Title", "Pflichtfelder fehlen.")</strong><br />
|
||||
<span style="font-size:0.85rem;">@L("SenderLogin_RequiredFields_Body", "Bitte Benutzername und Passwort eingeben.")</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (LoginResult == SenderLoginResult.InvalidCredentials) {
|
||||
<div class="alert alert-danger d-flex align-items-start gap-2 py-2" role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="flex-shrink-0 mt-1" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<strong>@L("SenderLogin_InvalidCredentials_Title", "Ungültige Anmeldedaten.")</strong><br />
|
||||
<span style="font-size:0.85rem;">@L("SenderLogin_InvalidCredentials_Body", "Benutzername oder Passwort ist falsch. Bitte versuchen Sie es erneut.")</span>
|
||||
</div>
|
||||
</div>
|
||||
} else if (LoginResult == SenderLoginResult.Error) {
|
||||
<div class="alert alert-secondary d-flex align-items-start gap-2 py-2" role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="flex-shrink-0 mt-1" viewBox="0 0 16 16">
|
||||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
|
||||
<path d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/>
|
||||
</svg>
|
||||
<div>
|
||||
<strong>@L("ServerError", "Serverfehler.")</strong><br />
|
||||
<span style="font-size:0.85rem;">@L("UnexpectedErrorTryAgainLater", "Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.")</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<form @onsubmit="SubmitFormAsync">
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-medium" for="login-username">
|
||||
@L("UserName", "Benutzername")
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" viewBox="0 0 16 16">
|
||||
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input id="login-username"
|
||||
type="text"
|
||||
class="form-control @GetUsernameInputClass()"
|
||||
placeholder="@L("SenderLogin_Username_Placeholder", "z. B. m.mustermann")"
|
||||
@bind="Username"
|
||||
@bind:event="oninput"
|
||||
disabled="@IsLoading"
|
||||
autocomplete="username"
|
||||
autofocus
|
||||
@ref="UsernameInputRef" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="form-label fw-medium" for="login-password">
|
||||
@L("Password", "Passwort")
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-light border-end-0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" viewBox="0 0 16 16">
|
||||
<path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input id="login-password"
|
||||
type="@(ShowPassword ? "text" : "password")"
|
||||
class="form-control border-start-0 border-end-0 @GetPasswordInputClass()"
|
||||
@bind="Password"
|
||||
@bind:event="oninput"
|
||||
disabled="@IsLoading"
|
||||
autocomplete="current-password" />
|
||||
<button type="button"
|
||||
class="btn btn-outline-secondary border-start-0"
|
||||
style="border-left: none;"
|
||||
tabindex="-1"
|
||||
@onclick="() => ShowPassword = !ShowPassword">
|
||||
@if (ShowPassword) {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
|
||||
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
||||
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709z"/>
|
||||
<path fill-rule="evenodd" d="M13.646 14.354l-12-12 .708-.708 12 12-.708.708z"/>
|
||||
</svg>
|
||||
} else {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
||||
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
||||
</svg>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit"
|
||||
class="btn home-btn-primary w-100 py-2 fw-medium"
|
||||
disabled="@IsLoading">
|
||||
@if (IsLoading) {
|
||||
<span class="spinner-border spinner-border-sm me-2" role="status" aria-hidden="true"></span>
|
||||
<span>@L("LoginInProgress", "Anmelden …")</span>
|
||||
} else {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
||||
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="me-2" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M10 3.5a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 1 1 0v2A1.5 1.5 0 0 1 9.5 14h-8A1.5 1.5 0 0 1 0 12.5v-9A1.5 1.5 0 0 1 1.5 2h8A1.5 1.5 0 0 1 11 3.5v2a.5.5 0 0 1-1 0v-2z"/>
|
||||
<path fill-rule="evenodd" d="M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"/>
|
||||
</svg>
|
||||
<span>@L("Login", "Anmelden")</span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary w-100 py-2 fw-medium"
|
||||
style="background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%); border: none;"
|
||||
@onclick="SubmitAsync"
|
||||
disabled="@(IsLoading || string.IsNullOrWhiteSpace(Username) || string.IsNullOrWhiteSpace(Password))">
|
||||
@if (IsLoading) {
|
||||
<span class="spinner-border spinner-border-sm me-2" role="status" aria-hidden="true"></span>
|
||||
<span>@L("LoginInProgress", "Anmelden …")</span>
|
||||
} else {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="me-2" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M10 3.5a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 1 1 0v2A1.5 1.5 0 0 1 9.5 14h-8A1.5 1.5 0 0 1 0 12.5v-9A1.5 1.5 0 0 1 1.5 2h8A1.5 1.5 0 0 1 11 3.5v2a.5.5 0 0 1-1 0v-2z"/>
|
||||
<path fill-rule="evenodd" d="M4.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H14.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"/>
|
||||
</svg>
|
||||
<span>@L("Login", "Anmelden")</span>
|
||||
}
|
||||
</button>
|
||||
<div class="card-footer text-center text-muted py-3 border-0 bg-transparent" style="font-size: 0.78rem;">
|
||||
© @DateTime.Now.Year Digital Data GmbH
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center text-muted py-3 border-0 bg-transparent" style="font-size: 0.78rem;">
|
||||
@L("SenderLogin_FooterHelp", "Bei Problemen wenden Sie sich bitte an den Administrator.")
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -145,17 +169,42 @@
|
||||
string Password = string.Empty;
|
||||
bool ShowPassword;
|
||||
bool IsLoading;
|
||||
bool ShowRequiredValidation;
|
||||
SenderLoginResult? LoginResult;
|
||||
ElementReference UsernameInputRef;
|
||||
EnvelopeGenerator.Server.Client.Services.CustomImageDto? _appLogo;
|
||||
|
||||
async Task OnKeyDownAsync(Microsoft.AspNetCore.Components.Web.KeyboardEventArgs e) {
|
||||
if (e.Key == "Enter")
|
||||
await SubmitAsync();
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var logos = await CustomImagesService.GetAsync();
|
||||
_appLogo = logos.App;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (!firstRender)
|
||||
return;
|
||||
|
||||
await UsernameInputRef.FocusAsync();
|
||||
}
|
||||
|
||||
async Task SubmitFormAsync()
|
||||
{
|
||||
await SubmitAsync();
|
||||
}
|
||||
|
||||
async Task SubmitAsync() {
|
||||
if (string.IsNullOrWhiteSpace(Username) || string.IsNullOrWhiteSpace(Password) || IsLoading) return;
|
||||
if (IsLoading) return;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Username) || string.IsNullOrWhiteSpace(Password)) {
|
||||
ShowRequiredValidation = true;
|
||||
LoginResult = null;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
return;
|
||||
}
|
||||
|
||||
IsLoading = true;
|
||||
ShowRequiredValidation = false;
|
||||
LoginResult = null;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
|
||||
@@ -171,6 +220,20 @@
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
string GetUsernameInputClass()
|
||||
{
|
||||
if (LoginResult == SenderLoginResult.InvalidCredentials)
|
||||
return "is-invalid";
|
||||
return ShowRequiredValidation && string.IsNullOrWhiteSpace(Username) ? "is-invalid" : string.Empty;
|
||||
}
|
||||
|
||||
string GetPasswordInputClass()
|
||||
{
|
||||
if (LoginResult == SenderLoginResult.InvalidCredentials)
|
||||
return "is-invalid";
|
||||
return ShowRequiredValidation && string.IsNullOrWhiteSpace(Password) ? "is-invalid" : string.Empty;
|
||||
}
|
||||
|
||||
string L(string key, string fallback)
|
||||
{
|
||||
var value = UiLocalizer[key];
|
||||
|
||||
@@ -20,7 +20,9 @@ public class CustomImagesController(IOptions<CustomImagesOptions> options) : Con
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the signFLOW app logo and company logo configuration.
|
||||
/// Anonymous access allowed so the login page can display branding before the user authenticates.
|
||||
/// </summary>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public ActionResult<CustomImagesOptions> Get() => Ok(options.Value);
|
||||
}
|
||||
|
||||
@@ -312,6 +312,35 @@ article {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.sender-login-page {
|
||||
min-height: calc(100vh - 36px);
|
||||
background: linear-gradient(160deg, #1e2e3e 0%, #2c3e50 40%, #3498db 100%);
|
||||
padding: 24px 16px;
|
||||
}
|
||||
|
||||
.sender-login-content {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.sender-login-card {
|
||||
margin: 0 auto;
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sender-login-back-link {
|
||||
color: #1f4f93;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sender-login-back-link:hover {
|
||||
color: #2f77d2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.home-card {
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden;
|
||||
@@ -695,6 +724,10 @@ article {
|
||||
background: linear-gradient(160deg, #1a0533 0%, #3b0764 45%, #6b21a8 100%);
|
||||
}
|
||||
|
||||
[data-sf-theme="purple"] .sender-login-page {
|
||||
background: linear-gradient(160deg, #1a0533 0%, #3b0764 45%, #6b21a8 100%);
|
||||
}
|
||||
|
||||
[data-sf-theme="purple"] .home-btn-primary {
|
||||
background: linear-gradient(135deg, #6b21a8 0%, #9333ea 100%);
|
||||
}
|
||||
@@ -710,6 +743,14 @@ article {
|
||||
background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%) !important;
|
||||
}
|
||||
|
||||
/* signFLOW logo inside the sender login card header: centered, larger than nav */
|
||||
.sender-login-card .card-header .signflow-app-logo {
|
||||
margin: 0 auto;
|
||||
height: 5rem !important; /* override inline appsettings height for this context */
|
||||
width: auto;
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
[data-sf-theme="purple"] .login-card .card-header {
|
||||
background: linear-gradient(135deg, #1a0533 0%, #6b21a8 100%) !important;
|
||||
}
|
||||
@@ -718,6 +759,10 @@ article {
|
||||
background: linear-gradient(160deg, #0a0f1e 0%, #111827 50%, #1e1b4b 100%);
|
||||
}
|
||||
|
||||
[data-sf-theme="blazing-dark"] .sender-login-page {
|
||||
background: linear-gradient(160deg, #0a0f1e 0%, #111827 50%, #1e1b4b 100%);
|
||||
}
|
||||
|
||||
[data-sf-theme="blazing-dark"] .home-btn-primary {
|
||||
background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user