Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions Sources/OversizeKit/LauncherKit/LauncherViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final class LauncherViewModel: ObservableObject {

var isShowLockscreen: Bool {
if FeatureFlags.secure.lookscreen ?? false {
if settingsService.pinCodeEnabend || settingsService.biometricEnabled, authState != .unlocked {
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 @@ -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 @@ -70,10 +70,10 @@ extension SecuritySettingsView {
if FeatureFlags.secure.lookscreen.valueOrFalse {
Switch(isOn:
Binding(get: {
settingsService.pinCodeEnabend
settingsService.pinCodeEnabled
}, set: {
if settingsService.isSetedPinCode() {
settingsService.pinCodeEnabend = $0
if settingsService.isSetPinCode() {
settingsService.pinCodeEnabled = $0
} else {
navigator.navigate(to: SettingsDestinations.setPINCode)
}
Expand All @@ -84,7 +84,7 @@ extension SecuritySettingsView {
}
}

if settingsService.isSetedPinCode() {
if settingsService.isSetPinCode() {
Row(L10n.Security.changePINCode) {
navigator.navigate(to: SettingsDestinations.updatePINCode)
}
Expand All @@ -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,20 +122,20 @@ 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))
// }
//
if FeatureFlags.secure.blurMinimize.valueOrFalse {
Switch(isOn: $settingsService.blurMinimizeEnabend) {
Switch(isOn: $settingsService.blurMinimizeEnabled) {
Row(L10n.Security.blurMinimize)
.premium()
}
Expand All @@ -150,7 +150,7 @@ extension SecuritySettingsView {
if settingsService.fastEnter {
Row("Time to enter", trailing: {
Picker("", selection: $settingsService.appLockTimeout) {
ForEach(0 ..< min.count) {
ForEach(0 ..< min.count, id: \.self) { // Non-constant range: argument must be an integer literal
let min = Int(self.min[$0] / 60)

Text("\(min) \(OversizeLocalizable.L10n.Time.mins)")
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
18 changes: 9 additions & 9 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,11 +81,11 @@ extension SettingsView {
private var app: some View {
SectionView("General") {
VStack(spacing: .zero) {
if FeatureFlags.app.apperance.valueOrFalse {
if FeatureFlags.app.appearance.valueOrFalse {
Row(L10n.Settings.apperance) {
navigator.navigate(to: SettingsDestinations.appearance)
} leading: {
apperanceSettingsIcon.icon()
appearanceSettingsIcon.icon()
}
.rowArrow()
}
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
@@ -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 @@ -242,7 +242,7 @@ public struct StoreInstuctinsView: View {
.background {
Circle()
.fill(Color.surfacePrimary)
.shadowElevaton(.z2)
.shadowElevation(.z2)
}

TextBox(
Expand Down Expand Up @@ -270,7 +270,7 @@ public struct StoreInstuctinsView: View {
.background {
Circle()
.fill(Color.surfacePrimary)
.shadowElevaton(.z2)
.shadowElevation(.z2)
}

TextBox(
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()
}
}
4 changes: 2 additions & 2 deletions Sources/OversizeKit/StoreKit/StoreScreen/StoreView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ public struct StoreView: View {
StoreProductView(product: product, products: data, isSelected: .constant(viewModel.selectedProduct == product)) {
viewModel.selectedProduct = product
}
.storeProductStyle(.collumn)
.storeProductStyle(.column)
}
}
ForEach(data.nonConsumable) { product in
StoreProductView(product: product, products: data, isSelected: .constant(viewModel.selectedProduct == product)) {
viewModel.selectedProduct = product
}
.storeProductStyle(.collumn)
.storeProductStyle(.column)
}
}
}
Expand Down
Loading