Skip to content

Commit

Permalink
Update "update / delete Login ID" page UI
Browse files Browse the repository at this point in the history
ref DEV-1313
  • Loading branch information
louischan-oursky committed May 29, 2024
2 parents 3f93144 + 7e95122 commit e82f8c1
Show file tree
Hide file tree
Showing 28 changed files with 79 additions and 12 deletions.
19 changes: 15 additions & 4 deletions authui/src/tailwind-light-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,21 @@
border-color: var(--color-text-shaded-2);
}

.light-btn--destructive,
.light-btn--destructive:focus,
.light-btn--destructive:hover,
.light-btn--destructive:active {
.outlined-btn {
@apply border border-solid;
color: var(--color-text-unshaded);
background-color: transparent;
border-color: var(--color-text-unshaded);
}

.outlined-btn--destructive {
color: var(--color-error-unshaded);
border-color: var(--color-error-unshaded);
}

.outlined-btn--destructive:focus,
.outlined-btn--destructive:hover,
.outlined-btn--destructive:active {
color: var(--color-error-shaded-6);
border-color: var(--color-error-shaded-6);
}
Expand Down
4 changes: 4 additions & 0 deletions authui/src/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
@apply rounded-sm px-5 py-1.5 text-center border border-solid border-transparent;
}

.btn.outlined-btn {
@apply rounded-sm px-5 py-1.5 text-center border border-solid;
}

.primary-btn.outline {
@apply border outline-none;
}
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Neue Telefonnummer",
"login-id-placeholder": "{variant, select, email {E-Mail-Adresse} username {Benutzername} other {E-Mail-Adresse oder Benutzername}}",
"login-id-placeholder--new": "Neue {variant, select, email {E-Mail-Adresse} username {Benutzername} other {E-Mail-Adresse oder Benutzername}}",
"add-login-id-label": "Füge {variant, select, email {E-Mail-Adresse} username {Benutzername} phone {Telefonnummer} other {E-Mail-Adresse oder Benutzername}} hinzu",
"update-login-id-label": "Aktualisiere {variant, select, email {E-Mail-Adresse} username {Benutzername} phone {Telefonnummer} other {E-Mail-Adresse oder Benutzername}}",
"remove-login-id-label": "Entfernen Sie {variant, select, email {E-Mail-Adresse} username {Benutzername} phone {Telefonnummer} other {E-Mail-Adresse oder Benutzername}}",
"use-text-login-id-description": "Verwenden Sie stattdessen {variant, select, email {E-Mail-Adresse} username {Benutzername} other {E-Mail-Adresse oder Benutzername}}",
"use-email-login-id-description": "Verwenden Sie stattdessen die E-Mail-Adresse",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/el/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Νέος αριθμός τηλεφώνου",
"login-id-placeholder": "{variant, select, email {Διεύθυνση email} username {Όνομα χρήστη} other {Διεύθυνση email ή όνομα χρήστη}}",
"login-id-placeholder--new": "Νέο {variant, select, email {Διεύθυνση email} username {Όνομα χρήστη} other {Διεύθυνση email ή όνομα χρήστη}}",
"add-login-id-label": "Προσθήκη {variant, select, email {Διεύθυνσης ηλεκτρονικού ταχυδρομείου} username {Ονόματος χρήστη} phone {Αριθμού τηλεφώνου} other {Διεύθυνσης ηλεκτρονικού ταχυδρομείου ή ονόματος χρήστη}}",
"update-login-id-label": "Ενημέρωση {variant, select, email {Διεύθυνσης ηλεκτρονικού ταχυδρομείου} username {Ονόματος χρήστη} phone {Αριθμού τηλεφώνου} other {Διεύθυνσης ηλεκτρονικού ταχυδρομείου ή ονόματος χρήστη}}",
"remove-login-id-label": "Αφαίρεση {variant, select, email {Διεύθυνσης email} username {Ονόματος χρήστη} phone {Αριθμού τηλεφώνου} other {Διεύθυνσης email ή ονόματος χρήστη}}",
"use-text-login-id-description": "Χρησιμοποιήστε {variant, select, email {διεύθυνση email} username {όνομα χρήστη} other {διεύθυνση email ή όνομα χρήστη}} αντ'' αυτού",
"use-email-login-id-description": "Χρησιμοποιήστε τη διεύθυνση email αντί",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "New Phone number",
"login-id-placeholder": "{variant, select, email {Email address} username {Username} other {Email address or username}}",
"login-id-placeholder--new": "New {variant, select, email {Email address} username {Username} other {Email address or username}}",
"add-login-id-label": "Add {variant, select, email {Email address} username {Username} phone {Phone Number} other {Email address or username}}",
"update-login-id-label": "Update {variant, select, email {Email address} username {Username} phone {Phone Number} other {Email address or username}}",
"remove-login-id-label": "Remove {variant, select, email {Email address} username {Username} phone {Phone Number} other {Email address or username}}",
"use-text-login-id-description": "Use {variant, select, email {email address} username {username} other {email address or username}} instead",
"use-email-login-id-description": "Use email address instead",
Expand Down
18 changes: 12 additions & 6 deletions resources/authgear/templates/en/web/enter_login_id.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ <h1 class="m-0 primary-txt text-center text-xl font-bold">
{{/* If new identity or update is allowed, display the input */}}
{{ $is_input_displayed := or (not $.IdentityID) (and $.IdentityID (not $.UpdateDisabled)) }}

{{ if $is_input_displayed }}

{{ if $.IdentityID }}
{{ if $.IdentityID }}
<p class="text-sm m-0 break-words secondary-txt text-center">
{{ template "enter-login-id-page-description--change" (dict "key" $.LoginIDKey "displayID" $.DisplayID) }}
</p>
{{ end }}
{{ end }}

{{ if $is_input_displayed }}

<form id="main-form" class="twc-container-vertical" method="post" novalidate>

Expand Down Expand Up @@ -65,13 +65,19 @@ <h1 class="m-0 primary-txt text-center text-xl font-bold">
name="x_action"
value="add_or_update"
data-authgear-event="authgear.button.change_login_id"
>{{ template "next-button-label" }}</button>
>
{{ if $.IdentityID }}
{{ template "update-login-id-label" (dict "variant" .LoginIDType) }}
{{ else }}
{{ template "add-login-id-label" (dict "variant" .LoginIDType) }}
{{ end }}
</button>
{{ end }}

{{ if and .IdentityID (not .DeleteDisabled) }}{{ if gt $.IdentityCount 1 }}
<button
form="remove-form"
class="btn light-btn light-btn--destructive text-left text-sm"
class="btn outlined-btn outlined-btn--destructive text-left text-sm"
type="submit"
name="x_action"
value="remove"
Expand Down
2 changes: 1 addition & 1 deletion resources/authgear/templates/en/web/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h1 class="m-0 primary-txt text-xl font-bold">
{{/* Action */}}
{{ if eq .type "login_id" }}
{{ if .identity_id }}
{{ if or (not .delete_disabled) (not .update_disabled) }}
{{ if or (not .update_disabled) (and (not .delete_disabled) (gt $.IdentityCount 1)) }}
<a class="link w-6 flex flex-col items-end justify-center" href="{{ call $.MakeURL "/settings/enter_login_id" "q_login_id_key" .login_id_key "q_login_id_type" .login_id_type "q_login_id_input_type" .login_id_input_type "q_identity_id" .identity_id }}">
<i class="ti ti-edit"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion resources/authgear/templates/en/web/settings_identity.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h1 class="m-0 primary-txt text-xl font-bold">
{{/* Action */}}
{{ if eq .type "login_id" }}
{{ if .identity_id }}
{{ if or (not .update_disabled) (not .delete_disabled) }}
{{ if or (not .update_disabled) (and (not .delete_disabled) (gt $.IdentityCount 1)) }}
<a class="link w-8 flex flex-col items-end justify-center" href="{{ call $.MakeURL "/settings/enter_login_id" "q_login_id_key" .login_id_key "q_login_id_type" .login_id_type "q_login_id_input_type" .login_id_input_type "q_identity_id" .identity_id }}">
<i class="ti ti-edit"></i>
</a>
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/es-419/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nuevo número de teléfono",
"login-id-placeholder": "{variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} other {Dirección de correo electrónico o nombre de usuario}}",
"login-id-placeholder--new": "Nuevo {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} other {Dirección de correo electrónico o nombre de usuario}}",
"add-login-id-label": "Agregar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"update-login-id-label": "Actualizar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"remove-login-id-label": "Eliminar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"use-text-login-id-description": "Usa {variant, select, email {dirección de correo electrónico} username {nombre de usuario} other {dirección de correo electrónico o nombre de usuario}} en su lugar",
"use-email-login-id-description": "Usa la dirección de correo electrónico en su lugar",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/es-ES/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nuevo número de teléfono",
"login-id-placeholder": "{variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} other {Dirección de correo electrónico o nombre de usuario}}",
"login-id-placeholder--new": "Nuevo {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} other {Dirección de correo electrónico o nombre de usuario}}",
"add-login-id-label": "Añadir {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"update-login-id-label": "Actualizar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"remove-login-id-label": "Eliminar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"use-text-login-id-description": "Usa {variant, select, email {dirección de correo electrónico} username {nombre de usuario} other {dirección de correo electrónico o nombre de usuario}} en su lugar",
"use-email-login-id-description": "Usa la dirección de correo electrónico en su lugar",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nuevo número de teléfono",
"login-id-placeholder": "{variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} other {Dirección de correo electrónico o nombre de usuario}}",
"login-id-placeholder--new": "Nueva {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} other {Dirección de correo electrónico o nombre de usuario}}",
"add-login-id-label": "Añadir {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"update-login-id-label": "Actualizar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"remove-login-id-label": "Eliminar {variant, select, email {Dirección de correo electrónico} username {Nombre de usuario} phone {Número de teléfono} other {Dirección de correo electrónico o nombre de usuario}}",
"use-text-login-id-description": "Usar {variant, select, email {dirección de correo electrónico} username {nombre de usuario} other {dirección de correo electrónico o nombre de usuario}} en su lugar",
"use-email-login-id-description": "Usar dirección de correo electrónico en su lugar",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/fil/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Bagong numero ng telepono",
"login-id-placeholder": "{variant, select, email {Email address} username {Username} other {Email address o username}}",
"login-id-placeholder--new": "Bagong {variant, select, email {Email address} username {Username} other {Email address o username}}",
"add-login-id-label": "Magdagdag ng {variant, select, email {Email address} username {Username} phone {Numero ng Telepono} other {Email address o username}}",
"update-login-id-label": "I-update ang {variant, select, email {Email address} username {Username} phone {Numero ng Telepono} other {Email address o username}}",
"remove-login-id-label": "Alisin ang {variant, select, email {Email address} username {Username} phone {Numero ng Telepono} other {Email address o username}}",
"use-text-login-id-description": "Gumamit ng {variant, select, email {email address} username {username} other {email address o username}} sa halip",
"use-email-login-id-description": "Gumamit ng email address sa halip",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nouveau numéro de téléphone",
"login-id-placeholder": "{variant, select, email {Adresse e-mail} username {Nom d''utilisateur} other {Adresse e-mail ou nom d''utilisateur}}",
"login-id-placeholder--new": "Nouveau {variant, select, email {Adresse e-mail} username {Nom d''utilisateur} other {Adresse e-mail ou nom d''utilisateur}}",
"add-login-id-label": "Ajouter {variant, select, email {Adresse e-mail} username {Nom d''utilisateur} phone {Numéro de téléphone} other {Adresse e-mail ou nom d''utilisateur}}",
"update-login-id-label": "Mettre à jour {variant, select, email {Adresse e-mail} username {Nom d''utilisateur} phone {Numéro de téléphone} other {Adresse e-mail ou nom d''utilisateur}}",
"remove-login-id-label": "Supprimer {variant, select, email {Adresse e-mail} username {Nom d''utilisateur} phone {Numéro de téléphone} other {Adresse e-mail ou nom d''utilisateur}}",
"use-text-login-id-description": "Utilisez {variant, select, email {l''adresse e-mail} username {le nom d''utilisateur} other {l''adresse e-mail ou le nom d''utilisateur}} à la place",
"use-email-login-id-description": "Utilisez l''adresse e-mail à la place",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/id/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nomor telepon baru",
"login-id-placeholder": "{variant, select, email {Alamat email} username {Nama pengguna} other {Alamat email atau nama pengguna}}",
"login-id-placeholder--new": "Baru {variant, select, email {Alamat email} username {Nama pengguna} other {Alamat email atau nama pengguna}}",
"add-login-id-label": "Tambahkan {variant, select, email {Alamat Email} username {Nama Pengguna} phone {Nomor Telepon} other {Alamat Email atau nama pengguna}}",
"update-login-id-label": "Perbarui {variant, select, email {Alamat Email} username {Nama Pengguna} phone {Nomor Telepon} other {Alamat Email atau nama pengguna}}",
"remove-login-id-label": "Hapus {variant, select, email {Alamat email} username {Nama pengguna} phone {Nomor Telepon} other {Alamat email atau nama pengguna}}",
"use-text-login-id-description": "Gunakan {variant, select, email {alamat email} username {nama pengguna} other {alamat email atau nama pengguna}} sebagai gantinya",
"use-email-login-id-description": "Gunakan alamat email sebagai gantinya",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nuovo numero di telefono",
"login-id-placeholder": "{variant, select, email {Indirizzo email} username {Nome utente} other {Indirizzo email o nome utente}}",
"login-id-placeholder--new": "Nouveau {variant, select, email {Adresse e-mail} username {Nome utente} other {Adresse e-mail ou nome utente}}",
"add-login-id-label": "Aggiungi {variant, select, email {Indirizzo email} username {Nome utente} phone {Numero di telefono} other {Indirizzo email o nome utente}}",
"update-login-id-label": "Aggiorna {variant, select, email {Indirizzo email} username {Nome utente} phone {Numero di telefono} other {Indirizzo email o nome utente}}",
"remove-login-id-label": "Rimuovi {variant, select, email {Indirizzo email} username {Nome utente} phone {Numero di telefono} other {Indirizzo email o nome utente}}",
"use-text-login-id-description": "Usa {variant, select, email {indirizzo email} username {nome utente} other {indirizzo email o nome utente}} invece",
"use-email-login-id-description": "Usa invece l''indirizzo email",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "新しい電話番号",
"login-id-placeholder": "{variant, select, email {メールアドレス} username {ユーザー名} other {メールアドレスまたはユーザー名}}",
"login-id-placeholder--new": "新しい{variant, select, email {メールアドレス} username {ユーザー名} other {メールアドレスまたはユーザー名}}",
"add-login-id-label": "追加 {variant, select, email {メールアドレス} username {ユーザー名} phone {電話番号} other {メールアドレスまたはユーザー名}}",
"update-login-id-label": "更新 {variant, select, email {メールアドレス} username {ユーザー名} phone {電話番号} other {メールアドレスまたはユーザー名}}",
"remove-login-id-label": "{variant, select, email {メールアドレス} username {ユーザー名} phone {電話番号} other {メールアドレスまたはユーザー名}}を削除",
"use-text-login-id-description": "{variant, select, email {メールアドレス} username {ユーザー名} other {メールアドレスまたはユーザー名}}を使用する",
"use-email-login-id-description": "メールアドレスを使用する",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "새 전화번호",
"login-id-placeholder": "{variant, select, email {이메일 주소} username {사용자명} other {이메일 주소 또는 사용자명}}",
"login-id-placeholder--new": "새 {variant, select, email {이메일 주소} username {사용자 이름} other {이메일 주소 또는 사용자 이름}}",
"add-login-id-label": "추가 {variant, select, email {이메일 주소} username {사용자 이름} phone {전화번호} other {이메일 주소 또는 사용자 이름}}",
"update-login-id-label": "업데이트 {variant, select, email {이메일 주소} username {사용자 이름} phone {전화번호} other {이메일 주소 또는 사용자 이름}}",
"remove-login-id-label": "{variant, select, email {이메일 주소} username {사용자 이름} phone {전화번호} other {이메일 주소 또는 사용자 이름}} 제거",
"use-text-login-id-description": "{variant, select, email {이메일 주소} username {사용자명} other {이메일 주소 또는 사용자명}}를 사용하세요",
"use-email-login-id-description": "이메일 주소를 사용하세요",
Expand Down
2 changes: 2 additions & 0 deletions resources/authgear/templates/ms/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
"phone-number-placeholder--new": "Nombor telefon baru",
"login-id-placeholder": "{variant, select, email {Alamat email} username {Nama pengguna} other {Alamat email atau nama pengguna}}",
"login-id-placeholder--new": "Baru {variant, select, email {Alamat e-mel} username {Nama pengguna} other {Alamat e-mel atau nama pengguna}}",
"add-login-id-label": "Tambah {variant, select, email {Alamat emel} username {Nama pengguna} phone {Nombor Telefon} other {Alamat emel atau nama pengguna}}",
"update-login-id-label": "Kemaskini {variant, select, email {Alamat emel} username {Nama pengguna} phone {Nombor Telefon} other {Alamat emel atau nama pengguna}}",
"remove-login-id-label": "Alih keluar {variant, select, email {Alamat e-mel} username {Nama pengguna} phone {Nombor Telefon} other {Alamat e-mel atau nama pengguna}}",
"use-text-login-id-description": "Gunakan {variant, select, email {alamat email} username {nama pengguna} other {alamat email atau nama pengguna}} sebagai gantinya",
"use-email-login-id-description": "Gunakan alamat email sebagai gantinya",
Expand Down
Loading

0 comments on commit e82f8c1

Please sign in to comment.