mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-25 12:16:37 +00:00
fix(gui): Fix menu's application name (#1996)
This replaces use of `electron.app.getName()` with the package.json's `.displayName` property to ensure the correct application name is displayed when packaged. Change-Type: patch
This commit is contained in:
parent
9c019cafd5
commit
890122894f
@ -17,6 +17,7 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const electron = require('electron')
|
const electron = require('electron')
|
||||||
|
const packageJson = require('../../package.json')
|
||||||
|
|
||||||
const menuTemplate = [
|
const menuTemplate = [
|
||||||
{
|
{
|
||||||
@ -68,7 +69,7 @@ const menuTemplate = [
|
|||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
menuTemplate.unshift({
|
menuTemplate.unshift({
|
||||||
label: electron.app.getName(),
|
label: packageJson.displayName,
|
||||||
submenu: [ {
|
submenu: [ {
|
||||||
role: 'about'
|
role: 'about'
|
||||||
}, {
|
}, {
|
||||||
@ -98,7 +99,7 @@ if (process.platform === 'darwin') {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
menuTemplate.unshift({
|
menuTemplate.unshift({
|
||||||
label: electron.app.getName(),
|
label: packageJson.displayName,
|
||||||
submenu: [ {
|
submenu: [ {
|
||||||
label: 'Settings',
|
label: 'Settings',
|
||||||
click () {
|
click () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user