summaryrefslogtreecommitdiff
path: root/Jel/Views/Dashboard/DashboardView.swift
blob: 508d002a8f722ae19990d6711dcd2e9bed9629ac (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
//
//  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")
            .padding([.top, .leading])
        }
      }
      .navigationTitle("Home")
      .toolbar {
        ToolbarItem(placement: .topBarTrailing) {
          Button {
            showingSettingsSheet.toggle()
          } label: {
            Label("Settings", systemImage: "gear")
          }
        }
      }
      .sheet(isPresented: $showingSettingsSheet) {
        SettingsView(showingSettingsView: $showingSettingsSheet)
      }
    }
  }
}

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