mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
refactor toaster to platform showToast
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { ToasterService } from 'angular2-toaster';
|
||||
import { Angulartics2 } from 'angulartics2';
|
||||
|
||||
import { OnInit } from '@angular/core';
|
||||
@@ -15,7 +14,7 @@ export class PasswordHistoryComponent implements OnInit {
|
||||
|
||||
constructor(protected cipherService: CipherService, protected analytics: Angulartics2,
|
||||
protected platformUtilsService: PlatformUtilsService, protected i18nService: I18nService,
|
||||
protected toasterService: ToasterService, private win: Window) { }
|
||||
private win: Window) { }
|
||||
|
||||
async ngOnInit() {
|
||||
const cipher = await this.cipherService.get(this.cipherId);
|
||||
@@ -27,6 +26,7 @@ export class PasswordHistoryComponent implements OnInit {
|
||||
this.analytics.eventTrack.next({ action: 'Copied Password History' });
|
||||
const copyOptions = this.win != null ? { window: this.win } : null;
|
||||
this.platformUtilsService.copyToClipboard(password, copyOptions);
|
||||
this.toasterService.popAsync('info', null, this.i18nService.t('valueCopied', this.i18nService.t('password')));
|
||||
this.platformUtilsService.showToast('info', null,
|
||||
this.i18nService.t('valueCopied', this.i18nService.t('password')));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user