Uncommented client-side CAPTCHA completion check.
This commit is contained in:
@@ -70,7 +70,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="button button-submit">Log in</button>
|
||||
<button
|
||||
class="button button-submit"
|
||||
:disabled="submitted"
|
||||
>Log in</button>
|
||||
|
||||
<a
|
||||
v-if="allowSignup"
|
||||
@@ -94,11 +97,13 @@ const allowSignup = pageContext.env.allowSignup;
|
||||
const username = ref('');
|
||||
const password = ref('');
|
||||
|
||||
const submitted = ref(false);
|
||||
const errorMsg = ref(null);
|
||||
const userInput = ref(null);
|
||||
const showPassword = ref(false);
|
||||
|
||||
async function login() {
|
||||
submitted.value = true;
|
||||
errorMsg.value = null;
|
||||
|
||||
try {
|
||||
@@ -111,6 +116,8 @@ async function login() {
|
||||
navigate(pageContext.urlParsed.search.r ? decodeURIComponent(pageContext.urlParsed.search.r) : `/user/${loginUser.username}`, null, { redirect: true });
|
||||
} catch (error) {
|
||||
errorMsg.value = error.message;
|
||||
} finally {
|
||||
submitted.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user