TimeChain/main.js
Jason Tudisco 4d57642db4 Mostly working on search and create and changing location of Database file.
New key bindings!
Added ability to search by tag and by date. Though there is still a bug in by date.
Lots of DB code updates.
Adding electron if casses. Some of these features are electrong spesific so it is checking that it is electron.
Changing how tagging control works so I could have multiple on the same page.
Added some error tracking code so I would get notified of internal errors if online.
New preload script (special feature in electron)
2022-02-14 04:56:21 -06:00

39 lines
786 B
JavaScript

const { app, BrowserWindow } = require('electron')
const path = require('path')
const here = app.getAppPath()
console.log('here', here)
require('./src/data/sqlite-electron-ipc')
// Preload
const Sentry = require('@sentry/browser')
Sentry.init({
dsn: 'http://a12d5c5f800b406f8d1c0c5d2ed63a78@216.128.138.128:8000/1'
})
let mainWin
function createWindow () {
mainWin = new BrowserWindow({
autoHideMenuBar: true,
width: 800,
height: 600,
icon: __dirname + '/src/img/chains.png',
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
preload: path.join(here, 'preload.js')
},
nodeIntegration: true
})
// win.autoHideMenuBar = true;
mainWin.loadFile('index.html')
}
app.whenReady().then(() => {
createWindow()
})