mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
Refactor
This commit is contained in:
parent
64c274a523
commit
8b241c51ac
2 changed files with 4 additions and 8 deletions
|
|
@ -138,7 +138,7 @@ extension ContentView: View {
|
|||
) {
|
||||
HowToActivateView(isSheet: false)
|
||||
}
|
||||
Section {
|
||||
Section("Servers") {
|
||||
ForEach(0..<self.servers.count, id: \.self) { i in
|
||||
NavigationLink(
|
||||
tag: i,
|
||||
|
|
@ -173,11 +173,8 @@ extension ContentView: View {
|
|||
}
|
||||
.onDelete(perform: self.removeServers)
|
||||
.onMove(perform: self.moveServers)
|
||||
} header: {
|
||||
Text("Servers")
|
||||
}
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
.navigationTitle(Bundle.main.displayName!)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
|
|
|
|||
|
|
@ -35,10 +35,9 @@ extension DetailView: View {
|
|||
self.serverConfigurationSections
|
||||
Section {
|
||||
ForEach(self.server.onDemandRules) { rule in
|
||||
NavigationLink(
|
||||
rule.name,
|
||||
destination: RuleView(rule: self.binding(for: rule))
|
||||
)
|
||||
NavigationLink(rule.name) {
|
||||
RuleView(rule: self.binding(for: rule))
|
||||
}
|
||||
}
|
||||
.onDelete { self.server.onDemandRules.remove(atOffsets: $0) }
|
||||
.onMove { self.server.onDemandRules.move(fromOffsets: $0, toOffset: $1) }
|
||||
|
|
|
|||
Loading…
Reference in a new issue