@@ -24,11 +24,19 @@ struct DetailedView: View {
2424 if detailData [ 0 ] . FullMain. season == 2024 {
2525 ScrollView {
2626 Text ( " Team \( String ( detailData [ 0 ] . FullMain. team) ) " )
27+ #if !os(watchOS)
2728 . font( . largeTitle)
29+ #else
30+ . font( . title3)
31+ #endif
2832 . padding( [ . top, . leading] )
2933 . frame ( maxWidth: . infinity, alignment: . leading)
3034 Text ( " \( detailData [ 0 ] . FullMain. level) \( String ( detailData [ 0 ] . FullMain. match_num) ) @ \( detailData [ 0 ] . FullMain. event) \( String ( detailData [ 0 ] . FullMain. season) ) " )
35+ #if !os(watchOS)
3136 . font( . title2)
37+ #else
38+ . font( . body)
39+ #endif
3240 . padding( . leading)
3341 . frame ( maxWidth: . infinity, alignment: . leading)
3442 VStack {
@@ -43,19 +51,31 @@ struct DetailedView: View {
4351 HStack {
4452 VStack {
4553 Text ( " \( String ( detailData [ 0 ] . FullMain. analysis. split ( separator: " , " ) [ 3 ] ) ) s " )
54+ #if !os(watchOS)
4655 . font( . title)
56+ #else
57+ . font( . title3)
58+ #endif
4759 Text ( " intake " )
4860 }
4961 . frame ( maxWidth: . infinity)
5062 VStack {
5163 Text ( " \( String ( detailData [ 0 ] . FullMain. analysis. split ( separator: " , " ) [ 4 ] ) ) s " )
64+ #if !os(watchOS)
5265 . font( . title)
66+ #else
67+ . font( . title3)
68+ #endif
5369 Text ( " travel " )
5470 }
5571 . frame ( maxWidth: . infinity)
5672 VStack {
5773 Text ( " \( String ( detailData [ 0 ] . FullMain. analysis. split ( separator: " , " ) [ 5 ] ) ) s " )
74+ #if !os(watchOS)
5875 . font( . title)
76+ #else
77+ . font( . title3)
78+ #endif
5979 Text ( " outtake " )
6080 }
6181 . frame ( maxWidth: . infinity)
@@ -67,13 +87,21 @@ struct DetailedView: View {
6787 HStack {
6888 VStack {
6989 Text ( String ( detailData [ 0 ] . FullMain. analysis. split ( separator: " , " ) [ 6 ] ) )
90+ #if !os(watchOS)
7091 . font( . title)
92+ #else
93+ . font( . title3)
94+ #endif
7195 Text ( " speaker " )
7296 }
7397 . frame ( maxWidth: . infinity)
7498 VStack {
7599 Text ( String ( detailData [ 0 ] . FullMain. analysis. split ( separator: " , " ) [ 7 ] ) )
100+ #if !os(watchOS)
76101 . font( . title)
102+ #else
103+ . font( . title3)
104+ #endif
77105 Text ( " amplifier " )
78106 }
79107 . frame ( maxWidth: . infinity)
@@ -87,7 +115,7 @@ struct DetailedView: View {
87115 . frame ( maxWidth: . infinity, alignment: . leading)
88116 VStack {
89117 Divider ( )
90- ForEach ( gameData, id : \ . id ) { matchTime in
118+ ForEach ( gameData) { matchTime in
91119 VStack {
92120 HStack {
93121 switch matchTime. score_type {
@@ -159,10 +187,19 @@ struct DetailedView: View {
159187 HStack {
160188 Spacer ( )
161189 Label ( String ( format: " %.1f " , matchTime. intake) , systemImage: " tray.and.arrow.down " )
190+ #if os(watchOS)
191+ . labelStyle( . titleOnly)
192+ #endif
162193 Spacer ( )
163194 Label ( String ( format: " %.1f " , matchTime. travel) , systemImage: " arrow.up.and.down.and.arrow.left.and.right " )
195+ #if os(watchOS)
196+ . labelStyle( . titleOnly)
197+ #endif
164198 Spacer ( )
165199 Label ( String ( format: " %.1f " , matchTime. outtake) , systemImage: " tray.and.arrow.up " )
200+ #if os(watchOS)
201+ . labelStyle( . titleOnly)
202+ #endif
166203 Spacer ( )
167204 }
168205 . padding ( . top)
@@ -294,10 +331,17 @@ struct FullMainData: Codable {
294331}
295332
296333/// 2024 season specific data structure for deocding the `game` key of `FullMainData`
297- struct MatchTime2024 : Codable {
298- let id : Int
334+ struct MatchTime2024 : Codable , Identifiable {
335+ var id = UUID ( )
299336 let score_type : Int
300337 let intake : Float
301338 let outtake : Float
302339 let travel : Float
340+
341+ enum CodingKeys : CodingKey {
342+ case score_type
343+ case intake
344+ case outtake
345+ case travel
346+ }
303347}
0 commit comments