feat: 自动隐藏被覆盖的打包历史

This commit is contained in:
shenlei
2026-07-24 12:05:37 +09:00
parent 4dccc4d96b
commit bb8a0afeac
9 changed files with 111 additions and 4 deletions
+8 -3
View File
@@ -20,6 +20,7 @@
<option value="failed">失败</option>
<option value="cancelled">已取消</option>
</select>
<label v-if="isAdmin" class="superseded-toggle"><input v-model="showSuperseded" type="checkbox" @change="loadTasks"> 显示已覆盖</label>
</div>
</div>
<table class="config-table">
@@ -180,6 +181,7 @@ const logLines = ref([])
const logContainer = ref(null)
const showVerboseLogs = ref(false)
const qrPreview = ref(null)
const showSuperseded = ref(false)
let logWs = null
const getAppVersion = (task) => {
@@ -210,11 +212,13 @@ const filteredTasks = computed(() => {
})
})
onMounted(async () => {
const res = await authFetch('/api/tasks?limit=100')
const loadTasks = async () => {
const res = await authFetch(`/api/tasks?limit=100${showSuperseded.value ? '&include_superseded=true' : ''}`)
const data = await res.json()
tasks.value = data.map(task => ({ ...task, app_version: getAppVersion(task) }))
})
}
onMounted(loadTasks)
const viewLogs = async (taskId) => {
const task = tasks.value.find(t => t.id === taskId)
@@ -468,6 +472,7 @@ const errorCategoryLabel = (cat) => {
.meta-value { font-size: 13px; color: #333; font-weight: 500; }
.version-filter { width: 150px; }
.superseded-toggle { display: flex; align-items: center; gap: 4px; color: #666; font-size: 13px; white-space: nowrap; }
/* 日志操作栏 */
.log-modal-actions {