Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
radeknovis committed Jul 24, 2023
1 parent 4322598 commit e1a6964
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 38 deletions.
12 changes: 7 additions & 5 deletions Sources/WalletConnectModal/Modal/ModalSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ public struct ModalSheet: View {
TextField("Search", text: $viewModel.searchTerm, onEditingChanged: { editing in
self.searchEditing = editing
})
.transform { view in
#if os(macOS)
view
#else
view.autocapitalization(.none)
#endif
}
}
.padding(.vertical, 4)
.padding(.horizontal, 10)
Expand All @@ -107,11 +114,6 @@ public struct ModalSheet: View {
.onDisappear {
searchEditing = false
}
.transform {
#if os(iOS)
$0.autocapitalization(.none)
#endif
}
.padding(.horizontal, 50)
} else {
Text(viewModel.destination.contentTitle)
Expand Down
2 changes: 1 addition & 1 deletion Sources/WalletConnectModal/Modal/ModalViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ final class ModalViewModel: ObservableObject {
.sink { sessions in
print(sessions)
isShown.wrappedValue = false
self.toast = Toast(style: .success, message: "Session estabilished", duration: 15)
self.toast = Toast(style: .success, message: "Session estabilished", duration: 5)
}
.store(in: &disposeBag)

Expand Down
59 changes: 30 additions & 29 deletions Sources/WalletConnectModal/Modal/Screens/GetAWalletView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,54 @@ struct GetAWalletView: View {
WalletImage(wallet: wallet)
.frame(width: 40, height: 40)

Text(wallet.name)
.font(.system(size: 16, weight: .medium))
.padding(.horizontal)
Text(wallet.name)
.font(.system(size: 16, weight: .medium))
.padding(.horizontal)

Spacer()
Spacer()

Image(systemName: "chevron.right")
.font(.system(.footnote).weight(.semibold))
Image(systemName: "chevron.right")
.font(.system(.footnote).weight(.semibold))
}
}
}
}
}
.frame(minHeight: 400)
.listStyle(.plain)
.frame(minHeight: 400)
.listStyle(.plain)


VStack(alignment: .center, spacing: 8) {
Text("Not what you’re looking for?")
.font(
.system(size: 16)
.weight(.semibold)
)
.multilineTextAlignment(.center)
.foregroundColor(.foreground1)
)
.multilineTextAlignment(.center)
.foregroundColor(.foreground1)

Text("With hundreds of wallets out there, 
there’s something for everyone ")
.font(
.system(size: 14)
Text("With hundreds of wallets out there, 
there’s something for everyone ")
.font(
.system(size: 14)
.weight(.medium)
)
.foregroundColor(.foreground2)
.fixedSize(horizontal: false, vertical: true)
)
.foregroundColor(.foreground2)
.fixedSize(horizontal: false, vertical: true)

Button(action: {
navigateToExternalLink(URL(string: "https://walletconnect.com/explorer?type=wallet")!)
}) {
HStack {
Text("Explore Wallets")
Image(.external_link)
Button(action: {
navigateToExternalLink(URL(string: "https://walletconnect.com/explorer?type=wallet")!)
}) {
HStack {
Text("Explore Wallets")
Image(.external_link)
}
}
.buttonStyle(W3MButtonStyle())
}
.buttonStyle(W3MButtonStyle())
.multilineTextAlignment(.center)
.padding(.horizontal, 0)
.padding(.top, 0)
.frame(maxHeight: .infinity, alignment: .bottom)
}
.multilineTextAlignment(.center)
.padding(.horizontal, 0)
.padding(.top, 0)
.frame(maxHeight: .infinity, alignment: .bottom)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ struct WhatIsWalletView: View {
.padding(.bottom, 40)
}
}
.tabViewStyle(.page(indexDisplayMode: .always))
.transform {
#if os(iOS)
$0.tabViewStyle(.page(indexDisplayMode: .always))
#endif
}
.frame(height: 150)

} else {
Expand Down
4 changes: 2 additions & 2 deletions Sources/WalletConnectModal/UI/Common/Toast.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import SwiftUI

struct Toast: Equatable {
var style: ToastStyle
var message: String
let style: ToastStyle
let message: String
var duration: Double = 3
var width: Double = .infinity
}
Expand Down

0 comments on commit e1a6964

Please sign in to comment.