open-remora

Open Remora, a free secondary dive computer for Apple Watch Ultra
git clone https://git.schurger.org/open-remora.git
Log | Files | Refs | README | LICENSE

SettingsView.swift (722B)


      1 // SPDX-License-Identifier: GPL-2.0-only
      2 import SwiftUI
      3 import RemoraDeco
      4 import RemoraUI
      5 
      6 /// The settings screens come from RemoraUI; the watch adds its own footers and saves every change.
      7 struct SettingsView: View {
      8     @Environment(LogStore.self) private var store
      9 
     10     var body: some View {
     11         @Bindable var store = store
     12         DiveSettingsView(
     13             settings: $store.settings,
     14             ndlAlarmNote: String(localized: "NDL: time left without a mandatory stop. The watch vibrates and the value blinks below this threshold."),
     15             altitudeNote: String(localized: "Altitude is measured by the watch: nothing to set."))
     16             .onChange(of: store.settings) { store.saveSettings() }
     17     }
     18 }