mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 17:43:39 +00:00
[PM-14006] Prevent screenshot setting V2 (#12570)
* Add screenshot protection to windows and mac * Update messaging of screencapture prevention feature * Rename settings key * Default allow screenshots * Update screenshot setting description * Fix typo * Add confirm visible prompt
This commit is contained in:
@@ -76,6 +76,13 @@ export class WindowMain {
|
||||
}
|
||||
});
|
||||
|
||||
this.desktopSettingsService.preventScreenshots$.subscribe((prevent) => {
|
||||
if (this.win == null) {
|
||||
return;
|
||||
}
|
||||
this.win.setContentProtection(prevent);
|
||||
});
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
try {
|
||||
if (!isMacAppStore()) {
|
||||
@@ -277,6 +284,14 @@ export class WindowMain {
|
||||
});
|
||||
});
|
||||
|
||||
firstValueFrom(this.desktopSettingsService.preventScreenshots$)
|
||||
.then((preventScreenshots) => {
|
||||
this.win.setContentProtection(preventScreenshots);
|
||||
})
|
||||
.catch((e) => {
|
||||
this.logService.error(e);
|
||||
});
|
||||
|
||||
if (this.createWindowCallback) {
|
||||
this.createWindowCallback(this.win);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user