修改主题色

This commit is contained in:
aaron 2025-05-09 12:13:20 +08:00
parent 1a607c1ee1
commit c2b949919f
2 changed files with 38 additions and 60 deletions

View File

@ -93,23 +93,23 @@ onUnmounted(() => {
<style> <style>
:root { :root {
--color-bg-primary: #343541; --color-bg-primary: #ffffff;
--color-bg-secondary: #202123; --color-bg-secondary: #f8f9fa;
--color-bg-elevated: #2a2b32; --color-bg-elevated: #ffffff;
--color-bg-card: #444654; --color-bg-card: #f8f9fa;
--color-text-primary: #ececf1; --color-text-primary: #2c3e50;
--color-text-secondary: #9fa6b1; --color-text-secondary: #6c757d;
--color-text-tertiary: #565869; --color-text-tertiary: #8c98a4;
--color-text-disabled: #6b7280; --color-text-disabled: #adb5bd;
--color-divider: rgba(255, 255, 255, 0.1); --color-divider: rgba(0, 0, 0, 0.1);
--color-border: rgba(255, 255, 255, 0.1); --color-border: rgba(0, 0, 0, 0.1);
--color-border-hover: rgba(255, 255, 255, 0.2); --color-border-hover: rgba(0, 0, 0, 0.2);
--color-accent: #66a3ff; --color-accent: #3355ff;
--color-accent-hover: #4d8fff; --color-accent-hover: #2244ee;
--color-accent-light: rgba(102, 163, 255, 0.1); --color-accent-light: rgba(51, 85, 255, 0.1);
--font-weight-light: 300; --font-weight-light: 300;
--font-weight-regular: 400; --font-weight-regular: 400;
@ -156,8 +156,8 @@ body {
.sidebar { .sidebar {
width: var(--sidebar-width); width: var(--sidebar-width);
height: 100vh; height: 100vh;
background-color: var(--color-bg-secondary); background-color: var(--color-bg-elevated);
border-right: 1px solid var(--color-divider); border-right: 1px solid var(--color-border);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@ -179,7 +179,7 @@ body {
.title-text { .title-text {
font-size: 1.8rem; font-size: 1.8rem;
font-weight: 800; font-weight: 800;
background: linear-gradient(135deg, #66a3ff 0%, #3355ff 100%); background: linear-gradient(135deg, var(--color-accent) 0%, #2244ee 100%);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
background-clip: text; background-clip: text;
@ -233,11 +233,12 @@ body {
} }
.agent-item:hover { .agent-item:hover {
background-color: var(--color-bg-elevated); background-color: var(--color-bg-secondary);
} }
.agent-item.router-link-active { .agent-item.router-link-active {
background-color: var(--color-bg-elevated); background-color: var(--color-accent-light);
color: var(--color-accent);
} }
.agent-icon { .agent-icon {
@ -262,6 +263,7 @@ body {
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
border-top: 1px solid var(--color-divider); border-top: 1px solid var(--color-divider);
border: 1px solid var(--color-border);
} }
.user-section:hover { .user-section:hover {
@ -278,12 +280,12 @@ body {
width: 2.5rem; width: 2.5rem;
height: 2.5rem; height: 2.5rem;
border-radius: 50%; border-radius: 50%;
background: #3355ff33; background: var(--color-accent-light);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 1rem; font-size: 1rem;
color: #3355ff; color: var(--color-accent);
font-weight: bold; font-weight: bold;
} }

View File

@ -437,7 +437,7 @@ onUnmounted(() => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
background-color: #343541; background-color: var(--color-bg-primary);
} }
/* 访问限制提示样式 */ /* 访问限制提示样式 */
@ -507,7 +507,7 @@ onUnmounted(() => {
} }
.login-prompt-content { .login-prompt-content {
background-color: var(--color-bg-card); background-color: var(--color-bg-elevated);
border-radius: var(--border-radius); border-radius: var(--border-radius);
padding: 2rem; padding: 2rem;
text-align: center; text-align: center;
@ -568,7 +568,7 @@ onUnmounted(() => {
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: 0; min-height: 0;
background-color: #343541; background-color: var(--color-bg-primary);
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
@ -579,7 +579,7 @@ onUnmounted(() => {
flex-direction: column; flex-direction: column;
min-width: 0; min-width: 0;
min-height: 0; min-height: 0;
background-color: #343541; background-color: var(--color-bg-primary);
} }
.chat-window { .chat-window {
@ -641,13 +641,13 @@ onUnmounted(() => {
} }
.user-message .message-content { .user-message .message-content {
background-color: #2563eb; background-color: var(--color-accent);
color: white; color: white;
border-radius: 1rem 1rem 0 1rem; border-radius: 1rem 1rem 0 1rem;
} }
.ai-message .message-content { .ai-message .message-content {
background-color: #1f2937; background-color: var(--color-bg-secondary);
color: var(--color-text-primary); color: var(--color-text-primary);
border-radius: 1rem 1rem 1rem 0; border-radius: 1rem 1rem 1rem 0;
} }
@ -683,7 +683,7 @@ onUnmounted(() => {
.input-container { .input-container {
padding: 1.5rem 2rem; padding: 1.5rem 2rem;
background-color: var(--color-bg-primary); background-color: var(--color-bg-primary);
border-top: 1px solid var(--color-divider); border-top: 1px solid var(--color-border);
} }
.input-wrapper { .input-wrapper {
@ -702,7 +702,7 @@ onUnmounted(() => {
max-height: 8rem; max-height: 8rem;
padding: 0.75rem 1rem; padding: 0.75rem 1rem;
padding-right: 3rem; padding-right: 3rem;
background-color: var(--color-bg-elevated); background-color: var(--color-bg-secondary);
border: 1px solid var(--color-border); border: 1px solid var(--color-border);
border-radius: var(--border-radius); border-radius: var(--border-radius);
color: var(--color-text-primary); color: var(--color-text-primary);
@ -711,15 +711,10 @@ onUnmounted(() => {
resize: none; resize: none;
outline: none; outline: none;
transition: border-color 0.2s ease; transition: border-color 0.2s ease;
text-align: left;
overflow-y: auto;
} }
.message-input::placeholder { .message-input::placeholder {
color: var(--color-text-secondary); color: var(--color-text-secondary);
opacity: 1;
line-height: 1rem;
text-align: left;
} }
.message-input:focus { .message-input:focus {
@ -763,33 +758,17 @@ onUnmounted(() => {
} }
:deep(.markdown-body) { :deep(.markdown-body) {
color: inherit; color: var(--color-text-primary);
font-size: 1rem;
line-height: 1.6;
width: 100%;
overflow-wrap: break-word;
word-break: break-word;
} }
:deep(.markdown-body pre) { :deep(.markdown-body pre) {
background-color: rgba(0, 0, 0, 0.2); background-color: var(--color-bg-secondary);
border-radius: 0.5rem; border: 1px solid var(--color-border);
padding: 1rem;
margin: 1rem 0;
overflow-x: auto;
} }
:deep(.markdown-body code) { :deep(.markdown-body code) {
background-color: rgba(0, 0, 0, 0.2); background-color: var(--color-bg-secondary);
padding: 0.2em 0.4em; color: var(--color-text-primary);
border-radius: 0.25rem;
font-family: monospace;
font-size: 0.9em;
}
:deep(.markdown-body pre code) {
background-color: transparent;
padding: 0;
} }
:deep(.markdown-body p) { :deep(.markdown-body p) {
@ -801,11 +780,8 @@ onUnmounted(() => {
} }
:deep(.markdown-body blockquote) { :deep(.markdown-body blockquote) {
background-color: var(--color-bg-secondary);
border-left: 4px solid var(--color-accent); border-left: 4px solid var(--color-accent);
margin: 0.5rem 0;
padding: 0.5rem 1rem;
background-color: rgba(0, 0, 0, 0.2);
border-radius: 0 0.25rem 0.25rem 0;
} }
:deep(.markdown-body table) { :deep(.markdown-body table) {
@ -822,7 +798,7 @@ onUnmounted(() => {
} }
:deep(.markdown-body th) { :deep(.markdown-body th) {
background-color: rgba(0, 0, 0, 0.2); background-color: var(--color-bg-secondary);
} }
:deep(.markdown-body img) { :deep(.markdown-body img) {