Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Add manual timer reset button
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Apr 23, 2024
1 parent 14f809a commit 02c0d2d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Aware/macOS/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ServiceManagement
import SwiftUI

struct SettingsView: View {
@AppStorage("reset") private var resetTimer: Bool = false
@AppStorage("userIdleSeconds") private var userIdleSeconds: Int = 120
@AppStorage("formatStyle") private var timerFormatStyle: TimerFormatStyle.Style = .condensedAbbreviated
@AppStorage("showSeconds") private var showSeconds: Bool = false
Expand All @@ -32,6 +33,10 @@ struct SettingsView: View {

Toggle("Open at Login", isOn: openAtLogin)
.toggleStyle(.checkbox)

Button("Reset Timer") {
self.resetTimer = true
}
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions Aware/visionOS/Settings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Reset Timer</string>
<key>Key</key>
<string>reset</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
Expand Down

0 comments on commit 02c0d2d

Please sign in to comment.