1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-24 03:32:51 +02:00
bitwarden-browser/apps/desktop/src/main
Daniel James Smith e9d0f75b8a
[PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704)
* Only pass necessary service to power-monitor

PowerMonitorMain only requires the messagingService instead of a full reference to Main

* Remove never changing constructor params

Window.main has a defaultWidth and defaultHeight that never change, so they do not need to get passed in from outside

hideTitleBar is always true, so there is no need to make it a param

* Remove projectName from updater

This is likely another relict from sharing this previously with dircetory-connector and is not needed anymore

* Only pass necessary service to MenuMain

MenuMain only needs service references instead of a full reference to Main

* Refactor biometrics service

Create BiometricsService that takes care of loading the platformspecifc services, hiding the implementation details
Make it clearer which dependencies are needed by a specific biometrics-service (compile-error vs runtime-error)
Add unit tests
Isolate biometrics import/exports with a barrel file

* Fix #3148

recordActivity was only getting called when user-activity in the main window is recognized
When using biometrics to unlock, the Windows Hello/TouchID prompt would be focused and no input would be recognised. LastActive would have an old value and the vault would get locked

* Improve reloading with biometrics

* Mock import of desktop-native

* Add mock for "@bitwarden/desktop-native-linux-x64-musl"

* Revert "Add mock for "@bitwarden/desktop-native-linux-x64-musl""

This reverts commit 69771b94bf.

* mock the exports of desktop-native

* Pass process.platform inot BiometricsService
2023-03-10 21:32:26 +01:00
..
biometric [PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704) 2023-03-10 21:32:26 +01:00
menu [PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704) 2023-03-10 21:32:26 +01:00
desktop-credential-storage-listener.ts [PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704) 2023-03-10 21:32:26 +01:00
messaging.main.ts [SG-520] Native messaging handler (#3566) 2022-09-23 15:47:17 -04:00
native-messaging.main.ts [SM-329] Merge libs/electron into desktop (#3989) 2022-12-02 12:45:09 +01:00
power-monitor.main.ts [PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704) 2023-03-10 21:32:26 +01:00
tray.main.ts [SM-329] Merge libs/electron into desktop (#3989) 2022-12-02 12:45:09 +01:00
updater.main.ts [PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704) 2023-03-10 21:32:26 +01:00
window.main.ts [PM-469] [PM-1325] [PS-1165] [PS-1257] Small refactorings/improvements on the desktop app main (#4704) 2023-03-10 21:32:26 +01:00