From b46de0328c5b176210040ad3649a586461ae09c2 Mon Sep 17 00:00:00 2001 From: canglan Date: Wed, 6 May 2026 16:45:43 +0800 Subject: [PATCH] =?UTF-8?q?v1.0.2=E4=BF=AE=E5=A4=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Installer.php | 10 ++--- app/Views/chat.php | 15 +++++-- app/Views/config.php | 16 ++++--- app/Views/login.php | 10 ++++- assets/css/style.css | 91 ++++++++++++++++++++++++++++++-------- assets/js/chat.js | 8 ++-- assets/js/upload.js | 2 +- public/install.php | 9 ++-- 8 files changed, 120 insertions(+), 41 deletions(-) diff --git a/app/Services/Installer.php b/app/Services/Installer.php index 9f607d9..04b7014 100644 --- a/app/Services/Installer.php +++ b/app/Services/Installer.php @@ -87,27 +87,27 @@ class Installer [ 'name' => '智能助手', 'prompt' => '你是一个全能的智能助手,善于回答各种问题,提供准确、有帮助的回答。', - 'icon' => '🤖', + 'icon' => 'A', ], [ 'name' => '代码专家', 'prompt' => '你是一个专业的编程专家,精通多种编程语言和技术框架,擅长代码编写、调试和优化。', - 'icon' => '💻', + 'icon' => '', ], [ 'name' => '翻译官', 'prompt' => '你是一个专业的翻译官,精通中文、英文、日文等多种语言,提供准确、流畅的翻译服务。', - 'icon' => '🌐', + 'icon' => 'T', ], [ 'name' => '写作助手', 'prompt' => '你是一个专业的写作助手,擅长各类文体的写作,包括文章、报告、邮件、创意写作等。', - 'icon' => '✍️', + 'icon' => 'W', ], [ 'name' => '数学家', 'prompt' => '你是一个数学专家,精通各领域的数学知识,善于解答数学问题并提供详细的解题步骤。', - 'icon' => '🔢', + 'icon' => 'M', ], ]; diff --git a/app/Views/chat.php b/app/Views/chat.php index cd8189d..9f2ad22 100644 --- a/app/Views/chat.php +++ b/app/Views/chat.php @@ -13,7 +13,9 @@
- + - ⚙️ 设置 + + + 设置 +
@@ -51,7 +56,9 @@
- +
@@ -129,7 +136,7 @@ async function loadPersonalities() { personalitiesData.forEach(p => { const option = document.createElement('option'); option.value = p.id; - option.textContent = (p.icon || '🤖') + ' ' + p.name; + option.textContent = (p.icon ? p.icon + ' ' : '') + p.name; select.appendChild(option); }); } catch (err) { diff --git a/app/Views/config.php b/app/Views/config.php index b3a2dda..1d475c6 100644 --- a/app/Views/config.php +++ b/app/Views/config.php @@ -1,7 +1,13 @@
-

⚙️ 系统配置

- ← 返回聊天 +

+ + 系统配置 +

+ + + 返回聊天 +
@@ -25,8 +31,8 @@
- - + +
@@ -188,7 +194,7 @@ const ConfigPage = { list.innerHTML = this.personalities.map(p => `
- ${p.icon || '🤖'} ${this.escapeHtml(p.name)} + ${p.icon ? '' + this.escapeHtml(p.icon) + '' : ''}${this.escapeHtml(p.name)} ${p.is_preset ? '预设' : '自定义'}
${!p.is_preset ? '' : ''} diff --git a/app/Views/login.php b/app/Views/login.php index c9b54bf..dd66bf4 100644 --- a/app/Views/login.php +++ b/app/Views/login.php @@ -1,6 +1,14 @@