@@ -9,6 +9,10 @@ struct PointOfSaleSettingsStoreDetailView: View {
99 self . viewModel = viewModel
1010 }
1111
12+ private var backgroundColor : Color {
13+ Color . posOnSecondaryContainer
14+ }
15+
1216 var body : some View {
1317 NavigationStack {
1418 List {
@@ -20,6 +24,7 @@ struct PointOfSaleSettingsStoreDetailView: View {
2024 . font ( . posBodyMediumRegular( ) )
2125 . foregroundStyle ( . secondary)
2226 }
27+ . listRowSeparator ( . hidden)
2328
2429 VStack ( alignment: . leading, spacing: POSPadding . small) {
2530 Text ( Localization . address)
@@ -28,9 +33,19 @@ struct PointOfSaleSettingsStoreDetailView: View {
2833 . font ( . posBodyMediumRegular( ) )
2934 . foregroundStyle ( . secondary)
3035 }
36+ . listRowSeparator ( . hidden)
3137 } header: {
32- Text ( Localization . storeInformation)
33- . font ( . posBodyLargeRegular( ) )
38+ ZStack {
39+ backgroundColor
40+ Text ( Localization . storeInformation)
41+ . font ( . posHeadingBold)
42+ . foregroundColor ( . posOnSurface)
43+ . frame ( maxWidth: . infinity, alignment: . leading)
44+ . padding ( . horizontal, POSPadding . medium)
45+ . padding ( . vertical, POSPadding . small)
46+ . textCase ( nil )
47+ }
48+ . listRowInsets ( EdgeInsets ( ) )
3449 }
3550
3651 Section {
@@ -39,36 +54,55 @@ struct PointOfSaleSettingsStoreDetailView: View {
3954 . font ( . posBodyMediumRegular( ) )
4055 settingValueView ( for: viewModel. receiptInformation. storeName)
4156 }
57+ . listRowSeparator ( . hidden)
4258
4359 VStack ( alignment: . leading, spacing: POSPadding . small) {
4460 Text ( Localization . physicalAddress)
4561 . font ( . posBodyMediumRegular( ) )
4662 settingValueView ( for: viewModel. receiptInformation. storeAddress)
4763 }
64+ . listRowSeparator ( . hidden)
4865
4966 VStack ( alignment: . leading, spacing: POSPadding . small) {
5067 Text ( Localization . phoneNumber)
5168 . font ( . posBodyMediumRegular( ) )
5269 settingValueView ( for: viewModel. receiptInformation. phone)
5370 }
71+ . listRowSeparator ( . hidden)
5472
5573 VStack ( alignment: . leading, spacing: POSPadding . small) {
5674 Text ( Localization . email)
5775 . font ( . posBodyMediumRegular( ) )
5876 settingValueView ( for: viewModel. receiptInformation. email)
5977 }
78+ . listRowSeparator ( . hidden)
6079
6180 VStack ( alignment: . leading, spacing: POSPadding . small) {
6281 Text ( Localization . refundReturnsPolicy)
6382 . font ( . posBodyMediumRegular( ) )
6483 settingValueView ( for: viewModel. receiptInformation. refundReturnsPolicy)
6584 }
85+ . listRowSeparator ( . hidden)
6686 } header: {
67- Text ( Localization . receiptInformation)
68- . font ( . posBodyLargeRegular( ) )
87+ ZStack {
88+ backgroundColor
89+ Text ( Localization . receiptInformation)
90+ . font ( . posHeadingBold)
91+ . foregroundColor ( . posOnSurface)
92+ . frame ( maxWidth: . infinity, alignment: . leading)
93+ . padding ( . horizontal, POSPadding . medium)
94+ . padding ( . vertical, POSPadding . small)
95+ . textCase ( nil )
96+ }
97+ . listRowInsets ( EdgeInsets ( ) )
6998 }
7099 . renderedIf ( viewModel. shouldShowReceiptInformation)
71100 }
101+ . listStyle ( . plain)
102+ . scrollContentBackground ( . hidden)
103+ . background ( backgroundColor)
104+ . listRowSeparator ( . hidden)
105+ . listSectionSeparator ( . hidden)
72106 . task {
73107 isLoading = true
74108 await viewModel. retrievePOSReceiptSettings ( )
@@ -80,7 +114,11 @@ struct PointOfSaleSettingsStoreDetailView: View {
80114 @ViewBuilder
81115 private func settingValueView( for value: String ? ) -> some View {
82116 if isLoading {
83- GhostSettingRowView ( )
117+ Rectangle ( )
118+ . fill ( Color . posOnSurfaceVariantLowest)
119+ . frame ( width: Constants . shimmeringTextWidth, height: Constants . shimmeringTextHeight)
120+ . clipShape ( RoundedRectangle ( cornerRadius: POSCornerRadiusStyle . small. value) )
121+ . shimmering ( )
84122 } else {
85123 Text ( value ?? Localization . notSet)
86124 . font ( . posBodyMediumRegular( ) )
@@ -89,46 +127,13 @@ struct PointOfSaleSettingsStoreDetailView: View {
89127 }
90128}
91129
92- // Temporary: Simplified copy from PointOfSaleOrderListView.GhostOrderRowView
93- private struct GhostSettingRowView : View {
94- @ScaledMetric private var scale : CGFloat = 1.0
95- @Environment ( \. dynamicTypeSize) var dynamicTypeSize
96-
97- private var minHeight : CGFloat {
98- min ( Constants . orderCardMinHeight * scale, Constants . maximumOrderCardHeight)
99- }
100-
101- var body : some View {
102- HStack ( alignment: . center, spacing: POSSpacing . medium) {
103- VStack ( alignment: . leading, spacing: POSSpacing . xSmall) {
104- Rectangle ( )
105- . fill ( Color . posOnSurfaceVariantLowest)
106- . frame ( width: 70 , height: 16 )
107- . clipShape ( RoundedRectangle ( cornerRadius: 4 ) )
108- . shimmering ( )
109-
110- Rectangle ( )
111- . fill ( Color . posOnSurfaceVariantLowest)
112- . frame ( width: 160 , height: 14 )
113- . clipShape ( RoundedRectangle ( cornerRadius: 4 ) )
114- . shimmering ( )
115- }
116- }
117- . padding ( . horizontal, POSPadding . medium * ( 1 / scale) )
118- . padding ( . vertical, POSPadding . medium * ( 1 / scale) )
119- . frame ( maxWidth: . infinity, minHeight: dynamicTypeSize. isAccessibilitySize ? nil : minHeight, alignment: . leading)
120- . background ( Color . posSurfaceContainerLowest)
121- . posItemCardBorderStyles ( )
122- . geometryGroup ( )
123- }
124130
125- private enum Constants {
126- static let orderCardMinHeight : CGFloat = 90
127- static let maximumOrderCardHeight : CGFloat = Constants . orderCardMinHeight * 2
131+ private extension PointOfSaleSettingsStoreDetailView {
132+ enum Constants {
133+ static let shimmeringTextWidth : CGFloat = 70
134+ static let shimmeringTextHeight : CGFloat = 16
128135 }
129- }
130136
131- private extension PointOfSaleSettingsStoreDetailView {
132137 enum Localization {
133138 static let notSet = NSLocalizedString (
134139 " pointOfSaleSettingsStoreDetailView.notSet " ,
0 commit comments