1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 10:43:35 +00:00

[PM-11312] Add "prevent screenshot" setting to windows and mac (#10707)

* Add screenshot protection to windows and mac

* Update messaging of screencapture prevention feature

* Set default state to false
This commit is contained in:
Bernd Schoolmann
2024-09-18 12:38:35 +02:00
committed by GitHub
parent 18ef74930c
commit 1b7bb014d2
5 changed files with 63 additions and 0 deletions

View File

@@ -109,6 +109,7 @@ export class SettingsComponent implements OnInit, OnDestroy {
disabled: true,
}),
enableHardwareAcceleration: true,
allowScreenshots: false,
enableDuckDuckGoBrowserIntegration: false,
theme: [null as ThemeType | null],
locale: [null as string | null],
@@ -277,6 +278,7 @@ export class SettingsComponent implements OnInit, OnDestroy {
enableHardwareAcceleration: await firstValueFrom(
this.desktopSettingsService.hardwareAcceleration$,
),
allowScreenshots: await firstValueFrom(this.desktopSettingsService.allowScreenshots$),
theme: await firstValueFrom(this.themeStateService.selectedTheme$),
locale: await firstValueFrom(this.i18nService.userSetLocale$),
};
@@ -727,6 +729,10 @@ export class SettingsComponent implements OnInit, OnDestroy {
);
}
async saveAllowScreenshots() {
await this.desktopSettingsService.setAllowScreenshots(this.form.value.allowScreenshots);
}
private async generateVaultTimeoutOptions(): Promise<VaultTimeoutOption[]> {
let vaultTimeoutOptions: VaultTimeoutOption[] = [
{ name: this.i18nService.t("oneMinute"), value: 1 },