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