diff --git a/Trust/Localization/en.lproj/Localizable.strings b/Trust/Localization/en.lproj/Localizable.strings index 605a9e125..55af50f89 100644 --- a/Trust/Localization/en.lproj/Localizable.strings +++ b/Trust/Localization/en.lproj/Localizable.strings @@ -184,6 +184,8 @@ "a.wallet.ticketToken.redeem.selectQuantity.title" = "Select Quantity of Tickets"; "a.wallet.ticketToken.redeem.quantity.title" = "QUANTITY OF TICKETS"; "a.wallet.ticketToken.redeem.showQRCode.title" = "Show QR Code to Redemption Booth"; +"a.wallet.ticketToken.redeem.successful.title" = "Congrats"; +"a.wallet.ticketToken.redeem.successful.description" = "You have successfully redeemed your ticket(s)"; "a.wallet.ticketToken.sell.button.title" = "Sell"; "a.wallet.ticketToken.sell.selectTickets.title" = "Select Tickets To Sell:"; "a.wallet.ticketToken.sell.ethHelp.title" = "Set Ethereum price for magic link:"; diff --git a/Trust/Redeem/ViewControllers/RedeemTicketsQuantitySelectionViewController.swift b/Trust/Redeem/ViewControllers/RedeemTicketsQuantitySelectionViewController.swift index fda349899..e6f8d05f9 100644 --- a/Trust/Redeem/ViewControllers/RedeemTicketsQuantitySelectionViewController.swift +++ b/Trust/Redeem/ViewControllers/RedeemTicketsQuantitySelectionViewController.swift @@ -144,7 +144,7 @@ class RedeemTicketsQuantitySelectionViewController: UIViewController { ticketView.configure(viewModel: .init()) - quantityStepper.borderWidth = 2 + quantityStepper.borderWidth = 1 quantityStepper.clipsToBounds = true quantityStepper.borderColor = viewModel.stepperBorderColor quantityStepper.maximumValue = viewModel.maxValue diff --git a/Trust/Redeem/ViewControllers/TicketRedemptionViewController.swift b/Trust/Redeem/ViewControllers/TicketRedemptionViewController.swift index 9e1a98385..3a8122120 100644 --- a/Trust/Redeem/ViewControllers/TicketRedemptionViewController.swift +++ b/Trust/Redeem/ViewControllers/TicketRedemptionViewController.swift @@ -117,8 +117,9 @@ class TicketRedemptionViewController: UIViewController { private func showSuccessMessage() { invalidateTimer() - UIAlertController.alert(title: "Congrats", - message: "You have successfully redeemed your ticket(s)", + + UIAlertController.alert(title: R.string.localizable.aWalletTicketTokenRedeemSuccessfulTitle(), + message: R.string.localizable.aWalletTicketTokenRedeemSuccessfulDescription(), alertButtonTitles: [R.string.localizable.oK()], alertButtonStyles: [.cancel], viewController: self, diff --git a/Trust/Settings/Coordinators/HelpUsCoordinator.swift b/Trust/Settings/Coordinators/HelpUsCoordinator.swift index d7fa55330..a8c3c5638 100644 --- a/Trust/Settings/Coordinators/HelpUsCoordinator.swift +++ b/Trust/Settings/Coordinators/HelpUsCoordinator.swift @@ -31,7 +31,7 @@ class HelpUsCoordinator: Coordinator { func rateUs() { if #available(iOS 10.3, *) { SKStoreReviewController.requestReview() } else { - UIApplication.shared.openURL(URL(string: "itms-apps://itunes.apple.com/app/id1288339409")!) + UIApplication.shared.openURL(URL(string: Constants.appstoreURL)!) } appTracker.completedRating = true } diff --git a/Trust/Settings/Types/Constants.swift b/Trust/Settings/Types/Constants.swift index 9353fa0bf..b59b4cac4 100644 --- a/Trust/Settings/Types/Constants.swift +++ b/Trust/Settings/Types/Constants.swift @@ -14,6 +14,8 @@ public struct Constants { public static let twitterUsername = "Alpha_wallet" public static let redditGroupName = "r/AlphaWallet/" public static let facebookUsername = "AlphaWallet" + //TODO need to change this for launch + public static let appstoreURL = "itms-apps://itunes.apple.com/app/id1288339409" // support public static let supportEmail = "support@awallet.io" diff --git a/Trust/Style/AppStyle.swift b/Trust/Style/AppStyle.swift index 5261b5100..4720866d0 100644 --- a/Trust/Style/AppStyle.swift +++ b/Trust/Style/AppStyle.swift @@ -23,6 +23,7 @@ func applyStyle() { //We could have set the backBarButtonItem with an empty title for every view controller, but we don't have a place to do it for Eureka view controllers. Using appearance here, while a hack is still more convenient though, since we don't have to do it for every view controller instance UIBarButtonItem.appearance().setBackButtonTitlePositionAdjustment(UIOffset(horizontal: -200, vertical: 0), for: .default) + UIBarButtonItem.appearance().tintColor = Colors.appWhite UIToolbar.appearance().tintColor = Colors.appBackground diff --git a/Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift b/Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift index a024a311e..b4b49a57f 100644 --- a/Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift +++ b/Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift @@ -140,7 +140,7 @@ class TransferTicketsQuantitySelectionViewController: UIViewController { ticketView.configure(viewModel: .init()) - quantityStepper.borderWidth = 2 + quantityStepper.borderWidth = 1 quantityStepper.clipsToBounds = true quantityStepper.borderColor = viewModel.stepperBorderColor quantityStepper.maximumValue = viewModel.maxValue diff --git a/Trust/Transfer/Views/ShareModeButton.swift b/Trust/Transfer/Views/ShareModeButton.swift deleted file mode 100644 index 97bbeb042..000000000 --- a/Trust/Transfer/Views/ShareModeButton.swift +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright © 2018 Stormbird PTE. LTD. - -import UIKit - -class ShareModeButton: UIControl { - var title: String = "" { - didSet { - label.text = title - } - } - var image: UIImage? { - didSet { - imageView.image = image - } - } - let background = UIControl() - let imageView = UIImageView() - let label = UILabel() - var callback: (()->())? - - init() { - super.init(frame: .zero) - - background.addTarget(self, action: #selector(touchDown), for: .touchDown) - background.addTarget(self, action: #selector(touchUpInside), for: .touchUpInside) - background.addTarget(self, action: #selector(touchUpOutside), for: .touchUpOutside) - - background.translatesAutoresizingMaskIntoConstraints = false - addSubview(background) - - background.backgroundColor = Colors.appWhite - background.layer.cornerRadius = 20 - background.layer.shadowRadius = 3 - background.layer.shadowColor = UIColor.black.cgColor - background.layer.shadowOffset = CGSize(width: 0, height: 0) - background.layer.shadowOpacity = 0.14 - background.layer.borderColor = UIColor.black.cgColor - - label.translatesAutoresizingMaskIntoConstraints = false - label.textAlignment = .center - label.numberOfLines = 0 - addSubview(label) - - imageView.translatesAutoresizingMaskIntoConstraints = false - imageView.contentMode = .scaleAspectFit - addSubview(imageView) - - let constraintForImageViewTop: NSLayoutConstraint - if ScreenChecker().isNarrowScreen() { - constraintForImageViewTop = imageView.topAnchor.constraint(equalTo: topAnchor, constant: 3) - } else { - constraintForImageViewTop = imageView.bottomAnchor.constraint(equalTo: centerYAnchor, constant: 7) - } - - NSLayoutConstraint.activate([ - background.leadingAnchor.constraint(equalTo: leadingAnchor), - background.trailingAnchor.constraint(equalTo: trailingAnchor), - background.topAnchor.constraint(equalTo: topAnchor), - background.bottomAnchor.constraint(equalTo: bottomAnchor), - - imageView.centerXAnchor.constraint(equalTo: centerXAnchor), - constraintForImageViewTop, - imageView.bottomAnchor.constraint(equalTo: label.topAnchor, constant: -3), - - imageView.widthAnchor.constraint(equalToConstant: 70), - imageView.heightAnchor.constraint(equalToConstant: 70), - - label.leftAnchor.constraint(equalTo: leftAnchor, constant: 10), - label.rightAnchor.constraint(equalTo: rightAnchor, constant: -10), - label.bottomAnchor.constraint(equalTo: bottomAnchor), - - widthAnchor.constraint(equalTo: heightAnchor) - ]) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - @objc func touchDown() { - background.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.1) - } - @objc func touchUpInside() { - background.backgroundColor = Colors.appWhite - callback?() - } - @objc func touchUpOutside() { - background.backgroundColor = Colors.appWhite - } -}