diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte
index f60bd41..e523db7 100644
--- a/src/routes/login/+page.svelte
+++ b/src/routes/login/+page.svelte
@@ -10,6 +10,8 @@
let name: string;
let password: string;
+ let passwordVisible: boolean;
+ let passwordInput: HTMLInputElement;
let error: HTMLSpanElement;
function submit() {
@@ -23,20 +25,32 @@
});
}
+ function togglePasswordVisibility() {
+ passwordVisible = !passwordVisible;
+ passwordInput.type = passwordVisible ? 'text' : 'password';
+ }
+
$: if (browser && $token) goto("/account");
Have an account? Login
{/if} + + diff --git a/static/icons/eye-off.svg b/static/icons/eye-off.svg new file mode 100644 index 0000000..0d7ccb2 --- /dev/null +++ b/static/icons/eye-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/eye.svg b/static/icons/eye.svg new file mode 100644 index 0000000..8ec58f6 --- /dev/null +++ b/static/icons/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/icons/help-circle.svg b/static/icons/help-circle.svg index d05cae1..12b3aad 100644 --- a/static/icons/help-circle.svg +++ b/static/icons/help-circle.svg @@ -1,5 +1,5 @@