feature/backend-rewrite #2

Open
kamil wants to merge 236 commits from feature/backend-rewrite into main
Showing only changes of commit 603cd2bb02 - Show all commits

View File

@@ -63,7 +63,7 @@ struct MiniPlayerView: View {
.foregroundStyle(.red) .foregroundStyle(.red)
.frame(width: 36, height: 36) .frame(width: 36, height: 36)
default: default:
Color.clear.frame(width: 36, height: 36) EmptyView()
} }
} }
@@ -81,6 +81,18 @@ struct MiniPlayerView: View {
} }
.background(.ultraThinMaterial) .background(.ultraThinMaterial)
.shadow(color: .black.opacity(0.15), radius: 6, y: -2) .shadow(color: .black.opacity(0.15), radius: 6, y: -2)
.gesture(
DragGesture(minimumDistance: 20, coordinateSpace: .local)
.onEnded { value in
if value.translation.height < -20 {
// Swipe up expand full player
showFullPlayer = true
} else if value.translation.height > 20 {
// Swipe down dismiss
audioPlayer.stop()
}
}
)
} }
private var progress: CGFloat { private var progress: CGFloat {