Replace QR code scanner's switch front/back camera button with photo picker button so we can pick photos with QR codes in them

pull/1098/head
Hwee-Boon Yar 6 years ago
parent 3d079ac070
commit 874b3e5302
  1. 2
      AlphaWallet/Browser/Coordinators/ScanQRCodeCoordinator.swift
  2. 1
      AlphaWallet/Localization/en.lproj/Localizable.strings
  3. 2
      AlphaWallet/Localization/es.lproj/Localizable.strings
  4. 2
      AlphaWallet/Localization/ja.lproj/Localizable.strings
  5. 2
      AlphaWallet/Localization/ko.lproj/Localizable.strings
  6. 2
      AlphaWallet/Localization/zh-Hans.lproj/Localizable.strings
  7. 2
      AlphaWallet/Tokens/ViewControllers/NewTokenViewController.swift
  8. 2
      AlphaWallet/Transfer/ViewControllers/SendViewController.swift
  9. 2
      AlphaWallet/Transfer/ViewControllers/TransferTokensCardViaWalletAddressViewController.swift
  10. 2
      AlphaWallet/Wallet/ViewControllers/ImportWalletViewController.swift
  11. 2
      Podfile
  12. 12
      Podfile.lock

@ -14,7 +14,7 @@ final class ScanQRCodeCoordinator: NSObject, Coordinator {
let navigationController: NavigationController
lazy var qrcodeController: QRCodeReaderViewController = {
let controller = QRCodeReaderViewController(cancelButtonTitle: R.string.localizable.cancel())
let controller = QRCodeReaderViewController(cancelButtonTitle: R.string.localizable.cancel(), chooseFromPhotoLibraryButtonTitle: R.string.localizable.photos())
controller.delegate = self
controller.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(dismiss))
controller.delegate = self

@ -327,3 +327,4 @@
"dappBrowser.clearMyDapps" = "Remove Dapp?";
"recent.transactions" = "Recent Transactions";
"blockchain.XDAI" = "xDAI Chain";
"photos" = "Photos";

@ -326,5 +326,5 @@
"dappBrowser.clearMyDapps" = "Remove Dapp?";
"recent.transactions" = "Recent Transactions";
"blockchain.XDAI" = "xDAI Chain";
"a.claim.token.failed.notEnoughXDAI.title" = "a.claim.token.failed.notEnoughXDAI.title";
"photos" = "Photos";

@ -326,5 +326,5 @@
"dappBrowser.clearMyDapps" = "Remove Dapp?";
"recent.transactions" = "Recent Transactions";
"blockchain.XDAI" = "xDAI Chain";
"a.claim.token.failed.notEnoughXDAI.title" = "a.claim.token.failed.notEnoughXDAI.title";
"photos" = "Photos";

@ -326,5 +326,5 @@
"dappBrowser.clearMyDapps" = "Remove Dapp?";
"recent.transactions" = "Recent Transactions";
"blockchain.XDAI" = "xDAI Chain";
"a.claim.token.failed.notEnoughXDAI.title" = "a.claim.token.failed.notEnoughXDAI.title";
"photos" = "Photos";

@ -326,5 +326,5 @@
"dappBrowser.clearMyDapps" = "Remove Dapp?";
"recent.transactions" = "Recent Transactions";
"blockchain.XDAI" = "xDAI Chain";
"a.claim.token.failed.notEnoughXDAI.title" = "a.claim.token.failed.notEnoughXDAI.title";
"photos" = "Photos";

@ -348,7 +348,7 @@ extension NewTokenViewController: AddressTextFieldDelegate {
promptUserOpenSettingsToChangeCameraPermission()
return
}
let controller = QRCodeReaderViewController()
let controller = QRCodeReaderViewController(cancelButtonTitle: nil, chooseFromPhotoLibraryButtonTitle: R.string.localizable.photos())
controller.delegate = self
present(controller, animated: true, completion: nil)
}

@ -338,7 +338,7 @@ extension SendViewController: AddressTextFieldDelegate {
promptUserOpenSettingsToChangeCameraPermission()
return
}
let controller = QRCodeReaderViewController()
let controller = QRCodeReaderViewController(cancelButtonTitle: nil, chooseFromPhotoLibraryButtonTitle: R.string.localizable.photos())
controller.delegate = self
present(controller, animated: true, completion: nil)
}

@ -174,7 +174,7 @@ extension TransferTokensCardViaWalletAddressViewController: AddressTextFieldDele
promptUserOpenSettingsToChangeCameraPermission()
return
}
let controller = QRCodeReaderViewController()
let controller = QRCodeReaderViewController(cancelButtonTitle: nil, chooseFromPhotoLibraryButtonTitle: R.string.localizable.photos())
controller.delegate = self
present(controller, animated: true, completion: nil)
}

@ -307,7 +307,7 @@ class ImportWalletViewController: UIViewController, CanScanQRCode {
promptUserOpenSettingsToChangeCameraPermission()
return
}
let controller = QRCodeReaderViewController()
let controller = QRCodeReaderViewController(cancelButtonTitle: nil, chooseFromPhotoLibraryButtonTitle: R.string.localizable.photos())
controller.delegate = self
present(controller, animated: true, completion: nil)
}

@ -12,7 +12,7 @@ target 'AlphaWallet' do
pod 'Eureka', '~> 4.3'
pod 'MBProgressHUD'
pod 'StatefulViewController'
pod 'QRCodeReaderViewController', :git=>'https://github.com/yannickl/QRCodeReaderViewController.git', :branch=>'master'
pod 'QRCodeReaderViewController', :git=>'https://github.com/AlphaWallet/QRCodeReaderViewController.git', :branch=>'alphawallet'
pod 'KeychainSwift'
pod 'SwiftLint'
pod 'SeedStackViewController'

@ -97,7 +97,7 @@ DEPENDENCIES:
- Moya (~> 10.0.1)
- PromiseKit/Alamofire
- PromiseKit/CorePromise
- QRCodeReaderViewController (from `https://github.com/yannickl/QRCodeReaderViewController.git`, branch `master`)
- QRCodeReaderViewController (from `https://github.com/AlphaWallet/QRCodeReaderViewController.git`, branch `alphawallet`)
- R.swift
- RealmSwift (~> 3.9)
- SAMKeychain
@ -152,8 +152,8 @@ EXTERNAL SOURCES:
:commit: c13e70e63dd1a2554b59e0aa75c12b93e2ee9dd8
:git: https://github.com/alpha-wallet/Macaw.git
QRCodeReaderViewController:
:branch: master
:git: https://github.com/yannickl/QRCodeReaderViewController.git
:branch: alphawallet
:git: https://github.com/AlphaWallet/QRCodeReaderViewController.git
SwiftyXMLParser:
:git: https://github.com/yahoojapan/SwiftyXMLParser.git
TrezorCrypto:
@ -174,8 +174,8 @@ CHECKOUT OPTIONS:
:commit: c13e70e63dd1a2554b59e0aa75c12b93e2ee9dd8
:git: https://github.com/alpha-wallet/Macaw.git
QRCodeReaderViewController:
:commit: 80bd79cbeede842949b229f81bc6328f53701c5a
:git: https://github.com/yannickl/QRCodeReaderViewController.git
:commit: b00c1919e8d359fb7d1b3b7bdbffa45f8d68c2cf
:git: https://github.com/AlphaWallet/QRCodeReaderViewController.git
SwiftyXMLParser:
:commit: 1ddcad0a09efb85f2325d994c2169cd9ba116ae3
:git: https://github.com/yahoojapan/SwiftyXMLParser.git
@ -229,6 +229,6 @@ SPEC CHECKSUMS:
TrustKeystore: 26efa8079f6451d02ce64b906d3ff240fd71d7ca
web3swift: ec721fe509a4b3ca7abdf027d186d07fce65be8f
PODFILE CHECKSUM: 60bd42079815449bfc0a86db9f656b1f7ec2e1cb
PODFILE CHECKSUM: 3ec7d523f3289b6f77d721eacd0020ec5a9624c6
COCOAPODS: 1.5.3

Loading…
Cancel
Save