1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

show toasts on copying, resolves #28

This commit is contained in:
Kyle Spearrin
2018-02-23 16:31:52 -05:00
parent accb4436ba
commit e24a083936
6 changed files with 53 additions and 28 deletions

View File

@@ -96,13 +96,15 @@ export class ViewComponent implements OnChanges, OnDestroy {
this.platformUtilsService.launchUri(this.cipher.login.uri);
}
copy(value: string, aType: string) {
copy(value: string, typeI18nKey: string, aType: string) {
if (value == null) {
return;
}
this.analytics.eventTrack.next({ action: 'Copied ' + aType });
this.platformUtilsService.copyToClipboard(value);
this.toasterService.popAsync('info', null,
this.i18nService.t('valueCopied', this.i18nService.t(typeI18nKey)));
}
async downloadAttachment(attachment: AttachmentView) {