diff --git a/dashboard/public/favicon.svg b/dashboard/public/favicon.svg index 6893eb1..2ca1ece 100644 --- a/dashboard/public/favicon.svg +++ b/dashboard/public/favicon.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/dashboard/src/App.vue b/dashboard/src/App.vue index 3b91f0f..f698b42 100644 --- a/dashboard/src/App.vue +++ b/dashboard/src/App.vue @@ -21,6 +21,8 @@ const sidebarCollapsed = ref(false) .main-content { flex: 1; margin-left: 260px; padding: 2rem; min-height: 100vh; transition: margin-left 0.3s; } .main-content.no-sidebar { margin-left: 0; } .sidebar-collapsed .main-content { margin-left: 70px; } -@media (max-width: 1024px) { .main-content { margin-left: 70px; } } -@media (max-width: 768px) { .main-content { margin-left: 0; } } +@media (max-width: 768px) { + .main-content { margin-left: 70px; } + .sidebar-collapsed .main-content { margin-left: 0; } +} diff --git a/dashboard/src/assets/hero.png b/dashboard/src/assets/hero.png deleted file mode 100644 index cc51a3d..0000000 Binary files a/dashboard/src/assets/hero.png and /dev/null differ diff --git a/dashboard/src/assets/vite.svg b/dashboard/src/assets/vite.svg deleted file mode 100644 index 5101b67..0000000 --- a/dashboard/src/assets/vite.svg +++ /dev/null @@ -1 +0,0 @@ -Vite diff --git a/dashboard/src/assets/vue.svg b/dashboard/src/assets/vue.svg deleted file mode 100644 index 770e9d3..0000000 --- a/dashboard/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/dashboard/src/components/AppSidebar.vue b/dashboard/src/components/AppSidebar.vue index d9ada9c..b698df3 100644 --- a/dashboard/src/components/AppSidebar.vue +++ b/dashboard/src/components/AppSidebar.vue @@ -1,119 +1,125 @@ diff --git a/dashboard/src/components/BaseButton.vue b/dashboard/src/components/BaseButton.vue deleted file mode 100644 index dd5020f..0000000 --- a/dashboard/src/components/BaseButton.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - diff --git a/dashboard/src/components/EmptyState.vue b/dashboard/src/components/EmptyState.vue index 9fc8e87..84421e9 100644 --- a/dashboard/src/components/EmptyState.vue +++ b/dashboard/src/components/EmptyState.vue @@ -1,6 +1,6 @@ - {{ icon }} + {{ title }} {{ description }} @@ -11,10 +11,6 @@ diff --git a/dashboard/src/index.js b/dashboard/src/index.js index 964003c..d4d18e0 100644 --- a/dashboard/src/index.js +++ b/dashboard/src/index.js @@ -1,9 +1,3 @@ -// 导出 composables -export * from './composables/useApi.js' -export * from './composables/useFormatters.js' -export * from './composables/useUtils.js' - // 导出组件 -export { default as LoadingSpinner } from './components/LoadingSpinner.vue' export { default as ErrorMessage } from './components/ErrorMessage.vue' export { default as EmptyState } from './components/EmptyState.vue' diff --git a/dashboard/src/style.css b/dashboard/src/style.css index dc737fb..9ac0253 100644 --- a/dashboard/src/style.css +++ b/dashboard/src/style.css @@ -4,9 +4,9 @@ --bg: #fff; --border: #e5e4e7; --code-bg: #f4f3ec; - --accent: #aa3bff; - --accent-bg: rgba(170, 59, 255, 0.1); - --accent-border: rgba(170, 59, 255, 0.5); + --accent: #2563eb; + --accent-bg: rgba(37, 99, 235, 0.1); + --accent-border: rgba(37, 99, 235, 0.5); --social-bg: rgba(244, 243, 236, 0.5); --shadow: rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; @@ -37,9 +37,9 @@ --bg: #16171d; --border: #2e303a; --code-bg: #1f2028; - --accent: #c084fc; - --accent-bg: rgba(192, 132, 252, 0.15); - --accent-border: rgba(192, 132, 252, 0.5); + --accent: #60a5fa; + --accent-bg: rgba(96, 165, 250, 0.15); + --accent-border: rgba(96, 165, 250, 0.5); --social-bg: rgba(47, 48, 58, 0.5); --shadow: rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; diff --git a/dashboard/src/views/AboutView.vue b/dashboard/src/views/AboutView.vue deleted file mode 100644 index 00f7bac..0000000 --- a/dashboard/src/views/AboutView.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - 关于此项目 - 这是 Luxx 项目的管理仪表板前端。 - 技术栈:Vue 3 + Vue Router + Pinia + Vite - 返回首页 - - - - - - \ No newline at end of file diff --git a/dashboard/src/views/ConversationDetailView.vue b/dashboard/src/views/ConversationDetailView.vue index 914667e..115d9d3 100644 --- a/dashboard/src/views/ConversationDetailView.vue +++ b/dashboard/src/views/ConversationDetailView.vue @@ -7,14 +7,14 @@ 开始对话吧! - {{ msg.role === 'user' ? '👤' : '🤖' }} + {{ msg.role === 'user' ? 'U' : 'A' }} {{ msg.content }} {{ formatTime(msg.created_at) }} - 🤖 + A {{ streamContent }}▋ diff --git a/dashboard/src/views/ConversationsView.vue b/dashboard/src/views/ConversationsView.vue index 9f75868..21dd0bd 100644 --- a/dashboard/src/views/ConversationsView.vue +++ b/dashboard/src/views/ConversationsView.vue @@ -15,7 +15,7 @@ {{ c.title || '未命名会话' }} {{ formatDate(c.created_at) }} • {{ c.model || '默认模型' }} - 🗑️ + 删除 @@ -150,7 +150,8 @@ onMounted(fetchData) .card:hover { border-color: var(--accent); transform: translateY(-2px); } .card h3 { margin: 0 0 0.5rem; color: var(--text-h); } .card p { margin: 0; color: var(--text); font-size: 0.875rem; } -.btn-delete { background: transparent; border: none; font-size: 1.2rem; cursor: pointer; padding: 0.5rem; } +.btn-delete { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-border); font-size: 0.875rem; cursor: pointer; padding: 0.25rem 0.75rem; border-radius: 6px; transition: all 0.2s; } +.btn-delete:hover { background: var(--accent); color: white; } .pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); } .pagination button { padding: 0.5rem 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; } .pagination button:disabled { opacity: 0.5; cursor: not-allowed; } diff --git a/dashboard/src/views/HomeView.vue b/dashboard/src/views/HomeView.vue index 4bad69f..b55606a 100644 --- a/dashboard/src/views/HomeView.vue +++ b/dashboard/src/views/HomeView.vue @@ -4,30 +4,19 @@ 欢迎使用 Luxx 智能会话管理与工具平台 - 💬 开始会话 - 🛠️ 查看工具 + 开始会话 + 查看工具 - 💬{{ stats.conversations }}会话总数 - 🛠️{{ stats.tools }}可用工具 - 📝{{ stats.messages }}消息总数 - 🤖{{ stats.models }}支持模型 + {{ stats.conversations }}会话总数 + {{ stats.tools }}可用工具 + {{ stats.messages }}消息总数 + {{ stats.models }}支持模型 - - 核心功能 - - - {{ f.icon }} - {{ f.title }} - {{ f.desc }} - - - - - + @@ -36,12 +25,6 @@ import { ref, onMounted } from 'vue' import { conversationsAPI, toolsAPI } from '../services/api.js' const stats = ref({ conversations: 0, tools: 0, messages: 0, models: 1 }) -const features = [ - { icon: '💬', title: '智能会话', desc: '支持多模型对话,灵活配置参数' }, - { icon: '🛠️', title: '工具生态', desc: '内置多种工具,扩展系统能力' }, - { icon: '🔐', title: '安全认证', desc: 'JWT Token 授权,安全可靠' }, - { icon: '📊', title: '数据分析', desc: '强大的数据处理能力' } -] onMounted(async () => { try { @@ -61,14 +44,14 @@ onMounted(async () => {
{{ description }}
这是 Luxx 项目的管理仪表板前端。
技术栈:Vue 3 + Vue Router + Pinia + Vite
开始对话吧!
{{ formatDate(c.created_at) }} • {{ c.model || '默认模型' }}
智能会话管理与工具平台
{{ f.desc }}