@@ -39,40 +39,61 @@ public struct AboutView: View {
39
39
public init ( react_items: [ AboutModel ] ) {
40
40
self . items = react_items
41
41
}
42
+
43
+ // MARK: - COMPILER DIRECTIVE
44
+ #if os(iOS)
45
+ @Environment ( \. horizontalSizeClass) var hsClass : UserInterfaceSizeClass ?
46
+ #endif
47
+
42
48
// MARK: - SOME SORT OF VIEW
43
49
public var body : some View {
44
- NavigationView {
45
- VStack {
46
- AboutBackgroundView ( )
47
- . padding ( . top , - 15 )
48
-
49
- List {
50
- Section (
51
- header : Text ( NSLocalizedString ( " IMPROVEMENT US " , comment : " IMPROVEMENT US " ) )
52
- . font ( . custom ( " Nunito-Regular " , size : 25 , relativeTo : . largeTitle ) )
53
- ) {
54
- ForEach ( improvementCase ( items : items ) ) {
55
- AboutSectionView ( aboutModel : $0 )
56
- }
57
- }
50
+ #if os(iOS)
51
+ if hsClass == . compact {
52
+ NavigationView {
53
+ view
54
+ }
55
+ . accentColor ( Color ( " AccentColor " ) )
56
+ } else {
57
+ view
58
+ }
59
+ #else
60
+ view
61
+ . frame ( minWidth : 400 , minHeight : 600 )
62
+ #endif
63
+ }
58
64
59
- Section (
60
- header: Text ( NSLocalizedString ( " CONNECTING WITH US " , comment: " CONNECTING WITH US " ) )
61
- . font ( . custom( " Nunito-Regular " , size: 25 , relativeTo: . largeTitle) )
62
- ) {
63
- ForEach ( socialCase ( items: items) ) {
64
- AboutSectionView ( aboutModel: $0)
65
- }
65
+ @ViewBuilder
66
+ private var view : some View {
67
+ VStack {
68
+ AboutBackgroundView ( )
69
+ . padding ( . top, - 15 )
70
+
71
+ List {
72
+ Section (
73
+ header: Text ( NSLocalizedString ( " IMPROVEMENT US " , comment: " IMPROVEMENT US " ) )
74
+ . font ( . custom( " Nunito-Regular " , size: 25 , relativeTo: . largeTitle) )
75
+ ) {
76
+ ForEach ( improvementCase ( items: items) ) {
77
+ AboutSectionView ( aboutModel: $0)
66
78
}
67
79
}
68
- . listStyle ( . grouped)
69
- . padding ( . top, - 15 )
70
80
71
- Spacer ( )
81
+ Section (
82
+ header: Text ( NSLocalizedString ( " CONNECTING WITH US " , comment: " CONNECTING WITH US " ) )
83
+ . font ( . custom( " Nunito-Regular " , size: 25 , relativeTo: . largeTitle) )
84
+ ) {
85
+ ForEach ( socialCase ( items: items) ) {
86
+ AboutSectionView ( aboutModel: $0)
87
+ }
88
+ }
72
89
}
73
- . navigationTitle ( NSLocalizedString ( " About Us " , comment: " About Us " ) )
74
- . navigationBarTitleDisplayMode ( . automatic)
90
+ . listStyle ( . grouped)
91
+ . padding ( . top, - 15 )
92
+
93
+ Spacer ( )
75
94
}
95
+ . navigationTitle ( NSLocalizedString ( " About Us " , comment: " About Us " ) )
96
+ . navigationBarTitleDisplayMode ( . automatic)
76
97
}
77
98
78
99
// MARK: - METHODS
0 commit comments