mirror of
				https://github.com/yattee/yattee.git
				synced 2025-10-30 20:22:06 +00:00 
			
		
		
		
	Watch Next menu improvements
This commit is contained in:
		| @@ -87,11 +87,9 @@ struct PlayerQueueView: View { | ||||
|             ForEach(player.queue) { item in | ||||
|                 PlayerQueueRow(item: item) | ||||
|                     .contextMenu { | ||||
|                         removeButton(item) | ||||
|                         removeAllButton() | ||||
|  | ||||
|                         if let video = item.video { | ||||
|                             VideoContextMenuView(video: video) | ||||
|                                 .environment(\.inQueueListing, true) | ||||
|                         } | ||||
|                     } | ||||
|             } | ||||
| @@ -116,22 +114,6 @@ struct PlayerQueueView: View { | ||||
|             .transaction { t in t.disablesAnimations = true } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private func removeButton(_ item: PlayerQueueItem) -> some View { | ||||
|         Button { | ||||
|             player.remove(item) | ||||
|         } label: { | ||||
|             Label("Remove from the queue", systemImage: "trash") | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     private func removeAllButton() -> some View { | ||||
|         Button { | ||||
|             player.removeQueueItems() | ||||
|         } label: { | ||||
|             Label("Clear the queue", systemImage: "trash.fill") | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| struct PlayerQueueView_Previews: PreviewProvider { | ||||
|   | ||||
| @@ -96,13 +96,13 @@ struct VideoDetails: View { | ||||
|         ContentItem(video: player.currentVideo) | ||||
|     } | ||||
|  | ||||
|     var pageMenu: some View { | ||||
|     @ViewBuilder var pageMenu: some View { | ||||
|         #if os(macOS) | ||||
|             pagePicker | ||||
|                 .labelsHidden() | ||||
|                 .offset(x: 15, y: 15) | ||||
|                 .frame(maxWidth: 200) | ||||
|         #else | ||||
|         #elseif os(iOS) | ||||
|             Menu { | ||||
|                 pagePicker | ||||
|             } label: { | ||||
| @@ -224,6 +224,8 @@ struct VideoDetails: View { | ||||
|             .secondaryBackground | ||||
|         #elseif os(iOS) | ||||
|             .background | ||||
|         #else | ||||
|             .clear | ||||
|         #endif | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Arkadiusz Fal
					Arkadiusz Fal