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:
@@ -19,6 +19,8 @@ struct ProxiesView: View {
|
||||
@State private var searchString = ProxiesSearchString()
|
||||
@State private var isGlobalMode = false
|
||||
|
||||
@StateObject private var hideProxyNames = HideProxyNames()
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List(proxyStorage.groups, id: \.id) { group in
|
||||
@@ -36,6 +38,16 @@ struct ProxiesView: View {
|
||||
.onAppear {
|
||||
loadProxies()
|
||||
}
|
||||
.environmentObject(hideProxyNames)
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
Button {
|
||||
hideProxyNames.hide = !hideProxyNames.hide
|
||||
} label: {
|
||||
Image(systemName: hideProxyNames.hide ? "eyeglasses" : "wand.and.stars")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user