|
|
@@ -354,6 +354,7 @@ final class ViewController: NSViewController {
|
|
354
|
354
|
private weak var schedulePageFilterDropdown: NSPopUpButton?
|
|
355
|
355
|
private weak var schedulePageFromDatePicker: NSDatePicker?
|
|
356
|
356
|
private weak var schedulePageToDatePicker: NSDatePicker?
|
|
|
357
|
+ private weak var schedulePageApplyButton: NSButton?
|
|
357
|
358
|
private weak var schedulePageRangeErrorLabel: NSTextField?
|
|
358
|
359
|
private weak var schedulePageCardsStack: NSStackView?
|
|
359
|
360
|
private weak var schedulePageCardsScrollView: NSScrollView?
|
|
|
@@ -3461,6 +3462,7 @@ private extension ViewController {
|
|
3461
|
3462
|
filterRow.addArrangedSubview(filterRowSpacer)
|
|
3462
|
3463
|
|
|
3463
|
3464
|
let applyButton = makeSchedulePagePillButton(title: "Apply", action: #selector(schedulePageApplyDateRangePressed(_:)))
|
|
|
3465
|
+ schedulePageApplyButton = applyButton
|
|
3464
|
3466
|
filterRow.addArrangedSubview(applyButton)
|
|
3465
|
3467
|
filterRow.setCustomSpacing(22, after: applyButton)
|
|
3466
|
3468
|
let resetButton = makeSchedulePagePillButton(title: "Reset", action: #selector(schedulePageResetFiltersPressed(_:)))
|
|
|
@@ -6225,7 +6227,9 @@ private extension ViewController {
|
|
6225
|
6227
|
let isCustom = schedulePageFilter == .customRange
|
|
6226
|
6228
|
schedulePageFromDatePicker?.isEnabled = isCustom
|
|
6227
|
6229
|
schedulePageToDatePicker?.isEnabled = isCustom
|
|
|
6230
|
+ schedulePageApplyButton?.isEnabled = isCustom
|
|
6228
|
6231
|
let dim: CGFloat = isCustom ? 1.0 : 0.65
|
|
|
6232
|
+ schedulePageApplyButton?.alphaValue = isCustom ? 1.0 : 0.65
|
|
6229
|
6233
|
schedulePageFromDatePicker?.alphaValue = 1
|
|
6230
|
6234
|
schedulePageToDatePicker?.alphaValue = 1
|
|
6231
|
6235
|
schedulePageFromDatePicker?.superview?.alphaValue = dim
|
|
|
@@ -7401,6 +7405,16 @@ private final class InAppBrowserContainerViewController: NSViewController, WKNav
|
|
7401
|
7405
|
NSWorkspace.shared.open(url)
|
|
7402
|
7406
|
}
|
|
7403
|
7407
|
|
|
|
7408
|
+ private func shouldOpenURLExternally(_ url: URL) -> Bool {
|
|
|
7409
|
+ let scheme = (url.scheme ?? "").lowercased()
|
|
|
7410
|
+ guard !scheme.isEmpty else { return false }
|
|
|
7411
|
+ // Some auth and popup flows briefly navigate through internal URLs like
|
|
|
7412
|
+ // about:blank or javascript: before redirecting to a real destination.
|
|
|
7413
|
+ // Opening these via NSWorkspace triggers Finder's "no application set"
|
|
|
7414
|
+ // dialog, so keep them in-app and ignore external handoff.
|
|
|
7415
|
+ return scheme != "about" && scheme != "javascript"
|
|
|
7416
|
+ }
|
|
|
7417
|
+
|
|
7404
|
7418
|
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
|
7405
|
7419
|
processTerminateRetryCount = 0
|
|
7406
|
7420
|
syncAddressFieldFromWebView()
|
|
|
@@ -7455,7 +7469,9 @@ private final class InAppBrowserContainerViewController: NSViewController, WKNav
|
|
7455
|
7469
|
}
|
|
7456
|
7470
|
let scheme = (url.scheme ?? "").lowercased()
|
|
7457
|
7471
|
if scheme != "http" && scheme != "https" {
|
|
7458
|
|
- openExternally(url)
|
|
|
7472
|
+ if shouldOpenURLExternally(url) {
|
|
|
7473
|
+ openExternally(url)
|
|
|
7474
|
+ }
|
|
7459
|
7475
|
decisionHandler(.cancel)
|
|
7460
|
7476
|
return
|
|
7461
|
7477
|
}
|
|
|
@@ -7480,7 +7496,9 @@ private final class InAppBrowserContainerViewController: NSViewController, WKNav
|
|
7480
|
7496
|
if navigationAction.targetFrame == nil, let requestURL = navigationAction.request.url {
|
|
7481
|
7497
|
let scheme = (requestURL.scheme ?? "").lowercased()
|
|
7482
|
7498
|
if scheme != "http" && scheme != "https" {
|
|
7483
|
|
- openExternally(requestURL)
|
|
|
7499
|
+ if shouldOpenURLExternally(requestURL) {
|
|
|
7500
|
+ openExternally(requestURL)
|
|
|
7501
|
+ }
|
|
7484
|
7502
|
} else if inAppBrowserURLAllowed(requestURL, policy: navigationPolicy) {
|
|
7485
|
7503
|
webView.load(URLRequest(url: requestURL))
|
|
7486
|
7504
|
} else {
|