Merge branch 'activate-github-sponsors'

This commit is contained in:
Davide De Rosa 2020-06-04 23:10:59 +02:00
commit 5168f67132
3 changed files with 17 additions and 13 deletions

View File

@ -646,14 +646,14 @@ internal enum L10n {
/// Make a donation
internal static let caption = L10n.tr("Core", "organizer.cells.donate.caption")
}
internal enum GithubSponsors {
/// Support me on GitHub
internal static let caption = L10n.tr("Core", "organizer.cells.github_sponsors.caption")
}
internal enum JoinCommunity {
/// Join community
internal static let caption = L10n.tr("Core", "organizer.cells.join_community.caption")
}
internal enum Patreon {
/// Support me on Patreon
internal static let caption = L10n.tr("Core", "organizer.cells.patreon.caption")
}
internal enum Profile {
internal enum Value {
/// In use

View File

@ -81,7 +81,7 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
}
model.setHeader(L10n.Core.Organizer.Sections.Support.header, forSection: .support)
model.set([.connectionStatus], forSection: .vpn)
model.set([.donate, .joinCommunity], forSection: .support)
model.set([.donate, .githubSponsors, .joinCommunity], forSection: .support)
model.set([.openAbout], forSection: .about)
model.set([.uninstall], forSection: .destruction)
@ -332,6 +332,10 @@ class OrganizerViewController: UITableViewController, StrongTableHost {
present(alert, animated: true, completion: nil)
}
private func becomeSponsor() {
UIApplication.shared.open(AppConstants.URLs.githubSponsors, options: [:], completionHandler: nil)
}
private func subscribeSubreddit() {
UIApplication.shared.open(AppConstants.URLs.subreddit, options: [:], completionHandler: nil)
}
@ -437,7 +441,7 @@ extension OrganizerViewController {
case donate
// case patreon
case githubSponsors
case translate
@ -530,10 +534,10 @@ extension OrganizerViewController {
cell.leftText = L10n.Core.Organizer.Cells.Donate.caption
return cell
// case .patreon:
// let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
// cell.leftText = L10n.Core.Organizer.Cells.Patreon.caption
// return cell
case .githubSponsors:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
cell.leftText = L10n.Core.Organizer.Cells.GithubSponsors.caption
return cell
case .translate:
let cell = Cells.setting.dequeue(from: tableView, for: indexPath)
@ -601,8 +605,8 @@ extension OrganizerViewController {
case .donate:
donateToDeveloper()
// case .patreon:
// visit(AppConstants.URLs.patreon)
case .githubSponsors:
becomeSponsor()
case .translate:
offerTranslation()

@ -1 +1 @@
Subproject commit 26431df4a4d189f45e2892c8fab4268e48c2f7f4
Subproject commit e54b162b4bf1744ea74d5a29c2aa952503ea0a08