Commit bcc4ce52 authored by Andrew Cohen's avatar Andrew Cohen

about menu version

parent 8a1354db
......@@ -43,7 +43,8 @@ function createWindow ()
})
console.log(process.cwd())
require('./menu.js');
const menu=require('./menu.js');
menu.setMenu(mainWindow);
}
ipcMain.on('captureScreenFinalize',(event) => {
......
......@@ -54,15 +54,32 @@ const template = [
submenu: [
{
label: 'Learn More',
click () { require('electron').shell.openExternal('http://bioimage.coe.drexel.edu') }
click () { require('electron').shell.openExternal('http://leverjs.net') }
},
{
label: 'about leverjs (tbd)'
label: 'about leverjs',
click: about
}
]
}
]
const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
function about(){
const {dialog} = require('electron');
const fs = require('fs')
const path=require('path');
var packageFile=path.join(path.dirname(process.mainModule.filename),'..','package.json');
var packageInfo = JSON.parse(fs.readFileSync(packageFile,'utf8'))
var version = packageInfo.version;
dialog.showMessageBox({type:"info",title:"leverjs",message:"leverjs version: "+version});
}
const menu = Menu.buildFromTemplate(template);
var mainWindow;
function setMenu(window)
{
Menu.setApplicationMenu(menu)
mainWindow=window;
}
module.exports.setMenu=setMenu;
......@@ -12,7 +12,7 @@ var win;
const path=require('path');
function sendStatusToWindow(text) {
log.info(text);
//log.info(text);
win.webContents.send('autoUpdater', text);
}
......@@ -56,7 +56,7 @@ function checkForUpdates(mainWindow)
function doUpdate()
{
autoUpdater.downloadUpdate();
}
}
module.exports.checkForUpdates=checkForUpdates;
module.exports.doUpdate=doUpdate;
\ No newline at end of file
......@@ -63,21 +63,24 @@ function processUpdateEvent(event,text)
handleUpdateAvailable(event);
return;
}
if ( (text==='checking for updates') || (text==='no update available') || (text==='update error'))
return;
var updateButton=document.getElementById('updateButton');
updateButton.innerHTML='close';
var updateBar=document.getElementById('updateBar');
updateBar.style.display="inline";
if ( (text==='checking for updates') || (text==='no update available') || (text==='update error'))
return;
if (text==='progress') {
if (processIndicator.length>10)
processIndicator='.';
else
processIndicator+='.';
text+='downloading'+processIndicator;
text='downloading'+processIndicator;
}
var status=document.getElementById('updateStatus');
status.innerHTML=text;
......
{
"name": "leverjs",
"version": "1.0.0",
"version": "1.0.1",
"description": "live cell & organelle image analysis",
"main": "elever/main.js",
"scripts": {
......
Markdown is supported
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