@@ -28,7 +28,7 @@ enum SettingsButtonAction: String {
2828}
2929
3030enum SettingsSection : Int {
31- case purchaseStatusSection = 0
31+ case unlockFullVersionSection = 0
3232 case cloudServiceSection
3333 case cacheSection
3434 case aboutSection
@@ -46,22 +46,22 @@ class SettingsViewModel: TableViewModel<SettingsSection> {
4646 }
4747
4848 override func getFooterTitle( for section: Int ) -> String ? {
49- guard sections [ section] . id == . aboutSection, hasFullAccess else { return nil }
50- return LocalizedString . getValue ( " settings.fullVersion .footer " )
49+ guard sections [ section] . id == . aboutSection, hasFullVersion else { return nil }
50+ return LocalizedString . getValue ( " settings.aboutCryptomator.hasFullVersion .footer " )
5151 }
5252
5353 var showDebugModeWarning : AnyPublisher < Void , Never > {
5454 return showDebugModeWarningPublisher. eraseToAnyPublisher ( )
5555 }
5656
57- private var hasFullAccess : Bool {
57+ private var hasFullVersion : Bool {
5858 cryptomatorSettings. hasRunningSubscription || cryptomatorSettings. fullVersionUnlocked
5959 }
6060
6161 private var _sections : [ Section < SettingsSection > ] {
6262 var sections : [ Section < SettingsSection > ] = [ ]
63- if !hasFullAccess {
64- sections. append ( Section ( id: . purchaseStatusSection , elements: [ purchaseStatusCellViewModel ] ) )
63+ if !hasFullVersion {
64+ sections. append ( Section ( id: . unlockFullVersionSection , elements: [ unlockFullVersionCellViewModel ] ) )
6565 }
6666 sections. append ( contentsOf: [
6767 Section ( id: . cloudServiceSection, elements: [
@@ -95,23 +95,21 @@ class SettingsViewModel: TableViewModel<SettingsSection> {
9595 return elements
9696 }
9797
98- private var purchaseStatusCellViewModel : ButtonCellViewModel < SettingsButtonAction > {
98+ private var unlockFullVersionCellViewModel : ButtonCellViewModel < SettingsButtonAction > {
9999 let detailTitle : String
100100 if let trialExpirationDate = cryptomatorSettings. trialExpirationDate, trialExpirationDate > Date ( ) {
101- let dateFormatter = DateFormatter ( )
102- dateFormatter. dateStyle = . medium
103- dateFormatter. timeStyle = . none
104- detailTitle = String ( format: LocalizedString . getValue ( " settings.trial.expirationDate " ) , dateFormatter. string ( from: trialExpirationDate) )
101+ let formatter = DateFormatter ( )
102+ formatter. dateStyle = . short
103+ detailTitle = String ( format: LocalizedString . getValue ( " settings.unlockFullVersion.trialExpirationDate " ) , formatter. string ( from: trialExpirationDate) )
105104 } else {
106- detailTitle = LocalizedString . getValue ( " settings.freeTier.subtitle " )
105+ detailTitle = LocalizedString . getValue ( " settings.unlockFullVersion.detail " )
107106 }
108107 let image = UIImage ( systemName: " checkmark.seal.fill " , withConfiguration: UIImage . SymbolConfiguration ( pointSize: 22 ) )
109108 return ButtonCellViewModel . createDisclosureButton ( action: . showUnlockFullVersion, title: LocalizedString . getValue ( " settings.unlockFullVersion " ) , detailTitle: detailTitle, image: image, cellStyle: . subtitle)
110109 }
111110
112111 private let cacheSizeCellViewModel = LoadingWithLabelCellViewModel ( title: LocalizedString . getValue ( " settings.cacheSize " ) )
113112 private let clearCacheButtonCellViewModel = ButtonCellViewModel < SettingsButtonAction > ( action: . clearCache, title: LocalizedString . getValue ( " settings.clearCache " ) , isEnabled: false )
114-
115113 private var cryptomatorSettings : CryptomatorSettings
116114
117115 private lazy var debugModeViewModel : SwitchCellViewModel = {
0 commit comments