mirror of https://github.com/docker/docs.git
Fixed browser window not opening.
This commit is contained in:
parent
c78549a45f
commit
3b9244159e
|
@ -19,7 +19,8 @@ if (argv.integration) {
|
||||||
process.env.TEST_TYPE = 'test';
|
process.env.TEST_TYPE = 'test';
|
||||||
}
|
}
|
||||||
|
|
||||||
var mainWindow = new BrowserWindow({
|
app.on('activate-with-no-open-windows', function () {
|
||||||
|
var mainWindow = new BrowserWindow({
|
||||||
width: 1000,
|
width: 1000,
|
||||||
height: 700,
|
height: 700,
|
||||||
'min-width': 1000,
|
'min-width': 1000,
|
||||||
|
@ -27,9 +28,7 @@ var mainWindow = new BrowserWindow({
|
||||||
resizable: true,
|
resizable: true,
|
||||||
frame: false,
|
frame: false,
|
||||||
show: false
|
show: false
|
||||||
});
|
});
|
||||||
|
|
||||||
app.on('activate-with-no-open-windows', function () {
|
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
}
|
}
|
||||||
|
@ -37,7 +36,15 @@ app.on('activate-with-no-open-windows', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.on('ready', function() {
|
app.on('ready', function() {
|
||||||
|
var mainWindow = new BrowserWindow({
|
||||||
|
width: 1000,
|
||||||
|
height: 700,
|
||||||
|
'min-width': 1000,
|
||||||
|
'min-height': 700,
|
||||||
|
resizable: true,
|
||||||
|
frame: false,
|
||||||
|
show: false
|
||||||
|
});
|
||||||
if (argv.test) {
|
if (argv.test) {
|
||||||
mainWindow.loadUrl('file://' + __dirname + '/../tests/tests.html');
|
mainWindow.loadUrl('file://' + __dirname + '/../tests/tests.html');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue