diff --git a/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift b/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift index a39ba0f0..40a43e20 100644 --- a/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift @@ -61,7 +61,7 @@ class OrganizerViewController: UITableViewController, TableModelHost { model.set([.siriShortcuts], in: .siri) } model.setHeader(L10n.Organizer.Sections.Support.header, for: .support) - model.set([.patreon], in: .support) + model.set([.donate, .patreon], in: .support) model.set([.openAbout], in: .about) model.set([.uninstall], in: .destruction) if AppConstants.Flags.isBeta { @@ -191,6 +191,10 @@ class OrganizerViewController: UITableViewController, TableModelHost { perform(segue: StoryboardSegue.Organizer.siriShortcutsSegueIdentifier) } + private func donateToDeveloper() { + // TODO + } + private func visitPatreon() { UIApplication.shared.open(AppConstants.URLs.patreon, options: [:], completionHandler: nil) } @@ -308,8 +312,10 @@ extension OrganizerViewController { case siriShortcuts - case patreon + case donate + case patreon + case openAbout case uninstall @@ -385,6 +391,11 @@ extension OrganizerViewController { cell.leftText = L10n.Organizer.Cells.SiriShortcuts.caption return cell + case .donate: + let cell = Cells.setting.dequeue(from: tableView, for: indexPath) + cell.leftText = L10n.Organizer.Cells.Donate.caption + return cell + case .patreon: let cell = Cells.setting.dequeue(from: tableView, for: indexPath) cell.leftText = L10n.Organizer.Cells.Patreon.caption @@ -395,7 +406,7 @@ extension OrganizerViewController { cell.leftText = L10n.Organizer.Cells.About.caption(GroupConstants.App.name) cell.rightText = Utils.versionString() return cell - + case .uninstall: let cell = Cells.destructive.dequeue(from: tableView, for: indexPath) cell.caption = L10n.Organizer.Cells.Uninstall.caption @@ -428,6 +439,9 @@ extension OrganizerViewController { case .siriShortcuts: addShortcuts() + case .donate: + donateToDeveloper() + case .patreon: visitPatreon() diff --git a/Passepartout/Resources/en.lproj/Localizable.strings b/Passepartout/Resources/en.lproj/Localizable.strings index d856a742..a2b47ef8 100644 --- a/Passepartout/Resources/en.lproj/Localizable.strings +++ b/Passepartout/Resources/en.lproj/Localizable.strings @@ -48,6 +48,7 @@ "organizer.cells.add_host.caption" = "Add new host"; "organizer.cells.siri_shortcuts.caption" = "Manage shortcuts"; "organizer.cells.about.caption" = "About %@"; +"organizer.cells.donate.caption" = "Make a donation"; "organizer.cells.patreon.caption" = "Support me on Patreon"; "organizer.cells.uninstall.caption" = "Remove VPN configuration"; "organizer.alerts.exhausted_providers.message" = "You have created profiles for any available provider."; diff --git a/Passepartout/Sources/SwiftGen+Strings.swift b/Passepartout/Sources/SwiftGen+Strings.swift index 759552d4..5a67db46 100644 --- a/Passepartout/Sources/SwiftGen+Strings.swift +++ b/Passepartout/Sources/SwiftGen+Strings.swift @@ -408,6 +408,10 @@ public enum L10n { /// Add new provider public static let caption = L10n.tr("Localizable", "organizer.cells.add_provider.caption") } + public enum Donate { + /// Make a donation + public static let caption = L10n.tr("Localizable", "organizer.cells.donate.caption") + } public enum Patreon { /// Support me on Patreon public static let caption = L10n.tr("Localizable", "organizer.cells.patreon.caption")