Commit 4cf0a5d0 authored by DFN2's avatar DFN2
Browse files

add checkForUpdates handler in ocsManagerHandler

parent 839a40b2
......@@ -222,6 +222,7 @@ ipcMain.on('store', (event, key, value) => {
ipcMain.on('checkForUpdates', () => {
// TODO -> add check for updates method?
ocsManager = spawn(ocsManagerConfig.bin, ['-p', ocsManagerConfig.port, '--appFile', process.env.APPIMAGE]);
console.log(ocsManager);
});
ipcMain.on('previewpic', (event, kind, itemKey, url) => {
......
......@@ -189,7 +189,8 @@ export default class ToolbarComponent extends BaseComponent {
break;
}
case 'check_for_updates':{
this._ipcRenderer.send('checkForUpdates');
//this._ipcRenderer.send('checkForUpdates');
this.dispatch('ocsManager_checkForUpdates', {});
this.contentRoot.querySelector('app-menu').close();
break;
}
......
......@@ -144,6 +144,12 @@ export default class OcsManagerHandler {
return false;
})
.add('ocsManager_checkForUpdates', () => {
console.log('checkForUpdates');
this._ocsManagerApi.send('UpdateHandler::checkAppUpdate', []).then(function(res){
console.log(res)
});
})
.add('ocsManager_update', (data) => {
this._ocsManagerApi.send('UpdateHandler::update', [data.itemKey]);
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment