mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
Fix linting errors
This commit is contained in:
@@ -138,7 +138,7 @@ export default class MainBackground {
|
|||||||
private menuOptionsLoaded: any[] = [];
|
private menuOptionsLoaded: any[] = [];
|
||||||
private syncTimeout: any;
|
private syncTimeout: any;
|
||||||
private isSafari: boolean;
|
private isSafari: boolean;
|
||||||
nativeMessagingBackground: NativeMessagingBackground;
|
private nativeMessagingBackground: NativeMessagingBackground;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.nativeMessagingBackground = new NativeMessagingBackground();
|
this.nativeMessagingBackground = new NativeMessagingBackground();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { BrowserApi } from "../browser/browserApi";
|
import { BrowserApi } from '../browser/browserApi';
|
||||||
|
|
||||||
export class NativeMessagingBackground {
|
export class NativeMessagingBackground {
|
||||||
private connected = false;
|
private connected = false;
|
||||||
@@ -7,19 +7,19 @@ export class NativeMessagingBackground {
|
|||||||
private resolver: any = null;
|
private resolver: any = null;
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
this.port = BrowserApi.connectNative("com.8bit.bitwarden");
|
this.port = BrowserApi.connectNative('com.8bit.bitwarden');
|
||||||
|
|
||||||
this.connected = true;
|
this.connected = true;
|
||||||
this.port.onMessage.addListener((msg: any) => {
|
this.port.onMessage.addListener((msg: any) => {
|
||||||
if (this.resolver) {
|
if (this.resolver) {
|
||||||
this.resolver(msg);
|
this.resolver(msg);
|
||||||
} else {
|
} else {
|
||||||
|
// tslint:disable-next-line
|
||||||
console.error('NO RESOLVER');
|
console.error('NO RESOLVER');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.port.onDisconnect.addListener(() => {
|
this.port.onDisconnect.addListener(() => {
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
console.log('Disconnected');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -227,8 +227,8 @@ export class SettingsComponent implements OnInit {
|
|||||||
this.biometric = await this.platformUtilsService.authenticateBiometric();
|
this.biometric = await this.platformUtilsService.authenticateBiometric();
|
||||||
Swal.close();
|
Swal.close();
|
||||||
|
|
||||||
if (this.biometric == false) {
|
if (this.biometric === false) {
|
||||||
this.platformUtilsService.showToast("error", "Unable to enable biometrics", "Ensure the desktop application is running, and browser integration is enabled.");
|
this.platformUtilsService.showToast('error', 'Unable to enable biometrics', 'Ensure the desktop application is running, and browser integration is enabled.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.biometric === current) {
|
if (this.biometric === current) {
|
||||||
|
|||||||
@@ -299,9 +299,9 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
|||||||
|
|
||||||
const response = await responsePromise;
|
const response = await responsePromise;
|
||||||
|
|
||||||
return response.response == 'unlocked';
|
return response.response === 'unlocked';
|
||||||
}
|
}
|
||||||
|
|
||||||
sidebarViewName(): string {
|
sidebarViewName(): string {
|
||||||
if ((window as any).chrome.sidebarAction && this.isFirefox()) {
|
if ((window as any).chrome.sidebarAction && this.isFirefox()) {
|
||||||
return 'sidebar';
|
return 'sidebar';
|
||||||
|
|||||||
Reference in New Issue
Block a user