diff --git a/iOS/Account/Account.storyboard b/iOS/Account/Account.storyboard index 5d42f4d88..4c1f22bbc 100644 --- a/iOS/Account/Account.storyboard +++ b/iOS/Account/Account.storyboard @@ -1,10 +1,11 @@ - + - + + @@ -47,6 +48,37 @@ + + + + + + + + + + + + + + + + @@ -165,6 +197,7 @@ + @@ -196,6 +229,24 @@ + + + + + + + + + + + + + @@ -267,12 +318,13 @@ + - + @@ -281,6 +333,37 @@ + + + + + + + + + + + + + + + + @@ -399,6 +482,7 @@ + @@ -430,6 +514,37 @@ + + + + + + + + + + + + + + + + @@ -547,6 +662,7 @@ + @@ -563,6 +679,37 @@ + + + + + + + + + + + + + + + + @@ -697,8 +844,10 @@ + + @@ -729,6 +878,24 @@ + + + + + + + + + + + + + @@ -775,6 +942,9 @@ + + + @@ -801,5 +971,11 @@ + + + + + + diff --git a/iOS/Account/CloudKitAccountViewController.swift b/iOS/Account/CloudKitAccountViewController.swift index a72f8203f..1367590db 100644 --- a/iOS/Account/CloudKitAccountViewController.swift +++ b/iOS/Account/CloudKitAccountViewController.swift @@ -12,12 +12,18 @@ import Account class CloudKitAccountViewController: UITableViewController { weak var delegate: AddAccountDismissDelegate? - + @IBOutlet weak var footerLabel: UILabel! + override func viewDidLoad() { super.viewDidLoad() - + setupFooter() + tableView.register(ImageHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader") } + + private func setupFooter() { + footerLabel.text = NSLocalizedString("Use your iCloud account to sync your subscriptions across your iOS and macOS devices.", comment: "iCloud") + } @IBAction func cancel(_ sender: Any) { dismiss(animated: true, completion: nil) diff --git a/iOS/Account/FeedWranglerAccountViewController.swift b/iOS/Account/FeedWranglerAccountViewController.swift index c5dd3944c..3e71ac7d3 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 { @@ -19,13 +20,15 @@ class FeedWranglerAccountViewController: UITableViewController { @IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var showHideButton: UIButton! @IBOutlet weak var actionButton: UIButton! + @IBOutlet weak var footerLabel: UILabel! weak var account: Account? weak var delegate: AddAccountDismissDelegate? override func viewDidLoad() { super.viewDidLoad() - + setupFooter() + activityIndicator.isHidden = true emailTextField.delegate = self passwordTextField.delegate = self @@ -43,6 +46,10 @@ class FeedWranglerAccountViewController: UITableViewController { tableView.register(ImageHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader") } + + private func setupFooter() { + footerLabel.text = NSLocalizedString("Sign in to your Feed Wrangler account and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have a Feed Wrangler account?", comment: "Feed Wrangler") + } override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return section == 0 ? ImageHeaderView.rowHeight : super.tableView(tableView, heightForHeaderInSection: section) @@ -138,6 +145,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..4dcb85e56 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 { @@ -19,12 +20,14 @@ class FeedbinAccountViewController: UITableViewController { @IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var showHideButton: UIButton! @IBOutlet weak var actionButton: UIButton! + @IBOutlet weak var footerLabel: UILabel! weak var account: Account? weak var delegate: AddAccountDismissDelegate? override func viewDidLoad() { super.viewDidLoad() + setupFooter() activityIndicator.isHidden = true emailTextField.delegate = self @@ -44,6 +47,10 @@ class FeedbinAccountViewController: UITableViewController { tableView.register(ImageHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader") } + + private func setupFooter() { + footerLabel.text = NSLocalizedString("Sign in to your Feedbin account and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have a Feedbin account?", comment: "Feedbin") + } override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return section == 0 ? ImageHeaderView.rowHeight : super.tableView(tableView, heightForHeaderInSection: section) @@ -138,6 +145,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/LocalAccountViewController.swift b/iOS/Account/LocalAccountViewController.swift index 0bcbe8fa2..d692dc5fa 100644 --- a/iOS/Account/LocalAccountViewController.swift +++ b/iOS/Account/LocalAccountViewController.swift @@ -12,16 +12,21 @@ import Account class LocalAccountViewController: UITableViewController { @IBOutlet weak var nameTextField: UITextField! + @IBOutlet weak var footerLabel: UILabel! weak var delegate: AddAccountDismissDelegate? override func viewDidLoad() { super.viewDidLoad() + setupFooter() navigationItem.title = Account.defaultLocalAccountName nameTextField.delegate = self - tableView.register(ImageHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader") } + + private func setupFooter() { + footerLabel.text = NSLocalizedString("Local accounts do not sync your subscriptions across devices.", comment: "Local") + } @IBAction func cancel(_ sender: Any) { dismiss(animated: true, completion: nil) diff --git a/iOS/Account/NewsBlurAccountViewController.swift b/iOS/Account/NewsBlurAccountViewController.swift index 6d5dab361..8b67b496b 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 { @@ -19,13 +20,14 @@ class NewsBlurAccountViewController: UITableViewController { @IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var showHideButton: UIButton! @IBOutlet weak var actionButton: UIButton! + @IBOutlet weak var footerLabel: UILabel! weak var account: Account? weak var delegate: AddAccountDismissDelegate? override func viewDidLoad() { super.viewDidLoad() - + setupFooter() activityIndicator.isHidden = true usernameTextField.delegate = self passwordTextField.delegate = self @@ -44,6 +46,10 @@ class NewsBlurAccountViewController: UITableViewController { tableView.register(ImageHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader") } + + private func setupFooter() { + footerLabel.text = NSLocalizedString("Sign in to your NewsBlur account and sync your subscriptions across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon't have a Feedbin account?", comment: "NewsBlur") + } override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { return section == 0 ? ImageHeaderView.rowHeight : super.tableView(tableView, heightForHeaderInSection: section) @@ -142,6 +148,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..c02733d1d 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? @@ -27,6 +30,7 @@ class ReaderAPIAccountViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() + setupFooter() activityIndicator.isHidden = true usernameTextField.delegate = self @@ -64,6 +68,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 +247,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 +281,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