From d2eb0b0d2a7219e045d7fdc2d693293f126a4b1a Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Wed, 19 Oct 2022 15:18:44 +0200 Subject: [PATCH] fix(console): split password from contact information, initialization mail on top (#4380) * chore(console): split password from contact information * change user detail, initialization mail * fix translation * Update console/src/assets/i18n/de.json Co-authored-by: Elio Bischof * Update console/src/assets/i18n/de.json Co-authored-by: Elio Bischof * Update console/src/assets/i18n/en.json Co-authored-by: Elio Bischof * Update console/src/assets/i18n/fr.json Co-authored-by: Elio Bischof * Update console/src/assets/i18n/fr.json Co-authored-by: Elio Bischof * Update console/src/assets/i18n/it.json Co-authored-by: Elio Bischof * Update console/src/assets/i18n/en.json Co-authored-by: Elio Bischof * i18n Co-authored-by: Elio Bischof --- .../auth-user-detail.component.html | 23 +++++++-- .../auth-user-detail.component.ts | 3 +- .../resend-email-dialog.component.ts | 6 ++- .../contact/contact.component.html | 20 -------- .../user-detail/user-detail.component.html | 49 ++++++++++++++----- .../user-detail/user-detail.component.scss | 20 ++++++-- .../user-detail/user-detail.component.ts | 8 +-- console/src/assets/i18n/de.json | 7 +-- console/src/assets/i18n/en.json | 7 +-- console/src/assets/i18n/fr.json | 5 +- console/src/assets/i18n/it.json | 5 +- console/src/assets/i18n/zh.json | 5 +- 12 files changed, 100 insertions(+), 58 deletions(-) diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html index 0946bdef0..e8b07421f 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html @@ -85,11 +85,28 @@ - + + +
+
+
+ {{ 'USER.PASSWORD.LABEL' | translate }} + ********* + + +
+ +
+ + + +
+
+
+
+ -
- diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts index 3005dfb8e..2e0b34eea 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts @@ -47,9 +47,8 @@ export class AuthUserDetailComponent implements OnDestroy { public settingsList: SidenavSetting[] = [ { id: 'general', i18nKey: 'USER.SETTINGS.GENERAL' }, + { id: 'security', i18nKey: 'USER.SETTINGS.SECURITY' }, { id: 'idp', i18nKey: 'USER.SETTINGS.IDP' }, - { id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS' }, - { id: 'mfa', i18nKey: 'USER.SETTINGS.MFA' }, { id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS' }, { id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS' }, { diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/resend-email-dialog/resend-email-dialog.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/resend-email-dialog/resend-email-dialog.component.ts index 7391a3d82..8eb3848ce 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/resend-email-dialog/resend-email-dialog.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/resend-email-dialog/resend-email-dialog.component.ts @@ -8,7 +8,11 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; }) export class ResendEmailDialogComponent { public email: string = ''; - constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any) {} + constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any) { + if (data.email) { + this.email = data.email; + } + } closeDialog(email: string = ''): void { this.dialogRef.close(email); diff --git a/console/src/app/pages/users/user-detail/contact/contact.component.html b/console/src/app/pages/users/user-detail/contact/contact.component.html index 36dba42f1..e7c66c4d2 100644 --- a/console/src/app/pages/users/user-detail/contact/contact.component.html +++ b/console/src/app/pages/users/user-detail/contact/contact.component.html @@ -1,24 +1,4 @@
-
-
- {{ 'USER.PROFILE.PASSWORD' | translate }} - ********* - - -
- -
- - - -
-
-
{{ 'USER.EMAIL' | translate }} diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html index 8b9b4e30f..b249030ec 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html @@ -59,6 +59,17 @@ > {{ 'USER.PAGES.NOUSER' | translate }} +
+ +
+ {{ 'USER.ISINITIAL' | translate }} + +
+
+
+ @@ -113,16 +124,6 @@ > {{ 'USER.PASSWORD.RESENDNOTIFICATION' | translate }} - @@ -169,12 +170,34 @@ - + + +
+
+
+ {{ 'USER.PASSWORD.LABEL' | translate }} + ********* + + +
+ +
+ + + +
+
+
+
+ -
- diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss index 5f24e220b..c36e19dc5 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss @@ -18,6 +18,22 @@ margin: 1rem 0; } +.is-initial-info-section { + margin-top: 1rem; + display: block; + + .is-initial-row { + display: flex; + justify-content: space-between; + align-items: flex-start; + + button { + display: block; + flex-shrink: 0; + } + } +} + .icon-button { .icon { font-size: 1.2rem; @@ -39,10 +55,6 @@ padding-top: 1rem; } -.resendemail { - margin-top: 0.5rem; -} - .sp-wrapper { margin: 1rem 0; } diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts index 2b54ccc6c..0fa7fc1a8 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts @@ -25,8 +25,7 @@ const GENERAL: SidenavSetting = { id: 'general', i18nKey: 'USER.SETTINGS.GENERAL const GRANTS: SidenavSetting = { id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS' }; const METADATA: SidenavSetting = { id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA' }; const IDP: SidenavSetting = { id: 'idp', i18nKey: 'USER.SETTINGS.IDP' }; -const PASSWORDLESS: SidenavSetting = { id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS' }; -const MFA: SidenavSetting = { id: 'mfa', i18nKey: 'USER.SETTINGS.MFA' }; +const SECURITY: SidenavSetting = { id: 'security', i18nKey: 'USER.SETTINGS.SECURITY' }; const PERSONALACCESSTOKEN: SidenavSetting = { id: 'pat', i18nKey: 'USER.SETTINGS.PAT' }; const KEYS: SidenavSetting = { id: 'keys', i18nKey: 'USER.SETTINGS.KEYS' }; const MEMBERSHIPS: SidenavSetting = { id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS' }; @@ -122,7 +121,7 @@ export class UserDetailComponent implements OnInit { this.user = resp.user; if (this.user.human) { - this.settingsList = [GENERAL, MFA, PASSWORDLESS, IDP, GRANTS, MEMBERSHIPS, METADATA]; + this.settingsList = [GENERAL, SECURITY, IDP, GRANTS, MEMBERSHIPS, METADATA]; } else if (this.user.machine) { this.settingsList = [GENERAL, GRANTS, MEMBERSHIPS, PERSONALACCESSTOKEN, KEYS, METADATA]; } @@ -378,6 +377,9 @@ export class UserDetailComponent implements OnInit { public resendInitEmail(): void { const dialogRef = this.dialog.open(ResendEmailDialogComponent, { width: '400px', + data: { + email: this.user.human?.email?.email ?? '', + }, }); dialogRef.afterClosed().subscribe((resp) => { diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index abfff4ca0..9585e182f 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -212,10 +212,9 @@ "TITLE": "Einstellungen", "GENERAL": "Allgemein", "IDP": "Identity Provider", - "MFA": "Multifactor Authentication", + "SECURITY": "Passwort und Sicherheit", "KEYS": "Schlüssel", "PAT": "Personal Access Tokens", - "PASSWORDLESS": "Passwordless", "USERGRANTS": "Authorizations", "MEMBERSHIPS": "Memberships", "METADATA": "Metadata" @@ -461,6 +460,7 @@ }, "PASSWORD": { "TITLE": "Passwort", + "LABEL": "Ein sicheres Passwort trägt zum Schutz des Accounts bei.", "DESCRIPTION": "Gebe das neue Passwort unter Einhaltung der Richtlinie für die Komplexität ein.", "OLD": "Aktuelles Passwort", "NEW": "Neues Passwort", @@ -482,9 +482,10 @@ "EMAILVERIFIED": "Email verifiziert", "NOTVERIFIED": "nicht verifiziert", "PREFERRED_LOGINNAME": "Bevorzugter Loginname", + "ISINITIAL": "Dieser Benutzer wurde noch nicht verifiziert.", "LOGINMETHODS": { "TITLE": "Kontaktinformationen", - "DESCRIPTION": "Die Kontaktinformationen werden benötigt, um Dir wichtige Informationen wie Verifikationsnachrichten und Links für das Zurücksetzen des Passworts per E-Mail zu senden.", + "DESCRIPTION": "Die Kontaktinformationen werden benötigt, um dir wichtige Informationen wie Verifikationsnachrichten und Links für das Zurücksetzen des Passworts per E-Mail zu senden.", "EMAIL": { "TITLE": "E-Mail", "VALID": "Validiert", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index bf4984571..1691cc66f 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -212,10 +212,9 @@ "TITLE": "Settings", "GENERAL": "General", "IDP": "Identity Providers", - "MFA": "Multifactor Authentication", + "SECURITY": "Password and Security", "KEYS": "Keys", "PAT": "Personal Access Tokens", - "PASSWORDLESS": "Passwordless", "USERGRANTS": "Authorizations", "MEMBERSHIPS": "Memberships", "METADATA": "Metadata" @@ -461,6 +460,7 @@ }, "PASSWORD": { "TITLE": "Password", + "LABEL": "A secure password helps to protect the account", "DESCRIPTION": "Enter the new password according to the policy below.", "OLD": "Current Password", "NEW": "New Password", @@ -482,6 +482,7 @@ "EMAILVERIFIED": "Email verified", "NOTVERIFIED": "not verified", "PREFERRED_LOGINNAME": "Preferred Loginname", + "ISINITIAL": "This users email is not verified yet.", "LOGINMETHODS": { "TITLE": "Contact Information", "DESCRIPTION": "The provided information is used to send important information, like password reset e-mails to you.", @@ -565,7 +566,7 @@ "SAVED": "Profile saved successfully.", "USERNAMECHANGED": "Username changed.", "EMAILSAVED": "E-mail saved successfully.", - "INITEMAILSENT": "Initializing mail sent.", + "INITEMAILSENT": "Initialization mail sent.", "PHONESAVED": "Phone saved successfully.", "PHONEREMOVED": "Phone has been removed.", "PHONEVERIFIED": "Phone verified successfully.", diff --git a/console/src/assets/i18n/fr.json b/console/src/assets/i18n/fr.json index c37ddf174..6ea68a40e 100644 --- a/console/src/assets/i18n/fr.json +++ b/console/src/assets/i18n/fr.json @@ -212,10 +212,9 @@ "TITLE": "Paramètres", "GENERAL": "Général", "IDP": "Fournisseurs d'identité", - "MFA": "Authentification multifactorielle", + "SECURITY": "Mot de passe et sécurité", "KEYS": "Clés", "PAT": "Jetons d'accès personnels", - "PASSWORDLESS": "Sans mot de passe", "USERGRANTS": "Autorisations", "MEMBERSHIPS": "Adhésions", "METADATA": "Métadonnées" @@ -461,6 +460,7 @@ }, "PASSWORD": { "TITLE": "Mot de passe", + "LABEL": "Un mot de passe sécurisé permet de protéger le compte", "DESCRIPTION": "Saisissez le nouveau mot de passe conformément à la politique ci-dessous.", "OLD": "Mot de passe actuel", "NEW": "Nouveau mot de passe", @@ -482,6 +482,7 @@ "EMAILVERIFIED": "Courriel vérifié", "NOTVERIFIED": "non vérifié", "PREFERRED_LOGINNAME": "Nom de connexion préféré", + "ISINITIAL": "Le mail de cet utilisateur n'a pas encore été vérifié.", "LOGINMETHODS": { "TITLE": "Informations sur le contact", "DESCRIPTION": "Les informations fournies sont utilisées pour vous envoyer des informations importantes, comme des e-mails de réinitialisation de mot de passe.", diff --git a/console/src/assets/i18n/it.json b/console/src/assets/i18n/it.json index fd5409f7c..1541b0fa9 100644 --- a/console/src/assets/i18n/it.json +++ b/console/src/assets/i18n/it.json @@ -212,10 +212,9 @@ "TITLE": "Impostazioni", "GENERAL": "Generale", "IDP": "Identity Providers", - "MFA": "Autenticazione a più fattori", + "SECURITY": "Password e sicurezza", "KEYS": "Chiavi", "PAT": "Personal Access Tokens", - "PASSWORDLESS": "Passwordless", "USERGRANTS": "Autorizzazioni", "MEMBERSHIPS": "Memberships", "METADATA": "Metadati" @@ -461,6 +460,7 @@ }, "PASSWORD": { "TITLE": "Password", + "LABEL": "Una password sicura aiuta a proteggere l'account", "DESCRIPTION": "Inserisci la nuova password secondo i requisiti.", "OLD": "Password attuale", "NEW": "Nuova password", @@ -482,6 +482,7 @@ "EMAILVERIFIED": "Email verificata", "NOTVERIFIED": "non verificato", "PREFERRED_LOGINNAME": "Loginname preferito", + "ISINITIAL": "L'e-mail di questo utente non è ancora stata verificata.", "LOGINMETHODS": { "TITLE": "Informazioni di contatto", "DESCRIPTION": "Le informazioni fornite sono utilizzate per inviare informazioni importanti, come le e-mail di reset della password.", diff --git a/console/src/assets/i18n/zh.json b/console/src/assets/i18n/zh.json index fa86d9497..7f23ca8f4 100644 --- a/console/src/assets/i18n/zh.json +++ b/console/src/assets/i18n/zh.json @@ -212,10 +212,9 @@ "TITLE": "设置", "GENERAL": "通用", "IDP": "身份提供者", - "MFA": "多因素认证", + "SECURITY": "密码和安全", "KEYS": "秘钥", "PAT": "个人访问令牌", - "PASSWORDLESS": "无密码认证", "USERGRANTS": "授权", "MEMBERSHIPS": "成员身份", "METADATA": "元数据" @@ -461,6 +460,7 @@ }, "PASSWORD": { "TITLE": "密码", + "LABEL": "安全密码有助于保护帐户", "DESCRIPTION": "根据以下策略输入新密码。", "OLD": "当前密码", "NEW": "新密码", @@ -482,6 +482,7 @@ "EMAILVERIFIED": "电子邮件已验证", "NOTVERIFIED": "未验证", "PREFERRED_LOGINNAME": "首选登录名", + "ISINITIAL": "此用户电子邮件尚未验证。", "LOGINMETHODS": { "TITLE": "联系信息", "DESCRIPTION": "提供的信息用于向您发送重要信息,例如密码重置电子邮件。",