refactor: make name a prop on app (#17701)

Update app.name to be a property on app.
This commit is contained in:
Shelley Vohr 2019-04-30 13:55:33 -07:00 committed by GitHub
parent f2d41b7812
commit 8d83518f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 25 deletions

View file

@ -9,7 +9,7 @@ const isLinux = process.platform === 'linux'
const roles = {
about: {
get label () {
return isLinux ? 'About' : `About ${app.getName()}`
return isLinux ? 'About' : `About ${app.name}`
}
},
close: {
@ -49,7 +49,7 @@ const roles = {
},
hide: {
get label () {
return `Hide ${app.getName()}`
return `Hide ${app.name}`
},
accelerator: 'Command+H'
},
@ -77,7 +77,7 @@ const roles = {
quit: {
get label () {
switch (process.platform) {
case 'darwin': return `Quit ${app.getName()}`
case 'darwin': return `Quit ${app.name}`
case 'win32': return 'Exit'
default: return 'Quit'
}
@ -172,7 +172,7 @@ const roles = {
// App submenu should be used for Mac only
appmenu: {
get label () {
return app.getName()
return app.name
},
submenu: [
{ role: 'about' },