Removes 1Password

This commit is contained in:
Stuart Breckenridge
2022-01-25 06:07:33 +08:00
parent 9d41e8eec2
commit ac8fdabb3e
12 changed files with 1 additions and 974 deletions

View File

@@ -21,11 +21,6 @@ class FeedWranglerAccountViewController: UITableViewController {
@IBOutlet weak var showHideButton: UIButton!
@IBOutlet weak var actionButton: UIButton!
@IBOutlet weak var footerLabel: UILabel!
@IBOutlet weak var onepasswordButton: UIBarButtonItem! {
didSet {
onepasswordButton.image?.withTintColor(AppAssets.primaryAccentColor)
}
}
weak var account: Account?
weak var delegate: AddAccountDismissDelegate?
@@ -157,16 +152,6 @@ class FeedWranglerAccountViewController: UITableViewController {
actionButton.isEnabled = !(emailTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false)
}
@IBAction func retrievePasswordDetailsFrom1Password(_ sender: Any) {
OnePasswordExtension.shared().findLogin(forURLString: "feedwrangler.com", for: self, sender: sender) { [self] loginDictionary, error in
if let loginDictionary = loginDictionary {
emailTextField.text = loginDictionary[AppExtensionUsernameKey] as? String
passwordTextField.text = loginDictionary[AppExtensionPasswordKey] as? String
actionButton.isEnabled = !(emailTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false)
}
}
}
private func showError(_ message: String) {
presentError(title: NSLocalizedString("Error", comment: "Credentials Error"), message: message)

View File

@@ -21,11 +21,6 @@ class FeedbinAccountViewController: UITableViewController {
@IBOutlet weak var showHideButton: UIButton!
@IBOutlet weak var actionButton: UIButton!
@IBOutlet weak var footerLabel: UILabel!
@IBOutlet weak var onepasswordButton: UIBarButtonItem! {
didSet {
onepasswordButton.image?.withTintColor(AppAssets.primaryAccentColor)
}
}
weak var account: Account?
weak var delegate: AddAccountDismissDelegate?
@@ -52,10 +47,6 @@ class FeedbinAccountViewController: UITableViewController {
tableView.register(ImageHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader")
if !OnePasswordExtension.shared().isAppExtensionAvailable() {
onepasswordButton.isEnabled = false
onepasswordButton.image?.withTintColor(.clear)
}
}
private func setupFooter() {
@@ -80,16 +71,6 @@ class FeedbinAccountViewController: UITableViewController {
dismiss(animated: true, completion: nil)
}
@IBAction func retrievePasswordDetailsFrom1Password(_ sender: Any) {
OnePasswordExtension.shared().findLogin(forURLString: "feedbin.com", for: self, sender: self) { [self] loginDictionary, error in
if let loginDictionary = loginDictionary {
emailTextField.text = loginDictionary[AppExtensionUsernameKey] as? String
passwordTextField.text = loginDictionary[AppExtensionPasswordKey] as? String
actionButton.isEnabled = !(emailTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false)
}
}
}
@IBAction func showHidePassword(_ sender: Any) {
if passwordTextField.isSecureTextEntry {

View File

@@ -21,11 +21,6 @@ class NewsBlurAccountViewController: UITableViewController {
@IBOutlet weak var showHideButton: UIButton!
@IBOutlet weak var actionButton: UIButton!
@IBOutlet weak var footerLabel: UILabel!
@IBOutlet weak var onepasswordButton: UIBarButtonItem! {
didSet {
onepasswordButton.image?.withTintColor(AppAssets.primaryAccentColor)
}
}
weak var account: Account?
weak var delegate: AddAccountDismissDelegate?
@@ -157,16 +152,6 @@ class NewsBlurAccountViewController: UITableViewController {
safari.modalPresentationStyle = .currentContext
self.present(safari, animated: true, completion: nil)
}
@IBAction func retrievePasswordDetailsFrom1Password(_ sender: Any) {
OnePasswordExtension.shared().findLogin(forURLString: "newsblur.com", for: self, sender: sender) { [self] loginDictionary, error in
if let loginDictionary = loginDictionary {
usernameTextField.text = loginDictionary[AppExtensionUsernameKey] as? String
passwordTextField.text = loginDictionary[AppExtensionPasswordKey] as? String
actionButton.isEnabled = !(usernameTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false)
}
}
}
@objc func textDidChange(_ note: Notification) {
actionButton.isEnabled = !(usernameTextField.text?.isEmpty ?? false)

View File

@@ -23,11 +23,6 @@ class ReaderAPIAccountViewController: UITableViewController {
@IBOutlet weak var actionButton: UIButton!
@IBOutlet weak var footerLabel: UILabel!
@IBOutlet weak var signUpButton: UIButton!
@IBOutlet weak var onepasswordButton: UIBarButtonItem! {
didSet {
onepasswordButton.image?.withTintColor(AppAssets.primaryAccentColor)
}
}
weak var account: Account?
var accountType: AccountType?
@@ -269,30 +264,6 @@ class ReaderAPIAccountViewController: UITableViewController {
self.present(safari, animated: true, completion: nil)
}
@IBAction func retrievePasswordDetailsFrom1Password(_ sender: Any) {
var url: String
switch accountType {
case .bazQux:
url = "bazqux.com"
case .inoreader:
url = "inoreader.com"
case .theOldReader:
url = "theoldreader.com"
case .freshRSS:
url = apiURLTextField.text ?? ""
default:
url = ""
}
OnePasswordExtension.shared().findLogin(forURLString: url, for: self, sender: sender) { [self] loginDictionary, error in
if let loginDictionary = loginDictionary {
usernameTextField.text = loginDictionary[AppExtensionUsernameKey] as? String
passwordTextField.text = loginDictionary[AppExtensionPasswordKey] as? String
actionButton.isEnabled = !(usernameTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false)
}
}
}
private func apiURL() -> URL? {
switch accountType {
case .freshRSS:

View File

@@ -1,23 +0,0 @@
{
"images" : [
{
"filename" : "onepassword-navbar.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "onepassword-navbar@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "onepassword-navbar@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -2,4 +2,4 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "OnePasswordExtension.h"