feat(core): updated to new browser engine

This commit is contained in:
Alexey Kasyanchuk
2018-12-09 15:51:24 +03:00
parent 23e2871669
commit a43f7431dd
4 changed files with 3232 additions and 6719 deletions

View File

@ -3,7 +3,6 @@ import './app.css';
import './router';
import PagesPie from './pages-pie.js';
//import registerServiceWorker from './registerServiceWorker';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import __, { changeLanguage } from './translation'
@ -73,11 +72,6 @@ else
}
// Needed for onTouchTap
// http://stackoverflow.com/a/34015469/988941
injectTapEventPlugin();
//registerServiceWorker();
// override log to main process

View File

@ -126,7 +126,12 @@ if(portative)
// handle promise rejections
process.on('unhandledRejection', r => logTE('system', 'Rejection:', r));
const shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
const gotTheLock = app.requestSingleInstanceLock()
if (!gotTheLock) {
logT('app', 'closed because of second application')
app.exit(0);
} else {
app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
logT('app', 'openned second application, just focus this one')
if (mainWindow) {
@ -134,11 +139,7 @@ const shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory
mainWindow.restore();
mainWindow.focus();
}
});
if (shouldQuit) {
logT('app', 'closed because of second application')
app.exit(0);
})
}
// log autoupdate