diff --git a/src/assets/custom.png b/src/assets/custom.png new file mode 100644 index 0000000..a08241b Binary files /dev/null and b/src/assets/custom.png differ diff --git a/src/assets/user.png b/src/assets/user.png new file mode 100644 index 0000000..8328b07 Binary files /dev/null and b/src/assets/user.png differ diff --git a/src/components/chat/HistoryButton.vue b/src/components/chat/HistoryButton.vue index e5be27f..56bb10b 100644 --- a/src/components/chat/HistoryButton.vue +++ b/src/components/chat/HistoryButton.vue @@ -93,22 +93,23 @@ const handleDelete = async (conversationId) => { display: flex; align-items: center; gap: 4px; - border: none; + border: none !important; background: transparent !important; - + box-shadow: none !important; + outline: none !important; + &.icon-only { width: 32px; padding: 0; } - &:hover { - color: #07c160 !important; - background: transparent !important; - } - + &:hover, &:focus { - outline: none; - box-shadow: none; + color: var(--el-color-primary) !important; + background: transparent !important; + border: none !important; + box-shadow: none !important; + outline: none !important; } :deep(.el-icon) { @@ -116,6 +117,24 @@ const handleDelete = async (conversationId) => { } } +:deep(.el-dropdown__trigger) { + .el-button { + border: none !important; + background: transparent !important; + box-shadow: none !important; + outline: none !important; + + &:hover, + &:focus { + border: none !important; + background: transparent !important; + box-shadow: none !important; + outline: none !important; + color: var(--el-color-primary) !important; + } + } +} + :deep(.el-dropdown-menu__item) { font-size: 13px; padding: 8px 16px; diff --git a/src/components/settings/DisplayModeSettings.vue b/src/components/settings/DisplayModeSettings.vue index 4caf72a..83758ca 100644 --- a/src/components/settings/DisplayModeSettings.vue +++ b/src/components/settings/DisplayModeSettings.vue @@ -7,13 +7,13 @@ size="small" class="display-mode-group" > - + 默认 - + 浅色 - + 深色 diff --git a/src/components/settings/ThemeSettings.vue b/src/components/settings/ThemeSettings.vue index 203ad29..e8c6f00 100644 --- a/src/components/settings/ThemeSettings.vue +++ b/src/components/settings/ThemeSettings.vue @@ -32,8 +32,10 @@ const filteredThemes = computed(() => { const themeLabels = { default: '默认', fresh: '清新', + classic: '经典', warm: '暖色', business: '商务', + gray: '灰色', }; const getThemeLabel = (themeName) => { diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 679e083..cdaae61 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -9,7 +9,7 @@ \ No newline at end of file diff --git a/src/views/chat/ChatModeSelector.vue b/src/views/chat/ChatModeSelector.vue index bd1815d..5688b53 100644 --- a/src/views/chat/ChatModeSelector.vue +++ b/src/views/chat/ChatModeSelector.vue @@ -8,9 +8,14 @@ >
+
Logo
+ +
- 设置 + 设置
@@ -101,7 +106,7 @@ onUnmounted(() => { .mode-selector { width: 240px; height: 100%; - background-color: var(--el-bg-color); + background-color: var(--el-color-primary-light-7); border-right: 1px solid var(--el-border-color-light); position: relative; z-index: 10; @@ -165,12 +170,12 @@ onUnmounted(() => { } &.is-active { - background-image: linear-gradient(135deg, var(--el-color-primary) 0%, var(--el-color-primary-light-3) 100%); - color: white; + background-image: linear-gradient(135deg, var(--el-color-primary) 0%, var(--el-color-primary-light-3) 100%); + color: var(--el-color-white); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); .el-icon { - color: white; + color: var(--el-color-white); } } @@ -234,6 +239,26 @@ onUnmounted(() => { } .mode-selector.collapsed { + .mode-header { + padding: 0; + display: flex; + align-items: center; + justify-content: center; + height: 60px; + + .mode-header-collapsed-logo { + display: flex; + align-items: center; + height: 100%; + } + + .mode-header-icon.collapsed { + height: 32px; + filter: drop-shadow(0 0 0.75em rgba(var(--el-color-primary-rgb), 0.6)); + vertical-align: middle; + } + } + .mode-menu { padding: 8px 12px; } @@ -267,66 +292,236 @@ onUnmounted(() => { } .sidebar-footer { - padding: 8px; - margin-top: auto; + height: 48px; + padding: 0 12px; + display: flex; + align-items: center; + justify-content: center; } .settings-button { display: flex; align-items: center; - height: 44px; - line-height: 44px; + height: 40px; + width: 100%; + padding: 0 12px; color: var(--el-text-color-regular); border-radius: 8px; - padding: 0 12px !important; cursor: pointer; - overflow: hidden; - - body:not(.no-animations) & { - transition: background-color 0.3s, color 0.3s; - } - + transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; + .el-icon { margin-right: 12px; font-size: 18px; width: 18px; - color: var(--el-text-color-regular); - body:not(.no-animations) & { - transition: color 0.3s; - } + } + + &:hover { + background-color: var(--el-fill-color-light); + color: var(--el-color-primary); } .button-text { font-size: 14px; - margin-left: 12px; white-space: nowrap; opacity: 1; - transform: translateX(0); - - body:not(.no-animations) & { - transition: opacity 0.3s ease-in-out; - } - } - - &:hover { - background-color: var(--el-color-primary-light-9); - color: var(--el-color-primary); - - .el-icon { - color: var(--el-color-primary); - } + transition: opacity 0.3s ease-in-out; } } .mode-selector.collapsed { .sidebar-footer { - padding: 8px 12px; - .settings-button { - width: 40px; - height: 40px; - } + padding: 0; } + .settings-button { + justify-content: center; + width: 40px; + padding: 0; + + .el-icon { + margin-right: 0; + } + + .button-text { + opacity: 0; + pointer-events: none; + } + + &:hover { + background-color: var(--el-fill-color-light); + } + } +} + + + + + + + \ No newline at end of file diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 8729542..80a5328 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -39,7 +39,7 @@ const handleModeChange = (mode) => { height: 100vh; margin: 0; padding: 0; - background-color: #f5f5f5; + background-color: var(--el-bg-color-page); } .chat-container { @@ -52,7 +52,7 @@ const handleModeChange = (mode) => { flex: 1; height: 100%; overflow: hidden; - background-color: #f5f5f5; + background-color: var(--el-bg-color-page); position: relative; } diff --git a/vite.config.js b/vite.config.js index 35d4210..090cf1d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,7 +9,9 @@ import mkcert from "vite-plugin-mkcert"; // https://vite.dev/config/ export default defineConfig(({ command, mode }) => { const env = loadEnv(mode, process.cwd()) - console.log('env', env) + console.log('\x1b[36m%s\x1b[0m', '[VITE_APP_ENV]', env.VITE_APP_ENV) + console.log('\x1b[33m%s\x1b[0m', '[VITE_APP_BASE_API]', env.VITE_APP_BASE_API) + // 将环境变量转换为 process.env 格式 const processEnv = {} Object.keys(env).forEach(key => { @@ -37,7 +39,7 @@ export default defineConfig(({ command, mode }) => { css: { preprocessorOptions: { scss: { - additionalData: `` + api: 'modern-compiler' } } },