mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
fix alert having like 2 cancel buttons
This commit is contained in:
@@ -15,7 +15,7 @@ struct ImportView: View {
|
|||||||
@State private var text: String = "Ready..."
|
@State private var text: String = "Ready..."
|
||||||
@State private var fgColor: Color = .yellow
|
@State private var fgColor: Color = .yellow
|
||||||
|
|
||||||
@State private var showAlert: Bool = true
|
@State private var showAlert: Bool = false
|
||||||
|
|
||||||
@State private var replaceCurrentEvents: Bool = false
|
@State private var replaceCurrentEvents: Bool = false
|
||||||
|
|
||||||
@@ -66,17 +66,17 @@ struct ImportView: View {
|
|||||||
fgColor = .yellow
|
fgColor = .yellow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.blur(radius: showAlert ? 2 : 0)
|
|
||||||
.alert("Are you sure?", isPresented: $showAlert) {
|
.alert("Are you sure?", isPresented: $showAlert) {
|
||||||
Button(role: .destructive) {
|
Button(role: .destructive) {
|
||||||
importEvents()
|
importEvents()
|
||||||
} label: {
|
} label: {
|
||||||
Text("Replace Events")
|
Text("Replace Events")
|
||||||
}
|
}
|
||||||
Button(role: .cancel) {
|
Button() {
|
||||||
importEvents()
|
importEvents()
|
||||||
} label: {
|
} label: {
|
||||||
Text("Add to Events")
|
Text("Add to Events")
|
||||||
|
.foregroundStyle(.one)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user