From 50a84584161c8e14a8e56b20633b78ad4fb31542 Mon Sep 17 00:00:00 2001 From: lumaa-dev Date: Thu, 26 Sep 2024 01:32:17 +0200 Subject: [PATCH] About new stuff --- Bubble/Localizable.xcstrings | 34 ++++++++++++++++++- Bubble/Views/Settings/AboutView.swift | 49 ++++++++++++++++++++------- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/Bubble/Localizable.xcstrings b/Bubble/Localizable.xcstrings index ad065d0..99fbd90 100644 --- a/Bubble/Localizable.xcstrings +++ b/Bubble/Localizable.xcstrings @@ -125,6 +125,38 @@ } } }, + "about.other" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Third-parties" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Services tiers" + } + } + } + }, + "about.subclub" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "About sub.club" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "À propos de sub.club" + } + } + } + }, "about.version-%@" : { "localizations" : { "en" : { @@ -5185,4 +5217,4 @@ } }, "version" : "1.0" -} +} \ No newline at end of file diff --git a/Bubble/Views/Settings/AboutView.swift b/Bubble/Views/Settings/AboutView.swift index 41198be..8dec9db 100644 --- a/Bubble/Views/Settings/AboutView.swift +++ b/Bubble/Views/Settings/AboutView.swift @@ -28,20 +28,43 @@ struct AboutView: View { } .listRowThreaded() } - - Toggle("setting.experimental.activate", isOn: $userPreferences.showExperimental) - .listRowThreaded() - .tint(Color(uiColor: UIColor.label)) - .disabled(!AppDelegate.premium) - .onAppear { - do { - let oldPreferences = try UserPreferences.loadAsCurrent() ?? UserPreferences.defaultPreferences - - userPreferences.showExperimental = oldPreferences.showExperimental && AppDelegate.premium - } catch { - print(error) - } + + Section { + Text("about.other") + .textCase(.lowercase) + .font(.callout.lowercaseSmallCaps()) + .foregroundStyle(Color.gray) + .listRowBackground(Color.appBackground) + + Button { + UniversalNavigator.static.presentedSheet = .aboutSubclub + } label: { + Text("about.subclub") } + .listRowThreaded() + } + + Section { + Text(String("Bubble+")) + .textCase(.lowercase) + .font(.callout.lowercaseSmallCaps()) + .foregroundStyle(Color.gray) + .listRowBackground(Color.appBackground) + + Toggle("setting.experimental.activate", isOn: $userPreferences.showExperimental) + .listRowThreaded() + .tint(Color(uiColor: UIColor.label)) + .disabled(!AppDelegate.premium) + .onAppear { + do { + let oldPreferences = try UserPreferences.loadAsCurrent() ?? UserPreferences.defaultPreferences + + userPreferences.showExperimental = oldPreferences.showExperimental && AppDelegate.premium + } catch { + print(error) + } + } + } } } .listThreaded()