mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-05 09:10:53 +01:00
add web device type, dont check password twice
This commit is contained in:
parent
c59bca05bb
commit
8211e19db0
@ -278,6 +278,10 @@ export class AddEditComponent {
|
||||
}
|
||||
|
||||
async checkPassword() {
|
||||
if (this.checkPasswordPromise != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.cipher.login == null || this.cipher.login.password == null || this.cipher.login.password === '') {
|
||||
return;
|
||||
}
|
||||
@ -285,6 +289,7 @@ export class AddEditComponent {
|
||||
this.analytics.eventTrack.next({ action: 'Check Password' });
|
||||
this.checkPasswordPromise = this.auditService.passwordLeaked(this.cipher.login.password);
|
||||
const matches = await this.checkPasswordPromise;
|
||||
this.checkPasswordPromise = null;
|
||||
|
||||
if (matches > 0) {
|
||||
this.toasterService.popAsync('warning', null, this.i18nService.t('passwordExposed', matches.toString()));
|
||||
|
@ -8,4 +8,5 @@ export enum DeviceType {
|
||||
Linux = 8,
|
||||
Vivaldi = 19,
|
||||
Safari = 20,
|
||||
Web = 21,
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ export const AnalyticsIds = {
|
||||
[DeviceType.Windows]: 'UA-81915606-17',
|
||||
[DeviceType.Linux]: 'UA-81915606-19',
|
||||
[DeviceType.MacOs]: 'UA-81915606-18',
|
||||
[DeviceType.Web]: 'UA-81915606-3',
|
||||
};
|
||||
|
||||
export class Analytics {
|
||||
|
Loading…
Reference in New Issue
Block a user