@@ -115,27 +115,27 @@ menu st =
115
115
Dialog. argsOptic = # modelMenu,
116
116
Dialog. argsAction = PushUpdate . Instant ,
117
117
Dialog. argsContent =
118
- [ Currency. selectCurrency
119
- Currency. defOpts
120
- { Currency. optsExtraOnClick =
121
- (& # modelLoading .~ True ),
122
- Currency. optsButtonViewer =
123
- mappend " Marketplace - "
124
- . Money. inspectCurrencyCode
125
- . Money. currencyInfoCode
126
- }
127
- Currency. Args
128
- { Currency. argsModel = st,
129
- Currency. argsOptic =
130
- # modelState . # stAssetCurrency,
131
- Currency. argsAction =
132
- PushUpdate . Instant ,
133
- Currency. argsEmitter =
134
- pushActionQueue st . Instant ,
135
- Currency. argsCurrencies =
136
- # modelCurrencies
137
- },
138
- Currency. selectCurrency
118
+ Currency. selectCurrency
119
+ Currency. defOpts
120
+ { Currency. optsExtraOnClick =
121
+ (& # modelLoading .~ True ),
122
+ Currency. optsButtonViewer =
123
+ mappend " Marketplace - "
124
+ . Money. inspectCurrencyCode
125
+ . Money. currencyInfoCode
126
+ }
127
+ Currency. Args
128
+ { Currency. argsModel = st,
129
+ Currency. argsOptic =
130
+ # modelState . # stAssetCurrency,
131
+ Currency. argsAction =
132
+ PushUpdate . Instant ,
133
+ Currency. argsEmitter =
134
+ pushActionQueue st . Instant ,
135
+ Currency. argsCurrencies =
136
+ # modelCurrencies
137
+ }
138
+ <> Currency. selectCurrency
139
139
Currency. defOpts
140
140
{ Currency. optsExtraOnClick =
141
141
(& # modelLoading .~ True ),
@@ -154,115 +154,115 @@ menu st =
154
154
pushActionQueue st . Instant ,
155
155
Currency. argsCurrencies =
156
156
# modelCurrencies
157
- },
158
- Select. select
159
- ( Select. defOpts
160
- & # optsLabel
161
- .~ Just " Exchange rate"
162
- )
163
- Select. Args
164
- { Select. argsModel =
165
- st,
166
- Select. argsOptic =
167
- # modelState . # stOnlineOrOffline,
168
- Select. argsAction =
169
- PushUpdate . Instant ,
170
- Select. argsOptions =
171
- constTraversal $ enumerate @ OnlineOrOffline
172
- },
173
- Field. ratioField
174
- Field. Args
175
- { Field. argsModel = st,
176
- Field. argsOptic =
177
- # modelState . # stExchangeRate,
178
- Field. argsAction =
179
- PushUpdate . Instant ,
180
- Field. argsEmitter =
181
- pushActionQueue st . Instant
182
157
}
183
- ( let disabled =
184
- st
185
- ^. # modelState
186
- . # stOnlineOrOffline
187
- == Online
188
- in Field. defOpts @ Model @ Action
189
- & # optsDisabled
190
- .~ disabled
158
+ <> [ Select. select
159
+ ( Select. defOpts
160
+ & # optsLabel
161
+ .~ Just " Exchange rate"
162
+ )
163
+ Select. Args
164
+ { Select. argsModel =
165
+ st,
166
+ Select. argsOptic =
167
+ # modelState . # stOnlineOrOffline,
168
+ Select. argsAction =
169
+ PushUpdate . Instant ,
170
+ Select. argsOptions =
171
+ constTraversal $ enumerate @ OnlineOrOffline
172
+ },
173
+ Field. ratioField
174
+ Field. Args
175
+ { Field. argsModel = st,
176
+ Field. argsOptic =
177
+ # modelState . # stExchangeRate,
178
+ Field. argsAction =
179
+ PushUpdate . Instant ,
180
+ Field. argsEmitter =
181
+ pushActionQueue st . Instant
182
+ }
183
+ ( let disabled =
184
+ st
185
+ ^. # modelState
186
+ . # stOnlineOrOffline
187
+ == Online
188
+ in Field. defOpts @ Model @ Action
189
+ & # optsDisabled
190
+ .~ disabled
191
+ & # optsPlaceholder
192
+ .~ ( " 1 "
193
+ <> toUpper
194
+ ( Money. inspectCurrencyCode
195
+ $ st
196
+ ^. # modelState
197
+ . # stAssetCurrency
198
+ . # currencyOutput
199
+ . # currencyInfoCode
200
+ )
201
+ <> " \8776 X "
202
+ <> toUpper
203
+ ( Money. inspectCurrencyCode
204
+ $ st
205
+ ^. # modelState
206
+ . # stMerchantCurrency
207
+ . # currencyOutput
208
+ . # currencyInfoCode
209
+ )
210
+ )
211
+ & ( if disabled
212
+ then # optsTrailingWidget .~ Nothing
213
+ else id
214
+ )
215
+ ),
216
+ Field. dynamicField
217
+ Field. Args
218
+ { Field. argsModel = st,
219
+ Field. argsOptic =
220
+ # modelState . # stMerchantFeePercent,
221
+ Field. argsAction =
222
+ PushUpdate . Instant ,
223
+ Field. argsEmitter =
224
+ pushActionQueue st . Instant
225
+ }
226
+ ( Field. defOpts
191
227
& # optsPlaceholder
192
- .~ ( " 1 "
193
- <> toUpper
194
- ( Money. inspectCurrencyCode
195
- $ st
196
- ^. # modelState
197
- . # stAssetCurrency
198
- . # currencyOutput
199
- . # currencyInfoCode
200
- )
201
- <> " \8776 X "
202
- <> toUpper
203
- ( Money. inspectCurrencyCode
204
- $ st
205
- ^. # modelState
206
- . # stMerchantCurrency
207
- . # currencyOutput
208
- . # currencyInfoCode
209
- )
210
- )
211
- & ( if disabled
212
- then # optsTrailingWidget .~ Nothing
213
- else id
214
- )
215
- ),
216
- Field. dynamicField
217
- Field. Args
218
- { Field. argsModel = st,
219
- Field. argsOptic =
220
- # modelState . # stMerchantFeePercent,
221
- Field. argsAction =
222
- PushUpdate . Instant ,
223
- Field. argsEmitter =
224
- pushActionQueue st . Instant
225
- }
226
- ( Field. defOpts
227
- & # optsPlaceholder
228
- .~ (" Merchant fee %" :: Unicode )
229
- ),
230
- Field. textField
231
- Field. Args
232
- { Field. argsModel = st,
233
- Field. argsOptic = # modelState . # stMerchantTele,
234
- Field. argsAction = PushUpdate . Instant ,
235
- Field. argsEmitter = pushActionQueue st . Instant
236
- }
237
- ( Field. defOpts
238
- & # optsPlaceholder
239
- .~ (" Merchant telegram" :: Unicode )
240
- ),
241
- Field. textField
242
- Field. Args
243
- { Field. argsModel = st,
244
- Field. argsOptic = # modelState . # stPreview,
245
- Field. argsAction = PushUpdate . Instant ,
246
- Field. argsEmitter = pushActionQueue st . Instant
247
- }
248
- ( Field. defOpts @ Model @ Action
249
- & # optsPlaceholder
250
- .~ (" QR title" :: Unicode )
251
- ),
252
- button_
253
- [ Css. fullWidth,
254
- onClick
255
- . screen
256
- $ if isQrCode sc
257
- then Main
258
- else QrCode sc
259
- ]
260
- [ text
261
- $ if isQrCode sc
262
- then " Delivery Calculator"
263
- else " QR"
264
- ]
265
- ]
228
+ .~ (" Merchant fee %" :: Unicode )
229
+ ),
230
+ Field. textField
231
+ Field. Args
232
+ { Field. argsModel = st,
233
+ Field. argsOptic = # modelState . # stMerchantTele,
234
+ Field. argsAction = PushUpdate . Instant ,
235
+ Field. argsEmitter = pushActionQueue st . Instant
236
+ }
237
+ ( Field. defOpts
238
+ & # optsPlaceholder
239
+ .~ (" Merchant telegram" :: Unicode )
240
+ ),
241
+ Field. textField
242
+ Field. Args
243
+ { Field. argsModel = st,
244
+ Field. argsOptic = # modelState . # stPreview,
245
+ Field. argsAction = PushUpdate . Instant ,
246
+ Field. argsEmitter = pushActionQueue st . Instant
247
+ }
248
+ ( Field. defOpts @ Model @ Action
249
+ & # optsPlaceholder
250
+ .~ (" QR title" :: Unicode )
251
+ ),
252
+ button_
253
+ [ Css. fullWidth,
254
+ onClick
255
+ . screen
256
+ $ if isQrCode sc
257
+ then Main
258
+ else QrCode sc
259
+ ]
260
+ [ text
261
+ $ if isQrCode sc
262
+ then " Delivery Calculator"
263
+ else " QR"
264
+ ]
265
+ ]
266
266
<> linksWidget st
267
267
}
268
268
where
0 commit comments