Surface the existing pin (keep-from-cull) and per-file delete actions as visible inline buttons on each offline cache row instead of context-menu-only: a star toggles protection from auto-cull (and restore-if-missing), a trash culls that file early. Aligns wording/icons to the star metaphor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
No EOL
1 KiB
Swift
32 lines
No EOL
1 KiB
Swift
import SwiftUI
|
|
import TVAnarchyCore
|
|
|
|
/// Netflix-style up-next countdown during the last ~30s of an episode.
|
|
struct PlayerUpNextCard: View {
|
|
let nextTitle: String
|
|
let secondsLeft: Int
|
|
let onPlayNow: () -> Void
|
|
|
|
var body: some View {
|
|
HStack(spacing: 14) {
|
|
VStack(alignment: .leading, spacing: 4) {
|
|
Text("Up next in \(max(1, secondsLeft))s")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
Text(nextTitle)
|
|
.font(.callout.bold())
|
|
.lineLimit(2)
|
|
}
|
|
Spacer(minLength: 0)
|
|
Button("Play now", action: onPlayNow)
|
|
.buttonStyle(.borderedProminent)
|
|
.controlSize(.small)
|
|
}
|
|
.padding(14)
|
|
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 12))
|
|
.overlay {
|
|
RoundedRectangle(cornerRadius: 12)
|
|
.strokeBorder(.white.opacity(0.12), lineWidth: 1)
|
|
}
|
|
}
|
|
} |