bitwarden-estensione-browser/apps/browser/src/popup/components/send-list.component.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
936 B
TypeScript
Raw Normal View History

import { Component, EventEmitter, Input, Output } from "@angular/core";
2022-06-14 17:10:53 +02:00
import { SendType } from "@bitwarden/common/enums/sendType";
import { SendView } from "@bitwarden/common/models/view/sendView";
@Component({
selector: "app-send-list",
templateUrl: "send-list.component.html",
})
export class SendListComponent {
@Input() sends: SendView[];
@Input() title: string;
@Input() disabledByPolicy = false;
@Output() onSelected = new EventEmitter<SendView>();
@Output() onCopySendLink = new EventEmitter<SendView>();
@Output() onRemovePassword = new EventEmitter<SendView>();
@Output() onDeleteSend = new EventEmitter<SendView>();
2021-12-21 15:43:35 +01:00
sendType = SendType;
2021-12-21 15:43:35 +01:00
selectSend(s: SendView) {
this.onSelected.emit(s);
}
2021-12-21 15:43:35 +01:00
copySendLink(s: SendView) {
this.onCopySendLink.emit(s);
}
2021-12-21 15:43:35 +01:00
removePassword(s: SendView) {
this.onRemovePassword.emit(s);
}
2021-12-21 15:43:35 +01:00
delete(s: SendView) {
this.onDeleteSend.emit(s);
}
}