diff --git a/iOS/Account/Account.storyboard b/iOS/Account/Account.storyboard index 5d42f4d88..f8cf163e5 100644 --- a/iOS/Account/Account.storyboard +++ b/iOS/Account/Account.storyboard @@ -1,10 +1,11 @@ - + - + + @@ -47,6 +48,37 @@ + + + + + + + + + + + + + + + + @@ -196,6 +228,24 @@ + + + + + + + + + + + + + @@ -272,7 +322,7 @@ - + @@ -281,6 +331,37 @@ + + + + + + + + + + + + + + + + @@ -430,6 +511,37 @@ + + + + + + + + + + + + + + + + @@ -563,6 +675,37 @@ + + + + + + + + + + + + + + + + @@ -697,8 +840,10 @@ + + @@ -729,6 +874,24 @@ + + + + + + + + + + + + + @@ -801,5 +964,11 @@ + + + + + + diff --git a/iOS/Account/FeedWranglerAccountViewController.swift b/iOS/Account/FeedWranglerAccountViewController.swift index c5dd3944c..5f4bc997b 100644 --- a/iOS/Account/FeedWranglerAccountViewController.swift +++ b/iOS/Account/FeedWranglerAccountViewController.swift @@ -10,6 +10,7 @@ import UIKit import Account import RSWeb import Secrets +import SafariServices class FeedWranglerAccountViewController: UITableViewController { @@ -138,6 +139,13 @@ class FeedWranglerAccountViewController: UITableViewController { } } + @IBAction func signUpWithProvider(_ sender: Any) { + let url = URL(string: "https://feedwrangler.net/users/new")! + let safari = SFSafariViewController(url: url) + safari.modalPresentationStyle = .currentContext + self.present(safari, animated: true, completion: nil) + } + @objc func textDidChange(_ note: Notification) { actionButton.isEnabled = !(emailTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false) } diff --git a/iOS/Account/FeedbinAccountViewController.swift b/iOS/Account/FeedbinAccountViewController.swift index 270fb969f..413a2ec79 100644 --- a/iOS/Account/FeedbinAccountViewController.swift +++ b/iOS/Account/FeedbinAccountViewController.swift @@ -10,6 +10,7 @@ import UIKit import Account import Secrets import RSWeb +import SafariServices class FeedbinAccountViewController: UITableViewController { @@ -138,6 +139,14 @@ class FeedbinAccountViewController: UITableViewController { } } + @IBAction func signUpWithProvider(_ sender: Any) { + let url = URL(string: "https://feedbin.com/signup")! + let safari = SFSafariViewController(url: url) + safari.modalPresentationStyle = .currentContext + self.present(safari, animated: true, completion: nil) + } + + @objc func textDidChange(_ note: Notification) { actionButton.isEnabled = !(emailTextField.text?.isEmpty ?? false) && !(passwordTextField.text?.isEmpty ?? false) } diff --git a/iOS/Account/NewsBlurAccountViewController.swift b/iOS/Account/NewsBlurAccountViewController.swift index 6d5dab361..522b2203e 100644 --- a/iOS/Account/NewsBlurAccountViewController.swift +++ b/iOS/Account/NewsBlurAccountViewController.swift @@ -10,6 +10,7 @@ import UIKit import Account import Secrets import RSWeb +import SafariServices class NewsBlurAccountViewController: UITableViewController { @@ -142,6 +143,13 @@ class NewsBlurAccountViewController: UITableViewController { } } + + @IBAction func signUpWithProvider(_ sender: Any) { + let url = URL(string: "https://newsblur.com")! + let safari = SFSafariViewController(url: url) + safari.modalPresentationStyle = .currentContext + self.present(safari, animated: true, completion: nil) + } @objc func textDidChange(_ note: Notification) { actionButton.isEnabled = !(usernameTextField.text?.isEmpty ?? false) diff --git a/iOS/Account/ReaderAPIAccountViewController.swift b/iOS/Account/ReaderAPIAccountViewController.swift index 5c99618d6..3af06e767 100644 --- a/iOS/Account/ReaderAPIAccountViewController.swift +++ b/iOS/Account/ReaderAPIAccountViewController.swift @@ -10,6 +10,7 @@ import UIKit import Account import Secrets import RSWeb +import SafariServices class ReaderAPIAccountViewController: UITableViewController { @@ -20,6 +21,8 @@ class ReaderAPIAccountViewController: UITableViewController { @IBOutlet weak var apiURLTextField: UITextField! @IBOutlet weak var showHideButton: UIButton! @IBOutlet weak var actionButton: UIButton! + @IBOutlet weak var footerLabel: UILabel! + @IBOutlet weak var signUpButton: UIButton! weak var account: Account? var accountType: AccountType? @@ -57,6 +60,8 @@ class ReaderAPIAccountViewController: UITableViewController { } } + setupFooter() + NotificationCenter.default.addObserver(self, selector: #selector(textDidChange(_:)), name: UITextField.textDidChangeNotification, object: usernameTextField) NotificationCenter.default.addObserver(self, selector: #selector(textDidChange(_:)), name: UITextField.textDidChangeNotification, object: passwordTextField) @@ -64,6 +69,25 @@ class ReaderAPIAccountViewController: UITableViewController { } + private func setupFooter() { + switch accountType { + case .bazQux: + footerLabel.text = NSLocalizedString("Sign in to your BazQux account and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have a BazQux account?", comment: "BazQux") + signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "BazQux SignUp"), for: .normal) + case .inoreader: + footerLabel.text = NSLocalizedString("Sign in to your InoReader account and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have an InoReader account?", comment: "InoReader") + signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "InoReader SignUp"), for: .normal) + case .theOldReader: + footerLabel.text = NSLocalizedString("Sign in to your The Old Reader account and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have a The Old Reader account?", comment: "TOR") + signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "TOR SignUp"), for: .normal) + case .freshRSS: + footerLabel.text = NSLocalizedString("Sign in to your FreshRSS instance and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have an FreshRSS instance?", comment: "FreshRSS") + signUpButton.setTitle(NSLocalizedString("Find Out More", comment: "FreshRSS SignUp"), for: .normal) + default: + return + } + } + override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return section == 0 ? ImageHeaderView.rowHeight : super.tableView(tableView, heightForHeaderInSection: section) } @@ -224,6 +248,25 @@ class ReaderAPIAccountViewController: UITableViewController { return true } + @IBAction func signUpWithProvider(_ sender: Any) { + var url: URL! + switch accountType { + case .bazQux: + url = URL(string: "https://bazqux.com")! + case .inoreader: + url = URL(string: "https://www.inoreader.com")! + case .theOldReader: + url = URL(string: "https://theoldreader.com")! + case .freshRSS: + url = URL(string: "https://freshrss.org")! + default: + return + } + let safari = SFSafariViewController(url: url) + safari.modalPresentationStyle = .currentContext + self.present(safari, animated: true, completion: nil) + } + private func apiURL() -> URL? { switch accountType { case .freshRSS: @@ -239,6 +282,8 @@ class ReaderAPIAccountViewController: UITableViewController { } } + + @objc func textDidChange(_ note: Notification) { actionButton.isEnabled = !(usernameTextField.text?.isEmpty ?? false) } diff --git a/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/Contents.json b/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/Contents.json index 9e763872c..e072222a1 100644 --- a/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/Contents.json +++ b/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "accountLocalPad-any.pdf", + "filename" : "ipad-any-slice.pdf", "idiom" : "universal" }, { @@ -11,7 +11,7 @@ "value" : "dark" } ], - "filename" : "accountLocalPad-dark.pdf", + "filename" : "ipad-dark-slice.pdf", "idiom" : "universal" } ], diff --git a/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/accountLocalPhone-dark.pdf b/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/ipad-any-slice.pdf similarity index 70% rename from iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/accountLocalPhone-dark.pdf rename to iOS/Resources/Assets.xcassets/accountLocalPad.imageset/ipad-any-slice.pdf index f1c59bc0b..91665fa1b 100644 Binary files a/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/accountLocalPhone-dark.pdf and b/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/ipad-any-slice.pdf differ diff --git a/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/accountLocalPad-any.pdf b/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/ipad-dark-slice.pdf similarity index 67% rename from iOS/Resources/Assets.xcassets/accountLocalPad.imageset/accountLocalPad-any.pdf rename to iOS/Resources/Assets.xcassets/accountLocalPad.imageset/ipad-dark-slice.pdf index e8b6e0188..9091a096b 100644 Binary files a/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/accountLocalPad-any.pdf and b/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/ipad-dark-slice.pdf differ diff --git a/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/Contents.json b/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/Contents.json index d8acd1b72..04d21c05f 100644 --- a/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/Contents.json +++ b/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "accountLocalPhone-any.pdf", + "filename" : "iphone-any-slice.pdf", "idiom" : "universal" }, { @@ -11,7 +11,7 @@ "value" : "dark" } ], - "filename" : "accountLocalPhone-dark.pdf", + "filename" : "iphone-dark-slice.pdf", "idiom" : "universal" } ], diff --git a/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/accountLocalPad-dark.pdf b/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/iphone-any-slice.pdf similarity index 67% rename from iOS/Resources/Assets.xcassets/accountLocalPad.imageset/accountLocalPad-dark.pdf rename to iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/iphone-any-slice.pdf index 0ef067fd3..f36056970 100644 Binary files a/iOS/Resources/Assets.xcassets/accountLocalPad.imageset/accountLocalPad-dark.pdf and b/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/iphone-any-slice.pdf differ diff --git a/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/accountLocalPhone-any.pdf b/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/iphone-dark-slice.pdf similarity index 67% rename from iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/accountLocalPhone-any.pdf rename to iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/iphone-dark-slice.pdf index 75768db1d..cf2247077 100644 Binary files a/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/accountLocalPhone-any.pdf and b/iOS/Resources/Assets.xcassets/accountLocalPhone.imageset/iphone-dark-slice.pdf differ