Skip to content

Commit

Permalink
Showing 41 changed files with 34 additions and 48 deletions.
16 changes: 8 additions & 8 deletions .make-lint-translation-keys-expect
Original file line number Diff line number Diff line change
@@ -29,17 +29,17 @@ resources/authgear/templates/en/web/authflowv2/forgot_password.html:159:26: temp
resources/authgear/templates/en/web/authflowv2/layout.html:5:14: template translation is forbidden: `widget`
resources/authgear/templates/en/web/authflowv2/login.html:252:37: translation key not defined: "%s-icon"
resources/authgear/templates/en/web/authflowv2/settings_layout.html:3:14: template translation is forbidden: `widget`
resources/authgear/templates/en/web/authflowv2/settings_oob_otp.html:39:31: translation key not defined: "/settings/mfa/new_oob_otp_%s"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:139:22: translation key not defined: "custom-attribute-label-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:140:20: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:144:21: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:196:22: invalid translation key: "$label"
resources/authgear/templates/en/web/authflowv2/settings_oob_otp.html:38:31: translation key not defined: "/settings/mfa/new_oob_otp_%s"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:138:22: translation key not defined: "custom-attribute-label-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:139:20: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:143:21: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile.html:195:22: invalid translation key: "$label"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:6:18: translation key not defined: "custom-attribute-label-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:7:16: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:11:17: invalid translation key: "$labelKey"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:91:30: translation key not defined: "custom-attribute-enum-label-%s-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:92:28: invalid translation key: "$enum_label_key"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:95:28: invalid translation key: "$enum_label_key"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:90:30: translation key not defined: "custom-attribute-enum-label-%s-%s"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:91:28: invalid translation key: "$enum_label_key"
resources/authgear/templates/en/web/authflowv2/settings_profile_edit_custom.html:94:28: invalid translation key: "$enum_label_key"
resources/authgear/templates/en/web/authflowv2/signup.html:93:26: translation key not defined: "v2.page.signup-login.continue.subtitle-%v"
resources/authgear/templates/en/web/authflowv2/signup.html:102:26: translation key not defined: "v2.page.signup.continue.subtitle-%v"
resources/authgear/templates/en/web/authflowv2/signup.html:275:35: translation key not defined: "%s-icon"
2 changes: 2 additions & 0 deletions authui/src/authflowv2.ts
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ import { BotProtectionStandalonePageController } from "./authflowv2/botprotectio
import { ImagePickerController } from "./imagepicker";
import { SelectInputController } from "./authflowv2/selectInput";
import { AccountDeletionController } from "./accountdeletion";
import { BackController } from "./authflowv2/back";

axios.defaults.withCredentials = true;

@@ -136,5 +137,6 @@ Stimulus.register("bot-protection-dialog", BotProtectionDialogController);
Stimulus.register("select-input", SelectInputController);

Stimulus.register("account-deletion", AccountDeletionController);
Stimulus.register("back-button", BackController);

injectCSSAttrs(document.documentElement);
16 changes: 16 additions & 0 deletions authui/src/authflowv2/back.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Controller } from "@hotwired/stimulus";

export class BackController extends Controller {
connect(): void {
this.element.classList.remove("hidden");
this.element.addEventListener("click", this.back);
}

disconnect(): void {
this.element.removeEventListener("click", this.back);
}

back = () => {
window.history.back();
};
}
4 changes: 4 additions & 0 deletions authui/src/authflowv2/components/navbar.css
Original file line number Diff line number Diff line change
@@ -62,6 +62,10 @@

.navbar__item {
@apply relative;
@apply inline-flex;
@apply items-center;
@apply justify-center;
@apply gap-x-3;

color: var(--navbar__item-text-color);
font-family: var(--navbar__item-font-family);
8 changes: 4 additions & 4 deletions resources/authgear/templates/en/web/authflowv2/__navbar.html
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@
<nav class="navbar">
<h1 class="navbar__title">{{ $.Title }}</h1>

<a
class="navbar__item inline-flex items-center justify-center gap-x-3"
<button
class="navbar__item hidden"
title="{{ .BackTitle }}"
href="{{ .BackHref }}"
data-controller="back-button"
data-turbo-action="replace"
>
<span class="hidden tablet:inline-block">{{ .BackTitle }}</span>
</a>
</button>
</nav>
{{ end }}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-advanced-settings.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-biometric.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-change-password.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-delete-account.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/email" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-add-email.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/phone" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-add-phone.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/email" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-change-primary-email.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/phone" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-change-primary-phone.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/email" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-edit-email.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/phone" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-edit-phone.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/view_username" "q_login_id" $.Identity.ID)
"Title" (translate "v2.page.settings-identity-edit-username.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-email.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-identity-phone.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-identity-list-username.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/username" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-new-username.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/email" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-verify-email.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/phone" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-verify-phone.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/email" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-email.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/phone" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-phone.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/identity/username" "q_login_id_key" $.LoginIDKey)
"Title" (translate "v2.page.settings-identity-view-username.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-mfa.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/mfa")
"Title" (translate "v2.page.settings-mfa-create-password.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/mfa")
"Title" (translate "v2.page.settings-mfa-password.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/mfa")
"Title" $title
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-passkey.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/profile")
"Title" (translate "v2.page.settings-profile.default.profile-picture-title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-profile.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
{{ define "page-navbar" }}
{{ template "authflowv2/__navbar.html"
(dict
"BackHref" (call $.MakeURL "/settings/profile")
"Title" (translate "v2.page.settings-profile-edit-address.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
{{ define "page-navbar" }}
{{ template "authflowv2/__navbar.html"
(dict
"BackHref" (call $.MakeURL "/settings/profile")
"Title" (translate "v2.page.settings-profile-edit-birthdate.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/profile")
"Title" $label
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html" (dict
"Title" (include "v2.page.settings-profile-edit-gender.default.title" nil )
"BackTitle" (include "v2.component.navbar.default.item-back-button-label" nil )
"BackHref" (call $.MakeURL "/settings/profile")
)
}}
{{ end }}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/profile")
"Title" (translate "v2.page.settings-profile-edit-locale.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/profile")
"Title" (translate "v2.page.settings-profile-edit-name.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/profile")
"Title" (translate "v2.page.settings-profile-edit-zoneinfo.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings")
"Title" (translate "v2.page.settings-sessions.default.title" nil)
)
}}
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
{{ template "authflowv2/__navbar.html"
(dict
"BackTitle" (translate "v2.component.navbar.default.item-back-button-label" nil)
"BackHref" (call $.MakeURL "/settings/mfa")
"Title" (translate "v2.page.settings-totp.default.title" nil)
)
}}

0 comments on commit cd9c255

Please sign in to comment.