mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
refactor: replace deprecated APIs
I replaced deprecated SwiftUI APIs with new ones.
This commit is contained in:
parent
bbab4c95b7
commit
fcc41a2bcd
2 changed files with 5 additions and 5 deletions
|
|
@ -267,7 +267,7 @@ extension ContentView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ToolbarContentBuilder private var toolbarContent: some ToolbarContent {
|
@ToolbarContentBuilder private var toolbarContent: some ToolbarContent {
|
||||||
ToolbarItem(placement: .navigationBarLeading) {
|
ToolbarItem(placement: .topBarLeading) {
|
||||||
Menu {
|
Menu {
|
||||||
Button("DNS-over-TLS", action: self.addNewDoTServer)
|
Button("DNS-over-TLS", action: self.addNewDoTServer)
|
||||||
Button("DNS-over-HTTPS", action: self.addNewDoHServer)
|
Button("DNS-over-HTTPS", action: self.addNewDoHServer)
|
||||||
|
|
@ -275,7 +275,7 @@ extension ContentView: View {
|
||||||
Image(systemName: "plus")
|
Image(systemName: "plus")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolbarItem(placement: .navigationBarTrailing) {
|
ToolbarItem(placement: .topBarTrailing) {
|
||||||
EditButton()
|
EditButton()
|
||||||
}
|
}
|
||||||
ToolbarItem(placement: .status) {
|
ToolbarItem(placement: .status) {
|
||||||
|
|
@ -283,7 +283,7 @@ extension ContentView: View {
|
||||||
HStack {
|
HStack {
|
||||||
Circle()
|
Circle()
|
||||||
.frame(width: 10, height: 10)
|
.frame(width: 10, height: 10)
|
||||||
.foregroundColor(self.isEnabled ? .green : .secondary)
|
.foregroundStyle(self.isEnabled ? .green : .secondary)
|
||||||
Text(self.isEnabled ? "Active" : "Inactive")
|
Text(self.isEnabled ? "Active" : "Inactive")
|
||||||
#if targetEnvironment(macCatalyst)
|
#if targetEnvironment(macCatalyst)
|
||||||
Text("-")
|
Text("-")
|
||||||
|
|
@ -307,7 +307,7 @@ extension ContentView: View {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text(self.servers[i].name)
|
Text(self.servers[i].name)
|
||||||
Text(self.servers[i].configuration.description)
|
Text(self.servers[i].configuration.description)
|
||||||
.foregroundColor(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
if self.usedID == self.servers[i].id.uuidString {
|
if self.usedID == self.servers[i].id.uuidString {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ extension LazyTextField: View {
|
||||||
self.text.removeAll()
|
self.text.removeAll()
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "xmark.circle.fill")
|
Image(systemName: "xmark.circle.fill")
|
||||||
.foregroundColor(.primary)
|
.foregroundStyle(Color.primary)
|
||||||
.opacity(0.2)
|
.opacity(0.2)
|
||||||
}
|
}
|
||||||
.buttonStyle(.borderless)
|
.buttonStyle(.borderless)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue