@@ -3,11 +3,15 @@ import Foundation
|
3 | 3 | import WebKit |
4 | 4 | |
5 | 5 | private final class DashboardWindowContentView: NSView { |
6 | | -override var mouseDownCanMoveWindow: Bool { true } |
| 6 | +override var mouseDownCanMoveWindow: Bool { |
| 7 | +true |
| 8 | +} |
7 | 9 | } |
8 | 10 | |
9 | 11 | private final class DashboardWindowDragRegionView: NSView { |
10 | | -override var mouseDownCanMoveWindow: Bool { true } |
| 12 | +override var mouseDownCanMoveWindow: Bool { |
| 13 | +true |
| 14 | +} |
11 | 15 | |
12 | 16 | override func mouseDown(with event: NSEvent) { |
13 | 17 | self.window?.performDrag(with: event) |
@@ -275,7 +279,7 @@ final class DashboardWindowController: NSWindowController, WKNavigationDelegate,
|
275 | 279 | |
276 | 280 | private func showLoadFailure(_ error: Error) { |
277 | 281 | let nsError = error as NSError |
278 | | -if nsError.domain == NSURLErrorDomain && nsError.code == NSURLErrorCancelled { return } |
| 282 | +if nsError.domain == NSURLErrorDomain, nsError.code == NSURLErrorCancelled { return } |
279 | 283 | dashboardWindowLogger.error( |
280 | 284 | "dashboard load failed url=\(self.currentURL.absoluteString, privacy: .public) error=\(error.localizedDescription, privacy: .public)") |
281 | 285 | let html = Self.failureHTML(url: self.currentURL, message: error.localizedDescription) |
@@ -324,8 +328,8 @@ final class DashboardWindowController: NSWindowController, WKNavigationDelegate,
|
324 | 328 | <body> |
325 | 329 | <main> |
326 | 330 | <h1>Dashboard unavailable</h1> |
327 | | - <p>\(Self.htmlEscape(message))</p> |
328 | | - <code>\(Self.htmlEscape(url.absoluteString))</code> |
| 331 | + <p>\(self.htmlEscape(message))</p> |
| 332 | + <code>\(self.htmlEscape(url.absoluteString))</code> |
329 | 333 | </main> |
330 | 334 | </body> |
331 | 335 | </html> |
|