Merge branch 'master' into show-app-background-color-instead-of-white-while-loading-html-docs

pull/215/head
James Sangalli 7 years ago committed by GitHub
commit 856b516fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Trust/Localization/en.lproj/Localizable.strings
  2. 2
      Trust/Redeem/ViewControllers/RedeemTicketsQuantitySelectionViewController.swift
  3. 5
      Trust/Redeem/ViewControllers/TicketRedemptionViewController.swift
  4. 2
      Trust/Settings/Coordinators/HelpUsCoordinator.swift
  5. 2
      Trust/Settings/Types/Constants.swift
  6. 1
      Trust/Style/AppStyle.swift
  7. 2
      Trust/Transfer/ViewControllers/TransferTicketsQuantitySelectionViewController.swift
  8. 90
      Trust/Transfer/Views/ShareModeButton.swift

@ -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:";

@ -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

@ -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,

@ -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
}

@ -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"

@ -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

@ -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

@ -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
}
}
Loading…
Cancel
Save