Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
c93d80e591
commit
69793e85c5
3
PRD.md
3
PRD.md
@ -563,7 +563,8 @@ The following changes **automatically require** PRD updates:
|
|||||||
4. **Auto-stop**: Automatically stops current sound when selecting new one
|
4. **Auto-stop**: Automatically stops current sound when selecting new one
|
||||||
5. **Play/Stop Controls**: Simple button with visual feedback
|
5. **Play/Stop Controls**: Simple button with visual feedback
|
||||||
6. **Continuous playback**: Sounds loop until stopped
|
6. **Continuous playback**: Sounds loop until stopped
|
||||||
7. **Responsive layout**: Optimized for portrait and landscape orientations
|
7. **Empty state guidance**: Prompt shown when no sound is selected
|
||||||
|
8. **Responsive layout**: Optimized for portrait and landscape orientations
|
||||||
|
|
||||||
## Technical Requirements
|
## Technical Requirements
|
||||||
|
|
||||||
|
|||||||
@ -58,6 +58,11 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
.tag(Tab.settings)
|
.tag(Tab.settings)
|
||||||
}
|
}
|
||||||
|
.onChange(of: selectedTab) { oldValue, newValue in
|
||||||
|
if oldValue == .clock && newValue != .clock {
|
||||||
|
clockViewModel.setDisplayMode(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
.accentColor(AppAccent.primary)
|
.accentColor(AppAccent.primary)
|
||||||
.background(Color.Branding.primary.ignoresSafeArea())
|
.background(Color.Branding.primary.ignoresSafeArea())
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,6 +69,14 @@ class ClockViewModel {
|
|||||||
updateWakeLockState()
|
updateWakeLockState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setDisplayMode(_ enabled: Bool) {
|
||||||
|
guard isDisplayMode != enabled else { return }
|
||||||
|
withAnimation(Design.Animation.spring(bounce: Design.Animation.springBounce)) {
|
||||||
|
isDisplayMode = enabled
|
||||||
|
}
|
||||||
|
updateWakeLockState()
|
||||||
|
}
|
||||||
|
|
||||||
func updateStyle(_ newStyle: ClockStyle) {
|
func updateStyle(_ newStyle: ClockStyle) {
|
||||||
|
|
||||||
// Update properties of the existing style object instead of replacing it
|
// Update properties of the existing style object instead of replacing it
|
||||||
|
|||||||
@ -74,15 +74,23 @@ struct NoiseView: View {
|
|||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
// Fixed header
|
// Fixed header
|
||||||
VStack(alignment: .leading, spacing: Design.Spacing.medium) {
|
VStack(alignment: .leading, spacing: Design.Spacing.medium) {
|
||||||
if !isPad {
|
|
||||||
Text("Ambient Sounds")
|
|
||||||
.sectionTitleStyle()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Playback controls - always visible when sound is selected
|
// Playback controls - always visible when sound is selected
|
||||||
if selectedSound != nil {
|
if selectedSound != nil {
|
||||||
soundControlView
|
soundControlView
|
||||||
.centered()
|
.centered()
|
||||||
|
} else {
|
||||||
|
// Placeholder when no sound selected
|
||||||
|
VStack(spacing: Design.Spacing.small) {
|
||||||
|
Image(systemName: "music.note")
|
||||||
|
.font(.largeTitle)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
|
||||||
|
Text("Select a sound to begin")
|
||||||
|
.font(.subheadline)
|
||||||
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.padding(.vertical, Design.Spacing.large)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.contentPadding(horizontal: Design.Spacing.large)
|
.contentPadding(horizontal: Design.Spacing.large)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user