diff --git a/app/static/css/main.css b/app/static/css/main.css index a4737e5..8311f99 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -4119,3 +4119,13 @@ select.task-filter-select, position: relative; z-index: 2; } + +/* 添加任务名称悬停样式 */ +.task-name-hover { + cursor: pointer; + transition: color 0.2s ease-in-out; +} + +.task-name-hover:hover { + color: var(--focus-border-color) !important; +} diff --git a/app/templates/index.html b/app/templates/index.html index 2b851b7..0c5eb30 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -768,13 +768,15 @@
+ v-check-overflow="index + '|task_name'" + :class="{'task-name-hover': true}" + @click.stop="filterByTaskName(record.task_name, $event)"> {{ record.task_name }}
-
+
{{ record.task_name }}
@@ -3684,6 +3686,23 @@ alert("刷新 AList 目录失败: " + (error.response?.data?.message || error.message || "未知错误")); }); }, + filterByTaskName(taskName, event) { + // 防止事件冒泡,避免触发行选择 + if (event) { + event.stopPropagation(); + } + + // 如果当前已经筛选了该任务,则取消筛选 + if (this.historyTaskSelected === taskName) { + this.historyTaskSelected = ""; + } else { + // 设置任务筛选值 + this.historyTaskSelected = taskName; + } + + // 重新加载记录 + this.loadHistoryRecords(); + }, } });