feat: toolbar items

This commit is contained in:
mrFq1
2023-05-27 18:14:13 +08:00
parent 33a4eab579
commit 30922826e8
8 changed files with 134 additions and 54 deletions
@@ -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")
}
}
}
}