55//
66
77import SwiftUI
8- import SwiftUIIntrospect
8+ @ _spi ( Advanced ) import SwiftUIIntrospect
99
1010struct SidebarListView : View {
1111
12- @Binding var selectionName : SidebarItem ?
12+ @Binding var selection : SidebarItem ?
1313
1414 @State private var reloadID = UUID ( ) . uuidString
1515
@@ -18,52 +18,52 @@ struct SidebarListView: View {
1818 List {
1919 NavigationLink ( destination: OverviewView ( ) ,
2020 tag: SidebarItem . overview,
21- selection: $selectionName ) {
22- SidebarLabel ( item: . overview, iconName : " chart.bar.xaxis " )
21+ selection: $selection ) {
22+ SidebarLabel ( item: . overview)
2323 }
2424
2525 NavigationLink ( destination: ProxiesView ( ) ,
2626 tag: SidebarItem . proxies,
27- selection: $selectionName ) {
28- SidebarLabel ( item: . proxies, iconName : " globe.asia.australia " )
27+ selection: $selection ) {
28+ SidebarLabel ( item: . proxies)
2929 }
3030
3131 NavigationLink ( destination: ProvidersView ( ) ,
3232 tag: SidebarItem . providers,
33- selection: $selectionName ) {
34- SidebarLabel ( item: . providers, iconName : " link.icloud " )
33+ selection: $selection ) {
34+ SidebarLabel ( item: . providers)
3535 }
3636
3737 NavigationLink ( destination: RulesView ( ) ,
3838 tag: SidebarItem . rules,
39- selection: $selectionName ) {
40- SidebarLabel ( item: . rules, iconName : " waveform.and.magnifyingglass " )
39+ selection: $selection ) {
40+ SidebarLabel ( item: . rules)
4141 }
4242
4343 NavigationLink ( destination: ConnectionsView ( ) ,
4444 tag: SidebarItem . conns,
45- selection: $selectionName ) {
46- SidebarLabel ( item: . conns, iconName : " app.connected.to.app.below.fill " )
45+ selection: $selection ) {
46+ SidebarLabel ( item: . conns)
4747 }
4848
4949 NavigationLink ( destination: ConfigView ( ) ,
5050 tag: SidebarItem . config,
51- selection: $selectionName ) {
52- SidebarLabel ( item: . config, iconName : " slider.horizontal.3 " )
51+ selection: $selection ) {
52+ SidebarLabel ( item: . config)
5353 }
5454
5555 NavigationLink ( destination: LogsView ( ) ,
5656 tag: SidebarItem . logs,
57- selection: $selectionName ) {
58- SidebarLabel ( item: . logs, iconName : " wand.and.stars.inverse " )
57+ selection: $selection ) {
58+ SidebarLabel ( item: . logs)
5959 }
6060
6161 }
62- . introspect ( . table, on: . macOS( . v12, . v13 , . v14 , . v15 ) ) {
62+ . introspect ( . table, on: . macOS( . v12... ) ) {
6363 $0. refusesFirstResponder = true
6464
65- if selectionName == nil {
66- selectionName = SidebarItem . overview
65+ if selection == nil {
66+ selection = SidebarItem . overview
6767 $0. allowsEmptySelection = false
6868 if $0. selectedRow == - 1 {
6969 $0. selectRowIndexes ( . init( integer: 0 ) , byExtendingSelection: false )
0 commit comments