Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AppExample/Example/Resources/AppConfig.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<string>romanov.cc</string>
<key>Email</key>
<string>[email protected]</string>
<key>Fecebook</key>
<key>Facebook</key>
<string></string>
<key>Telegram</key>
<string></string>
Expand Down Expand Up @@ -54,7 +54,7 @@
<dict>
<key>Onboarding</key>
<true/>
<key>Apperance</key>
<key>Appearance</key>
<true/>
<key>StoreKit</key>
<true/>
Expand All @@ -68,7 +68,7 @@
<false/>
<key>Notifications</key>
<false/>
<key>Lookscreen</key>
<key>Lockscreen</key>
<false/>
<key>Vibration</key>
<false/>
Expand All @@ -92,7 +92,7 @@
<dict>
<key>BlurMinimize</key>
<true/>
<key>Lookscreen</key>
<key>Lockscreen</key>
<true/>
</dict>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeKit/AdsKit/AdView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public struct AdView: View {
.subheadline(.bold)
.onSurfacePrimaryForeground()

Bage(color: .warning) {
Badge(color: .warning) {
Text("Our app")
.bold()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public final class DebugMenuViewModel: ObservableObject {
public init() {}

func onTapRestOnboarding() {
appStateService.restOnbarding()
appStateService.resetOnboarding()
}

func onTapRestAppRunCount() {
appStateService.restAppRunCount()
appStateService.resetAppRunCount()
}
}
6 changes: 3 additions & 3 deletions Sources/OversizeKit/LauncherKit/Launcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct Launcher<Content: View, Onboarding: View>: View {
.onAppear {
Task { @MainActor in
await viewModel.reviewService.launchEvent()
await viewModel.launcherSheetsChek()
await viewModel.launcherSheetsCheck()
}
}
}
Expand All @@ -67,7 +67,7 @@ public struct Launcher<Content: View, Onboarding: View>: View {
private func fullScreenCover(sheet: LauncherViewModel.FullScreenSheet) -> some View {
switch sheet {
case .onboarding: onboarding
case .payWall: StoreInstuctinsView()
case .payWall: StoreInstructionsView()
case .rate: RateAppScreen()
case let .specialOffer(event): StoreSpecialOfferView(event: event)
}
Expand All @@ -79,7 +79,7 @@ public struct Launcher<Content: View, Onboarding: View>: View {
state: $viewModel.authState,
title: L10n.Security.enterPINCode,
errorText: L10n.Security.invalidPIN,
pinCodeEnabled: viewModel.settingsService.pinCodeEnabend,
pinCodeEnabled: viewModel.settingsService.pinCodeEnabled,
biometricEnabled: viewModel.settingsService.biometricEnabled,
biometricType: viewModel.biometricService.biometricType
) {
Expand Down
6 changes: 3 additions & 3 deletions Sources/OversizeKit/LauncherKit/LauncherViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public final class LauncherViewModel: ObservableObject {
let appUpdateAction: (() -> Void)?

var isShowLockscreen: Bool {
if FeatureFlags.secure.lookscreen ?? false {
if settingsService.pinCodeEnabend || settingsService.biometricEnabled, authState != .unlocked {
if FeatureFlags.secure.lockscreen ?? false {
if settingsService.pinCodeEnabled || settingsService.biometricEnabled, authState != .unlocked {
true
} else {
false
Expand Down Expand Up @@ -77,7 +77,7 @@ extension LauncherViewModel {

// Lockscreen
public extension LauncherViewModel {
func launcherSheetsChek() async {
func launcherSheetsCheck() async {
checkOnboarding()
await checkAppRate()
checkSpecialOffer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extension SettingsDestinations: NavigationDestination {
case .feedback:
FeedbackView()
.presentationDetents([.height(485)])
case .ourResorses:
OurResorsesView()
case .ourResources:
OurResourcesView()
case .support:
SupportView()
.presentationDetents([.height(460)])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public enum SettingsDestinations: Hashable {
case sync
case about
case feedback
case ourResorses
case ourResources
case support
case border
case font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public struct AboutView: View {
SectionView {
VStack(spacing: .zero) {
Row("Our open resources") {
navigator.navigate(to: SettingsDestinations.ourResorses)
navigator.navigate(to: SettingsDestinations.ourResources)
}
.rowArrow()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright © 2022 Alexander Romanov
// OurResorsesView.swift
// OurResourcesView.swift
//

#if canImport(MessageUI)
Expand All @@ -14,7 +14,7 @@ import OversizeServices
import OversizeUI
import SwiftUI

public struct OurResorsesView: View {
public struct OurResourcesView: View {
@Environment(\.iconStyle) var iconStyle: IconStyle
public init() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct AppearanceSettingView: View {
public init() {}

public var body: some View {
NavigationLayoutView(L10n.Settings.apperance) {
NavigationLayoutView(L10n.Settings.appearance) {
settings
.surfaceContentRowMargins()
} background: {
Expand All @@ -38,7 +38,7 @@ public struct AppearanceSettingView: View {

private var settings: some View {
LazyVStack(alignment: .leading, spacing: 0) {
apperance
appearance
.padding(.top, .xxxSmall)

#if os(iOS)
Expand Down Expand Up @@ -70,7 +70,7 @@ public struct AppearanceSettingView: View {
.preferredColorScheme(theme.appearance.colorScheme)
}

private var apperance: some View {
private var appearance: some View {
SectionView {
HStack {
ForEach(Appearance.allCases, id: \.self) { appearance in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public struct SetPINCodeView: View {
title: L10n.Security.oldPINCode,
errorText: viewModel.errorText
) {
viewModel.chekOldPINCode()
viewModel.checkOldPINCode()
} biometricAction: {}

case .newPINField:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public final class SetPINCodeViewModel: ObservableObject {
}
}

public func chekOldPINCode() {
public func checkOldPINCode() {
if oldCodeField != curentPinCode {
authState = .error
errorText = L10n.Security.invalidCurrentPINCode
Expand All @@ -74,7 +74,7 @@ public final class SetPINCodeViewModel: ObservableObject {
let result = await settingsStore.updatePINCode(oldPIN: curentPinCode, newPIN: newPinCodeField)
switch result {
case true:
settingsStore.pinCodeEnabend = true
settingsStore.pinCodeEnabled = true
TapticEngine.success.vibrate()
return true
case false:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ extension SecuritySettingsView {
}
}

if FeatureFlags.secure.lookscreen.valueOrFalse {
if FeatureFlags.secure.lockscreen.valueOrFalse {
Switch(isOn:
Binding(get: {
settingsService.pinCodeEnabend
settingsService.pinCodeEnabled
}, set: {
if settingsService.isSetedPinCode() {
settingsService.pinCodeEnabend = $0
settingsService.pinCodeEnabled = $0
} else {
navigator.navigate(to: SettingsDestinations.setPINCode)
}
Expand Down Expand Up @@ -104,11 +104,11 @@ extension SecuritySettingsView {
private var additionally: some View {
SectionView(L10n.Settings.additionally) {
VStack(spacing: .zero) {
// if FeatureFlags.secure.lookscreen.valueOrFalse {
// if FeatureFlags.secure.lockscreen.valueOrFalse {
// Row(L10n.Security.inactiveAskPassword, trallingType: .toggle(isOn: $settingsStore.askPasswordWhenInactiveEnabend))
// }
//
// if FeatureFlags.secure.lookscreen.valueOrFalse {
// if FeatureFlags.secure.lockscreen.valueOrFalse {
// Row(L10n.Security.minimizeAskPassword, trallingType: .toggle(isOn: $settingsStore.askPasswordAfterMinimizeEnabend))
// }

Expand All @@ -122,15 +122,15 @@ extension SecuritySettingsView {
// .onPremiumTap()
// }

// if FeatureFlags.secure.lookscreen.valueOrFalse {
// if FeatureFlags.secure.lockscreen.valueOrFalse {
// Row(L10n.Security.alertPINCode, trallingType: .toggle(isOn: $settingsStore.alertPINCodeEnabled))
// }
//
// if FeatureFlags.secure.photoBreaker.valueOrFalse {
// Row(L10n.Security.photoBreaker, trallingType: .toggle(isOn: $settingsStore.photoBreakerEnabend))
// }
//
// if FeatureFlags.secure.lookscreen.valueOrFalse {
// if FeatureFlags.secure.lockscreen.valueOrFalse {
// Row(L10n.Security.facedownLock, trallingType: .toggle(isOn: $settingsStore.lookScreenDownEnabend))
// }
//
Expand All @@ -142,7 +142,7 @@ extension SecuritySettingsView {
.onPremiumTap()
}

if FeatureFlags.secure.lookscreen.valueOrFalse {
if FeatureFlags.secure.lockscreen.valueOrFalse {
Switch(isOn: $settingsService.fastEnter) {
Row("Fast enter")
}
Expand All @@ -166,7 +166,7 @@ extension SecuritySettingsView {
.rowArrow()
}

// if FeatureFlags.secure.lookscreen.valueOrFalse {
// if FeatureFlags.secure.lockscreen.valueOrFalse {
// Row(L10n.Security.authHistory, trallingType: .toggle(isOn: $settingsService.authHistoryEnabend))
// .premium()
// .onPremiumTap()
Expand Down
24 changes: 12 additions & 12 deletions Sources/OversizeKit/SettingsKit/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public struct SettingsView<AppSection: View, HeadSection: View>: View {
extension SettingsView {
private var iOSSettings: some View {
VStack(alignment: .center, spacing: 0) {
if let stoteKit = FeatureFlags.app.storeKit {
if stoteKit {
if let storeKit = FeatureFlags.app.storeKit {
if storeKit {
SectionView {
PrmiumBannerRow()
PremiumBannerRow()
}
.surfaceContentMargins(.zero)
}
Expand Down Expand Up @@ -81,16 +81,16 @@ extension SettingsView {
private var app: some View {
SectionView("General") {
VStack(spacing: .zero) {
if FeatureFlags.app.apperance.valueOrFalse {
Row(L10n.Settings.apperance) {
if FeatureFlags.app.appearance.valueOrFalse {
Row(L10n.Settings.appearance) {
navigator.navigate(to: SettingsDestinations.appearance)
} leading: {
apperanceSettingsIcon.icon()
appearanceSettingsIcon.icon()
}
.rowArrow()
}

if FeatureFlags.app.сloudKit.valueOrFalse || FeatureFlags.app.healthKit.valueOrFalse {
if FeatureFlags.app.cloudKit.valueOrFalse || FeatureFlags.app.healthKit.valueOrFalse {
Row(L10n.Title.synchronization) {
navigator.navigate(to: SettingsDestinations.sync)
} leading: {
Expand All @@ -100,7 +100,7 @@ extension SettingsView {
}

if FeatureFlags.secure.faceID.valueOrFalse
|| FeatureFlags.secure.lookscreen.valueOrFalse
|| FeatureFlags.secure.lockscreen.valueOrFalse
|| FeatureFlags.secure.CVVCodes.valueOrFalse
|| FeatureFlags.secure.alertSecureCodes.valueOrFalse
|| FeatureFlags.secure.blurMinimize.valueOrFalse
Expand Down Expand Up @@ -146,7 +146,7 @@ extension SettingsView {
appSection
}

var apperanceSettingsIcon: Image {
var appearanceSettingsIcon: Image {
switch iconStyle {
case .line:
Image.Design.paintingPalette
Expand Down Expand Up @@ -387,10 +387,10 @@ extension SettingsView {
@available(macOS 13.0, *)
private var macSettings: some View {
VStack(alignment: .center, spacing: 0) {
if let stoteKit = FeatureFlags.app.storeKit {
if stoteKit {
if let storeKit = FeatureFlags.app.storeKit {
if storeKit {
SectionView {
PrmiumBannerRow()
PremiumBannerRow()
}
.surfaceContentMargins(.zero)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension iCloudSettingsView {
private var soundsAndVibrations: some View {
SectionView {
VStack(spacing: .zero) {
if FeatureFlags.app.сloudKit.valueOrFalse {
if FeatureFlags.app.cloudKit.valueOrFalse {
Switch(isOn: $settingsService.cloudKitEnabled) {
Row(L10n.Settings.iCloudSync) {
Image.Weather.Cloud.square.icon()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright © 2023 Alexander Romanov
// StoreInstuctinsView.swift
// StoreInstructionsView.swift
//

import OversizeComponents
Expand All @@ -11,7 +11,7 @@ import OversizeStoreService
import OversizeUI
import SwiftUI

public struct StoreInstuctinsView: View {
public struct StoreInstructionsView: View {
@StateObject var viewModel: StoreViewModel
@Environment(\.screenSize) var screenSize
@Environment(\.isPremium) var isPremium
Expand Down Expand Up @@ -135,7 +135,7 @@ public struct StoreInstuctinsView: View {
Text("Begin your path towards feeling better with a ")
.foregroundColor(.onSurfaceSecondary)

+ Text("\(viewModel.saleProcent)% discount")
+ Text("\(viewModel.salePercent)% discount")
.foregroundColor(.accent)
}
.body(.semibold)
Expand Down Expand Up @@ -308,8 +308,8 @@ public struct StoreInstuctinsView: View {
}
}

struct StoreViewInstuctins_Previews: PreviewProvider {
struct StoreViewInstructions_Previews: PreviewProvider {
static var previews: some View {
StoreInstuctinsView()
StoreInstructionsView()
}
}
Loading
Loading