macos: add button to ignore configuration errors

The popup will return on the next launch or configuration load.
This commit is contained in:
Mitchell Hashimoto
2023-09-12 22:25:24 -07:00
parent e9d650e19b
commit a95a1a8838

View File

@ -18,7 +18,7 @@ struct ConfigurationErrorsView: View {
Text(""" Text("""
^[\(model.errors.count) error(s) were](inflect: true) found while loading the configuration. \ ^[\(model.errors.count) error(s) were](inflect: true) found while loading the configuration. \
Please review the errors below and reload your configuration. Please review the errors below and reload your configuration or ignore the erroneous lines.
""") """)
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding() .padding()
@ -45,9 +45,10 @@ struct ConfigurationErrorsView: View {
HStack { HStack {
Spacer() Spacer()
Button("Ignore") { model.errors = [] }
Button("Reload Configuration") { reloadConfig() } Button("Reload Configuration") { reloadConfig() }
.padding([.bottom, .trailing])
} }
.padding([.bottom, .trailing])
} }
.frame(minWidth: 480, maxWidth: 960, minHeight: 270) .frame(minWidth: 480, maxWidth: 960, minHeight: 270)
} }