commit2ed4e3e307Author: DAI Mingchen <daimingchen@mail.ustc.edu.cn> Date: Thu Jul 25 11:48:00 2024 +0000 resolved WARN NoEmptyContinuation (grammar mistakes), and removed trivial unit test for hCAPTCHA commit690157811bAuthor: DAI Mingchen <daimingchen@mail.ustc.edu.cn> Date: Thu Jul 25 10:21:39 2024 +0000 fix: checkout the corresponding branch(master or dev) commit046ff63e42Author: DAI Mingchen <daimingchen@mail.ustc.edu.cn> Date: Thu Jul 25 10:01:24 2024 +0000 test new CI pipeline workflow in the org repo, with a bunch of ENV vars commitfaf7f51d85Author: 戴明辰 <daimingchen@mail.ustc.edu.cn> Date: Thu Jul 25 07:59:31 2024 +0000 !1 DevStar Studio 界面原型 + CI流水线测试通过 * finalize this PoC repo, and migrate to the main repo (as a dev branch) * bugFix: nullptr dereference @ routers/web/auth/wechat_utils.go * bugFix: CAPTCHA needs manual reloading * Updated UI * Changed logo and favicon * Made WeChat QR optional (will not cause HTTP 500 Internal Error), and … * Added Unit Test in CI workflow, and removed redundant tests in dev container * Compliance with open source licensing requirements * Fix workflow: only exec 'docker rm' if there are dangling volumes * Removed Magic values about: Docker registry(URL, username), k8s(nanesp… * fix mistakes: git checkout branch should be master rather than the sta… * Updated UI layouts and build scripts * Updated copyright info and ICP License ID at page footer * Updated ICP License ID at page footer * Updated code ownership: web footer, logo and favicon * Updated Internationalization(i18n): removed languages other than CN an…
32 lines
1.5 KiB
Handlebars
32 lines
1.5 KiB
Handlebars
{{/* TODO: 解决 k8s 中 deployment 多个 replicas 时验证码无法在页面初次加载,只能手动刷新。 */}}
|
||
{{if .EnableCaptcha}}{{if eq .CaptchaType "image"}}
|
||
<div class="inline field">
|
||
{{.Captcha.CreateHTML}}
|
||
</div>
|
||
<div class="required field {{if .Err_Captcha}}error{{end}}">
|
||
<label for="captcha">{{ctx.Locale.Tr "captcha"}}</label>
|
||
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
|
||
</div>
|
||
{{else if eq .CaptchaType "recaptcha"}}
|
||
<div class="inline field required">
|
||
<div id="captcha" data-captcha-type="g-recaptcha" class="g-recaptcha-style" data-sitekey="{{.RecaptchaSitekey}}"></div>
|
||
</div>
|
||
<script src='{{URLJoin .RecaptchaURL "api.js"}}'></script>
|
||
{{else if eq .CaptchaType "hcaptcha"}}
|
||
<div class="inline field required">
|
||
<div id="captcha" data-captcha-type="h-captcha" class="h-captcha-style" data-sitekey="{{.HcaptchaSitekey}}"></div>
|
||
</div>
|
||
<script src='https://hcaptcha.com/1/api.js'></script>
|
||
{{else if eq .CaptchaType "mcaptcha"}}
|
||
<div class="inline field">
|
||
<label></label>
|
||
<div class="m-captcha-style" id="mcaptcha__widget-container"></div>
|
||
<div id="captcha" data-captcha-type="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
|
||
</div>
|
||
{{else if eq .CaptchaType "cfturnstile"}}
|
||
<div class="inline field tw-text-center">
|
||
<div id="captcha" data-captcha-type="cf-turnstile" data-sitekey="{{.CfTurnstileSitekey}}"></div>
|
||
</div>
|
||
<script src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script>
|
||
{{end}}{{end}}
|