diff --git a/www/app.js b/www/app.js index d8520c0..0a0fdfa 100644 --- a/www/app.js +++ b/www/app.js @@ -179,14 +179,24 @@ function openConversation(id) {
- - +
+ + +
+
+ + +
@@ -264,6 +274,32 @@ function openConversation(id) { }); } + // 绑定置顶置底按钮事件 + const scrollTopBtn = document.getElementById('scrollTopBtn'); + const scrollBottomBtn = document.getElementById('scrollBottomBtn'); + + if (scrollTopBtn) { + scrollTopBtn.addEventListener('click', () => { + if (messagesContainer) { + messagesContainer.scrollTo({ + top: 0, + behavior: 'smooth' + }); + } + }); + } + + if (scrollBottomBtn) { + scrollBottomBtn.addEventListener('click', () => { + if (messagesContainer) { + messagesContainer.scrollTo({ + top: messagesContainer.scrollHeight, + behavior: 'smooth' + }); + } + }); + } + // 绑定输入事件 userInput.addEventListener('keydown', handleKeyDown); userInput.addEventListener('input', (e) => autoResize(e.target)); diff --git a/www/index.html b/www/index.html index 9fce4f5..f511bc8 100644 --- a/www/index.html +++ b/www/index.html @@ -8,12 +8,12 @@ AI助手 - +
- - + + \ No newline at end of file diff --git a/www/style.css b/www/style.css index 1d0a5c4..828c3cb 100644 --- a/www/style.css +++ b/www/style.css @@ -585,12 +585,24 @@ body { /* 功能开关栏 */ .feature-bar { display: flex; + justify-content: space-between; + align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,0.95); border-top: 1px solid var(--border-color); } +.feature-left { + display: flex; + gap: 8px; +} + +.feature-right { + display: flex; + gap: 4px; +} + .feature-btn { display: flex; align-items: center; @@ -620,6 +632,18 @@ body { flex-shrink: 0; } +/* 导航按钮样式 */ +.nav-btn { + padding: 6px 8px; + min-width: 32px; +} + +.nav-btn:hover { + background: var(--primary); + border-color: var(--primary); + color: white; +} + /* 思考内容块 */ .thinking-block { margin-bottom: 12px;