|
@@ -25,6 +25,8 @@ const { login } = useUserAuthStore();
|
|
const { openModal, closeCurrentModal } = useModalsStore();
|
|
const { openModal, closeCurrentModal } = useModalsStore();
|
|
|
|
|
|
const submitModal = () => {
|
|
const submitModal = () => {
|
|
|
|
+ if (!email.value || !password.value.value) return;
|
|
|
|
+
|
|
login({
|
|
login({
|
|
email: email.value,
|
|
email: email.value,
|
|
password: password.value.value
|
|
password: password.value.value
|
|
@@ -35,7 +37,7 @@ const submitModal = () => {
|
|
.catch(err => new Toast(err.message));
|
|
.catch(err => new Toast(err.message));
|
|
};
|
|
};
|
|
|
|
|
|
-const checkForAutofill = event => {
|
|
|
|
|
|
+const checkForAutofill = (type, event) => {
|
|
if (
|
|
if (
|
|
event.target.value !== "" &&
|
|
event.target.value !== "" &&
|
|
event.inputType === undefined &&
|
|
event.inputType === undefined &&
|
|
@@ -84,6 +86,7 @@ const githubRedirect = () => {
|
|
class="input"
|
|
class="input"
|
|
type="email"
|
|
type="email"
|
|
placeholder="Username/Email..."
|
|
placeholder="Username/Email..."
|
|
|
|
+ @input="checkForAutofill('email', $event)"
|
|
@keyup.enter="submitModal()"
|
|
@keyup.enter="submitModal()"
|
|
/>
|
|
/>
|
|
</p>
|
|
</p>
|
|
@@ -100,7 +103,7 @@ const githubRedirect = () => {
|
|
type="password"
|
|
type="password"
|
|
ref="passwordElement"
|
|
ref="passwordElement"
|
|
placeholder="Password..."
|
|
placeholder="Password..."
|
|
- @input="checkForAutofill($event)"
|
|
|
|
|
|
+ @input="checkForAutofill('password', $event)"
|
|
@keyup.enter="submitModal()"
|
|
@keyup.enter="submitModal()"
|
|
/>
|
|
/>
|
|
<a @click="togglePasswordVisibility()">
|
|
<a @click="togglePasswordVisibility()">
|