mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fix: Migrations
This commit is contained in:
parent
471fb6723e
commit
be152c1531
41 changed files with 2373 additions and 1321 deletions
|
|
@ -46,11 +46,7 @@ struct DynamicIslandHeader: View {
|
|||
if vm.notchState == .open {
|
||||
if Defaults[.showMirror] {
|
||||
Button(action: {
|
||||
if webcamManager.isSessionRunning {
|
||||
webcamManager.stopSession()
|
||||
} else {
|
||||
webcamManager.startSession()
|
||||
}
|
||||
vm.toggleCameraPreview()
|
||||
}) {
|
||||
Capsule()
|
||||
.fill(.black)
|
||||
|
|
|
|||
|
|
@ -161,18 +161,58 @@ struct MusicControlsView: View {
|
|||
|
||||
private var playbackControls: some View {
|
||||
HStack(spacing: 8) {
|
||||
if Defaults[.showShuffleAndRepeat] {
|
||||
HoverButton(icon: "shuffle", iconColor: musicManager.isShuffled ? .red : .white, scale: .medium) {
|
||||
Task {
|
||||
await MusicManager.shared.toggleShuffle()
|
||||
}
|
||||
}
|
||||
}
|
||||
HoverButton(icon: "backward.fill", scale: .medium) {
|
||||
MusicManager.shared.previousTrack()
|
||||
Task {
|
||||
await MusicManager.shared.previousTrack()
|
||||
}
|
||||
}
|
||||
HoverButton(icon: musicManager.isPlaying ? "pause.fill" : "play.fill", scale: .large) {
|
||||
MusicManager.shared.togglePlay()
|
||||
Task {
|
||||
await MusicManager.shared.togglePlay()
|
||||
}
|
||||
}
|
||||
HoverButton(icon: "forward.fill", scale: .medium) {
|
||||
MusicManager.shared.nextTrack()
|
||||
Task {
|
||||
await MusicManager.shared.nextTrack()
|
||||
}
|
||||
}
|
||||
if Defaults[.showShuffleAndRepeat] {
|
||||
HoverButton(icon: repeatIcon, iconColor: repeatIconColor, scale: .medium) {
|
||||
Task {
|
||||
await MusicManager.shared.toggleRepeat()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
}
|
||||
|
||||
private var repeatIcon: String {
|
||||
switch musicManager.repeatMode {
|
||||
case .off:
|
||||
return "repeat"
|
||||
case .all:
|
||||
return "repeat"
|
||||
case .one:
|
||||
return "repeat.1"
|
||||
}
|
||||
}
|
||||
|
||||
private var repeatIconColor: Color {
|
||||
switch musicManager.repeatMode {
|
||||
case .off:
|
||||
return .white
|
||||
case .all, .one:
|
||||
return .red
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Main View
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue