forked from pubkey/rxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
40 lines (33 loc) · 822 Bytes
/
Copy pathmain.js
File metadata and controls
40 lines (33 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const electron = require('electron');
const windowManager = require('electron-window-manager');
const path = require('path');
const url = require('url');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const windows = [];
function createWindow() {
const width = 300;
const height = 600;
let w = new BrowserWindow({
width,
height
});
w.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
}));
const x = windows.length * width;
const y = 0;
w.setPosition(x, y);
windows.push(w);
}
app.on('ready', function() {
createWindow();
createWindow();
});
app.on('window-all-closed', function() {
if (process.platform !== 'darwin') {
app.quit()
}
});