mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 01:39:46 +00:00
Refactor views
This commit is contained in:
@@ -13,6 +13,9 @@ import SwiftUI
|
||||
/// Download status is automatically shown from the download manager.
|
||||
/// On iOS/macOS, supports configurable tap zones for thumbnail and text area.
|
||||
struct VideoCardView: View {
|
||||
@Environment(\.appEnvironment) private var appEnvironment
|
||||
@Environment(\.videoQueueContext) private var videoQueueContext
|
||||
|
||||
let video: Video
|
||||
var watchProgress: Double? = nil
|
||||
/// Use compact styling for dense grids (3+ columns).
|
||||
@@ -22,9 +25,6 @@ struct VideoCardView: View {
|
||||
/// Custom duration text to show on thumbnail (e.g., remaining time). If nil, uses video.formattedDuration.
|
||||
var customDuration: String? = nil
|
||||
|
||||
@Environment(\.appEnvironment) private var appEnvironment
|
||||
@Environment(\.videoQueueContext) private var videoQueueContext
|
||||
|
||||
// Platform-specific fonts
|
||||
#if os(tvOS)
|
||||
private var titleFont: Font { isCompact ? .subheadline : .body }
|
||||
|
||||
Reference in New Issue
Block a user