IceCubesApp/IceCubesApp/App/Tabs/Settings/HapticSettingsView.swift

31 lines
907 B
Swift
Raw Normal View History

2023-02-04 16:38:48 +00:00
import DesignSystem
import Env
import Models
2024-01-06 18:27:26 +00:00
import StatusKit
2023-02-04 16:38:48 +00:00
import SwiftUI
2023-09-19 07:18:20 +00:00
@MainActor
2023-02-04 16:38:48 +00:00
struct HapticSettingsView: View {
2023-09-18 19:03:52 +00:00
@Environment(Theme.self) private var theme
2023-09-19 07:18:20 +00:00
@Environment(UserPreferences.self) private var userPreferences
2023-02-04 16:38:48 +00:00
var body: some View {
2023-09-19 07:18:20 +00:00
@Bindable var userPreferences = userPreferences
2023-02-04 16:38:48 +00:00
Form {
Section {
Toggle("settings.haptic.timeline", isOn: $userPreferences.hapticTimelineEnabled)
Toggle("settings.haptic.tab-selection", isOn: $userPreferences.hapticTabSelectionEnabled)
Toggle("settings.haptic.buttons", isOn: $userPreferences.hapticButtonPressEnabled)
}
#if !os(visionOS)
2023-02-04 16:38:48 +00:00
.listRowBackground(theme.primaryBackgroundColor)
#endif
2023-02-04 16:38:48 +00:00
}
.navigationTitle("settings.haptic.navigation-title")
#if !os(visionOS)
2024-02-14 11:48:14 +00:00
.scrollContentBackground(.hidden)
.background(theme.secondaryBackgroundColor)
#endif
2023-02-04 16:38:48 +00:00
}
}