mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-24 14:02:53 +01:00
31 lines
903 B
Swift
31 lines
903 B
Swift
import DesignSystem
|
|
import Env
|
|
import Models
|
|
import StatusKit
|
|
import SwiftUI
|
|
|
|
@MainActor
|
|
struct HapticSettingsView: View {
|
|
@Environment(Theme.self) private var theme
|
|
@Environment(UserPreferences.self) private var userPreferences
|
|
|
|
var body: some View {
|
|
@Bindable var userPreferences = userPreferences
|
|
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)
|
|
.listRowBackground(theme.primaryBackgroundColor)
|
|
#endif
|
|
}
|
|
.navigationTitle("settings.haptic.navigation-title")
|
|
#if !os(visionOS)
|
|
.scrollContentBackground(.hidden)
|
|
.background(theme.secondaryBackgroundColor)
|
|
#endif
|
|
}
|
|
}
|