mirror of
https://github.com/yJason/ClashX-Dashboard.git
synced 2026-03-01 00:35:19 +08:00
feat: toolbar items
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// SidebarListView.swift
|
||||
// ClashX Dashboard
|
||||
//
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SidebarListView: View {
|
||||
|
||||
@Binding var selectionName: String?
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
|
||||
NavigationLink(destination: OverviewView(),
|
||||
tag: "Overview",
|
||||
selection: $selectionName) {
|
||||
Label("Overview", systemImage: "chart.bar.xaxis")
|
||||
}
|
||||
|
||||
NavigationLink(destination: ProxiesView(),
|
||||
tag: "Proxies",
|
||||
selection: $selectionName) {
|
||||
Label("Proxies", systemImage: "globe.asia.australia")
|
||||
}
|
||||
|
||||
NavigationLink(destination: ProvidersView(),
|
||||
tag: "Providers",
|
||||
selection: $selectionName) {
|
||||
Label("Providers", systemImage: "link.icloud")
|
||||
}
|
||||
|
||||
NavigationLink(destination: RulesView(),
|
||||
tag: "Rules",
|
||||
selection: $selectionName) {
|
||||
Label("Rules", systemImage: "waveform.and.magnifyingglass")
|
||||
}
|
||||
|
||||
NavigationLink(destination: ConnectionsView(),
|
||||
tag: "Conns",
|
||||
selection: $selectionName) {
|
||||
Label("Conns", systemImage: "app.connected.to.app.below.fill")
|
||||
}
|
||||
|
||||
NavigationLink(destination: ConfigView(),
|
||||
tag: "Config",
|
||||
selection: $selectionName) {
|
||||
Label("Config", systemImage: "slider.horizontal.3")
|
||||
}
|
||||
|
||||
NavigationLink(destination: LogsView(),
|
||||
tag: "Logs",
|
||||
selection: $selectionName) {
|
||||
Label("Logs", systemImage: "wand.and.stars.inverse")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
}
|
||||
}
|
||||
|
||||
//struct SidebarListView_Previews: PreviewProvider {
|
||||
// static var previews: some View {
|
||||
// SidebarListView()
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user