1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-19 02:51:14 +02:00

Move share button to view page (#229)

It is not possible to edit and share at the same time. Browser extension
currently utilizes this layout and it is confusing. This change is in
conjunction with altering that UI.
This commit is contained in:
Matt Gibson 2020-12-15 17:49:51 -06:00 committed by GitHub
parent 58f5369adc
commit 75ca9f9c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,7 @@ export class ViewComponent implements OnDestroy, OnInit {
@Input() cipherId: string;
@Output() onEditCipher = new EventEmitter<CipherView>();
@Output() onCloneCipher = new EventEmitter<CipherView>();
@Output() onShareCipher = new EventEmitter<CipherView>();
@Output() onDeletedCipher = new EventEmitter<CipherView>();
@Output() onRestoredCipher = new EventEmitter<CipherView>();
@ -114,6 +115,10 @@ export class ViewComponent implements OnDestroy, OnInit {
this.onCloneCipher.emit(this.cipher);
}
share() {
this.onShareCipher.emit(this.cipher);
}
async delete(): Promise<boolean> {
const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t(this.cipher.isDeleted ? 'permanentlyDeleteItemConfirmation' : 'deleteItemConfirmation'),