mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 The captcha on the auth page uses a white background Fix https://github.com/siyuan-note/siyuan/issues/8645
This commit is contained in:
parent
b65fc703f5
commit
d94893f9a6
2 changed files with 3 additions and 1 deletions
|
|
@ -187,7 +187,7 @@
|
||||||
<h1 style="margin-bottom: 48px;color:var(--b3-theme-on-background)">{{.workspace}}</h1>
|
<h1 style="margin-bottom: 48px;color:var(--b3-theme-on-background)">{{.workspace}}</h1>
|
||||||
<input class="b3-text-filed" id="authCode" type="password" placeholder="{{.l0}}"/><br>
|
<input class="b3-text-filed" id="authCode" type="password" placeholder="{{.l0}}"/><br>
|
||||||
<div style="position: relative;width: 240px;margin: 8px auto 0;display: none">
|
<div style="position: relative;width: 240px;margin: 8px auto 0;display: none">
|
||||||
<img id="captchaImg" style="top: 1px;position: absolute;height: 28px;right: 1px;cursor: pointer">
|
<img id="captchaImg" style="top: 1px;position: absolute;height: 27px;right: 1px;cursor: pointer">
|
||||||
<input id="captcha" class="b3-text-filed" placeholder="{{.l3}}">
|
<input id="captcha" class="b3-text-filed" placeholder="{{.l3}}">
|
||||||
</div>
|
</div>
|
||||||
<button class="b3-button" onclick="submitAuth()">{{.l1}}</button>
|
<button class="b3-button" onclick="submitAuth()">{{.l1}}</button>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"image/color"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
|
@ -118,6 +119,7 @@ func GetCaptcha(c *gin.Context) {
|
||||||
options.CharPreset = "ABCDEFGHKLMNPQRSTUVWXYZ23456789"
|
options.CharPreset = "ABCDEFGHKLMNPQRSTUVWXYZ23456789"
|
||||||
options.Noise = 0.5
|
options.Noise = 0.5
|
||||||
options.CurveNumber = 0
|
options.CurveNumber = 0
|
||||||
|
options.BackgroundColor = color.White
|
||||||
})
|
})
|
||||||
if nil != err {
|
if nil != err {
|
||||||
logging.LogErrorf("generates captcha failed: " + err.Error())
|
logging.LogErrorf("generates captcha failed: " + err.Error())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue