feat: 视觉优化,修复样式问题

This commit is contained in:
Wenjie Zhang 2026-05-14 20:43:40 +08:00
parent bac93a5d04
commit 5731c9d7cf
3 changed files with 20 additions and 4 deletions

View File

@ -448,6 +448,9 @@ defineExpose({
background: transparent; background: transparent;
} }
}
.remote-install-panel {
.panel-header-text { .panel-header-text {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -396,7 +396,7 @@ provide('settingsModal', {
@sidebar-width: 252px; @sidebar-width: 252px;
@sidebar-collapsed-width: 56px; @sidebar-collapsed-width: 56px;
@sidebar-padding: 6px 8px; @sidebar-padding: 6px 8px;
@sidebar-item-height: 40px; @sidebar-item-height: 36px;
@sidebar-item-padding-x: 10px; @sidebar-item-padding-x: 10px;
@sidebar-icon-size: 18px; @sidebar-icon-size: 18px;
@ -545,7 +545,7 @@ div.header,
background-color: transparent; background-color: transparent;
color: var(--gray-700); color: var(--gray-700);
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 450;
transition: transition:
background-color 0.2s ease-in-out, background-color 0.2s ease-in-out,
border-color 0.2s ease-in-out, border-color 0.2s ease-in-out,
@ -567,7 +567,7 @@ div.header,
margin-left: 8px; margin-left: 8px;
overflow: hidden; overflow: hidden;
line-height: 20px; line-height: 20px;
font-weight: 500; font-weight: 450;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
transition: transition:

View File

@ -4,6 +4,19 @@ import { agentApi, databaseApi, mcpApi, skillApi } from '@/apis'
import { handleChatError } from '@/utils/errorHandler' import { handleChatError } from '@/utils/errorHandler'
import { useUserStore } from '@/stores/user' import { useUserStore } from '@/stores/user'
const CHATBOT_AGENT_ID = 'ChatbotAgent'
function sortAgents(agents) {
return [...agents].sort((a, b) => {
const isAChatbotAgent = a.id === CHATBOT_AGENT_ID
const isBChatbotAgent = b.id === CHATBOT_AGENT_ID
if (isAChatbotAgent && !isBChatbotAgent) return -1
if (!isAChatbotAgent && isBChatbotAgent) return 1
return a.id.localeCompare(b.id)
})
}
export const useAgentStore = defineStore( export const useAgentStore = defineStore(
'agent', 'agent',
() => { () => {
@ -184,7 +197,7 @@ export const useAgentStore = defineStore(
try { try {
const response = await agentApi.getAgents() const response = await agentApi.getAgents()
agents.value = response.agents agents.value = sortAgents(response.agents || [])
} catch (err) { } catch (err) {
console.error('Failed to fetch agents:', err) console.error('Failed to fetch agents:', err)
handleChatError(err, 'fetch') handleChatError(err, 'fetch')