feat: fix language page style
This commit is contained in:
@@ -250,25 +250,25 @@ onMounted(async () => {
|
||||
</Button>
|
||||
<div>
|
||||
<h2 class="text-xl sm:text-2xl font-bold tracking-tight">依赖管理</h2>
|
||||
<p class="text-muted-foreground text-sm">管理 Python 和 Node.js 依赖包</p>
|
||||
<p class="text-muted-foreground text-sm">管理工具运行环境的依赖包</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 当前环境信息 -->
|
||||
<div v-if="language && langVersion"
|
||||
class="bg-primary/10 border border-primary/20 rounded-lg p-3 flex items-center justify-between">
|
||||
class="bg-primary/5 border border-primary/10 rounded-lg p-3 flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<Package class="h-4 w-4 text-primary" />
|
||||
<Package class="h-4 w-4 text-primary/80" />
|
||||
<span class="text-sm">正在管理环境: <span class="font-bold font-mono">{{ language }}@{{ langVersion }}</span></span>
|
||||
</div>
|
||||
<Badge variant="outline" class="font-mono text-xs">Scoped Environment</Badge>
|
||||
<Badge variant="outline" class="font-mono text-xs border-primary/20 text-primary/80">Scoped Environment</Badge>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="rounded-lg border bg-card overflow-x-auto">
|
||||
<!-- 工具栏 -->
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2 px-4 py-3 border-b bg-muted/30">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2 px-4 py-3 border-b bg-muted/10">
|
||||
<div class="flex items-center gap-2">
|
||||
<Badge variant="secondary">{{ filteredDeps.length }} 个包</Badge>
|
||||
</div>
|
||||
@@ -293,7 +293,7 @@ onMounted(async () => {
|
||||
|
||||
<!-- 表头 -->
|
||||
<div
|
||||
class="flex items-center gap-4 px-4 py-2 border-b bg-muted/50 text-sm text-muted-foreground font-medium min-w-[400px]">
|
||||
class="flex items-center gap-4 px-4 py-2 border-b bg-muted/20 text-sm text-muted-foreground font-medium min-w-[400px]">
|
||||
<span class="flex-1">包名</span>
|
||||
<span class="w-32">版本</span>
|
||||
<span class="w-48 hidden md:block">备注</span>
|
||||
@@ -311,7 +311,7 @@ onMounted(async () => {
|
||||
{{ searchQuery ? '无匹配结果' : '暂无依赖包' }}
|
||||
</div>
|
||||
<div v-else v-for="dep in filteredDeps" :key="dep.id"
|
||||
class="flex items-center gap-4 px-4 py-2 hover:bg-muted/50 transition-colors">
|
||||
class="flex items-center gap-4 px-4 py-2 hover:bg-muted/30 transition-colors">
|
||||
<span class="flex-1 font-mono text-sm truncate">
|
||||
<TextOverflow :text="dep.name" title="包名" />
|
||||
</span>
|
||||
|
||||
@@ -133,7 +133,7 @@ onMounted(loadEnvVars)
|
||||
<div class="rounded-lg border bg-card overflow-x-auto">
|
||||
<!-- 表头 -->
|
||||
<div
|
||||
class="flex items-center gap-4 px-4 py-2 border-b bg-muted/50 text-sm text-muted-foreground font-medium min-w-[500px]">
|
||||
class="flex items-center gap-4 px-4 py-2 border-b bg-muted/20 text-sm text-muted-foreground font-medium min-w-[500px]">
|
||||
<span class="w-32 sm:w-48 shrink-0">变量名</span>
|
||||
<span class="w-24 sm:flex-1 shrink-0 sm:shrink">值</span>
|
||||
<span class="w-32 sm:w-48 shrink-0 hidden md:block">备注</span>
|
||||
@@ -145,9 +145,9 @@ onMounted(loadEnvVars)
|
||||
暂无环境变量
|
||||
</div>
|
||||
<div v-for="env in envVars" :key="env.id"
|
||||
class="flex items-center gap-4 px-4 py-2 hover:bg-muted/50 transition-colors">
|
||||
class="flex items-center gap-4 px-4 py-2 hover:bg-muted/30 transition-colors">
|
||||
<code
|
||||
class="w-32 sm:w-48 font-medium truncate shrink-0 text-xs bg-muted px-2 py-1 rounded">{{ env.name }}</code>
|
||||
class="w-32 sm:w-48 font-medium truncate shrink-0 text-xs bg-muted/40 px-2 py-1 rounded">{{ env.name }}</code>
|
||||
<span class="w-24 sm:flex-1 shrink-0 sm:shrink font-mono text-muted-foreground truncate text-xs">
|
||||
<TextOverflow :text="showValues[env.id] ? env.value : maskValue(env.value)" title="变量值" />
|
||||
</span>
|
||||
|
||||
@@ -245,7 +245,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
<div class="flex-1 min-w-0 rounded-lg border bg-card overflow-hidden">
|
||||
<!-- 小屏表头 -->
|
||||
<div
|
||||
class="flex sm:hidden items-center gap-2 px-3 py-2 border-b bg-muted/50 text-xs text-muted-foreground font-medium">
|
||||
class="flex sm:hidden items-center gap-2 px-3 py-2 border-b bg-muted/20 text-xs text-muted-foreground font-medium">
|
||||
<span class="w-14 shrink-0">ID</span>
|
||||
<span class="w-10 shrink-0 text-center">类型</span>
|
||||
<span class="flex-1 min-w-0">任务名称</span>
|
||||
@@ -254,7 +254,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
</div>
|
||||
<!-- 大屏表头 -->
|
||||
<div
|
||||
class="hidden sm:flex items-center gap-4 px-4 py-2 border-b bg-muted/50 text-sm text-muted-foreground font-medium">
|
||||
class="hidden sm:flex items-center gap-4 px-4 py-2 border-b bg-muted/20 text-sm text-muted-foreground font-medium">
|
||||
<span class="w-16 shrink-0">ID</span>
|
||||
<span class="w-12 shrink-0 text-center">类型</span>
|
||||
<span class="w-36 shrink-0">任务名称</span>
|
||||
@@ -269,8 +269,8 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
暂无日志
|
||||
</div>
|
||||
<div v-for="log in logs" :key="log.id" :class="[
|
||||
'cursor-pointer hover:bg-muted/50 transition-colors',
|
||||
selectedLog?.id === log.id && 'bg-accent'
|
||||
'cursor-pointer hover:bg-muted/30 transition-colors',
|
||||
selectedLog?.id === log.id && 'bg-accent/50'
|
||||
]" @click="selectLog(log)">
|
||||
<!-- 小屏行 -->
|
||||
<div class="flex sm:hidden items-center gap-2 px-3 py-2">
|
||||
@@ -307,7 +307,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
</div>
|
||||
</span>
|
||||
<span class="w-12 text-right shrink-0 text-muted-foreground text-xs">{{ formatDuration(log.duration)
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
<!-- 大屏行 -->
|
||||
<div class="hidden sm:flex items-center gap-4 px-4 py-2">
|
||||
@@ -317,7 +317,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
<Terminal v-else class="h-4 w-4 text-primary" />
|
||||
</span>
|
||||
<span class="w-36 shrink-0 font-medium truncate text-sm">{{ log.task_name }}</span>
|
||||
<code class="flex-1 min-w-0 text-muted-foreground truncate text-xs bg-muted px-2 py-1 rounded">
|
||||
<code class="flex-1 min-w-0 text-muted-foreground truncate text-xs bg-muted/40 px-2 py-1 rounded">
|
||||
<TextOverflow :text="log.command" title="执行命令" />
|
||||
</code>
|
||||
<span class="w-12 flex justify-center shrink-0">
|
||||
@@ -347,7 +347,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
</div>
|
||||
</span>
|
||||
<span class="w-16 text-right shrink-0 text-muted-foreground text-xs">{{ formatDuration(log.duration)
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-if="!selectedLog"
|
||||
class="w-40 text-right shrink-0 text-muted-foreground text-xs hidden md:block">{{ log.start_time ||
|
||||
log.created_at }}</span>
|
||||
@@ -409,7 +409,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
</div>
|
||||
<div class="pt-1">
|
||||
<span class="text-muted-foreground">命令</span>
|
||||
<code class="mt-1 block font-mono bg-muted px-2 py-1 rounded text-xs break-all">
|
||||
<code class="mt-1 block font-mono bg-muted/40 px-2 py-1 rounded text-xs break-all">
|
||||
{{ selectedLog.command }}
|
||||
</code>
|
||||
</div>
|
||||
@@ -424,7 +424,7 @@ watch(() => route.query.task_id, (newTaskId) => {
|
||||
{{ selectedLog.error }}
|
||||
</code>
|
||||
</div>
|
||||
<div class="px-4 py-2 text-sm text-muted-foreground border-b bg-muted/50 flex items-center justify-between">
|
||||
<div class="px-4 py-2 text-sm text-muted-foreground border-b bg-muted/20 flex items-center justify-between">
|
||||
<span>输出</span>
|
||||
<Button variant="ghost" size="icon" class="h-6 w-6" @click="showFullscreen = true" title="全屏查看">
|
||||
<Maximize2 class="h-3.5 w-3.5" />
|
||||
|
||||
@@ -224,7 +224,7 @@ watch(() => route.query.agent_id, (newVal) => {
|
||||
<div class="rounded-lg border bg-card overflow-x-auto">
|
||||
<!-- 表头 -->
|
||||
<div
|
||||
class="flex items-center gap-2 sm:gap-4 px-3 sm:px-4 py-2 border-b bg-muted/50 text-xs sm:text-sm text-muted-foreground font-medium min-w-[360px] sm:min-w-[800px]">
|
||||
class="flex items-center gap-2 sm:gap-4 px-3 sm:px-4 py-2 border-b bg-muted/20 text-xs sm:text-sm text-muted-foreground font-medium min-w-[360px] sm:min-w-[800px]">
|
||||
<span class="w-12 sm:w-14 shrink-0">ID</span>
|
||||
<span class="w-6 sm:w-8 shrink-0 text-center">类型</span>
|
||||
<span class="flex-1 min-w-0">名称</span>
|
||||
@@ -242,7 +242,7 @@ watch(() => route.query.agent_id, (newVal) => {
|
||||
暂无任务
|
||||
</div>
|
||||
<div v-for="task in tasks" :key="task.id"
|
||||
class="flex items-center gap-2 sm:gap-4 px-3 sm:px-4 py-2 hover:bg-muted/50 transition-colors">
|
||||
class="flex items-center gap-2 sm:gap-4 px-3 sm:px-4 py-2 hover:bg-muted/30 transition-colors">
|
||||
<span class="w-12 sm:w-14 shrink-0 text-muted-foreground text-xs sm:text-sm">#{{ task.id }}</span>
|
||||
<span class="w-6 sm:w-8 shrink-0 flex justify-center" :title="getTaskTypeTitle(task.type || 'task')">
|
||||
<GitBranch v-if="task.type === TASK_TYPE.REPO" class="h-3.5 w-3.5 sm:h-4 sm:w-4 text-primary" />
|
||||
@@ -258,10 +258,10 @@ watch(() => route.query.agent_id, (newVal) => {
|
||||
<span class="truncate">{{ getExecutorName(task) }}</span>
|
||||
</span>
|
||||
<code
|
||||
class="w-32 sm:flex-1 shrink-0 sm:shrink text-muted-foreground truncate text-xs bg-muted px-2 py-1 rounded hidden sm:block">
|
||||
class="w-32 sm:flex-1 shrink-0 sm:shrink text-muted-foreground truncate text-xs bg-muted/40 px-2 py-1 rounded hidden sm:block">
|
||||
<TextOverflow :text="task.command" :title="task.type === TASK_TYPE.REPO ? '同步地址' : '执行命令'" />
|
||||
</code>
|
||||
<code class="w-36 shrink-0 text-muted-foreground text-xs bg-muted px-2 py-1 rounded hidden md:block">{{ task.schedule
|
||||
<code class="w-36 shrink-0 text-muted-foreground text-xs bg-muted/40 px-2 py-1 rounded hidden md:block">{{ task.schedule
|
||||
}}</code>
|
||||
<span class="w-40 shrink-0 text-muted-foreground text-xs hidden lg:block">{{ task.last_run || '-' }}</span>
|
||||
<span class="w-40 shrink-0 text-muted-foreground text-xs hidden lg:block">{{ task.next_run || '-' }}</span>
|
||||
|
||||
Reference in New Issue
Block a user