1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

Remove electron remote (#830)

* Remove calls to remote
This commit is contained in:
Oscar Hinton
2021-04-07 20:25:15 +02:00
committed by GitHub
parent 9ff6b4242c
commit eebd4fc9d9
4 changed files with 68 additions and 65 deletions

View File

@@ -1,5 +1,3 @@
import { remote } from 'electron';
import {
Component,
NgZone,
@@ -19,6 +17,7 @@ import { UserService } from 'jslib/abstractions/user.service';
import { SendComponent as BaseSendComponent } from 'jslib/angular/components/send/send.component';
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
import { invokeMenu, RendererMenuItem } from 'jslib/electron/utils';
import { SendView } from 'jslib/models/view/sendView';
@@ -112,18 +111,19 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro
}
viewSendMenu(send: SendView) {
const menu = new remote.Menu();
menu.append(new remote.MenuItem({
const menu: RendererMenuItem[] = [];
menu.push({
label: this.i18nService.t('copyLink'),
click: () => this.copy(send),
}));
menu.append(new remote.MenuItem({
});
menu.push({
label: this.i18nService.t('delete'),
click: async () => {
await this.delete(send);
await this.deletedSend(send);
},
}));
menu.popup({ window: remote.getCurrentWindow() });
});
invokeMenu(menu);
}
}