From 37030755ace8489e5db8175cc4189522310b4d40 Mon Sep 17 00:00:00 2001 From: Majid Achhoud Date: Thu, 6 Nov 2025 09:34:13 +0100 Subject: [PATCH 1/2] Show purchase status and restore option in settings --- Cryptomator/Settings/SettingsViewModel.swift | 17 +++++++++++++---- SharedResources/en.lproj/Localizable.strings | 2 ++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Cryptomator/Settings/SettingsViewModel.swift b/Cryptomator/Settings/SettingsViewModel.swift index d761538c1..f4a8e81bd 100644 --- a/Cryptomator/Settings/SettingsViewModel.swift +++ b/Cryptomator/Settings/SettingsViewModel.swift @@ -71,12 +71,21 @@ class SettingsViewModel: TableViewModel { } private var aboutSectionElements: [TableViewCellViewModel] { - var elements = [ButtonCellViewModel.createDisclosureButton(action: SettingsButtonAction.showAbout, title: LocalizedString.getValue("settings.aboutCryptomator"))] + var elements: [TableViewCellViewModel] = [ButtonCellViewModel.createDisclosureButton(action: SettingsButtonAction.showAbout, title: LocalizedString.getValue("settings.aboutCryptomator"))] + if cryptomatorSettings.hasRunningSubscription { - elements.append(.init(action: .showManageSubscriptions, title: LocalizedString.getValue("settings.manageSubscriptions"))) - elements.append(.init(action: .restorePurchase, title: LocalizedString.getValue("purchase.restorePurchase.button"))) - } else if !cryptomatorSettings.fullVersionUnlocked { + elements.append(ButtonCellViewModel(action: .showManageSubscriptions, title: LocalizedString.getValue("settings.manageSubscriptions"))) + elements.append(ButtonCellViewModel(action: .restorePurchase, title: LocalizedString.getValue("purchase.restorePurchase.button"))) + } else if cryptomatorSettings.fullVersionUnlocked { + let statusCell = BindableTableViewCellViewModel( + title: LocalizedString.getValue("settings.fullVersionStatus"), + selectionStyle: .none, + accessoryType: .checkmark + ) + elements.append(statusCell) + } else { elements.append(ButtonCellViewModel.createDisclosureButton(action: SettingsButtonAction.showUnlockFullVersion, title: LocalizedString.getValue("settings.unlockFullVersion"))) + elements.append(ButtonCellViewModel(action: .restorePurchase, title: LocalizedString.getValue("purchase.restorePurchase.button"))) } return elements } diff --git a/SharedResources/en.lproj/Localizable.strings b/SharedResources/en.lproj/Localizable.strings index ea432fa88..e8758e675 100644 --- a/SharedResources/en.lproj/Localizable.strings +++ b/SharedResources/en.lproj/Localizable.strings @@ -213,6 +213,8 @@ "settings.sendLogFile" = "Send Log File"; "settings.shortcutsGuide" = "Shortcuts Guide"; "settings.unlockFullVersion" = "Unlock Full Version"; +"settings.fullVersionStatus" = "Full Version"; +"settings.fullVersionStatus.footer" = "You're using Cryptomator Full Version. Thank you for your support!"; "sharePoint.enterURL.title" = "Enter SharePoint URL"; "sharePoint.enterURL.placeholder" = "SharePoint Site URL"; From 22a98a55dcd7d5a77cf1480d78846893bd2c4a96 Mon Sep 17 00:00:00 2001 From: Majid Achhoud Date: Tue, 11 Nov 2025 10:31:50 +0100 Subject: [PATCH 2/2] Remove restore button for subscription users --- Cryptomator/Settings/SettingsViewModel.swift | 1 - SharedResources/en.lproj/Localizable.strings | 1 - 2 files changed, 2 deletions(-) diff --git a/Cryptomator/Settings/SettingsViewModel.swift b/Cryptomator/Settings/SettingsViewModel.swift index f4a8e81bd..eb3431025 100644 --- a/Cryptomator/Settings/SettingsViewModel.swift +++ b/Cryptomator/Settings/SettingsViewModel.swift @@ -75,7 +75,6 @@ class SettingsViewModel: TableViewModel { if cryptomatorSettings.hasRunningSubscription { elements.append(ButtonCellViewModel(action: .showManageSubscriptions, title: LocalizedString.getValue("settings.manageSubscriptions"))) - elements.append(ButtonCellViewModel(action: .restorePurchase, title: LocalizedString.getValue("purchase.restorePurchase.button"))) } else if cryptomatorSettings.fullVersionUnlocked { let statusCell = BindableTableViewCellViewModel( title: LocalizedString.getValue("settings.fullVersionStatus"), diff --git a/SharedResources/en.lproj/Localizable.strings b/SharedResources/en.lproj/Localizable.strings index e8758e675..ea1998962 100644 --- a/SharedResources/en.lproj/Localizable.strings +++ b/SharedResources/en.lproj/Localizable.strings @@ -214,7 +214,6 @@ "settings.shortcutsGuide" = "Shortcuts Guide"; "settings.unlockFullVersion" = "Unlock Full Version"; "settings.fullVersionStatus" = "Full Version"; -"settings.fullVersionStatus.footer" = "You're using Cryptomator Full Version. Thank you for your support!"; "sharePoint.enterURL.title" = "Enter SharePoint URL"; "sharePoint.enterURL.placeholder" = "SharePoint Site URL";