From 42bbcbfb9b592d9918b1a31f1d1b694a0d6f1eda Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 11 Sep 2023 15:13:02 -0700 Subject: [PATCH] macos: add a reload configuration button --- .../Features/Settings/ConfigurationErrorsView.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/macos/Sources/Features/Settings/ConfigurationErrorsView.swift b/macos/Sources/Features/Settings/ConfigurationErrorsView.swift index 7d3aa4d83..4ad5cf169 100644 --- a/macos/Sources/Features/Settings/ConfigurationErrorsView.swift +++ b/macos/Sources/Features/Settings/ConfigurationErrorsView.swift @@ -42,7 +42,18 @@ struct ConfigurationErrorsView: View { .background(Color.white) } } + + HStack { + Spacer() + Button("Reload Configuration") { reloadConfig() } + .padding([.bottom, .trailing]) + } } .frame(minWidth: 480, maxWidth: 960, minHeight: 270) } + + private func reloadConfig() { + guard let delegate = NSApplication.shared.delegate as? AppDelegate else { return } + delegate.reloadConfig(nil) + } }