Browse Source

Improved About window

Fixes #33
pull/92/merge
Ramiro Saenz 9 years ago
parent
commit
d7371731e7
  1. 4
      app.js
  2. 28
      app/view/main/About.js
  3. 10
      electron/menu.js

4
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') : '';
});

28
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: [
'<div style="text-align:center;"><img src="resources/Icon.png" width="100" /></div>'
,'<h3>Free and Open Source messaging and emailing app that combines common web applications into one.</h3>'
,'<div><b>Version:</b> {version}</div>'
,'<div><b>Platform:</b> {platform} ({arch})</div>'
,'<div><b>Electron:</b> {electron}</div>'
,'<div><b>Chromium:</b> {chromium}</div>'
,'<div><b>Node:</b> {node}</div>'
,'<br />'
,'<div style="text-align:center;"><a href="https://github.com/saenzramiro/rambox" target="_blank">GitHub</a> - <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WU75QWS7LH2CA" target="_blank">Donate</a> - <a href="http://rambox.pro" target="_blank">rambox.pro</a></div>'
]
});

10
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')
}
});
}

Loading…
Cancel
Save