fix: move queue controls into sidebar footer
This commit is contained in:
+26
-27
@@ -2287,39 +2287,12 @@ private struct PlayerContent: View {
|
||||
private var queueSidebar: some View {
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 4) {
|
||||
HStack(spacing: 4) {
|
||||
Text("Queue").fontWeight(.semibold)
|
||||
Text("\(model.queue.items.count)").foregroundStyle(.secondary)
|
||||
}
|
||||
.font(.system(size: 13))
|
||||
.accessibilityElement(children: .combine)
|
||||
Button(action: model.addQueuePanel) {
|
||||
Image(systemName: "plus")
|
||||
.frame(width: 20, height: 20)
|
||||
.background(Color(SunsetPalette.accent).opacity(0.1), in: RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.foregroundStyle(Color(SunsetPalette.accent))
|
||||
.padding(.leading, 4)
|
||||
.help("Add to Queue…")
|
||||
.accessibilityLabel("Add to Queue…")
|
||||
.disabled(!model.canOpen)
|
||||
Spacer(minLength: 4)
|
||||
titleControls
|
||||
}
|
||||
.padding(.leading, 12)
|
||||
.padding(.trailing, 4)
|
||||
.frame(height: 32)
|
||||
HStack {
|
||||
iconButton("backward.end.fill", "Previous Queue Item") { model.advanceQueue(-1) }
|
||||
.disabled(!model.canPreviousQueueItem)
|
||||
iconButton("forward.end.fill", "Next Queue Item") { model.advanceQueue(1) }
|
||||
.disabled(!model.canNextQueueItem)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.top, 8)
|
||||
.padding(.bottom, 8)
|
||||
List {
|
||||
ForEach(model.queue.items) { item in
|
||||
HStack(spacing: 8) {
|
||||
@@ -2371,6 +2344,32 @@ private struct PlayerContent: View {
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
}
|
||||
HStack(spacing: 4) {
|
||||
HStack(spacing: 4) {
|
||||
Text("Queue").fontWeight(.semibold)
|
||||
Text("\(model.queue.items.count)").foregroundStyle(.secondary)
|
||||
}
|
||||
.font(.system(size: 13))
|
||||
.accessibilityElement(children: .combine)
|
||||
Button(action: model.addQueuePanel) {
|
||||
Image(systemName: "plus")
|
||||
.frame(width: 20, height: 20)
|
||||
.background(Color(SunsetPalette.accent).opacity(0.1), in: RoundedRectangle(cornerRadius: 6))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.foregroundStyle(Color(SunsetPalette.accent))
|
||||
.padding(.leading, 4)
|
||||
.help("Add to Queue…")
|
||||
.accessibilityLabel("Add to Queue…")
|
||||
.disabled(!model.canOpen)
|
||||
Spacer()
|
||||
iconButton("backward.end.fill", "Previous Queue Item") { model.advanceQueue(-1) }
|
||||
.disabled(!model.canPreviousQueueItem)
|
||||
iconButton("forward.end.fill", "Next Queue Item") { model.advanceQueue(1) }
|
||||
.disabled(!model.canNextQueueItem)
|
||||
}
|
||||
.padding(.horizontal, 12)
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
.frame(width: 260)
|
||||
.background(PlayerGlass(cornerRadius: 0))
|
||||
|
||||
Reference in New Issue
Block a user