mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Formatting cleaning
This commit is contained in:
@@ -5,13 +5,13 @@ import { setCookie } from '@/utils/cookies';
|
|||||||
import { ref, type Ref } from 'vue';
|
import { ref, type Ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const isTokenOK: Ref<boolean|undefined> = ref(undefined)
|
const isTokenOK: Ref<boolean | undefined> = ref(undefined)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const email = ref('')
|
const email = ref('')
|
||||||
const password = ref('')
|
const password = ref('')
|
||||||
|
|
||||||
const isFormEmpty: ()=>boolean = () => {
|
const isFormEmpty: () => boolean = () => {
|
||||||
return email.value === '' || password.value === ''
|
return email.value === '' || password.value === ''
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,12 +79,14 @@ function login(email: string, password: string): void {
|
|||||||
</div>
|
</div>
|
||||||
<div :class="`label-input${isTokenOK === false ? '-error' : ''}`">
|
<div :class="`label-input${isTokenOK === false ? '-error' : ''}`">
|
||||||
<label for="password">Mot de passe</label>
|
<label for="password">Mot de passe</label>
|
||||||
<input id="password" name="password" placeholder="Mot de passe" type="password" v-model="password">
|
<input id="password" name="password" placeholder="Mot de passe" type="password"
|
||||||
|
v-model="password">
|
||||||
<p v-if="isTokenOK === false">❌ E-mail et/ou mot de passe incorrect(s).</p>
|
<p v-if="isTokenOK === false">❌ E-mail et/ou mot de passe incorrect(s).</p>
|
||||||
<p v-else-if="useErrorsStore().sessionExpired">⌛ Votre session a expiré.</p>
|
<p v-else-if="useErrorsStore().sessionExpired">⌛ Votre session a expiré.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button :class="`button-${isFormEmpty() ? 'disabled' : 'primary'}`" type="submit" :disabled="isFormEmpty()">
|
<button :class="`button-${isFormEmpty() ? 'disabled' : 'primary'}`" type="submit"
|
||||||
|
:disabled="isFormEmpty()">
|
||||||
Se connecter
|
Se connecter
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user