refac
This commit is contained in:
@@ -11,12 +11,15 @@
|
|||||||
export let outerClassName = 'flex flex-1 bg-transparent';
|
export let outerClassName = 'flex flex-1 bg-transparent';
|
||||||
export let inputClassName = 'w-full text-sm py-0.5 bg-transparent';
|
export let inputClassName = 'w-full text-sm py-0.5 bg-transparent';
|
||||||
export let showButtonClassName = 'pl-1.5 transition bg-transparent';
|
export let showButtonClassName = 'pl-1.5 transition bg-transparent';
|
||||||
|
export let screenReader = true;
|
||||||
|
|
||||||
let show = false;
|
let show = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={outerClassName}>
|
<div class={outerClassName}>
|
||||||
<label class="sr-only" for={id}>{placeholder || $i18n.t('Password')}</label>
|
{#if screenReader}
|
||||||
|
<label class="sr-only" for={id}>{placeholder || $i18n.t('Password')}</label>
|
||||||
|
{/if}
|
||||||
<input
|
<input
|
||||||
{id}
|
{id}
|
||||||
class={`${inputClassName} ${show ? '' : 'password'} ${($settings?.highContrastMode ?? false) ? 'placeholder:text-gray-700 dark:placeholder:text-gray-100' : ' outline-hidden placeholder:text-gray-300 dark:placeholder:text-gray-600'}`}
|
class={`${inputClassName} ${show ? '' : 'password'} ${($settings?.highContrastMode ?? false) ? 'placeholder:text-gray-700 dark:placeholder:text-gray-100' : ' outline-hidden placeholder:text-gray-300 dark:placeholder:text-gray-600'}`}
|
||||||
|
|||||||
@@ -342,6 +342,7 @@
|
|||||||
placeholder={$i18n.t('Enter Your Password')}
|
placeholder={$i18n.t('Enter Your Password')}
|
||||||
autocomplete={mode === 'signup' ? 'new-password' : 'current-password'}
|
autocomplete={mode === 'signup' ? 'new-password' : 'current-password'}
|
||||||
name="password"
|
name="password"
|
||||||
|
screenReader={false}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user