diff --git a/app.js b/app.js index 3675f3c2..60a29827 100644 --- a/app.js +++ b/app.js @@ -35,3 +35,7 @@ function sync() { services: services }); } + +require('electron').ipcRenderer.on('showAbout', (event, message) => { + !Ext.cq1('about') ? Ext.create('Rambox.view.main.About') : ''; +}); diff --git a/app/view/main/About.js b/app/view/main/About.js new file mode 100644 index 00000000..941d628e --- /dev/null +++ b/app/view/main/About.js @@ -0,0 +1,28 @@ +Ext.define('Rambox.view.main.About', { + extend: 'Ext.window.Window' + ,xtype: 'about' + ,title: 'About Rambox' + ,autoShow: true + ,modal: true + ,width: 300 + ,bodyPadding: 10 + ,data: { + version: require('electron').remote.app.getVersion() + ,platform: process.platform + ,arch: process.arch + ,electron: process.versions.electron + ,chromium: process.versions.chrome + ,node: process.versions.node + } + ,tpl: [ + '
' + ,'

Free and Open Source messaging and emailing app that combines common web applications into one.

' + ,'
Version: {version}
' + ,'
Platform: {platform} ({arch})
' + ,'
Electron: {electron}
' + ,'
Chromium: {chromium}
' + ,'
Node: {node}
' + ,'
' + ,'
GitHub - Donate - rambox.pro
' + ] +}); diff --git a/electron/menu.js b/electron/menu.js index 41b61af6..3362e7f9 100644 --- a/electron/menu.js +++ b/electron/menu.js @@ -122,7 +122,7 @@ let tpl = [ label: 'Close', accelerator: 'CmdOrCtrl+W', role: 'close' - }, + } ] }, { @@ -137,7 +137,9 @@ if (process.platform === 'darwin') { submenu: [ { label: `About ${appName}`, - role: 'about' + click() { + sendAction('showAbout') + } }, { type: 'separator' @@ -194,7 +196,9 @@ if (process.platform === 'darwin') { }); helpSubmenu.push({ label: `About ${appName}`, - role: 'about' + click() { + sendAction('showAbout') + } }); }