Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
f3d841f862
commit
102b0b7c05
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ struct SnoozeSelectionView: View {
|
||||
Spacer()
|
||||
if snoozeDuration == duration {
|
||||
Image(systemName: "checkmark")
|
||||
.foregroundColor(.orange)
|
||||
.foregroundColor(UIConstants.Colors.accentColor)
|
||||
}
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user