From 2227fd1190ed618fb3d2024697753a7bca1a9d44 Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Thu, 9 May 2024 12:29:51 +0200 Subject: [PATCH 1/2] Rename about.component to about-dialog.component (#9094) Co-authored-by: Daniel James Smith --- .../about-dialog.component.html} | 0 .../about-dialog.component.ts} | 4 ++-- apps/browser/src/tools/popup/settings/settings.component.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename apps/browser/src/tools/popup/settings/{about/about.component.html => about-dialog/about-dialog.component.html} (100%) rename apps/browser/src/tools/popup/settings/{about/about.component.ts => about-dialog/about-dialog.component.ts} (93%) diff --git a/apps/browser/src/tools/popup/settings/about/about.component.html b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.html similarity index 100% rename from apps/browser/src/tools/popup/settings/about/about.component.html rename to apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.html diff --git a/apps/browser/src/tools/popup/settings/about/about.component.ts b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts similarity index 93% rename from apps/browser/src/tools/popup/settings/about/about.component.ts rename to apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts index d7f98c1e7f..0467debdfb 100644 --- a/apps/browser/src/tools/popup/settings/about/about.component.ts +++ b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts @@ -9,11 +9,11 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { ButtonModule, DialogModule } from "@bitwarden/components"; @Component({ - templateUrl: "about.component.html", + templateUrl: "about-dialog.component.html", standalone: true, imports: [CommonModule, JslibModule, DialogModule, ButtonModule], }) -export class AboutComponent { +export class AboutDialogComponent { protected year = new Date().getFullYear(); protected version$: Observable; diff --git a/apps/browser/src/tools/popup/settings/settings.component.ts b/apps/browser/src/tools/popup/settings/settings.component.ts index 81727c442c..d0c5d63092 100644 --- a/apps/browser/src/tools/popup/settings/settings.component.ts +++ b/apps/browser/src/tools/popup/settings/settings.component.ts @@ -13,7 +13,7 @@ import { DialogService } from "@bitwarden/components"; import { BrowserApi } from "../../../platform/browser/browser-api"; import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; -import { AboutComponent } from "./about/about.component"; +import { AboutDialogComponent } from "./about-dialog/about-dialog.component"; const RateUrls = { [DeviceType.ChromeExtension]: @@ -84,7 +84,7 @@ export class SettingsComponent implements OnInit { } about() { - this.dialogService.open(AboutComponent); + this.dialogService.open(AboutDialogComponent); } rate() { From da144410e8cba06a1305c6e9359a413ca95ca558 Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Thu, 9 May 2024 12:30:43 +0200 Subject: [PATCH 2/2] Remove settings from options.component which had been moved to notifications.component (#9093) Co-authored-by: Daniel James Smith --- .../src/popup/settings/options.component.html | 61 ------------------- .../src/popup/settings/options.component.ts | 32 ---------- 2 files changed, 93 deletions(-) diff --git a/apps/browser/src/popup/settings/options.component.html b/apps/browser/src/popup/settings/options.component.html index fa2b7514db..0382eb5b86 100644 --- a/apps/browser/src/popup/settings/options.component.html +++ b/apps/browser/src/popup/settings/options.component.html @@ -60,67 +60,6 @@ -
-
-
- - -
-
- -
-
-
-
- - -
-
- -
-
-
-
- - -
-
- -
diff --git a/apps/browser/src/popup/settings/options.component.ts b/apps/browser/src/popup/settings/options.component.ts index 0344362d36..cfcc81bb22 100644 --- a/apps/browser/src/popup/settings/options.component.ts +++ b/apps/browser/src/popup/settings/options.component.ts @@ -3,7 +3,6 @@ import { firstValueFrom } from "rxjs"; import { AutofillSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/autofill-settings.service"; import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service"; -import { UserNotificationSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/user-notification-settings.service"; import { ClearClipboardDelaySetting } from "@bitwarden/common/autofill/types"; import { UriMatchStrategy, @@ -25,9 +24,6 @@ export class OptionsComponent implements OnInit { autoFillOnPageLoadOptions: any[]; enableAutoTotpCopy = false; // TODO: Does it matter if this is set to false or true? enableContextMenuItem = false; - enableAddLoginNotification = false; - enableChangedPasswordNotification = false; - enablePasskeys = true; showCardsCurrentTab = false; showIdentitiesCurrentTab = false; showClearClipboard = true; @@ -36,13 +32,11 @@ export class OptionsComponent implements OnInit { clearClipboard: ClearClipboardDelaySetting; clearClipboardOptions: any[]; showGeneral = true; - showAutofill = true; showDisplay = true; accountSwitcherEnabled = false; constructor( private messagingService: MessagingService, - private userNotificationSettingsService: UserNotificationSettingsServiceAbstraction, private autofillSettingsService: AutofillSettingsServiceAbstraction, private domainSettingsService: DomainSettingsService, i18nService: I18nService, @@ -82,14 +76,6 @@ export class OptionsComponent implements OnInit { this.autofillSettingsService.autofillOnPageLoadDefault$, ); - this.enableAddLoginNotification = await firstValueFrom( - this.userNotificationSettingsService.enableAddedLoginPrompt$, - ); - - this.enableChangedPasswordNotification = await firstValueFrom( - this.userNotificationSettingsService.enableChangedPasswordPrompt$, - ); - this.enableContextMenuItem = await firstValueFrom( this.autofillSettingsService.enableContextMenu$, ); @@ -101,8 +87,6 @@ export class OptionsComponent implements OnInit { this.enableAutoTotpCopy = await firstValueFrom(this.autofillSettingsService.autoCopyTotp$); - this.enablePasskeys = await firstValueFrom(this.vaultSettingsService.enablePasskeys$); - const defaultUriMatch = await firstValueFrom( this.domainSettingsService.defaultUriMatchStrategy$, ); @@ -111,22 +95,6 @@ export class OptionsComponent implements OnInit { this.clearClipboard = await firstValueFrom(this.autofillSettingsService.clearClipboardDelay$); } - async updateAddLoginNotification() { - await this.userNotificationSettingsService.setEnableAddedLoginPrompt( - this.enableAddLoginNotification, - ); - } - - async updateChangedPasswordNotification() { - await this.userNotificationSettingsService.setEnableChangedPasswordPrompt( - this.enableChangedPasswordNotification, - ); - } - - async updateEnablePasskeys() { - await this.vaultSettingsService.setEnablePasskeys(this.enablePasskeys); - } - async updateContextMenuItem() { await this.autofillSettingsService.setEnableContextMenu(this.enableContextMenuItem); this.messagingService.send("bgUpdateContextMenu");