|
@@ -2,6 +2,7 @@
|
|
import { getContext } from 'svelte';
|
|
import { getContext } from 'svelte';
|
|
import { toast } from 'svelte-sonner';
|
|
import { toast } from 'svelte-sonner';
|
|
import { updateUserPassword } from '$lib/apis/auths';
|
|
import { updateUserPassword } from '$lib/apis/auths';
|
|
|
|
+ import SensitiveInput from '$lib/components/common/SensitiveInput.svelte';
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
const i18n = getContext('i18n');
|
|
|
|
|
|
@@ -59,8 +60,8 @@
|
|
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Current Password')}</div>
|
|
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Current Password')}</div>
|
|
|
|
|
|
<div class="flex-1">
|
|
<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"
|
|
type="password"
|
|
bind:value={currentPassword}
|
|
bind:value={currentPassword}
|
|
placeholder={$i18n.t('Enter your current password')}
|
|
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=" mb-1 text-xs text-gray-500">{$i18n.t('New Password')}</div>
|
|
|
|
|
|
<div class="flex-1">
|
|
<div class="flex-1">
|
|
- <input
|
|
|
|
|
|
+ <SensitiveInput
|
|
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
|
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
|
type="password"
|
|
type="password"
|
|
bind:value={newPassword}
|
|
bind:value={newPassword}
|
|
@@ -89,7 +90,7 @@
|
|
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Confirm Password')}</div>
|
|
<div class=" mb-1 text-xs text-gray-500">{$i18n.t('Confirm Password')}</div>
|
|
|
|
|
|
<div class="flex-1">
|
|
<div class="flex-1">
|
|
- <input
|
|
|
|
|
|
+ <SensitiveInput
|
|
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
|
class="w-full bg-transparent text-sm dark:text-gray-300 outline-hidden placeholder:opacity-30"
|
|
type="password"
|
|
type="password"
|
|
bind:value={newPasswordConfirm}
|
|
bind:value={newPasswordConfirm}
|