feat(ui): 实现全卡堆叠趋势与单页资源进程布局
This commit is contained in:
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user