@@ -40,24 +40,22 @@ struct CardReaderConnectionStatusView: View {
4040 case . cancellingConnection:
4141 progressIndicatingCardReaderStatus ( title: Localization . pleaseWait)
4242 case . disconnected:
43- Button {
44- posModel. connectCardReader ( )
45- } label: {
43+ HStack ( spacing: Constants . horizontalPadding) {
4644 HStack ( spacing: Constants . buttonImageAndTextSpacing) {
47- circleIcon ( with: Color ( . wooCommerceAmber ( . shade60 ) ) )
45+ circleIcon ( with: Color . posAlert )
4846 Text ( Localization . readerDisconnected)
4947 . foregroundColor ( disconnectedFontColor)
5048 }
51- . padding ( . horizontal , Constants . overlayInnerHorizontalPadding )
52- . frame ( maxHeight : . infinity )
53- . overlay {
54- RoundedRectangle ( cornerRadius : Constants . overlayRadius )
55- . stroke ( Constants . overlayColor , lineWidth : Constants . overlayLineWidth )
49+
50+ Button {
51+ posModel . connectCardReader ( )
52+ } label : {
53+ Text ( Localization . connectReader )
5654 }
57- . padding ( . horizontal, Constants . overlayOuterHorizontalPadding)
58- . padding ( . vertical, Constants . overlayOuterVerticalPadding)
59- . frame ( maxHeight: . infinity)
55+ . buttonStyle ( POSButtonStyle ( variant: . filled, size: . extraSmall) )
6056 }
57+ . padding ( . horizontal, Constants . horizontalPadding)
58+ . frame ( maxHeight: . infinity)
6159 }
6260 }
6361 . font ( Constants . font, maximumContentSizeCategory: . accessibilityLarge)
@@ -97,7 +95,7 @@ private extension CardReaderConnectionStatusView {
9795 var disconnectedFontColor : Color {
9896 switch backgroundAppearance {
9997 case . primary:
100- . posPrimaryText
98+ . posOnSurface
10199 case . secondary:
102100 POSFloatingControlView . secondaryFontColor
103101 }
@@ -107,18 +105,12 @@ private extension CardReaderConnectionStatusView {
107105@available ( iOS 17 . 0 , * )
108106private extension CardReaderConnectionStatusView {
109107 enum Constants {
110- static let buttonImageAndTextSpacing : CGFloat = 12
108+ static let buttonImageAndTextSpacing : CGFloat = 16
111109 static let imageDimension : CGFloat = 12
112110 static let progressIndicatorDimension : CGFloat = 10
113111 static let progressIndicatorLineWidth : CGFloat = 2
114112 static let font = POSFontStyle . posDetailEmphasized
115113 static let horizontalPadding : CGFloat = 24
116- static let overlayRadius : CGFloat = 4
117- static let overlayLineWidth : CGFloat = 2
118- static let overlayColor : Color = Color . init ( uiColor: . wooCommercePurple( . shade60) )
119- static let overlayInnerHorizontalPadding : CGFloat = 16 + Self. overlayLineWidth
120- static let overlayOuterHorizontalPadding : CGFloat = 8 + Self. overlayLineWidth
121- static let overlayOuterVerticalPadding : CGFloat = 8 + Self. overlayLineWidth
122114 }
123115}
124116
@@ -132,11 +124,17 @@ private extension CardReaderConnectionStatusView {
132124 )
133125
134126 static let readerDisconnected = NSLocalizedString (
135- " pointOfSale.floatingButtons.readerDisconnected .title " ,
136- value: " Connect your reader " ,
127+ " pointOfSale.floatingButtons.readerNotConnected .title " ,
128+ value: " Reader not connected " ,
137129 comment: " The title of the floating button to indicate that reader is disconnected and prompt connect after tapping. "
138130 )
139131
132+ static let connectReader = NSLocalizedString (
133+ " pointOfSale.floatingButtons.connectCardReader.button.title " ,
134+ value: " Connect " ,
135+ comment: " The title of the menu button to connect a card reader. "
136+ )
137+
140138 static let readerDisconnecting = NSLocalizedString (
141139 " pointOfSale.floatingButtons.readerDisconnecting.title " ,
142140 value: " Disconnecting " ,
0 commit comments