mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
timer is any type
This commit is contained in:
parent
0f5af81bd9
commit
cd834a39fc
@ -9,6 +9,8 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import { Angulartics2 } from 'angulartics2';
|
||||||
|
|
||||||
import { CipherType } from 'jslib/enums/cipherType';
|
import { CipherType } from 'jslib/enums/cipherType';
|
||||||
import { FieldType } from 'jslib/enums/fieldType';
|
import { FieldType } from 'jslib/enums/fieldType';
|
||||||
|
|
||||||
@ -41,12 +43,12 @@ export class ViewComponent implements OnChanges, OnDestroy {
|
|||||||
totpLow: boolean;
|
totpLow: boolean;
|
||||||
fieldType = FieldType;
|
fieldType = FieldType;
|
||||||
|
|
||||||
private totpInterval: NodeJS.Timer;
|
private totpInterval: any;
|
||||||
|
|
||||||
constructor(private cipherService: CipherService, private totpService: TotpService,
|
constructor(private cipherService: CipherService, private totpService: TotpService,
|
||||||
private tokenService: TokenService, private utilsService: UtilsService,
|
private tokenService: TokenService, private utilsService: UtilsService,
|
||||||
private cryptoService: CryptoService, private platformUtilsService: PlatformUtilsService,
|
private cryptoService: CryptoService, private platformUtilsService: PlatformUtilsService,
|
||||||
private i18nService: I18nService) {
|
private i18nService: I18nService, private analytics: Angulartics2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnChanges() {
|
async ngOnChanges() {
|
||||||
@ -77,6 +79,7 @@ export class ViewComponent implements OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
togglePassword() {
|
togglePassword() {
|
||||||
|
this.analytics.eventTrack.next({ action: 'Toggled Password' });
|
||||||
this.showPassword = !this.showPassword;
|
this.showPassword = !this.showPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,18 +89,20 @@ export class ViewComponent implements OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
launch() {
|
launch() {
|
||||||
if (this.cipher.login.uri == null || this.cipher.login.uri.indexOf('://') === -1) {
|
if (!this.cipher.login.canLaunch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.analytics.eventTrack.next({ action: 'Launched Login URI' });
|
||||||
this.platformUtilsService.launchUri(this.cipher.login.uri);
|
this.platformUtilsService.launchUri(this.cipher.login.uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
copy(value: string) {
|
copy(value: string, aType: string) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.analytics.eventTrack.next({ action: 'Copied ' + aType });
|
||||||
this.utilsService.copyToClipboard(value, window.document);
|
this.utilsService.copyToClipboard(value, window.document);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +112,7 @@ export class ViewComponent implements OnChanges, OnDestroy {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.cipher.organizationId && !this.isPremium) {
|
if (this.cipher.organizationId == null && !this.isPremium) {
|
||||||
this.platformUtilsService.alertError(this.i18nService.t('premiumRequired'),
|
this.platformUtilsService.alertError(this.i18nService.t('premiumRequired'),
|
||||||
this.i18nService.t('premiumRequiredDesc'));
|
this.i18nService.t('premiumRequiredDesc'));
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user