mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Minor improvements
This commit is contained in:
@@ -21,19 +21,17 @@ struct PlayerOverlayModifier: ViewModifier {
|
||||
|
||||
@ViewBuilder var overlay: some View {
|
||||
Group {
|
||||
if player.videoForDisplay != nil {
|
||||
ControlsBar(fullScreen: .constant(false), expansionState: $expansionState, playerBar: true)
|
||||
.offset(x: expansionState == .mini && !controlsWhenMinimized ? 10 : 0, y: 0)
|
||||
.transition(.opacity)
|
||||
.frame(maxWidth: maxWidth, alignment: .trailing)
|
||||
.onAppear {
|
||||
if playerButtonIsExpanded {
|
||||
expansionState = .full
|
||||
}
|
||||
ControlsBar(fullScreen: .constant(false), expansionState: $expansionState, playerBar: true)
|
||||
.offset(x: expansionState == .mini && !controlsWhenMinimized ? 10 : 0, y: 0)
|
||||
.frame(maxWidth: maxWidth, alignment: .trailing)
|
||||
.onAppear {
|
||||
if playerButtonIsExpanded {
|
||||
expansionState = .full
|
||||
}
|
||||
}
|
||||
}
|
||||
.animation(.easeIn, value: player.videoForDisplay)
|
||||
.opacity(player.videoForDisplay == nil ? 0 : 1)
|
||||
}
|
||||
.animation(.default, value: player.currentItem)
|
||||
}
|
||||
|
||||
var maxWidth: Double {
|
||||
|
@@ -76,7 +76,7 @@ struct AppSidebarNavigation: View {
|
||||
}
|
||||
}
|
||||
|
||||
ToolbarItemGroup {
|
||||
ToolbarItemGroup(placement: accountsMenuToolbarItemPlacement) {
|
||||
AccountViewButton()
|
||||
}
|
||||
|
||||
|
@@ -120,6 +120,7 @@ struct VideoDetails: View {
|
||||
}
|
||||
.modifier(SettingsPickerModifier())
|
||||
.offset(x: 15, y: 5)
|
||||
.opacity(descriptionVisibility ? 1 : 0)
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -214,7 +215,7 @@ struct VideoDetails: View {
|
||||
)
|
||||
)
|
||||
.zIndex(0)
|
||||
.frame(maxHeight: 15)
|
||||
.frame(maxHeight: 25)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ struct WatchNextView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
#else
|
||||
VStack {
|
||||
HStack {
|
||||
@@ -221,7 +222,7 @@ struct WatchNextView: View {
|
||||
Divider()
|
||||
}
|
||||
|
||||
let queueForMoreVideos = player.queue.isEmpty ? [] : player.queue.suffix(from: player.playbackMode == .queue ? 1 : 0)
|
||||
let queueForMoreVideos = player.queue.isEmpty ? [] : player.queue.suffix(from: player.playbackMode == .queue && model.isAutoplaying && model.canAutoplay ? 1 : 0)
|
||||
|
||||
if (model.isAutoplaying && model.canAutoplay && !queueForMoreVideos.isEmpty) ||
|
||||
(!model.isAutoplaying && !queueForMoreVideos.isEmpty)
|
||||
|
Reference in New Issue
Block a user