mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-09 09:51:02 +01:00
Add setting to disable biometric auto prompt on desktop (#370)
* Add setting to disable biometric auto prompt on desktop * Add callback for checking if the window is visible.
This commit is contained in:
parent
d184b0d2d6
commit
1b8f6aace2
@ -13,6 +13,7 @@ export default class BiometricDarwinMain implements BiometricMain {
|
||||
async init() {
|
||||
this.storageService.save(ElectronConstants.enableBiometric, await this.supportsBiometric());
|
||||
this.storageService.save(ConstantsService.biometricText, 'unlockWithTouchId');
|
||||
this.storageService.save(ElectronConstants.noAutoPromptBiometricsText, 'noAutoPromptTouchId');
|
||||
|
||||
ipcMain.on('biometric', async (event: any, message: any) => {
|
||||
event.returnValue = await this.requestCreate();
|
||||
|
@ -27,6 +27,7 @@ export default class BiometricWindowsMain implements BiometricMain {
|
||||
}
|
||||
this.storageService.save(ElectronConstants.enableBiometric, supportsBiometric);
|
||||
this.storageService.save(ConstantsService.biometricText, 'unlockWithWindowsHello');
|
||||
this.storageService.save(ElectronConstants.noAutoPromptBiometricsText, 'noAutoPromptWindowsHello');
|
||||
|
||||
ipcMain.on('biometric', async (event: any, message: any) => {
|
||||
event.returnValue = await this.requestCreate();
|
||||
|
@ -10,4 +10,6 @@ export class ElectronConstants {
|
||||
static readonly enableBrowserIntegrationFingerprint: string = 'enableBrowserIntegrationFingerprint';
|
||||
static readonly alwaysShowDock: string = 'alwaysShowDock';
|
||||
static readonly openAtLogin: string = 'openAtLogin';
|
||||
static readonly noAutoPromptBiometrics: string = 'noAutoPromptBiometrics';
|
||||
static readonly noAutoPromptBiometricsText: string = 'noAutoPromptBiometricsText';
|
||||
}
|
||||
|
@ -37,6 +37,10 @@ export class ElectronMainMessagingService implements MessagingService {
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.handle('windowVisible', () => {
|
||||
return windowMain.win?.isVisible();
|
||||
});
|
||||
|
||||
nativeTheme.on('updated', () => {
|
||||
windowMain.win.webContents.send('systemThemeUpdated', nativeTheme.shouldUseDarkColors ? 'dark' : 'light');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user