nozaps: update zap sheet style to make it clear its a user zap

This commit is contained in:
William Casarin
2023-06-23 11:49:58 +02:00
parent 8b24befaf7
commit 61b3ad2990

View File

@@ -168,14 +168,14 @@ struct CustomizeZapView: View {
if model.zapping { if model.zapping {
Text("Zapping...", comment: "Text to indicate that the app is in the process of sending a zap.") Text("Zapping...", comment: "Text to indicate that the app is in the process of sending a zap.")
} else { } else {
Button(NSLocalizedString("Zap", comment: "Button to send a zap.")) { Button(NSLocalizedString("Zap User", comment: "Button to send a zap.")) {
let amount = model.custom_amount_sats let amount = model.custom_amount_sats
send_zap(damus_state: state, target: target, lnurl: lnurl, is_custom: true, comment: model.comment, amount_sats: amount, zap_type: model.zap_type) send_zap(damus_state: state, target: target, lnurl: lnurl, is_custom: true, comment: model.comment, amount_sats: amount, zap_type: model.zap_type)
model.zapping = true model.zapping = true
} }
.disabled(model.custom_amount_sats == 0 || model.custom_amount.isEmpty) .disabled(model.custom_amount_sats == 0 || model.custom_amount.isEmpty)
.font(.system(size: 28, weight: .bold)) .font(.system(size: 28, weight: .bold))
.frame(width: 130, height: 50) .frame(width: 180, height: 50)
.foregroundColor(.white) .foregroundColor(.white)
.background(LINEAR_GRADIENT) .background(LINEAR_GRADIENT)
.opacity(model.custom_amount_sats == 0 || model.custom_amount.isEmpty ? 0.5 : 1.0) .opacity(model.custom_amount_sats == 0 || model.custom_amount.isEmpty ? 0.5 : 1.0)
@@ -231,20 +231,24 @@ struct CustomizeZapView: View {
var body: some View { var body: some View {
VStack(alignment: .center, spacing: 20) { VStack(alignment: .center, spacing: 20) {
ZapTypeButton() ScrollView {
.padding(.top, 50) HStack(alignment: .center) {
UserView(damus_state: state, pubkey: target.pubkey)
ZapUserView(state: state, pubkey: target.pubkey)
ZapTypeButton()
}
.padding([.horizontal, .top])
CustomZapTextField CustomZapTextField
AmountPicker AmountPicker
ZapReply ZapReply
ZapButton ZapButton
Spacer() Spacer()
}
} }
.sheet(isPresented: $model.show_zap_types) { .sheet(isPresented: $model.show_zap_types) {
if #available(iOS 16.0, *) { if #available(iOS 16.0, *) {