-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.js
56 lines (46 loc) · 1.26 KB
/
main.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const { app, ipcMain, BrowserWindow } = require('electron');
// const disksInfo = require('node-disk-info') ;
// import { BrowserWindow} from 'electron';
let win;
function createWindow() {
win = new BrowserWindow({
minWidth: 800,
minHeight: 600,
autoHideMenuBar: true,
backgroundColor: '#232325',
frame: false,
webPreferences: {
webSecurity: false,
nodeIntegration: true,
contextIsolation: false,
}
})
win.maximize();
}
app.whenReady().then(() => {
createWindow();
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
})
}).then(() => {
win.loadFile('build/index.html');
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
ipcMain.handle('testTags', () => {
return new Promise((resolve, reject) => {
resolve(['tag1', 'tag2', 'tag3'])
})
})
// Windows Fram actions
// require('./main_process/titleBar')
require('./mainProcess/fileSystem');
require('./mainProcess/nedb/pinFolderCollection');
require('./mainProcess/nedb/projectCollection');
require('./mainProcess/nedb/tagCollection');
// require ('./../database/db')