mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Improve placeholders
This commit is contained in:
parent
8770bfb56d
commit
1c520831d1
@ -1,12 +1,15 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
extension Video {
|
extension Video {
|
||||||
|
static var fixtureID: Video.ID {
|
||||||
|
"FIXTURE"
|
||||||
|
}
|
||||||
|
|
||||||
static var fixture: Video {
|
static var fixture: Video {
|
||||||
let id = "D2sxamzaHkM"
|
|
||||||
let thumbnailURL = "https://yt3.ggpht.com/ytc/AKedOLR-pT_JEsz_hcaA4Gjx8DHcqJ8mS42aTRqcVy6P7w=s88-c-k-c0x00ffffff-no-rj-mo"
|
let thumbnailURL = "https://yt3.ggpht.com/ytc/AKedOLR-pT_JEsz_hcaA4Gjx8DHcqJ8mS42aTRqcVy6P7w=s88-c-k-c0x00ffffff-no-rj-mo"
|
||||||
|
|
||||||
return Video(
|
return Video(
|
||||||
videoID: UUID().uuidString,
|
videoID: fixtureID,
|
||||||
title: "Relaxing Piano Music to feel good",
|
title: "Relaxing Piano Music to feel good",
|
||||||
author: "Fancy Videotuber",
|
author: "Fancy Videotuber",
|
||||||
length: 582,
|
length: 582,
|
||||||
@ -21,7 +24,7 @@ extension Video {
|
|||||||
subscriptionsCount: 2300,
|
subscriptionsCount: 2300,
|
||||||
videos: []
|
videos: []
|
||||||
),
|
),
|
||||||
thumbnails: Thumbnail.fixturesForAllQualities(videoId: id),
|
thumbnails: [],
|
||||||
live: false,
|
live: false,
|
||||||
upcoming: false,
|
upcoming: false,
|
||||||
publishedAt: Date(),
|
publishedAt: Date(),
|
||||||
|
@ -62,6 +62,10 @@ struct VideoCell: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func playAction() {
|
private func playAction() {
|
||||||
|
guard video.videoID != Video.fixtureID else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if watchingNow {
|
if watchingNow {
|
||||||
if !player.playingInPictureInPicture {
|
if !player.playingInPictureInPicture {
|
||||||
player.show()
|
player.show()
|
||||||
|
@ -33,6 +33,12 @@ struct VideoContextMenuView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
if video.videoID != Video.fixtureID {
|
||||||
|
contextMenu
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder var contextMenu: some View {
|
||||||
if saveHistory {
|
if saveHistory {
|
||||||
Section {
|
Section {
|
||||||
if let watchedAtString = watchedAtString {
|
if let watchedAtString = watchedAtString {
|
||||||
|
Loading…
Reference in New Issue
Block a user