Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/5429

Vanessa724ab7456643
diff --git a/app/stage/auth.html b/app/stage/auth.html
index 493df8a000..c4239b94f4 100644
--- a/app/stage/auth.html
+++ b/app/stage/auth.html
@@ -148,7 +148,7 @@
<h1 style="margin-bottom: 48px;">思源 SiYuan</h1>
<input class="b3-text-filed" id="authCode" type="password" placeholder="授权码 Auth code"/><br>
<div style="position: relative;width: 240px;margin: 8px auto 0;display: none">
- <img id="captchaImg" style="top: 1px;position: absolute;height: 28px;right: 1px;">
+ <img id="captchaImg" style="top: 1px;position: absolute;height: 28px;right: 1px;cursor: pointer">
<input id="captcha" class="b3-text-filed" placeholder="验证码 Captcha">
</div>
<button class="b3-button" onclick="submitAuth()">解锁 Unlock</button>
@@ -457,6 +457,10 @@
}
})
+ captchaElement.previousElementSibling.addEventListener('click', function () {
+ this.src = '/api/system/getCaptcha'
+ })
+
const submitAuth = () => {
fetch('/api/system/loginAuth', {
method: 'POST',
@@ -483,6 +487,7 @@
document.querySelector('#message').classList.add('b3-snackbar--show')
document.querySelector('#message').firstElementChild.textContent = response.msg
inputElement.value = ''
+ inputElement.focus()
setTimeout(() => {
document.querySelector('#message').classList.remove('b3-snackbar--show')
document.querySelector('#message').firstElementChild.textContent = ''