From 356d98ae2d0a7eb0fe50e019f14f601f201436d0 Mon Sep 17 00:00:00 2001 From: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:00:57 +0200 Subject: [PATCH] fix: input field for password visiblity (#283) * fix: input field for password visiblity * chore: add scripts to layouts * fix: bump @ory/elements v0.1.0-beta.1 --- package-lock.json | 8 ++++---- package.json | 2 +- src/routes/login.ts | 2 +- src/routes/recovery.ts | 2 +- src/routes/verification.ts | 2 +- views/consent.hbs | 2 ++ views/layouts/auth.hbs | 5 +++-- views/layouts/settings.hbs | 3 ++- views/layouts/welcome.hbs | 3 ++- views/login.hbs | 12 ++++++------ views/partials/scripts.hbs | 3 +++ views/partials/standard_headers.hbs | 2 +- views/recovery.hbs | 2 +- views/registration.hbs | 14 +++++++------- views/settings.hbs | 13 +++++++------ views/verification.hbs | 2 +- 16 files changed, 43 insertions(+), 34 deletions(-) create mode 100644 views/partials/scripts.hbs diff --git a/package-lock.json b/package-lock.json index 1b06f494..1c6652be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@ory/client": "1.1.50", - "@ory/elements-markup": "0.0.1-beta.13", + "@ory/elements-markup": "0.1.0-beta.1", "@ory/integrations": "1.1.4", "axios": "1.2.6", "body-parser": "1.20.2", @@ -786,9 +786,9 @@ } }, "node_modules/@ory/elements-markup": { - "version": "0.0.1-beta.13", - "resolved": "https://registry.npmjs.org/@ory/elements-markup/-/elements-markup-0.0.1-beta.13.tgz", - "integrity": "sha512-2lraZPnF9F0b0vlGi7t9cSVRaB7arfryM8jeBQjDxnbtFXRnrEPtufNcQO8uG6wAhFYeh1A+5uM8UdZLqg44kA==", + "version": "0.1.0-beta.1", + "resolved": "https://registry.npmjs.org/@ory/elements-markup/-/elements-markup-0.1.0-beta.1.tgz", + "integrity": "sha512-9IflMA7F8UGWMzCWW4M+BdS512h4yki7vNo+bZRtbqp20Vy8oLXFd2sr1BmzN+LVxNt3H66LTy/zgw/Vj0Svnw==", "engines": { "node": ">=16.16.0", "npm": ">=8.11.0" diff --git a/package.json b/package.json index dafab922..228d30fc 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "dependencies": { "@ory/client": "1.1.50", - "@ory/elements-markup": "0.0.1-beta.13", + "@ory/elements-markup": "0.1.0-beta.1", "@ory/integrations": "1.1.4", "axios": "1.2.6", "body-parser": "1.20.2", diff --git a/src/routes/login.ts b/src/routes/login.ts index 9c8ad0bb..497ab6c6 100644 --- a/src/routes/login.ts +++ b/src/routes/login.ts @@ -193,7 +193,7 @@ export const createLoginRoute: RouteCreator = flow.oauth2_login_request.client?.client_id }`, }), - flow: flow as SelfServiceFlow, + flow: flow, flowType: "login", cardImage: logoUrl, additionalProps: { diff --git a/src/routes/recovery.ts b/src/routes/recovery.ts index 62c9c866..40a7c7f8 100644 --- a/src/routes/recovery.ts +++ b/src/routes/recovery.ts @@ -52,7 +52,7 @@ export const createRecoveryRoute: RouteCreator = res.render("recovery", { card: UserAuthCard({ title: "Recover your account", - flow: flow as SelfServiceFlow, + flow: flow, flowType: "recovery", cardImage: logoUrl, additionalProps: { diff --git a/src/routes/verification.ts b/src/routes/verification.ts index ca94770f..cab4b879 100644 --- a/src/routes/verification.ts +++ b/src/routes/verification.ts @@ -60,7 +60,7 @@ export const createVerificationRoute: RouteCreator = res.render("verification", { card: UserAuthCard({ title: "Verify your account", - flow: flow as SelfServiceFlow, + flow: flow, flowType: "verification", cardImage: logoUrl, additionalProps: { diff --git a/views/consent.hbs b/views/consent.hbs index 17fb8dba..a618b719 100644 --- a/views/consent.hbs +++ b/views/consent.hbs @@ -1,3 +1,5 @@ diff --git a/views/layouts/auth.hbs b/views/layouts/auth.hbs index 3c20b2e0..39983c9d 100644 --- a/views/layouts/auth.hbs +++ b/views/layouts/auth.hbs @@ -9,7 +9,8 @@ {{{body}}} {{> ory_branding}} - + + {{> scripts }} - \ No newline at end of file + diff --git a/views/layouts/settings.hbs b/views/layouts/settings.hbs index f9514820..cb5b12f3 100644 --- a/views/layouts/settings.hbs +++ b/views/layouts/settings.hbs @@ -14,6 +14,7 @@ {{> ory_branding}} + {{> scripts }} - \ No newline at end of file + diff --git a/views/layouts/welcome.hbs b/views/layouts/welcome.hbs index f9514820..cb5b12f3 100644 --- a/views/layouts/welcome.hbs +++ b/views/layouts/welcome.hbs @@ -14,6 +14,7 @@ {{> ory_branding}} + {{> scripts }} - \ No newline at end of file + diff --git a/views/login.hbs b/views/login.hbs index e0ad1ba2..901f5e0b 100644 --- a/views/login.hbs +++ b/views/login.hbs @@ -3,11 +3,11 @@ {{> ui_nodes nodes=nodes groups="webauthn" attributes="text/javascript" withoutDefaultGroup=true}} - - diff --git a/views/partials/scripts.hbs b/views/partials/scripts.hbs new file mode 100644 index 00000000..eb7eda0f --- /dev/null +++ b/views/partials/scripts.hbs @@ -0,0 +1,3 @@ +{{! Scripts }} + + diff --git a/views/partials/standard_headers.hbs b/views/partials/standard_headers.hbs index cc19698f..781d71fd 100644 --- a/views/partials/standard_headers.hbs +++ b/views/partials/standard_headers.hbs @@ -15,4 +15,4 @@ {{! Managed UI styling }} - \ No newline at end of file + diff --git a/views/recovery.hbs b/views/recovery.hbs index 7147635e..8f2d4a7a 100644 --- a/views/recovery.hbs +++ b/views/recovery.hbs @@ -1,3 +1,3 @@
{{{card}}} -
\ No newline at end of file + diff --git a/views/registration.hbs b/views/registration.hbs index beca6249..103ca6cd 100644 --- a/views/registration.hbs +++ b/views/registration.hbs @@ -4,11 +4,11 @@ {{> ui_nodes nodes=nodes groups="webauthn" attributes="text/javascript" withoutDefaultGroup=true}} - + - diff --git a/views/settings.hbs b/views/settings.hbs index e6a79ac3..dfc9d1b7 100644 --- a/views/settings.hbs +++ b/views/settings.hbs @@ -18,11 +18,12 @@ {{> ui_nodes nodes=nodes groups="webauthn" attributes="text/javascript" withoutDefaultGroup=true}} - - \ No newline at end of file + diff --git a/views/verification.hbs b/views/verification.hbs index 7649d5c4..bcef9657 100644 --- a/views/verification.hbs +++ b/views/verification.hbs @@ -1,3 +1,3 @@
{{{card}}} -
\ No newline at end of file +