mirror of
https://github.com/yattee/yattee.git
synced 2026-02-19 09:19:46 +00:00
Move close video button from toolbar into now playing card in RemoteControlView
This commit is contained in:
@@ -185,18 +185,6 @@ struct RemoteControlView: View {
|
||||
ToolbarItem(placement: .principal) {
|
||||
deviceHeader
|
||||
}
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
Button(role: .destructive) {
|
||||
Task {
|
||||
await remoteControl?.closeVideo(on: device)
|
||||
dismiss()
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "remoteControl.closeVideo"), systemImage: "xmark")
|
||||
.labelStyle(.iconOnly)
|
||||
}
|
||||
.disabled(remoteState.videoID == nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,6 +346,7 @@ struct RemoteControlView: View {
|
||||
|
||||
@ViewBuilder
|
||||
private var nowPlayingSection: some View {
|
||||
ZStack(alignment: .topTrailing) {
|
||||
VStack(spacing: 12) {
|
||||
HStack {
|
||||
// Thumbnail - only show if there's an active video
|
||||
@@ -447,6 +436,22 @@ struct RemoteControlView: View {
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
.padding(.top, 8)
|
||||
|
||||
// Close video button
|
||||
Button(role: .destructive) {
|
||||
Task {
|
||||
await remoteControl?.closeVideo(on: device)
|
||||
dismiss()
|
||||
}
|
||||
} label: {
|
||||
Label(String(localized: "remoteControl.closeVideo"), systemImage: "xmark")
|
||||
.labelStyle(.iconOnly)
|
||||
.font(.caption)
|
||||
}
|
||||
.disabled(remoteState.videoID == nil)
|
||||
.padding(12)
|
||||
}
|
||||
.background(.regularMaterial, in: RoundedRectangle(cornerRadius: 12))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user