refactor(更新中心): E方案重设计更新条目 + 已忽略沉底 + 复用app.update显示更新时间 + 安全加固

- UpdateCenterItem.vue: 改为单行紧凑卡片,显示 包名·当前→新版本、来源标签、更新时间(品牌色)、大小;已忽略项淡化
- updateCenter.ts: filteredItems 将已忽略项沉底到列表末尾
- UpdateCenterList/Modal + App.vue: 透传全局 apps,用 app.json 的 Update 字段(Date.parse)推算 updateTime,零额外网络请求
- typedefinition.ts + update-center/types.ts: 新增可选 updateTime 字段
- install-manager.ts: launch-app 补 pkgname.length > 256 长度限制(防 DoS)
- index.ts: close 事件先 clearTimeout 防抖定时器再同步保存窗口状态(消除竞态)
- App.vue: fetchWithRetry 重试 3→2、延迟 1000→500ms(体验优化)
- 7维审计通过;AI审查2阻断项(getIconUrl防护/fetchWithRetry泛型)经核实为误报
This commit is contained in:
xiyidaiwa
2026-08-11 23:54:00 +08:00
parent aef9ccd1ec
commit 30e1bc4840
10 changed files with 167 additions and 91 deletions
+3
View File
@@ -66,6 +66,7 @@
:items="store.filteredItems.value"
:tasks="store.snapshot.value.tasks"
:selected-task-keys="store.selectedTaskKeys.value"
:apps="apps"
@toggle-selection="emit('toggle-selection', $event)"
@ignore-item="store.ignoreItem"
@unignore-item="store.unignoreItem"
@@ -86,6 +87,7 @@
<script setup lang="ts">
import { computed } from "vue";
import type { App } from "@/global/typedefinition";
import type { UpdateCenterStore } from "@/modules/updateCenter";
import UpdateCenterList from "./update-center/UpdateCenterList.vue";
@@ -103,6 +105,7 @@ const emit = defineEmits<{
const props = defineProps<{
show: boolean;
store: UpdateCenterStore;
apps: App[];
}>();
const selectedCount = computed(() => props.store.getSelectedItems().length);