@@ -19,28 +19,62 @@ struct NetworkInspectorView: View {
19
19
@EnvironmentObject private var environment : ConsoleEnvironment
20
20
@Environment ( \. store) private var store
21
21
22
+ #if os(iOS) || os(visionOS)
22
23
var body : some View {
23
24
List {
24
25
contents
25
26
}
26
27
. animation ( . default, value: task. state)
27
- #if os(iOS) || os(visionOS)
28
28
. listStyle ( . insetGrouped)
29
29
. safeAreaInset ( edge: . bottom) {
30
30
OpenOnMacOverlay ( entity: task)
31
31
}
32
32
. inlineNavigationTitle ( environment. delegate. getShortTitle ( for: task) )
33
33
. sheet ( item: $shareItems, content: ShareView . init)
34
- #else
35
- . listStyle( . sidebar)
36
- #endif
37
34
. toolbar {
38
35
ToolbarItemGroup ( placement: . automatic) {
39
36
trailingNavigationBarItems
40
37
}
41
38
}
42
39
}
43
40
41
+ #else
42
+ var body : some View {
43
+ ScrollView ( . horizontal) {
44
+ HStack ( spacing: 0 ) {
45
+ List {
46
+ contents
47
+ . listRowSeparator ( . hidden)
48
+ }
49
+ . animation ( . default, value: task. state)
50
+ . frame ( minWidth: 320 , maxWidth: 420 )
51
+
52
+ Divider ( )
53
+
54
+ if task. hasMetrics {
55
+ metrics
56
+ . frame ( minWidth: 360 , idealWidth: 360 , maxWidth: 420 )
57
+ }
58
+ }
59
+ }
60
+ . toolbar {
61
+ ToolbarItemGroup ( placement: . automatic) {
62
+ trailingNavigationBarItems
63
+ }
64
+ }
65
+ }
66
+
67
+ @ViewBuilder
68
+ private var metrics : some View {
69
+ List {
70
+ ForEach ( task. orderedTransactions, id: \. index) {
71
+ NetworkInspectorTransactionView ( viewModel: . init( transaction: $0, task: task) )
72
+ }
73
+ }
74
+ . listStyle ( . inset( alternatesRowBackgrounds: false ) )
75
+ }
76
+ #endif
77
+
44
78
@ViewBuilder
45
79
private var contents : some View {
46
80
Section { NetworkInspectorView . makeHeaderView ( task: task, store: store) }
0 commit comments