feat: Add password visibility toggle to password fields w SensitiveInput.svelte component
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { getContext } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { updateUserPassword } from '$lib/apis/auths';
|
||||
import SensitiveInput from '$lib/components/common/SensitiveInput.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -59,8 +60,8 @@
|
||||
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Current Password')}</div>
|
||||
|
||||
<div class="flex-1">
|
||||
<input
|
||||
class="w-full bg-transparent dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
||||
<SensitiveInput
|
||||
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
||||
type="password"
|
||||
bind:value={currentPassword}
|
||||
placeholder={$i18n.t('Enter your current password')}
|
||||
@@ -74,7 +75,7 @@
|
||||
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('New Password')}</div>
|
||||
|
||||
<div class="flex-1">
|
||||
<input
|
||||
<SensitiveInput
|
||||
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
||||
type="password"
|
||||
bind:value={newPassword}
|
||||
@@ -89,7 +90,7 @@
|
||||
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Confirm Password')}</div>
|
||||
|
||||
<div class="flex-1">
|
||||
<input
|
||||
<SensitiveInput
|
||||
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
||||
type="password"
|
||||
bind:value={newPasswordConfirm}
|
||||
|
||||
Reference in New Issue
Block a user