summaryrefslogtreecommitdiff
path: root/Jel/Views/Dashboard/DashboardView.swift
blob: 279f0564f58f8c0cb0661ce649bf0b39e992f386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
//  DashboardView.swift
//  Jel
//
//  Created by zerocool on 12/12/23.
//

import SwiftUI
import JellyfinKit

struct DashboardView: View {
  @State var showingSettingsSheet: Bool = false
  
  var body: some View {
    ScrollView {
      LazyVStack {
        Section {
          NavigationStack {
            DashboardLibraryView()
          }
        } header: {
          DashboardSectionTitleView("Libraries")
        }
        
        Section {
          NavigationStack {
            DashboardLibraryView()
          }
        } header: {
          DashboardSectionTitleView("Next up")
        }
      }
      .padding()
    }
    .navigationTitle("Home")
    .toolbar {
      ToolbarItem(placement: .topBarTrailing) {
        Button {
          showingSettingsSheet.toggle()
        } label: {
          Label("Settings", systemImage: "gear")
        }
      }
    }
    .sheet(isPresented: $showingSettingsSheet) {
      SettingsView(showingSettingsView: $showingSettingsSheet)
    }
  }
}

//#Preview {
//  DashboardView()
//}