feat: 系统设置可配置版本信息、技术基础、开发者等
This commit is contained in:
40
www/admin.js
40
www/admin.js
@@ -1355,6 +1355,26 @@ async function loadSystemPage(content) {
|
||||
<input type="text" class="form-input" id="appVersion" value="${systemConfigs.app_version?.value || ''}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">应用简介</label>
|
||||
<input type="text" class="form-input" id="appDescription" value="${systemConfigs.app_description?.value || ''}" placeholder="如:提供智能对话、多种智能体服务">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">技术基础</label>
|
||||
<input type="text" class="form-input" id="appTechnology" value="${systemConfigs.app_technology?.value || ''}" placeholder="如:智谱 GLM-4.5-Air 大模型">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">开发者</label>
|
||||
<input type="text" class="form-input" id="appDeveloper" value="${systemConfigs.app_developer?.value || ''}" placeholder="如:OpenClaw Team">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">更新日期</label>
|
||||
<input type="text" class="form-input" id="appUpdateDate" value="${systemConfigs.app_update_date?.value || ''}" placeholder="如:2026-04-27">
|
||||
</div>
|
||||
|
||||
<h3 style="margin: 24px 0 16px; padding-top: 16px; border-top: 1px solid #e2e8f0;">游客使用限制</h3>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -1379,6 +1399,18 @@ async function loadSystemPage(content) {
|
||||
<input type="text" class="form-input" id="adminPassword" value="${systemConfigs.admin_password?.value || ''}" placeholder="修改管理员密码">
|
||||
</div>
|
||||
|
||||
<h3 style="margin: 24px 0 16px; padding-top: 16px; border-top: 1px solid #e2e8f0;">链接配置</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">隐私政策链接</label>
|
||||
<input type="text" class="form-input" id="privacyPolicyUrl" value="${systemConfigs.privacy_policy_url?.value || ''}" placeholder="隐私政策页面URL">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">用户协议链接</label>
|
||||
<input type="text" class="form-input" id="userAgreementUrl" value="${systemConfigs.user_agreement_url?.value || ''}" placeholder="用户协议页面URL">
|
||||
</div>
|
||||
|
||||
<button class="form-submit" onclick="saveSystemConfig()">保存设置</button>
|
||||
</div>
|
||||
|
||||
@@ -1394,10 +1426,16 @@ async function saveSystemConfig() {
|
||||
const data = {
|
||||
app_name: document.getElementById('appName').value,
|
||||
app_version: document.getElementById('appVersion').value,
|
||||
app_description: document.getElementById('appDescription').value,
|
||||
app_technology: document.getElementById('appTechnology').value,
|
||||
app_developer: document.getElementById('appDeveloper').value,
|
||||
app_update_date: document.getElementById('appUpdateDate').value,
|
||||
guest_chat_sessions: document.getElementById('guestChatSessions').value,
|
||||
guest_chat_messages: document.getElementById('guestChatMessages').value,
|
||||
guest_agent_messages: document.getElementById('guestAgentMessages').value,
|
||||
admin_password: document.getElementById('adminPassword').value
|
||||
admin_password: document.getElementById('adminPassword').value,
|
||||
privacy_policy_url: document.getElementById('privacyPolicyUrl').value,
|
||||
user_agreement_url: document.getElementById('userAgreementUrl').value,
|
||||
};
|
||||
|
||||
await fetchAPI('/api/admin/system', 'POST', data);
|
||||
|
||||
23
www/app.js
23
www/app.js
@@ -1602,8 +1602,8 @@ function renderProfilePage() {
|
||||
</div>
|
||||
|
||||
<div class="profile-footer">
|
||||
<p>AI助手 v3.6.0</p>
|
||||
<p>基于智谱 GLM-4.5-Air</p>
|
||||
<p>${CONFIG?.system?.appName || 'AI助手'} v${CONFIG?.system?.version || '3.10.0'}</p>
|
||||
<p>基于 ${CONFIG?.system?.technology || '智谱 GLM-4.5-Air'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2524,6 +2524,13 @@ function showHelpPage() {
|
||||
// ==================== 关于页面 ====================
|
||||
|
||||
function showAboutPage() {
|
||||
const appName = CONFIG?.system?.appName || 'AI助手';
|
||||
const version = CONFIG?.system?.version || '3.10.0';
|
||||
const developer = CONFIG?.system?.developer || 'OpenClaw Team';
|
||||
const updateDate = CONFIG?.system?.updateDate || '2026-04-27';
|
||||
const technology = CONFIG?.system?.technology || '智谱 GLM-4.5-Air 大模型';
|
||||
const description = CONFIG?.system?.description || '提供智能对话、多种智能体服务';
|
||||
|
||||
const aboutHtml = `
|
||||
<div class="settings-page">
|
||||
<header class="settings-header">
|
||||
@@ -2535,22 +2542,22 @@ function showAboutPage() {
|
||||
|
||||
<div class="settings-content about-content">
|
||||
<div class="about-logo">🤖</div>
|
||||
<div class="about-name">AI助手</div>
|
||||
<div class="about-version">v3.5.0</div>
|
||||
<div class="about-name">${appName}</div>
|
||||
<div class="about-version">v${version}</div>
|
||||
|
||||
<div class="about-info">
|
||||
<p>基于智谱 GLM-4.5-Air 大模型</p>
|
||||
<p>提供智能对话、多种智能体服务</p>
|
||||
<p>基于 ${technology}</p>
|
||||
<p>${description}</p>
|
||||
</div>
|
||||
|
||||
<div class="about-section">
|
||||
<div class="about-item">
|
||||
<span class="about-label">开发者</span>
|
||||
<span class="about-value">OpenClaw Team</span>
|
||||
<span class="about-value">${developer}</span>
|
||||
</div>
|
||||
<div class="about-item">
|
||||
<span class="about-label">更新日期</span>
|
||||
<span class="about-value">2026-04-27</span>
|
||||
<span class="about-value">${updateDate}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user