mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
swift formatting
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: b74ee7b3ee...255bd3962d
@@ -183,7 +183,8 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
|
|||||||
do {
|
do {
|
||||||
let fileManager = FileManager.default
|
let fileManager = FileManager.default
|
||||||
if !fileManager.fileExists(atPath: url.absoluteString) {
|
if !fileManager.fileExists(atPath: url.absoluteString) {
|
||||||
fileManager.createFile(atPath: url.absoluteString, contents: Data(), attributes: nil)
|
fileManager.createFile(atPath: url.absoluteString, contents: Data(),
|
||||||
|
attributes: nil)
|
||||||
}
|
}
|
||||||
try data!.write(to: url)
|
try data!.write(to: url)
|
||||||
} catch {
|
} catch {
|
||||||
@@ -215,7 +216,8 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension SafariExtensionViewController: WKUIDelegate {
|
extension SafariExtensionViewController: WKUIDelegate {
|
||||||
func webView(_: WKWebView, runOpenPanelWith _: WKOpenPanelParameters, initiatedByFrame _: WKFrameInfo, completionHandler: @escaping ([URL]?) -> Void) {
|
func webView(_: WKWebView, runOpenPanelWith _: WKOpenPanelParameters, initiatedByFrame _: WKFrameInfo,
|
||||||
|
completionHandler: @escaping ([URL]?) -> Void) {
|
||||||
let openPanel = NSOpenPanel()
|
let openPanel = NSOpenPanel()
|
||||||
openPanel.canChooseFiles = true
|
openPanel.canChooseFiles = true
|
||||||
openPanel.begin { result in
|
openPanel.begin { result in
|
||||||
|
|||||||
Reference in New Issue
Block a user