chore(dependencies): upgrade electron to 7.2.4

Signed-off-by: Trung Nguyen <trung.nguyen@docker.com>
This commit is contained in:
Trung Nguyen 2020-07-17 14:24:31 +02:00
Родитель b8789c9070
Коммит 6164fad576
9 изменённых файлов: 757 добавлений и 110 удалений

821
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -29,7 +29,7 @@
"test": "jest -c jest-unit.json", "test": "jest -c jest-unit.json",
"tslint": "tslint --fix --project ./tsconfig.json" "tslint": "tslint --fix --project ./tsconfig.json"
}, },
"electron-version": "1.8.8", "electron-version": "7.2.4",
"dependencies": { "dependencies": {
"JSONStream": "1.3.2", "JSONStream": "1.3.2",
"alt": "0.16.10", "alt": "0.16.10",
@ -73,7 +73,7 @@
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
"braces": "^2.3.1", "braces": "^2.3.1",
"electron": "1.8.8", "electron": "^7.2.4",
"electron-builder": "^20.28.4", "electron-builder": "^20.28.4",
"electron-packager": "^12.1.1", "electron-packager": "^12.1.1",
"eslint": "^4.18.2", "eslint": "^4.18.2",
@ -87,7 +87,7 @@
"grunt-contrib-copy": "^1.0.0", "grunt-contrib-copy": "^1.0.0",
"grunt-contrib-less": "^2.0.0", "grunt-contrib-less": "^2.0.0",
"grunt-contrib-watch": "^1.1.0", "grunt-contrib-watch": "^1.1.0",
"grunt-electron": "^9.0.1", "grunt-electron": "^11.0.0",
"grunt-electron-installer": "^2.1.0", "grunt-electron-installer": "^2.1.0",
"grunt-electron-packager": "0.2.1", "grunt-electron-packager": "0.2.1",
"grunt-if-missing": "1.0.1", "grunt-if-missing": "1.0.1",

Просмотреть файл

@ -1,4 +1,3 @@
require.main.paths.splice(0, 0, process.env.NODE_PATH);
import 'babel-polyfill'; import 'babel-polyfill';
import electron from 'electron'; import electron from 'electron';
const remote = electron.remote; const remote = electron.remote;

Просмотреть файл

@ -27,17 +27,20 @@ app.on('ready', function () {
var mainWindow = new BrowserWindow({ var mainWindow = new BrowserWindow({
width: size.width || 1080, width: size.width || 1080,
height: size.height || 680, height: size.height || 680,
'min-width': os.platform() === 'win32' ? 400 : 700, minWidth: os.platform() === 'win32' ? 400 : 700,
'min-height': os.platform() === 'win32' ? 260 : 500, minHeight: os.platform() === 'win32' ? 260 : 500,
'standard-window': false, 'standard-window': false,
resizable: true, resizable: true,
frame: false, frame: false,
backgroundColor: '#fff', backgroundColor: '#fff',
show: false show: false,
webPreferences: {
nodeIntegration: true,
},
}); });
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
mainWindow.openDevTools({detach: true}); mainWindow.openDevTools({mode: 'detach'});
} }
mainWindow.loadURL(path.normalize('file://' + path.join(__dirname, 'index.html'))); mainWindow.loadURL(path.normalize('file://' + path.join(__dirname, 'index.html')));

Просмотреть файл

@ -24,8 +24,8 @@ var ContainerHomeFolder = React.createClass({
dialog.showMessageBox({ dialog.showMessageBox({
message: `Enable all volumes to edit files? This may not work with all database containers.`, message: `Enable all volumes to edit files? This may not work with all database containers.`,
buttons: ['Enable Volumes', 'Cancel'] buttons: ['Enable Volumes', 'Cancel']
}, (index) => { }).then(({response}) => {
if (index === 0) { if (response === 0) {
var mounts = _.clone(this.props.container.Mounts); var mounts = _.clone(this.props.container.Mounts);
var newSource = path.join(util.home(), util.documents(), 'Kitematic', this.props.container.Name, destination); var newSource = path.join(util.home(), util.documents(), 'Kitematic', this.props.container.Name, destination);

Просмотреть файл

@ -104,11 +104,11 @@ module.exports = React.createClass({
let path = `${this.props.container.Name} ${new Date().toISOString().replace(/T/, '_').replace(/\..+/, '').replace(/:/g,'-')}.txt`; let path = `${this.props.container.Name} ${new Date().toISOString().replace(/T/, '_').replace(/\..+/, '').replace(/:/g,'-')}.txt`;
dialog.showSaveDialog({ dialog.showSaveDialog({
defaultPath: path defaultPath: path
},function(fileName) { }).then(({filePath}) => {
if (!fileName) return; if (!filePath) return;
fs.writeFile(fileName, _logs, (err) => { fs.writeFile(filePath, _logs, (err) => {
if(!err){ if(!err){
shell.showItemInFolder(fileName); shell.showItemInFolder(filePath);
}else{ }else{
dialog.showErrorBox('Oops! an error occured', err.message); dialog.showErrorBox('Oops! an error occured', err.message);
} }

Просмотреть файл

@ -20,15 +20,15 @@ var ContainerListItem = React.createClass({
dialog.showMessageBox({ dialog.showMessageBox({
message: 'Are you sure you want to stop & remove this container?', message: 'Are you sure you want to stop & remove this container?',
buttons: ['Remove', 'Cancel'] buttons: ['Remove', 'Cancel']
}, function (index) { }).then(({response}) => {
if (index === 0) { if (response === 0) {
metrics.track('Deleted Container', { metrics.track('Deleted Container', {
from: 'list', from: 'list',
type: 'existing' type: 'existing'
}); });
containerActions.destroy(this.props.container.Name); containerActions.destroy(this.props.container.Name);
} }
}.bind(this)); });
}, },
render: function () { render: function () {
var self = this; var self = this;

Просмотреть файл

@ -153,8 +153,8 @@ var ContainerSettingsGeneral = React.createClass({
dialog.showMessageBox({ dialog.showMessageBox({
message: 'Are you sure you want to delete this container?', message: 'Are you sure you want to delete this container?',
buttons: ['Delete', 'Cancel'] buttons: ['Delete', 'Cancel']
}, index => { }).then(({response}) => {
if (index === 0) { if (response === 0) {
metrics.track('Deleted Container', { metrics.track('Deleted Container', {
from: 'settings', from: 'settings',
type: 'existing' type: 'existing'

Просмотреть файл

@ -10,12 +10,12 @@ import containerActions from '../actions/ContainerActions';
var ContainerSettingsVolumes = React.createClass({ var ContainerSettingsVolumes = React.createClass({
handleChooseVolumeClick: function (dockerVol) { handleChooseVolumeClick: function (dockerVol) {
dialog.showOpenDialog({properties: ['openDirectory', 'createDirectory']}, (filenames) => { dialog.showOpenDialog({properties: ['openDirectory', 'createDirectory']}).then(({filePaths}) => {
if (!filenames) { if (!filePaths) {
return; return;
} }
var directory = filenames[0]; var directory = filePaths[0];
if (!directory || (!util.isNative() && directory.indexOf(util.home()) === -1)) { if (!directory || (!util.isNative() && directory.indexOf(util.home()) === -1)) {
dialog.showMessageBox({ dialog.showMessageBox({