mirror of
https://github.com/yattee/yattee.git
synced 2025-08-06 10:44:06 +00:00
tvOS History improvements
This commit is contained in:
@@ -33,15 +33,13 @@ struct NowPlayingView: View {
|
||||
.padding(.bottom, 20)
|
||||
}
|
||||
|
||||
if !infoViewController {
|
||||
header("Playing Next")
|
||||
}
|
||||
header("Playing Next")
|
||||
|
||||
if player.queue.isEmpty {
|
||||
Spacer()
|
||||
|
||||
Text("Playback queue is empty")
|
||||
.padding(.leading, 40)
|
||||
.padding([.vertical, .leading], 40)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
@@ -58,6 +56,34 @@ struct NowPlayingView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header("Played Previously")
|
||||
|
||||
if player.history.isEmpty {
|
||||
Spacer()
|
||||
|
||||
Text("History is empty")
|
||||
.padding([.vertical, .leading], 40)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
ForEach(player.history) { item in
|
||||
Button {
|
||||
player.playHistory(item)
|
||||
player.presentPlayer()
|
||||
} label: {
|
||||
VideoBanner(video: item.video)
|
||||
}
|
||||
.contextMenu {
|
||||
Button("Delete", role: .destructive) {
|
||||
player.removeHistory(item)
|
||||
}
|
||||
|
||||
Button("Delete History", role: .destructive) {
|
||||
player.removeHistoryItems()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.vertical)
|
||||
.padding(.horizontal, 40)
|
||||
|
Reference in New Issue
Block a user