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

View File

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

View File

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

View File

@ -29,7 +29,7 @@ struct SoundSelectionView: View {
Spacer()
if selectedSound == sound.fileName {
Image(systemName: "checkmark")
.foregroundColor(.orange)
.foregroundColor(UIConstants.Colors.accentColor)
}
}
.contentShape(Rectangle())
@ -55,7 +55,7 @@ struct SoundSelectionView: View {
}
}) {
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) {
HStack {
Image(systemName: "calendar")
.foregroundColor(.orange)
.foregroundColor(UIConstants.Colors.accentColor)
Text(timeUntilAlarm)
.font(.subheadline)
.foregroundColor(.secondary)