feat(ui): 实现全卡堆叠趋势与单页资源进程布局

This commit is contained in:
2026-11-15 17:59:52 +08:00
parent 469766892d
commit 99e558625b
37 changed files with 579 additions and 195 deletions
@@ -39,11 +39,13 @@ struct ProcessTableView: View {
if snapshot?.failed == true { Text("panel.processFailed") }
else if snapshot == nil { Text("metric.waiting").foregroundStyle(.secondary) }
NativeProcessTable(rows: rows, selection: $state.selected, sorting: $state.sortOrder, locale: locale, onExit: handleExit)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.overlay { if snapshot != nil && rows.isEmpty && snapshot?.failed != true { Text("panel.noResults").foregroundStyle(.secondary).allowsHitTesting(false) } }
if exitedSelection != nil, let departed = state.departed {
HStack { Text(verbatim: departed.name); Text("panel.exited"); Button("panel.dismiss") { state.selected = nil; state.departed = nil } }
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
.font(.system(size: 12)).padding(10)
.modifier(CardSurface())
.onAppear { rebuild(retainOrder: false) }