Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2025-09-08 15:14:12 -05:00
parent f3d841f862
commit 102b0b7c05
5 changed files with 14 additions and 23 deletions

View File

@ -29,57 +29,47 @@ struct AddAlarmView: View {
TimePickerSection(selectedTime: $newAlarmTime) TimePickerSection(selectedTime: $newAlarmTime)
TimeUntilAlarmSection(alarmTime: newAlarmTime) TimeUntilAlarmSection(alarmTime: newAlarmTime)
LazyVStack(spacing: 0) { List {
// Label Section // Label Section
NavigationLink(destination: LabelEditView(label: $alarmLabel)) { NavigationLink(destination: LabelEditView(label: $alarmLabel)) {
HStack { HStack {
Image(systemName: "textformat") Image(systemName: "textformat")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
.frame(width: 24) .frame(width: 24)
Text("Label") Text("Label")
Spacer() Spacer()
Text(alarmLabel) Text(alarmLabel)
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
.padding()
.background(Color(.systemGroupedBackground))
} }
.buttonStyle(PlainButtonStyle())
// Sound Section // Sound Section
NavigationLink(destination: SoundSelectionView(selectedSound: $selectedSoundName)) { NavigationLink(destination: SoundSelectionView(selectedSound: $selectedSoundName)) {
HStack { HStack {
Image(systemName: "music.note") Image(systemName: "music.note")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
.frame(width: 24) .frame(width: 24)
Text("Sound") Text("Sound")
Spacer() Spacer()
Text(getSoundDisplayName(selectedSoundName)) Text(getSoundDisplayName(selectedSoundName))
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
.padding()
.background(Color(.systemGroupedBackground))
} }
.buttonStyle(PlainButtonStyle())
// Snooze Section // Snooze Section
NavigationLink(destination: SnoozeSelectionView(snoozeDuration: $snoozeDuration)) { NavigationLink(destination: SnoozeSelectionView(snoozeDuration: $snoozeDuration)) {
HStack { HStack {
Image(systemName: "clock.arrow.circlepath") Image(systemName: "clock.arrow.circlepath")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
.frame(width: 24) .frame(width: 24)
Text("Snooze") Text("Snooze")
Spacer() Spacer()
Text("for \(snoozeDuration) min") Text("for \(snoozeDuration) min")
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
.padding()
.background(Color(.systemGroupedBackground))
} }
.buttonStyle(PlainButtonStyle())
} }
.cornerRadius(10) .listStyle(.insetGrouped)
.padding(.horizontal)
} }
} }
.navigationTitle("Alarm") .navigationTitle("Alarm")
@ -90,7 +80,7 @@ struct AddAlarmView: View {
Button("Cancel") { Button("Cancel") {
isPresented = false isPresented = false
} }
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
} }
ToolbarItem(placement: .navigationBarTrailing) { ToolbarItem(placement: .navigationBarTrailing) {
@ -109,7 +99,7 @@ struct AddAlarmView: View {
isPresented = false isPresented = false
} }
} }
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
.fontWeight(.semibold) .fontWeight(.semibold)
} }
} }

View File

@ -13,14 +13,15 @@ struct LabelEditView: View {
@Environment(\.dismiss) private var dismiss @Environment(\.dismiss) private var dismiss
var body: some View { var body: some View {
VStack(spacing: 20) { VStack(spacing: UIConstants.Spacing.large) {
TextField("Alarm Label", text: $label) TextField("Alarm Label", text: $label)
.textFieldStyle(RoundedBorderTextFieldStyle()) .textFieldStyle(RoundedBorderTextFieldStyle())
.padding() .contentPadding(horizontal: UIConstants.Spacing.large)
Spacer() Spacer()
} }
.navigationTitle("Label") .navigationTitle("Label")
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.contentPadding(vertical: UIConstants.Spacing.large)
} }
} }

View File

@ -23,7 +23,7 @@ struct SnoozeSelectionView: View {
Spacer() Spacer()
if snoozeDuration == duration { if snoozeDuration == duration {
Image(systemName: "checkmark") Image(systemName: "checkmark")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
} }
} }
.contentShape(Rectangle()) .contentShape(Rectangle())

View File

@ -29,7 +29,7 @@ struct SoundSelectionView: View {
Spacer() Spacer()
if selectedSound == sound.fileName { if selectedSound == sound.fileName {
Image(systemName: "checkmark") Image(systemName: "checkmark")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
} }
} }
.contentShape(Rectangle()) .contentShape(Rectangle())
@ -55,7 +55,7 @@ struct SoundSelectionView: View {
} }
}) { }) {
Image(systemName: isPlaying && currentlyPlayingSound == selectedSound ? "stop.fill" : "play.fill") Image(systemName: isPlaying && currentlyPlayingSound == selectedSound ? "stop.fill" : "play.fill")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
} }
} }
} }

View File

@ -15,7 +15,7 @@ struct TimeUntilAlarmSection: View {
VStack(spacing: 4) { VStack(spacing: 4) {
HStack { HStack {
Image(systemName: "calendar") Image(systemName: "calendar")
.foregroundColor(.orange) .foregroundColor(UIConstants.Colors.accentColor)
Text(timeUntilAlarm) Text(timeUntilAlarm)
.font(.subheadline) .font(.subheadline)
.foregroundColor(.secondary) .foregroundColor(.secondary)