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

bells and whistles for Send

This commit is contained in:
addison
2021-02-18 13:03:20 -05:00
parent 4a8cf62495
commit ac807b6d54
7 changed files with 170 additions and 78 deletions

View File

@@ -1,3 +1,5 @@
import { remote } from 'electron';
import {
Component,
NgZone,
@@ -77,10 +79,6 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro
}
}
editSend(send: SendView) {
return;
}
cancel(s: SendView) {
this.action = Action.None;
this.sendId = null;
@@ -112,4 +110,20 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro
get selectedSendType() {
return this.sends.find(s => s.id === this.sendId)?.type;
}
viewSendMenu(send: SendView) {
const menu = new remote.Menu();
menu.append(new remote.MenuItem({
label: this.i18nService.t('copyLink'),
click: () => this.copy(send)
}));
menu.append(new remote.MenuItem({
label: this.i18nService.t('delete'),
click: async () => {
await this.delete(send);
await this.deletedSend(send);
}
}));
menu.popup({ window: remote.getCurrentWindow() });
}
}