macos: add a reload configuration button

This commit is contained in:
Mitchell Hashimoto
2023-09-11 15:13:02 -07:00
parent ffd181f10d
commit 42bbcbfb9b

View File

@ -42,7 +42,18 @@ struct ConfigurationErrorsView: View {
.background(Color.white) .background(Color.white)
} }
} }
HStack {
Spacer()
Button("Reload Configuration") { reloadConfig() }
.padding([.bottom, .trailing])
}
} }
.frame(minWidth: 480, maxWidth: 960, minHeight: 270) .frame(minWidth: 480, maxWidth: 960, minHeight: 270)
} }
private func reloadConfig() {
guard let delegate = NSApplication.shared.delegate as? AppDelegate else { return }
delegate.reloadConfig(nil)
}
} }