refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
This commit is contained in:
parent
f2d41b7812
commit
8d83518f9a
15 changed files with 57 additions and 25 deletions
|
@ -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' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue