Wilson Mendes
@willmendesneto
Wilson Mendes
@willmendesneto
#developer
#opensource
#GDE AngularJS
SO, LET'S START THE PARTY ?
const sendEventFromPage = (customEventName) => {
...
mainWindow.webContents.send(customEventName);
};
const contextMenu = Menu.buildFromTemplate([{
label: 'Open',
click: () => {
sendEventFromPage('route:main');
}
}]);
const appIcon = new Tray();
appIcon.setToolTip('Build Checker App');
appIcon.setContextMenu(contextMenu);
import ipc from 'ipc-renderer';
import { createHashHistory } from 'history';
const appHistory = useRouterHistory(createHashHistory);
ipc.on('route:main', () => {
appHistory.push('/');
});
https://<your-http-username>:<your-http-password>@your-url
import low from 'lowdb';
import {storage} from 'lowdb/browser';
const DBClient = (key) => {
...
return {
findOne
};
};
export default {
DBClient
};
import ipc from 'ipc-renderer';
const DBConfig = DB.DBClient('configurations');
const config = DBConfig.findOne();
ipc.send('updateConfigInMainProcess', config);
import {ipcMain} from 'electron';
ipcMain.on('updateConfigInMainProcess', (event, config) => {
if (!config.showAppInDock) {
app.dock.hide();
}
...
event.sender.send('appConfigurationWasUpdated');
});
#thanks
Wilson Mendes
@willmendesneto