1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-28 12:35:40 +01:00

no update menu item for windows store

This commit is contained in:
Kyle Spearrin 2018-03-15 13:00:08 -04:00
parent f91d748a7c
commit c9d3452f05

View File

@ -11,7 +11,7 @@ import {
} from 'electron';
import { Main } from '../main';
import { isMacAppStore } from '../scripts/utils';
import { isMacAppStore, isWindowsStore } from '../scripts/utils';
import { ConstantsService } from 'jslib/services/constants.service';
@ -584,11 +584,15 @@ export class MenuMain {
firstMenuOptions);
// About menu
template[template.length - 1].submenu =
(template[template.length - 1].submenu as MenuItemConstructorOptions[]).concat([
const aboutMenuAdditions: MenuItemConstructorOptions[] = [
{ type: 'separator' },
updateMenuItem,
{
];
if (!isWindowsStore()) {
aboutMenuAdditions.push(updateMenuItem);
}
aboutMenuAdditions.push({
label: this.main.i18nService.t('aboutBitwarden'),
click: () => {
const aboutInformation = this.main.i18nService.t('version', app.getVersion()) +
@ -608,8 +612,10 @@ export class MenuMain {
clipboard.writeText(aboutInformation);
}
},
},
]);
});
template[template.length - 1].submenu =
(template[template.length - 1].submenu as MenuItemConstructorOptions[]).concat(aboutMenuAdditions);
}
this.menu = Menu.buildFromTemplate(template);