fixed login bug
This commit is contained in:
@@ -37,19 +37,18 @@ const login = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log("response", response);
|
console.log("response", response);
|
||||||
}).catch((error) => {
|
}).catch((err) => {
|
||||||
console.log("error", error);
|
console.log("error", err);
|
||||||
});
|
|
||||||
} catch (err) {
|
|
||||||
console.log( 'Error ' + err)
|
|
||||||
error.value = 'Incorrect username or password. Please try again.';
|
error.value = 'Incorrect username or password. Please try again.';
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
}, 3500);
|
}, 3500);
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
console.log('Error ' + err);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -98,7 +97,7 @@ const login = async () => {
|
|||||||
-->
|
-->
|
||||||
<Button @click="login" label="Sign In" class="w-full p-4 text-xl"></Button>
|
<Button @click="login" label="Sign In" class="w-full p-4 text-xl"></Button>
|
||||||
|
|
||||||
<Message v-if="visible" severity="error" :life="3000" class="mt-2">{{ error }}</Message>
|
<Message v-if="visible" severity="error" :life="3000" class="mt-2 error-message">{{ error }}</Message>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,4 +123,13 @@ const login = async () => {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
margin-top: -40px
|
margin-top: -40px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%; /* Ensure the message takes the full width of its container */
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user