mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: reset captcha field on login form submission failure
This commit is contained in:
parent
e4232166e8
commit
2060012660
|
|
@ -269,6 +269,7 @@ const loginHandle = () => {
|
|||
loading.value = false
|
||||
loginForm.value.username = ''
|
||||
loginForm.value.password = ''
|
||||
loginForm.value.captcha = ''
|
||||
const timestampKey = `${username}_chat_first_fail_timestamp`
|
||||
if (!localStorage.getItem(timestampKey)) {
|
||||
localStorage.setItem(timestampKey, Date.now().toString())
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ const loginHandle = () => {
|
|||
loading.value = false
|
||||
loginForm.value.username = ''
|
||||
loginForm.value.password = ''
|
||||
loginForm.value.captcha = ''
|
||||
const timestampKey = `${username}_first_fail_timestamp`
|
||||
if (!localStorage.getItem(timestampKey)) {
|
||||
localStorage.setItem(timestampKey, Date.now().toString())
|
||||
|
|
|
|||
Loading…
Reference in New Issue