mirror of
https://github.com/bitwarden/browser
synced 2026-01-06 10:33:57 +00:00
Fixed lint warnings (#1655)
This commit is contained in:
@@ -214,8 +214,8 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
// Request permission to use the optional permission for nativeMessaging
|
||||
if (!this.platformUtilsService.isFirefox()) {
|
||||
const hasPermission = await new Promise((resolve) => {
|
||||
chrome.permissions.contains({permissions: ['nativeMessaging']}, resolve);
|
||||
const hasPermission = await new Promise(resolve => {
|
||||
chrome.permissions.contains({ permissions: ['nativeMessaging'] }, resolve);
|
||||
});
|
||||
|
||||
if (!hasPermission) {
|
||||
@@ -224,9 +224,9 @@ export class SettingsComponent implements OnInit {
|
||||
this.i18nService.t('ok'), null);
|
||||
|
||||
const granted = await new Promise((resolve, reject) => {
|
||||
chrome.permissions.request({permissions: ['nativeMessaging']}, resolve);
|
||||
chrome.permissions.request({ permissions: ['nativeMessaging'] }, resolve);
|
||||
});
|
||||
|
||||
|
||||
if (!granted) {
|
||||
await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('nativeMessaginPermissionErrorDesc'), this.i18nService.t('nativeMessaginPermissionErrorTitle'),
|
||||
@@ -254,23 +254,23 @@ export class SettingsComponent implements OnInit {
|
||||
await this.cryptoService.toggleKey();
|
||||
|
||||
await Promise.race([
|
||||
submitted.then((result) => {
|
||||
submitted.then(result => {
|
||||
if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
this.biometric = false;
|
||||
this.storageService.remove(ConstantsService.biometricAwaitingAcceptance);
|
||||
}
|
||||
}),
|
||||
this.platformUtilsService.authenticateBiometric().then((result) => {
|
||||
this.platformUtilsService.authenticateBiometric().then(result => {
|
||||
this.biometric = result;
|
||||
|
||||
Swal.close();
|
||||
if (this.biometric === false) {
|
||||
this.platformUtilsService.showToast('error', this.i18nService.t('errorEnableBiometricTitle'), this.i18nService.t('errorEnableBiometricDesc'));
|
||||
}
|
||||
}).catch((e) => {
|
||||
}).catch(e => {
|
||||
// Handle connection errors
|
||||
this.biometric = false;
|
||||
})
|
||||
}),
|
||||
]);
|
||||
} else {
|
||||
await this.storageService.remove(ConstantsService.biometricUnlockKey);
|
||||
|
||||
Reference in New Issue
Block a user