mirror of
https://github.com/yattee/yattee.git
synced 2025-08-04 01:34:10 +00:00
tvOS layout fixes
This commit is contained in:
@@ -58,7 +58,11 @@ struct PlayerQueueRow: View {
|
||||
} label: {
|
||||
VideoBanner(video: item.video, playbackTime: watchStoppedAt, videoDuration: watch?.videoDuration)
|
||||
}
|
||||
#if os(tvOS)
|
||||
.buttonStyle(.card)
|
||||
#else
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
}
|
||||
|
||||
private var watch: Watch? {
|
||||
|
@@ -167,10 +167,6 @@ struct TrendingView: View {
|
||||
}
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
Spacer()
|
||||
#endif
|
||||
|
||||
HStack {
|
||||
Text("Country")
|
||||
.foregroundColor(.secondary)
|
||||
@@ -178,13 +174,11 @@ struct TrendingView: View {
|
||||
countryButton
|
||||
}
|
||||
|
||||
#if os(tvOS)
|
||||
if let favoriteItem {
|
||||
FavoriteButton(item: favoriteItem)
|
||||
.id(favoriteItem.id)
|
||||
.labelStyle(.iconOnly)
|
||||
}
|
||||
#endif
|
||||
if let favoriteItem {
|
||||
FavoriteButton(item: favoriteItem)
|
||||
.id(favoriteItem.id)
|
||||
.labelStyle(.iconOnly)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -71,8 +71,17 @@ struct VideoBanner: View {
|
||||
.padding(.vertical, playbackTime.isNil ? 0 : 5)
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.buttonStyle(.plain)
|
||||
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: 100, alignment: .center)
|
||||
#if os(tvOS)
|
||||
.buttonStyle(.card)
|
||||
|
||||
#else
|
||||
.buttonStyle(.plain)
|
||||
#endif
|
||||
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: 100, alignment: .center)
|
||||
#if os(tvOS)
|
||||
.padding(.vertical, 20)
|
||||
.padding(.trailing, 10)
|
||||
#endif
|
||||
}
|
||||
|
||||
private var stackAlignment: VerticalAlignment {
|
||||
|
@@ -25,12 +25,12 @@ struct PopularView: View {
|
||||
.navigationTitle("Popular")
|
||||
#endif
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .automatic) {
|
||||
FavoriteButton(item: FavoriteItem(section: .popular))
|
||||
}
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.background(
|
||||
Button("Refresh") {
|
||||
resource?.load()
|
||||
|
@@ -37,12 +37,13 @@ struct SubscriptionsView: View {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if !os(tvOS)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .automatic) {
|
||||
FavoriteButton(item: FavoriteItem(section: .subscriptions))
|
||||
}
|
||||
}
|
||||
#if !os(tvOS)
|
||||
.background(
|
||||
Button("Refresh") {
|
||||
loadResources(force: true)
|
||||
|
Reference in New Issue
Block a user