From c71f27072a8a0071b464e791b29f8c410a087e6a Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Mon, 27 Apr 2026 23:32:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8F=AF=E9=85=8D=E7=BD=AE=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=81=E6=8A=80=E6=9C=AF=E5=9F=BA=E7=A1=80=E3=80=81=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E8=80=85=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app.py | 18 +++++++++++++++--- www/admin.js | 40 +++++++++++++++++++++++++++++++++++++++- www/app.js | 23 +++++++++++++++-------- 3 files changed, 69 insertions(+), 12 deletions(-) diff --git a/backend/app.py b/backend/app.py index f6c690f..c6af9ca 100644 --- a/backend/app.py +++ b/backend/app.py @@ -260,13 +260,19 @@ def init_db(): if cursor.fetchone()[0] == 0: default_configs = [ ('app_name', 'AI助手', '应用名称'), - ('app_version', '3.5.1', '应用版本'), + ('app_version', '3.10.0', '应用版本'), ('llm_provider', 'zhipu', '默认大模型提供商'), ('enable_search', 'true', '是否启用联网搜索'), ('guest_chat_sessions', '1', '游客每日对话会话限制'), ('guest_chat_messages', '20', '游客每日对话消息限制'), ('guest_agent_messages', '20', '游客每日智能体消息限制'), ('admin_password', 'admin123', '管理员密码'), + ('app_developer', 'OpenClaw Team', '开发者'), + ('app_update_date', '2026-04-27', '更新日期'), + ('app_technology', '智谱 GLM-4.5-Air 大模型', '技术基础'), + ('app_description', '提供智能对话、多种智能体服务', '应用简介'), + ('privacy_policy_url', '', '隐私政策链接'), + ('user_agreement_url', '', '用户协议链接'), ] for key, value, desc in default_configs: cursor.execute('INSERT INTO system_configs (key, value, description) VALUES (?, ?, ?)', (key, value, desc)) @@ -1347,13 +1353,19 @@ def get_frontend_config(): 'chat_config': dict(chat_config) if chat_config else None, 'system': { 'appName': system.get('app_name', 'AI助手'), - 'version': system.get('app_version', '3.6.0'), + 'version': system.get('app_version', '3.10.0'), 'enableSearch': system.get('enable_search', 'true') == 'true', 'guestLimits': { 'chatSessions': int(system.get('guest_chat_sessions', '1')), 'chatMessages': int(system.get('guest_chat_messages', '20')), 'agentMessages': int(system.get('guest_agent_messages', '20')), - } + }, + 'developer': system.get('app_developer', 'OpenClaw Team'), + 'updateDate': system.get('app_update_date', '2026-04-27'), + 'technology': system.get('app_technology', '智谱 GLM-4.5-Air 大模型'), + 'description': system.get('app_description', '提供智能对话、多种智能体服务'), + 'privacyPolicyUrl': system.get('privacy_policy_url', ''), + 'userAgreementUrl': system.get('user_agreement_url', ''), } } diff --git a/www/admin.js b/www/admin.js index 5362cb0..f063e84 100644 --- a/www/admin.js +++ b/www/admin.js @@ -1355,6 +1355,26 @@ async function loadSystemPage(content) { +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+

游客使用限制

@@ -1379,6 +1399,18 @@ async function loadSystemPage(content) {
+

链接配置

+ +
+ + +
+ +
+ + +
+ @@ -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); diff --git a/www/app.js b/www/app.js index 95663b4..6b7cce0 100644 --- a/www/app.js +++ b/www/app.js @@ -1602,8 +1602,8 @@ function renderProfilePage() { @@ -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 = `
@@ -2535,22 +2542,22 @@ function showAboutPage() {
-
AI助手
-
v3.5.0
+
${appName}
+
v${version}
-

基于智谱 GLM-4.5-Air 大模型

-

提供智能对话、多种智能体服务

+

基于 ${technology}

+

${description}

开发者 - OpenClaw Team + ${developer}
更新日期 - 2026-04-27 + ${updateDate}