new macOS version
This commit is contained in:
@@ -18,6 +18,11 @@ struct MenuBarView: View {
|
||||
|
||||
Divider()
|
||||
|
||||
// Settings
|
||||
settingsSection
|
||||
|
||||
Divider()
|
||||
|
||||
// Bottom
|
||||
HStack {
|
||||
Text(auth.currentUser?.displayName ?? auth.currentUser?.email ?? "LockInBro")
|
||||
@@ -120,6 +125,31 @@ struct MenuBarView: View {
|
||||
}
|
||||
.padding(.vertical, 4)
|
||||
}
|
||||
private var settingsSection: some View {
|
||||
HStack(spacing: 8) {
|
||||
Image(systemName: "bell.badge")
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(width: 16)
|
||||
Text("Nudge after")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
Spacer()
|
||||
Picker("", selection: Binding(
|
||||
get: { Int(session.distractionThresholdSeconds) },
|
||||
set: { session.distractionThresholdSeconds = TimeInterval($0) }
|
||||
)) {
|
||||
Text("1 min").tag(60)
|
||||
Text("2 min").tag(120)
|
||||
Text("3 min").tag(180)
|
||||
Text("5 min").tag(300)
|
||||
}
|
||||
.pickerStyle(.menu)
|
||||
.frame(width: 80)
|
||||
.font(.caption)
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 6)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Menu Bar Button
|
||||
|
||||
Reference in New Issue
Block a user