chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const binding = process.atomBinding('dialog')
|
||||
const v8Util = process.atomBinding('v8_util')
|
||||
|
||||
|
@ -83,7 +83,7 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
|
||||
let {buttonLabel, defaultPath, filters, properties, title, message, securityScopedBookmarks = false} = options
|
||||
let { buttonLabel, defaultPath, filters, properties, title, message, securityScopedBookmarks = false } = options
|
||||
|
||||
if (properties == null) {
|
||||
properties = ['openFile']
|
||||
|
@ -129,7 +129,7 @@ module.exports = {
|
|||
const wrappedCallback = typeof callback === 'function' ? function (success, result, bookmarkData) {
|
||||
return success ? callback(result, bookmarkData) : callback()
|
||||
} : null
|
||||
const settings = {title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, window}
|
||||
const settings = { title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, window }
|
||||
settings.properties = dialogProperties
|
||||
return binding.showOpenDialog(settings, wrappedCallback)
|
||||
},
|
||||
|
@ -145,7 +145,7 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
|
||||
let {buttonLabel, defaultPath, filters, title, message, securityScopedBookmarks = false, nameFieldLabel, showsTagField} = options
|
||||
let { buttonLabel, defaultPath, filters, title, message, securityScopedBookmarks = false, nameFieldLabel, showsTagField } = options
|
||||
|
||||
if (title == null) {
|
||||
title = ''
|
||||
|
@ -188,7 +188,7 @@ module.exports = {
|
|||
const wrappedCallback = typeof callback === 'function' ? function (success, result, bookmarkData) {
|
||||
return success ? callback(result, bookmarkData) : callback()
|
||||
} : null
|
||||
const settings = {title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, nameFieldLabel, showsTagField, window}
|
||||
const settings = { title, buttonLabel, defaultPath, filters, message, securityScopedBookmarks, nameFieldLabel, showsTagField, window }
|
||||
return binding.showSaveDialog(settings, wrappedCallback)
|
||||
},
|
||||
|
||||
|
@ -275,8 +275,8 @@ module.exports = {
|
|||
|
||||
const flags = options.noLink ? messageBoxOptions.noLink : 0
|
||||
return binding.showMessageBox(messageBoxType, buttons, defaultId, cancelId,
|
||||
flags, title, message, detail, checkboxLabel,
|
||||
checkboxChecked, icon, window, callback)
|
||||
flags, title, message, detail, checkboxLabel,
|
||||
checkboxChecked, icon, window, callback)
|
||||
},
|
||||
|
||||
showErrorBox: function (...args) {
|
||||
|
@ -290,7 +290,7 @@ module.exports = {
|
|||
throw new TypeError('options must be an object')
|
||||
}
|
||||
|
||||
let {certificate, message} = options
|
||||
let { certificate, message } = options
|
||||
if (certificate == null || typeof certificate !== 'object') {
|
||||
throw new TypeError('certificate must be an object')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue