1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-05 09:10:53 +01:00

emit events for share and collections

This commit is contained in:
Kyle Spearrin 2018-10-23 15:42:20 -04:00
parent 8e377050e9
commit 2f510a7988

View File

@ -44,6 +44,8 @@ export class AddEditComponent implements OnInit {
@Output() onDeletedCipher = new EventEmitter<CipherView>(); @Output() onDeletedCipher = new EventEmitter<CipherView>();
@Output() onCancelled = new EventEmitter<CipherView>(); @Output() onCancelled = new EventEmitter<CipherView>();
@Output() onEditAttachments = new EventEmitter<CipherView>(); @Output() onEditAttachments = new EventEmitter<CipherView>();
@Output() onShareCipher = new EventEmitter<CipherView>();
@Output() onEditCollections = new EventEmitter<CipherView>();
@Output() onGeneratePassword = new EventEmitter(); @Output() onGeneratePassword = new EventEmitter();
editMode: boolean = false; editMode: boolean = false;
@ -263,6 +265,14 @@ export class AddEditComponent implements OnInit {
this.onEditAttachments.emit(this.cipher); this.onEditAttachments.emit(this.cipher);
} }
share() {
this.onShareCipher.emit(this.cipher);
}
editCollections() {
this.onEditCollections.emit(this.cipher);
}
async delete(): Promise<boolean> { async delete(): Promise<boolean> {
const confirmed = await this.platformUtilsService.showDialog( const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('deleteItemConfirmation'), this.i18nService.t('deleteItem'), this.i18nService.t('deleteItemConfirmation'), this.i18nService.t('deleteItem'),