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)
|
|
|
|
}
|
2023-12-19 08:51:20 +00:00
|
|
|
#if !os(visionOS)
|
2023-02-04 16:38:48 +00:00
|
|
|
.listRowBackground(theme.primaryBackgroundColor)
|
2023-12-19 08:51:20 +00:00
|
|
|
#endif
|
2023-02-04 16:38:48 +00:00
|
|
|
}
|
|
|
|
.navigationTitle("settings.haptic.navigation-title")
|
2023-12-19 08:51:20 +00:00
|
|
|
#if !os(visionOS)
|
2024-02-14 11:48:14 +00:00
|
|
|
.scrollContentBackground(.hidden)
|
|
|
|
.background(theme.secondaryBackgroundColor)
|
2023-12-19 08:51:20 +00:00
|
|
|
#endif
|
2023-02-04 16:38:48 +00:00
|
|
|
}
|
|
|
|
}
|