mirror of
https://github.com/lumaa-dev/BubbleApp.git
synced 2024-12-26 16:55:15 +01:00
Moved features
This commit is contained in:
parent
738d90f27f
commit
6dc640ad07
@ -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
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user