mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
fix: Adds forgot password link for login form (#8927)
- focus ring not appearing issue - missing forgot password link Fixes: https://linear.app/chatwoot/issue/CW-3090/fix-fixes-issues-with-login-form
This commit is contained in:
committed by
GitHub
parent
96b781b7fd
commit
7298002da7
@@ -6,24 +6,29 @@
|
|||||||
:has-error="hasError"
|
:has-error="hasError"
|
||||||
:error-message="errorMessage"
|
:error-message="errorMessage"
|
||||||
>
|
>
|
||||||
|
<template #rightOfLabel>
|
||||||
|
<slot />
|
||||||
|
</template>
|
||||||
<input
|
<input
|
||||||
:id="name"
|
:id="name"
|
||||||
:name="name"
|
:name="name"
|
||||||
:type="type"
|
:type="type"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
:tabindex="tabindex"
|
||||||
:required="required"
|
:required="required"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:data-testid="dataTestid"
|
:data-testid="dataTestid"
|
||||||
:value="value"
|
:value="value"
|
||||||
:class="{
|
:class="{
|
||||||
'focus:ring-red-600 ring-red-600': hasError,
|
'focus:outline-red-600 outline-red-600 dark:focus:outline-red-600 dark:outline-red-600':
|
||||||
'dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200':
|
hasError,
|
||||||
|
'outline-slate-200 dark:outline-slate-600 dark:focus:outline-woot-500 focus:outline-woot-500':
|
||||||
!hasError,
|
!hasError,
|
||||||
'px-3 py-3': spacing === 'base',
|
'px-3 py-3': spacing === 'base',
|
||||||
'px-3 py-2 mb-0': spacing === 'compact',
|
'px-3 py-2 mb-0': spacing === 'compact',
|
||||||
'pl-9': icon,
|
'pl-9': icon,
|
||||||
}"
|
}"
|
||||||
class="block w-full border-none shadow-sm appearance-none rounded-xl outline outline-1 outline-slate-200 dark:outline-slate-200/20 focus:outline-none focus:outline-0 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-woot-500 sm:text-sm sm:leading-6 dark:bg-slate-800"
|
class="block w-full border-none shadow-sm appearance-none rounded-xl outline outline-1 focus:outline-2 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 sm:text-sm sm:leading-6 dark:bg-slate-800"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
@blur="$emit('blur')"
|
@blur="$emit('blur')"
|
||||||
/>
|
/>
|
||||||
@@ -48,6 +53,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'text',
|
default: 'text',
|
||||||
},
|
},
|
||||||
|
tabindex: {
|
||||||
|
type: Number,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
required: {
|
required: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
<slot name="label">
|
<slot name="label">
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</slot>
|
</slot>
|
||||||
|
<slot name="rightOfLabel">
|
||||||
|
{{ label }}
|
||||||
|
</slot>
|
||||||
</label>
|
</label>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<div class="flex items-center relative w-full">
|
<div class="flex items-center relative w-full">
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
name="email_address"
|
name="email_address"
|
||||||
type="text"
|
type="text"
|
||||||
data-testid="email_input"
|
data-testid="email_input"
|
||||||
|
:tabindex="1"
|
||||||
required
|
required
|
||||||
:label="$t('LOGIN.EMAIL.LABEL')"
|
:label="$t('LOGIN.EMAIL.LABEL')"
|
||||||
:placeholder="$t('LOGIN.EMAIL.PLACEHOLDER')"
|
:placeholder="$t('LOGIN.EMAIL.PLACEHOLDER')"
|
||||||
@@ -58,19 +59,25 @@
|
|||||||
name="password"
|
name="password"
|
||||||
data-testid="password_input"
|
data-testid="password_input"
|
||||||
required
|
required
|
||||||
|
:tabindex="2"
|
||||||
:label="$t('LOGIN.PASSWORD.LABEL')"
|
:label="$t('LOGIN.PASSWORD.LABEL')"
|
||||||
:placeholder="$t('LOGIN.PASSWORD.PLACEHOLDER')"
|
:placeholder="$t('LOGIN.PASSWORD.PLACEHOLDER')"
|
||||||
:has-error="$v.credentials.password.$error"
|
:has-error="$v.credentials.password.$error"
|
||||||
@input="$v.credentials.password.$touch"
|
@input="$v.credentials.password.$touch"
|
||||||
>
|
>
|
||||||
<p v-if="!globalConfig.disableUserProfileUpdate">
|
<p v-if="!globalConfig.disableUserProfileUpdate">
|
||||||
<router-link to="auth/reset/password" class="text-link">
|
<router-link
|
||||||
|
to="auth/reset/password"
|
||||||
|
class="text-link text-sm"
|
||||||
|
tabindex="4"
|
||||||
|
>
|
||||||
{{ $t('LOGIN.FORGOT_PASSWORD') }}
|
{{ $t('LOGIN.FORGOT_PASSWORD') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</p>
|
</p>
|
||||||
</form-input>
|
</form-input>
|
||||||
<submit-button
|
<submit-button
|
||||||
:disabled="loginApi.showLoading"
|
:disabled="loginApi.showLoading"
|
||||||
|
:tabindex="3"
|
||||||
:button-text="$t('LOGIN.SUBMIT')"
|
:button-text="$t('LOGIN.SUBMIT')"
|
||||||
:loading="loginApi.showLoading"
|
:loading="loginApi.showLoading"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user