[tvOS] Fix Episode Description Size & Provide Episode Thumbnail Clarity (#1184)
Co-authored-by: Joseph Kribs <joseph@kribs.net>
This commit is contained in:
parent
da6c22341f
commit
9bc8d9613e
|
@ -12,26 +12,32 @@ import JellyfinAPI
|
|||
import SwiftUI
|
||||
|
||||
extension SeriesEpisodeSelector {
|
||||
|
||||
struct EpisodeCard: View {
|
||||
|
||||
@EnvironmentObject
|
||||
private var router: ItemCoordinator.Router
|
||||
|
||||
let episode: BaseItemDto
|
||||
|
||||
@FocusState
|
||||
private var isFocused: Bool
|
||||
|
||||
@ViewBuilder
|
||||
private var imageOverlay: some View {
|
||||
ZStack {
|
||||
if episode.userData?.isPlayed ?? false {
|
||||
WatchedIndicator(size: 45)
|
||||
} else {
|
||||
if (episode.userData?.playbackPositionTicks ?? 0) > 0 {
|
||||
LandscapePosterProgressBar(
|
||||
title: episode.progressLabel ?? L10n.continue,
|
||||
progress: (episode.userData?.playedPercentage ?? 0) / 100
|
||||
)
|
||||
}
|
||||
} else if (episode.userData?.playbackPositionTicks ?? 0) > 0 {
|
||||
LandscapePosterProgressBar(
|
||||
title: episode.progressLabel ?? L10n.continue,
|
||||
progress: (episode.userData?.playedPercentage ?? 0) / 100
|
||||
)
|
||||
}
|
||||
|
||||
if isFocused {
|
||||
Image(systemName: "play.fill")
|
||||
.resizable()
|
||||
.frame(width: 50, height: 50)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +70,7 @@ extension SeriesEpisodeSelector {
|
|||
}
|
||||
.buttonStyle(.card)
|
||||
.posterShadow()
|
||||
.focused($isFocused)
|
||||
|
||||
SeriesEpisodeSelector.EpisodeContent(
|
||||
subHeader: episode.episodeLocator ?? .emptyDash,
|
||||
|
|
|
@ -11,9 +11,7 @@ import JellyfinAPI
|
|||
import SwiftUI
|
||||
|
||||
extension SeriesEpisodeSelector {
|
||||
|
||||
struct EpisodeContent: View {
|
||||
|
||||
@Default(.accentColor)
|
||||
private var accentColor
|
||||
|
||||
|
@ -60,6 +58,8 @@ extension SeriesEpisodeSelector {
|
|||
headerView
|
||||
|
||||
contentView
|
||||
// Removing the alignment below makes the text center
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
L10n.seeMore.text
|
||||
.font(.caption.weight(.light))
|
||||
|
@ -73,7 +73,6 @@ extension SeriesEpisodeSelector {
|
|||
}
|
||||
|
||||
extension SeriesEpisodeSelector.EpisodeContent {
|
||||
|
||||
init(
|
||||
subHeader: String,
|
||||
header: String,
|
||||
|
|
Loading…
Reference in New Issue