chore: opt fonts

This commit is contained in:
duorameng
2026-04-07 20:05:03 +08:00
parent 5921029e26
commit 6cd0a869ef
9 changed files with 74 additions and 25 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ onMounted(loadLogs)
<template>
<div class="space-y-4">
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 w-full">
<div class="flex items-center gap-2 w-full sm:w-auto sm:ml-auto">
<div class="flex items-center gap-2 w-full lg:w-auto lg:ml-auto">
<div class="relative w-full sm:w-60 group">
<Search class="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground group-focus-within:text-primary transition-colors" />
<Input v-model="filterUsername" placeholder="搜索用户名..." class="h-9 pl-9 w-full text-sm bg-muted/20 border-muted-foreground/10 focus:bg-background"
@@ -169,7 +169,7 @@ function onDialogClose(open: boolean) {
<template>
<div class="space-y-4">
<div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 w-full">
<div class="flex items-center gap-2 w-full sm:w-auto sm:ml-auto">
<div class="flex items-center gap-2 w-full lg:w-auto lg:ml-auto">
<div class="relative w-full sm:w-60 group">
<Search class="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground group-focus-within:text-primary transition-colors" />
<Input v-model="filters.keyword" placeholder="搜索标题或内容..." class="h-9 pl-9 w-full text-sm bg-muted/20 border-muted-foreground/10 focus:bg-background"
+1 -1
View File
@@ -166,7 +166,7 @@ function onDialogClose(open: boolean) {
<template>
<div class="space-y-6">
<div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 w-full">
<div class="flex items-center gap-2 w-full sm:w-auto sm:ml-auto">
<div class="flex items-center gap-2 w-full lg:w-auto lg:ml-auto">
<div class="relative w-full sm:w-60 group">
<Search class="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground group-focus-within:text-primary transition-colors" />
<Input v-model="filters.keyword" placeholder="搜索标题或内容..." class="h-9 pl-9 w-full text-sm bg-muted/20 border-muted-foreground/10 focus:bg-background"
+2 -2
View File
@@ -331,9 +331,9 @@ watch(() => route.query.agent_id, (newVal: any) => {
<p class="text-muted-foreground text-sm">管理和调度自动化执行任务</p>
</div>
<div class="flex flex-col sm:flex-row flex-wrap gap-3 w-full lg:flex-1 lg:justify-end">
<div class="flex flex-col sm:flex-row flex-wrap gap-3 w-full lg:w-auto lg:ml-auto lg:justify-end">
<!-- 搜索与标签 -->
<div class="flex flex-col sm:flex-row items-center gap-2 w-full sm:flex-1 sm:w-auto text-sm">
<div class="flex flex-col sm:flex-row items-center gap-2 w-full sm:flex-1 lg:flex-none lg:w-auto text-sm">
<div class="relative w-full sm:flex-1 lg:max-w-[240px] group">
<Search class="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground group-focus-within:text-primary transition-colors" />
<Input v-model="filterName" placeholder="搜索任务..." class="h-9 pl-9 w-full bg-muted/20 border-muted-foreground/10 focus:bg-background"
+30 -5
View File
@@ -28,6 +28,11 @@ function reconnect() {
isReconnecting.value = false
}, 1000)
}
const statusState = ref<{ text: string; type: 'success' | 'error' | 'info' } | null>(null)
function handleStatusChange(status: any) {
statusState.value = status
}
</script>
<template>
@@ -58,13 +63,33 @@ function reconnect() {
</PopoverContent>
</Popover>
</div>
<Button variant="ghost" size="icon" class="h-6 w-6 text-gray-400 hover:text-white" @click="reconnect"
:disabled="isReconnecting" title="重新连接">
<RefreshCw class="h-3 w-3" :class="{ 'animate-spin': isReconnecting }" />
</Button>
<div class="flex items-center gap-3">
<!-- 终端状态指示 (右上角) -->
<div v-if="statusState" class="flex items-center gap-1.5 transition-all animate-in fade-in slide-in-from-right-1">
<div :class="[
'w-1.5 h-1.5 rounded-full',
statusState.type === 'success' ? 'bg-green-500 shadow-[0_0_8px_rgba(34,197,94,0.4)]' :
statusState.type === 'error' ? 'bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]' :
'bg-blue-400 animate-pulse'
]" />
<span :class="[
'text-[11px] font-medium transition-colors',
statusState.type === 'success' ? 'text-green-500/90' :
statusState.type === 'error' ? 'text-red-500/90' :
'text-blue-400/90'
]">
{{ statusState.text }}
</span>
</div>
<Button variant="ghost" size="icon" class="h-6 w-6 text-gray-400 hover:text-white" @click="reconnect"
:disabled="isReconnecting" title="重新连接">
<RefreshCw class="h-3 w-3" :class="{ 'animate-spin': isReconnecting }" />
</Button>
</div>
</div>
<div class="flex-1 border border-[#3c3c3c] border-t-0 rounded-b-md overflow-hidden bg-[#1e1e1e]">
<XTerminal ref="terminalRef" :font-size="13" />
<XTerminal ref="terminalRef" :font-size="13" @status-change="handleStatusChange" />
</div>
</div>
</template>