|
|
@@ -21,6 +21,10 @@ private enum AppWindowMetrics {
|
|
|
static let defaultContentHeight: CGFloat = 690
|
|
|
}
|
|
|
|
|
|
+/// Zoom shows "browser not supported" for the default macOS `WKWebView` UA. Use a desktop Safari string so join/start (including `/s/` host links) load in-app.
|
|
|
+private let embeddedZoomWebViewUserAgent =
|
|
|
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"
|
|
|
+
|
|
|
/// Errors from the main-window embedded OAuth web session (right panel).
|
|
|
private enum EmbeddedOAuthFlowError: Error {
|
|
|
case webViewUnavailable
|
|
|
@@ -6548,6 +6552,7 @@ class ViewController: NSViewController {
|
|
|
let embeddedBrowserConfiguration = WKWebViewConfiguration()
|
|
|
embeddedBrowserConfiguration.preferences.javaScriptCanOpenWindowsAutomatically = true
|
|
|
let embeddedWK = WKWebView(frame: .zero, configuration: embeddedBrowserConfiguration)
|
|
|
+ embeddedWK.customUserAgent = embeddedZoomWebViewUserAgent
|
|
|
embeddedWK.translatesAutoresizingMaskIntoConstraints = false
|
|
|
embeddedWK.setContentCompressionResistancePriority(.init(1), for: .horizontal)
|
|
|
embeddedWK.setContentHuggingPriority(.init(1), for: .horizontal)
|