chore: 修改前端风格

This commit is contained in:
ViperEkura 2026-03-24 15:37:50 +08:00
parent d7fe954098
commit b007499c7d
7 changed files with 127 additions and 119 deletions

View File

@ -271,8 +271,8 @@ html, body {
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
background: #0f172a;
color: #e2e8f0;
background: #f0f4f8;
color: #1e293b;
-webkit-font-smoothing: antialiased;
}

View File

@ -140,7 +140,7 @@ defineExpose({ scrollToBottom })
display: flex;
flex-direction: column;
height: 100vh;
background: #0f172a;
background: #f8fafc;
min-width: 0;
}
@ -150,14 +150,14 @@ defineExpose({ scrollToBottom })
flex-direction: column;
align-items: center;
justify-content: center;
color: #475569;
color: #94a3b8;
}
.welcome-icon {
width: 64px;
height: 64px;
border-radius: 16px;
background: linear-gradient(135deg, #2563eb, #0ea5e9);
background: linear-gradient(135deg, #2563eb, #3b82f6);
color: white;
display: flex;
align-items: center;
@ -169,7 +169,7 @@ defineExpose({ scrollToBottom })
.welcome h1 {
font-size: 24px;
color: #e2e8f0;
color: #1e293b;
margin: 0 0 8px;
}
@ -182,8 +182,8 @@ defineExpose({ scrollToBottom })
align-items: center;
justify-content: space-between;
padding: 12px 24px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
background: rgba(15, 23, 42, 0.8);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(8px);
}
@ -197,7 +197,7 @@ defineExpose({ scrollToBottom })
.chat-title {
font-size: 16px;
font-weight: 600;
color: #e2e8f0;
color: #1e293b;
margin: 0;
white-space: nowrap;
overflow: hidden;
@ -208,8 +208,8 @@ defineExpose({ scrollToBottom })
font-size: 11px;
padding: 2px 8px;
border-radius: 10px;
background: rgba(37, 99, 235, 0.15);
color: #60a5fa;
background: rgba(37, 99, 235, 0.1);
color: #2563eb;
flex-shrink: 0;
}
@ -217,8 +217,8 @@ defineExpose({ scrollToBottom })
font-size: 11px;
padding: 2px 8px;
border-radius: 10px;
background: rgba(16, 185, 129, 0.15);
color: #6ee7b7;
background: rgba(16, 185, 129, 0.1);
color: #059669;
flex-shrink: 0;
}
@ -233,7 +233,7 @@ defineExpose({ scrollToBottom })
border-radius: 8px;
border: none;
background: none;
color: #64748b;
color: #94a3b8;
cursor: pointer;
display: flex;
align-items: center;
@ -242,8 +242,8 @@ defineExpose({ scrollToBottom })
}
.btn-icon:hover {
background: rgba(255, 255, 255, 0.06);
color: #e2e8f0;
background: rgba(37, 99, 235, 0.08);
color: #2563eb;
}
.messages-container {
@ -257,7 +257,7 @@ defineExpose({ scrollToBottom })
}
.messages-container::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.08);
background: rgba(0, 0, 0, 0.08);
border-radius: 3px;
}
@ -268,8 +268,8 @@ defineExpose({ scrollToBottom })
.load-more-top button {
background: none;
border: 1px solid rgba(255, 255, 255, 0.1);
color: #94a3b8;
border: 1px solid rgba(0, 0, 0, 0.1);
color: #64748b;
padding: 6px 16px;
border-radius: 16px;
cursor: pointer;
@ -278,8 +278,8 @@ defineExpose({ scrollToBottom })
}
.load-more-top button:hover {
background: rgba(255, 255, 255, 0.06);
color: #e2e8f0;
background: rgba(37, 99, 235, 0.06);
color: #2563eb;
}
.messages-list {
@ -289,20 +289,20 @@ defineExpose({ scrollToBottom })
.streaming-thinking {
font-size: 13px;
color: #94a3b8;
color: #64748b;
line-height: 1.6;
white-space: pre-wrap;
padding: 12px;
background: rgba(255, 255, 255, 0.02);
background: #f1f5f9;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.06);
border: 1px solid rgba(0, 0, 0, 0.06);
margin-bottom: 8px;
}
.streaming-content {
font-size: 15px;
line-height: 1.7;
color: #e2e8f0;
color: #1e293b;
word-break: break-word;
}
@ -315,7 +315,8 @@ defineExpose({ scrollToBottom })
}
.streaming-content :deep(pre) {
background: #0d1117;
background: #f1f5f9;
border: 1px solid rgba(0, 0, 0, 0.06);
border-radius: 8px;
padding: 16px;
overflow-x: auto;
@ -329,7 +330,8 @@ defineExpose({ scrollToBottom })
}
.streaming-content :deep(code) {
background: rgba(255, 255, 255, 0.06);
background: rgba(37, 99, 235, 0.08);
color: #2563eb;
padding: 2px 6px;
border-radius: 4px;
font-size: 13px;
@ -338,6 +340,7 @@ defineExpose({ scrollToBottom })
.streaming-content :deep(pre code) {
background: none;
color: inherit;
padding: 0;
}
@ -348,9 +351,9 @@ defineExpose({ scrollToBottom })
}
.streaming-content :deep(blockquote) {
border-left: 3px solid rgba(59, 130, 246, 0.5);
border-left: 3px solid rgba(59, 130, 246, 0.4);
padding-left: 12px;
color: #94a3b8;
color: #64748b;
margin: 8px 0;
}
@ -362,16 +365,16 @@ defineExpose({ scrollToBottom })
.streaming-content :deep(th),
.streaming-content :deep(td) {
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid rgba(0, 0, 0, 0.08);
padding: 8px 12px;
text-align: left;
}
.streaming-content :deep(th) {
background: rgba(255, 255, 255, 0.04);
background: #f1f5f9;
}
.streaming-content :deep(.placeholder) {
color: #475569;
color: #94a3b8;
}
</style>

View File

@ -103,12 +103,12 @@ function copyContent() {
}
.user .avatar {
background: linear-gradient(135deg, #2563eb, #0ea5e9);
background: linear-gradient(135deg, #2563eb, #3b82f6);
color: white;
}
.assistant .avatar {
background: linear-gradient(135deg, #0ea5e9, #06b6d4);
background: linear-gradient(135deg, #3b82f6, #60a5fa);
color: white;
}
@ -120,16 +120,16 @@ function copyContent() {
.thinking-block {
margin-bottom: 8px;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.06);
border: 1px solid rgba(0, 0, 0, 0.06);
overflow: hidden;
}
.thinking-toggle {
width: 100%;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.03);
background: #f8fafc;
border: none;
color: #94a3b8;
color: #64748b;
font-size: 13px;
cursor: pointer;
display: flex;
@ -139,7 +139,7 @@ function copyContent() {
}
.thinking-toggle:hover {
background: rgba(255, 255, 255, 0.06);
background: #f1f5f9;
}
.thinking-toggle .arrow {
@ -154,9 +154,10 @@ function copyContent() {
.thinking-content {
padding: 12px;
font-size: 13px;
color: #94a3b8;
color: #64748b;
line-height: 1.6;
border-top: 1px solid rgba(255, 255, 255, 0.06);
border-top: 1px solid rgba(0, 0, 0, 0.06);
background: #f8fafc;
white-space: pre-wrap;
max-height: 300px;
overflow-y: auto;
@ -165,7 +166,7 @@ function copyContent() {
.message-content {
font-size: 15px;
line-height: 1.7;
color: #e2e8f0;
color: #1e293b;
word-break: break-word;
}
@ -178,7 +179,8 @@ function copyContent() {
}
.message-content :deep(pre) {
background: #0d1117;
background: #f1f5f9;
border: 1px solid rgba(0, 0, 0, 0.06);
border-radius: 8px;
padding: 16px;
overflow-x: auto;
@ -193,7 +195,8 @@ function copyContent() {
}
.message-content :deep(code) {
background: rgba(255, 255, 255, 0.06);
background: rgba(37, 99, 235, 0.08);
color: #2563eb;
padding: 2px 6px;
border-radius: 4px;
font-size: 13px;
@ -202,6 +205,7 @@ function copyContent() {
.message-content :deep(pre code) {
background: none;
color: inherit;
padding: 0;
}
@ -212,9 +216,9 @@ function copyContent() {
}
.message-content :deep(blockquote) {
border-left: 3px solid rgba(59, 130, 246, 0.5);
border-left: 3px solid rgba(59, 130, 246, 0.4);
padding-left: 12px;
color: #94a3b8;
color: #64748b;
margin: 8px 0;
}
@ -226,13 +230,13 @@ function copyContent() {
.message-content :deep(th),
.message-content :deep(td) {
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid rgba(0, 0, 0, 0.08);
padding: 8px 12px;
text-align: left;
}
.message-content :deep(th) {
background: rgba(255, 255, 255, 0.04);
background: #f1f5f9;
}
.message-footer {
@ -251,14 +255,14 @@ function copyContent() {
.token-count,
.message-time {
font-size: 12px;
color: #475569;
color: #94a3b8;
}
.btn-copy,
.btn-delete-msg {
background: none;
border: none;
color: #64748b;
color: #94a3b8;
cursor: pointer;
padding: 4px;
border-radius: 4px;
@ -268,12 +272,12 @@ function copyContent() {
}
.btn-copy:hover {
color: #60a5fa;
background: rgba(96, 165, 250, 0.1);
color: #2563eb;
background: rgba(37, 99, 235, 0.08);
}
.btn-delete-msg:hover {
color: #f87171;
background: rgba(248, 113, 113, 0.1);
color: #ef4444;
background: rgba(239, 68, 68, 0.08);
}
</style>

View File

@ -73,15 +73,15 @@ defineExpose({ focus })
<style scoped>
.message-input {
padding: 16px 24px 12px;
background: #16213e;
border-top: 1px solid rgba(255, 255, 255, 0.06);
background: #ffffff;
border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.input-wrapper {
display: flex;
align-items: flex-end;
background: #1a1a2e;
border: 1px solid rgba(255, 255, 255, 0.08);
align-items: center;
background: #f8fafc;
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 12px;
padding: 8px 12px;
transition: border-color 0.2s;
@ -95,7 +95,7 @@ textarea {
flex: 1;
background: none;
border: none;
color: #e2e8f0;
color: #1e293b;
font-size: 15px;
line-height: 1.5;
resize: none;
@ -105,7 +105,7 @@ textarea {
}
textarea::placeholder {
color: #475569;
color: #94a3b8;
}
textarea:disabled {
@ -124,8 +124,8 @@ textarea:disabled {
height: 36px;
border-radius: 8px;
border: none;
background: rgba(255, 255, 255, 0.06);
color: #475569;
background: #e2e8f0;
color: #94a3b8;
cursor: not-allowed;
display: flex;
align-items: center;
@ -146,7 +146,7 @@ textarea:disabled {
.input-hint {
text-align: center;
font-size: 12px;
color: #374151;
color: #94a3b8;
margin-top: 8px;
}
</style>

View File

@ -136,7 +136,7 @@ function save() {
.settings-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.3);
z-index: 100;
display: flex;
justify-content: flex-end;
@ -145,8 +145,8 @@ function save() {
.settings-panel {
width: 380px;
height: 100vh;
background: #1a1a2e;
border-left: 1px solid rgba(255, 255, 255, 0.06);
background: #ffffff;
border-left: 1px solid rgba(0, 0, 0, 0.06);
display: flex;
flex-direction: column;
overflow-y: auto;
@ -157,19 +157,19 @@ function save() {
align-items: center;
justify-content: space-between;
padding: 20px 24px;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.settings-header h3 {
margin: 0;
font-size: 16px;
color: #e2e8f0;
color: #1e293b;
}
.btn-close {
background: none;
border: none;
color: #64748b;
color: #94a3b8;
cursor: pointer;
padding: 4px;
border-radius: 4px;
@ -177,8 +177,8 @@ function save() {
}
.btn-close:hover {
color: #e2e8f0;
background: rgba(255, 255, 255, 0.06);
color: #1e293b;
background: rgba(37, 99, 235, 0.08);
}
.settings-body {
@ -193,14 +193,14 @@ function save() {
.form-group label {
display: block;
font-size: 13px;
color: #94a3b8;
color: #64748b;
margin-bottom: 8px;
font-weight: 500;
}
.value-display {
float: right;
color: #60a5fa;
color: #2563eb;
font-weight: 600;
}
@ -209,10 +209,10 @@ function save() {
.form-group select {
width: 100%;
padding: 10px 12px;
background: #0f172a;
border: 1px solid rgba(255, 255, 255, 0.08);
background: #f8fafc;
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 8px;
color: #e2e8f0;
color: #1e293b;
font-size: 14px;
font-family: inherit;
outline: none;
@ -236,7 +236,7 @@ function save() {
}
.form-group select option {
background: #0f172a;
background: #ffffff;
}
.form-row {
@ -253,7 +253,7 @@ function save() {
height: 4px;
-webkit-appearance: none;
appearance: none;
background: rgba(255, 255, 255, 0.1);
background: #e2e8f0;
border-radius: 2px;
outline: none;
}
@ -266,14 +266,14 @@ function save() {
border-radius: 50%;
background: #2563eb;
cursor: pointer;
border: 2px solid #0f172a;
border: 2px solid #ffffff;
}
.range-labels {
display: flex;
justify-content: space-between;
font-size: 11px;
color: #475569;
color: #94a3b8;
margin-top: 4px;
}
@ -292,7 +292,7 @@ function save() {
height: 24px;
border-radius: 12px;
border: none;
background: rgba(255, 255, 255, 0.1);
background: #e2e8f0;
cursor: pointer;
position: relative;
transition: background 0.2s;
@ -300,7 +300,7 @@ function save() {
}
.toggle.on {
background: #4f46e5;
background: #2563eb;
}
.toggle-thumb {
@ -312,6 +312,7 @@ function save() {
border-radius: 50%;
background: white;
transition: transform 0.2s;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.toggle.on .toggle-thumb {
@ -320,7 +321,7 @@ function save() {
.settings-footer {
padding: 16px 24px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
border-top: 1px solid rgba(0, 0, 0, 0.06);
display: flex;
justify-content: flex-end;
gap: 8px;
@ -329,17 +330,17 @@ function save() {
.btn-cancel {
padding: 8px 20px;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.1);
border: 1px solid rgba(0, 0, 0, 0.1);
background: none;
color: #94a3b8;
color: #64748b;
font-size: 14px;
cursor: pointer;
transition: all 0.15s;
}
.btn-cancel:hover {
background: rgba(255, 255, 255, 0.06);
color: #e2e8f0;
background: rgba(37, 99, 235, 0.06);
color: #1e293b;
}
.btn-save {

View File

@ -75,8 +75,8 @@ function onContextMenu(e, conv) {
.sidebar {
width: 280px;
min-width: 280px;
background: #1a1a2e;
border-right: 1px solid rgba(255, 255, 255, 0.06);
background: #ffffff;
border-right: 1px solid rgba(0, 0, 0, 0.08);
display: flex;
flex-direction: column;
height: 100vh;
@ -89,10 +89,10 @@ function onContextMenu(e, conv) {
.btn-new {
width: 100%;
padding: 10px 16px;
background: rgba(37, 99, 235, 0.15);
border: 1px dashed rgba(37, 99, 235, 0.4);
background: rgba(37, 99, 235, 0.08);
border: 1px dashed rgba(37, 99, 235, 0.35);
border-radius: 10px;
color: #60a5fa;
color: #2563eb;
font-size: 14px;
cursor: pointer;
display: flex;
@ -102,8 +102,8 @@ function onContextMenu(e, conv) {
}
.btn-new:hover {
background: rgba(37, 99, 235, 0.25);
border-color: rgba(37, 99, 235, 0.6);
background: rgba(37, 99, 235, 0.15);
border-color: rgba(37, 99, 235, 0.5);
}
.btn-new .icon {
@ -122,7 +122,7 @@ function onContextMenu(e, conv) {
}
.conversation-list::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.1);
border-radius: 2px;
}
@ -137,11 +137,11 @@ function onContextMenu(e, conv) {
}
.conversation-item:hover {
background: rgba(255, 255, 255, 0.05);
background: rgba(37, 99, 235, 0.06);
}
.conversation-item.active {
background: rgba(37, 99, 235, 0.2);
background: rgba(37, 99, 235, 0.12);
}
.conv-info {
@ -151,7 +151,7 @@ function onContextMenu(e, conv) {
.conv-title {
font-size: 14px;
color: #e2e8f0;
color: #1e293b;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -159,7 +159,7 @@ function onContextMenu(e, conv) {
.conv-meta {
font-size: 12px;
color: #64748b;
color: #94a3b8;
margin-top: 2px;
}
@ -167,7 +167,7 @@ function onContextMenu(e, conv) {
opacity: 0;
background: none;
border: none;
color: #64748b;
color: #94a3b8;
cursor: pointer;
padding: 4px;
border-radius: 4px;
@ -180,14 +180,14 @@ function onContextMenu(e, conv) {
}
.btn-delete:hover {
color: #f87171;
background: rgba(248, 113, 113, 0.1);
color: #ef4444;
background: rgba(239, 68, 68, 0.08);
}
.loading-more,
.empty-hint {
text-align: center;
color: #475569;
color: #94a3b8;
font-size: 13px;
padding: 20px;
}

View File

@ -1,67 +1,67 @@
/* highlight.js - GitHub Dark theme override for code blocks */
/* highlight.js - Light theme for code blocks */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');
.hljs {
color: #e6edf3;
background: #0d1117;
color: #24292f;
background: #f1f5f9;
}
.hljs-comment,
.hljs-quote {
color: #8b949e;
color: #6e7781;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #ff7b72;
color: #cf222e;
}
.hljs-string,
.hljs-addition {
color: #a5d6ff;
color: #0a3069;
}
.hljs-number,
.hljs-literal {
color: #79c0ff;
color: #0550ae;
}
.hljs-built_in,
.hljs-builtin-name {
color: #ffa657;
color: #953800;
}
.hljs-function .hljs-title,
.hljs-title.function_ {
color: #d2a8ff;
color: #8250df;
}
.hljs-variable,
.hljs-template-variable {
color: #ffa657;
color: #953800;
}
.hljs-attr,
.hljs-attribute {
color: #79c0ff;
color: #0550ae;
}
.hljs-selector-class {
color: #7ee787;
color: #116329;
}
.hljs-meta {
color: #79c0ff;
color: #0550ae;
}
.hljs-deletion {
color: #ffa198;
color: #82071e;
background: rgba(248, 81, 73, 0.1);
}
.hljs-addition {
color: #aff5b4;
background: rgba(46, 160, 67, 0.15);
color: #116329;
background: rgba(46, 160, 67, 0.1);
}