diff --git a/Bubble/Components/PlusNecessaryView.swift b/Bubble/Components/PlusNecessaryView.swift index 2a96c71..3dc1bd6 100644 --- a/Bubble/Components/PlusNecessaryView.swift +++ b/Bubble/Components/PlusNecessaryView.swift @@ -3,9 +3,9 @@ import SwiftUI struct PlusNecessaryView: View { - var lockedFeature: ShopView.Feature? = nil + var lockedFeature: AppInfo.Feature? = nil - init(_ lockedFeature: ShopView.Feature? = nil) { + init(_ lockedFeature: AppInfo.Feature? = nil) { self.lockedFeature = lockedFeature } diff --git a/Bubble/Data/AppInfo.swift b/Bubble/Data/AppInfo.swift index af8f9e4..85fd9b9 100644 --- a/Bubble/Data/AppInfo.swift +++ b/Bubble/Data/AppInfo.swift @@ -12,4 +12,35 @@ public enum AppInfo { extension AppInfo { static var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown" + + /// App's features + public enum Feature { + case drafts + case analytics + case contentFilter + case downloadAttachment + case moreAccounts + case experimentalSettings + case vip + + //TODO: Upgrade this + public var details: ShopView.PremiumFeature { + switch self { + case .drafts: + return .init("shop.features.drafts", description: "shop.features.drafts.description", systemImage: "pencil.and.outline") + case .analytics: + return .init("shop.features.analytics", description: "shop.features.analytics.description", systemImage: "chart.line.uptrend.xyaxis.circle") + case .contentFilter: + return .init("shop.features.content-filter", description: "shop.features.content-filter.description", systemImage: "wand.and.stars") + case .downloadAttachment: + return .init("shop.features.download-atchmnt", description: "shop.features.download-atchmnt.description", systemImage: "photo.badge.arrow.down") + case .moreAccounts: + return .init("shop.features.more-accounts", description: "shop.features.more-accounts.description", systemImage: "person.fill.badge.plus") + case .experimentalSettings: + return .init("shop.features.experimental", description: "shop.features.experimental.description", systemImage: "gearshape.fill") + case .vip: + return .init("shop.features.vip", description: "shop.features.vip.description", systemImage: "crown") + } + } + } } diff --git a/Bubble/Data/Navigator.swift b/Bubble/Data/Navigator.swift index 6d34272..49ebcc3 100644 --- a/Bubble/Data/Navigator.swift +++ b/Bubble/Data/Navigator.swift @@ -104,7 +104,7 @@ public enum TabDestination: Identifiable { public enum SheetDestination: Identifiable { case welcome case shop - case lockedFeature(_ feature: ShopView.Feature? = nil) + case lockedFeature(_ feature: AppInfo.Feature? = nil) case media(attachments: [MediaAttachment], selected: MediaAttachment) case aboutSubclub