mirror of
				https://github.com/yattee/yattee.git
				synced 2025-11-03 22:22:02 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Swift
		
	
	
	
	
	
import Defaults
 | 
						|
import SwiftUI
 | 
						|
 | 
						|
struct AppTabNavigation: View {
 | 
						|
    @State private var showingOptions = false
 | 
						|
 | 
						|
    @State private var tabSelection: TabSelection? = .subscriptions
 | 
						|
 | 
						|
    var body: some View {
 | 
						|
        TabView(selection: $tabSelection) {
 | 
						|
            NavigationView {
 | 
						|
                SubscriptionsView()
 | 
						|
            }
 | 
						|
            .tabItem {
 | 
						|
                Label("Subscriptions", systemImage: "play.rectangle.fill")
 | 
						|
                    .accessibility(label: Text("Subscriptions"))
 | 
						|
            }
 | 
						|
            .tag(TabSelection.subscriptions)
 | 
						|
 | 
						|
            NavigationView {
 | 
						|
                PopularVideosView()
 | 
						|
            }
 | 
						|
            .tabItem {
 | 
						|
                Label("Popular", systemImage: "chart.bar")
 | 
						|
                    .accessibility(label: Text("Popular"))
 | 
						|
            }
 | 
						|
            .tag(TabSelection.popular)
 | 
						|
 | 
						|
            NavigationView {
 | 
						|
                TrendingView()
 | 
						|
            }
 | 
						|
            .tabItem {
 | 
						|
                Label("Trending", systemImage: "chart.line.uptrend.xyaxis")
 | 
						|
                    .accessibility(label: Text("Trending"))
 | 
						|
            }
 | 
						|
            .tag(TabSelection.trending)
 | 
						|
 | 
						|
            NavigationView {
 | 
						|
                PlaylistsView()
 | 
						|
            }
 | 
						|
            .tabItem {
 | 
						|
                Label("Playlists", systemImage: "list.and.film")
 | 
						|
                    .accessibility(label: Text("Playlists"))
 | 
						|
            }
 | 
						|
            .tag(TabSelection.playlists)
 | 
						|
 | 
						|
            NavigationView {
 | 
						|
                SearchView()
 | 
						|
            }
 | 
						|
            .tabItem {
 | 
						|
                Label("Search", systemImage: "magnifyingglass")
 | 
						|
                    .accessibility(label: Text("Search"))
 | 
						|
            }
 | 
						|
            .tag(TabSelection.search)
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |