增加ai配置和ai广场功能
This commit is contained in:
1 parent
244b4bd9fd
commit
d9a50e23dd
27 files changed
+3808
-57
No files matched your search
+53
-8
@@ -180,6 +180,32 @@
|
||||
background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
|
||||
}
|
||||
.login-panel { display: none; }
|
||||
|
||||
/* ---------- 登录方式全部关闭 ---------- */
|
||||
.login-disabled {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 48px 24px 32px;
|
||||
color: var(--text-sub);
|
||||
}
|
||||
.login-disabled svg {
|
||||
width: 44px; height: 44px;
|
||||
color: var(--text-faint, #a3acbf);
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.login-disabled-title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
}
|
||||
.login-disabled-desc {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.login-panel.active { display: block; animation: panelIn .24s ease both; }
|
||||
@keyframes panelIn {
|
||||
from { opacity: 0; transform: translateY(6px); }
|
||||
@@ -618,15 +644,28 @@
|
||||
<span id="errorText"></span>
|
||||
</div>
|
||||
|
||||
<!-- 登录方式切换:默认账号密码 -->
|
||||
<div class="login-tabs" role="tablist">
|
||||
<button class="login-tab active" type="button" role="tab" data-tab="account" onclick="switchLoginTab('account')">账号密码</button>
|
||||
<button class="login-tab" type="button" role="tab" data-tab="sms" onclick="switchLoginTab('sms')">短信登录</button>
|
||||
<button class="login-tab" type="button" role="tab" data-tab="qr" onclick="switchLoginTab('qr')">扫码登录</button>
|
||||
{{if .LoginDisabled}}
|
||||
<!-- 平台设置已关闭全部登录方式 -->
|
||||
<div class="login-disabled">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V8a4 4 0 018 0v3"/>
|
||||
</svg>
|
||||
<p class="login-disabled-title">登录功能已关闭</p>
|
||||
<p class="login-disabled-desc">管理员已在平台设置中关闭全部登录方式,请联系管理员开启后再试。</p>
|
||||
</div>
|
||||
{{else}}
|
||||
<!-- 登录方式切换:按平台设置的开关渲染,默认选中第一个可用方式 -->
|
||||
{{if .LoginShowTabs}}
|
||||
<div class="login-tabs" role="tablist">
|
||||
{{if .LoginPwdOn}}<button class="login-tab{{if eq .LoginDefaultTab "account"}} active{{end}}" type="button" role="tab" data-tab="account" onclick="switchLoginTab('account')">账号密码</button>{{end}}
|
||||
{{if .LoginSmsOn}}<button class="login-tab{{if eq .LoginDefaultTab "sms"}} active{{end}}" type="button" role="tab" data-tab="sms" onclick="switchLoginTab('sms')">短信登录</button>{{end}}
|
||||
{{if .LoginQrOn}}<button class="login-tab{{if eq .LoginDefaultTab "qr"}} active{{end}}" type="button" role="tab" data-tab="qr" onclick="switchLoginTab('qr')">扫码登录</button>{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- 账号密码登录 -->
|
||||
<div class="login-panel active" id="panel-account">
|
||||
{{if .LoginPwdOn}}
|
||||
<div class="login-panel{{if eq .LoginDefaultTab "account"}} active{{end}}" id="panel-account">
|
||||
{{if .Notice}}
|
||||
<div class="notice-box{{if eq .Notice "registered_warn"}} warn{{end}}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
@@ -680,9 +719,11 @@
|
||||
|
||||
<div class="back">还没有账号?<a class="link" href="/auth/register?client_id={{urlquery .ClientID}}&redirect={{urlquery .Redirect}}">立即注册</a></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- 手机号验证码登录 -->
|
||||
<div class="login-panel" id="panel-sms">
|
||||
{{if .LoginSmsOn}}
|
||||
<div class="login-panel{{if eq .LoginDefaultTab "sms"}} active{{end}}" id="panel-sms">
|
||||
<form onsubmit="return submitSmsLogin(event)" autocomplete="on">
|
||||
<div class="field">
|
||||
<label class="field-label" for="smsMobile">手机号</label>
|
||||
@@ -714,9 +755,11 @@
|
||||
</form>
|
||||
<p class="form-hint">未注册的手机号验证通过后将自动创建账号</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- 扫码登录:微信扫码 → 小程序内确认 -->
|
||||
<div class="login-panel" id="panel-qr">
|
||||
{{if .LoginQrOn}}
|
||||
<div class="login-panel{{if eq .LoginDefaultTab "qr"}} active{{end}}" id="panel-qr">
|
||||
<div class="qr-panel">
|
||||
<div class="qr-box">
|
||||
<img id="scanQrImg" class="qr-img" alt="微信扫码登录" style="display:none" />
|
||||
@@ -730,6 +773,7 @@
|
||||
<p class="qr-note">二维码 5 分钟内有效,过期可点击刷新</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- 第三方登录(未配置时点击提示即将上线) -->
|
||||
<div class="third-area" id="thirdArea">
|
||||
@@ -749,6 +793,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}{{/* end LoginDisabled */}}
|
||||
{{end}}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user