Skip to content

Commit

Permalink
Merge branch 'main' into auth/pm-5712/fix-account-switcher-showing-wr…
Browse files Browse the repository at this point in the history
…ong-env-when-adding-new-acct
  • Loading branch information
JaredSnider-Bitwarden authored Feb 11, 2025
2 parents c730af8 + e3870a6 commit 390b230
Show file tree
Hide file tree
Showing 26 changed files with 64 additions and 905 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,10 @@ jobs:
npm_command: "dist:edge"
archive_name: "dist-edge.zip"
artifact_name: "dist-edge-MV3"
- name: "firefox"
npm_command: "dist:firefox"
archive_name: "dist-firefox.zip"
artifact_name: "dist-firefox"
- name: "firefox-mv3"
npm_command: "dist:firefox:mv3"
archive_name: "dist-firefox.zip"
artifact_name: "DO-NOT-USE-FOR-PROD-dist-firefox-MV3"
artifact_name: "dist-firefox-MV3"
- name: "opera"
npm_command: "dist:opera"
archive_name: "dist-opera.zip"
Expand Down
147 changes: 0 additions & 147 deletions apps/browser/src/auth/popup/register.component.html

This file was deleted.

58 changes: 0 additions & 58 deletions apps/browser/src/auth/popup/register.component.ts

This file was deleted.

16 changes: 15 additions & 1 deletion apps/browser/src/manifest.v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@
},
"description": "__MSG_commandOpenSidebar__"
},
"__opera___execute_sidebar_action": {
"suggested_key": {
"default": "Alt+Shift+Y",
"linux": "Alt+Shift+U"
},
"description": "__MSG_commandOpenSidebar__"
},
"autofill_login": {
"suggested_key": {
"default": "Ctrl+Shift+L"
Expand Down Expand Up @@ -182,5 +189,12 @@
"storage": {
"managed_schema": "managed_schema.json"
},
"__firefox__storage": null
"__firefox__storage": null,
"__opera__sidebar_action": {
"default_title": "Bitwarden",
"default_panel": "popup/index.html?uilocation=sidebar",
"default_icon": "images/icon19.png",
"open_at_install": false,
"browser_style": false
}
}
11 changes: 8 additions & 3 deletions apps/browser/src/platform/browser/browser-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,15 @@ export class BrowserApi {
win: Window & typeof globalThis,
): OperaSidebarAction | FirefoxSidebarAction | null {
const deviceType = BrowserPlatformUtilsService.getDevice(win);
if (deviceType !== DeviceType.FirefoxExtension && deviceType !== DeviceType.OperaExtension) {
return null;
if (deviceType === DeviceType.FirefoxExtension) {
return browser.sidebarAction;
}

if (deviceType === DeviceType.OperaExtension) {
return win.opr?.sidebarAction;
}
return win.opr?.sidebarAction || browser.sidebarAction;

return null;
}

static captureVisibleTab(): Promise<string> {
Expand Down
7 changes: 7 additions & 0 deletions apps/browser/src/platform/listeners/update-badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ export class UpdateBadge {
return;
}

if ("opr" in this.win && BrowserApi.isManifestVersion(3)) {
// setIcon API is currenly broken for Opera MV3 extensions
// https://forums.opera.com/topic/75680/opr-sidebaraction-seticon-api-is-broken-access-to-extension-api-denied?_=1738349261570
// The API currently crashes on MacOS
return;
}

if (this.isOperaSidebar(this.sidebarAction)) {
await new Promise<void>((resolve) =>
(this.sidebarAction as OperaSidebarAction).setIcon(options, () => resolve()),
Expand Down
7 changes: 0 additions & 7 deletions apps/browser/src/popup/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ import { HomeComponent } from "../auth/popup/home.component";
import { LoginDecryptionOptionsComponentV1 } from "../auth/popup/login-decryption-options/login-decryption-options-v1.component";
import { LoginComponentV1 } from "../auth/popup/login-v1.component";
import { LoginViaAuthRequestComponentV1 } from "../auth/popup/login-via-auth-request-v1.component";
import { RegisterComponent } from "../auth/popup/register.component";
import { RemovePasswordComponent } from "../auth/popup/remove-password.component";
import { SetPasswordComponent } from "../auth/popup/set-password.component";
import { AccountSecurityComponent } from "../auth/popup/settings/account-security.component";
Expand Down Expand Up @@ -267,12 +266,6 @@ const routes: Routes = [
canActivate: [authGuard],
data: { elevation: 1 } satisfies RouteDataProperties,
},
{
path: "register",
component: RegisterComponent,
canActivate: [unauthGuardFn(unauthRouteOverrides)],
data: { elevation: 1 } satisfies RouteDataProperties,
},
{
path: "environment",
component: EnvironmentComponent,
Expand Down
2 changes: 0 additions & 2 deletions apps/browser/src/popup/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { HomeComponent } from "../auth/popup/home.component";
import { LoginDecryptionOptionsComponentV1 } from "../auth/popup/login-decryption-options/login-decryption-options-v1.component";
import { LoginComponentV1 } from "../auth/popup/login-v1.component";
import { LoginViaAuthRequestComponentV1 } from "../auth/popup/login-via-auth-request-v1.component";
import { RegisterComponent } from "../auth/popup/register.component";
import { RemovePasswordComponent } from "../auth/popup/remove-password.component";
import { SetPasswordComponent } from "../auth/popup/set-password.component";
import { AccountSecurityComponent } from "../auth/popup/settings/account-security.component";
Expand Down Expand Up @@ -103,7 +102,6 @@ import "../platform/popup/locales";
LoginViaAuthRequestComponentV1,
LoginComponentV1,
LoginDecryptionOptionsComponentV1,
RegisterComponent,
SetPasswordComponent,
SsoComponentV1,
TabsV2Component,
Expand Down
2 changes: 0 additions & 2 deletions apps/desktop/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import { HintComponent } from "../auth/hint.component";
import { LoginDecryptionOptionsComponentV1 } from "../auth/login/login-decryption-options/login-decryption-options-v1.component";
import { LoginComponentV1 } from "../auth/login/login-v1.component";
import { LoginViaAuthRequestComponentV1 } from "../auth/login/login-via-auth-request-v1.component";
import { RegisterComponent } from "../auth/register.component";
import { RemovePasswordComponent } from "../auth/remove-password.component";
import { SetPasswordComponent } from "../auth/set-password.component";
import { SsoComponentV1 } from "../auth/sso-v1.component";
Expand Down Expand Up @@ -136,7 +135,6 @@ const routes: Routes = [
},
} satisfies RouteDataProperties & AnonLayoutWrapperData,
},
{ path: "register", component: RegisterComponent },
{
path: "new-device-notice",
component: AnonLayoutWrapperComponent,
Expand Down
14 changes: 0 additions & 14 deletions apps/desktop/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,20 +318,6 @@ export class AppComponent implements OnInit, OnDestroy {
}
break;
}
case "upgradeOrganization": {
const upgradeConfirmed = await this.dialogService.openSimpleDialog({
title: { key: "upgradeOrganization" },
content: { key: "upgradeOrganizationDesc" },
acceptButtonText: { key: "learnMore" },
type: "info",
});
if (upgradeConfirmed) {
this.platformUtilsService.launchUri(
"https://bitwarden.com/help/upgrade-from-individual-to-org/",
);
}
break;
}
case "emailVerificationRequired": {
const emailVerificationConfirmed = await this.dialogService.openSimpleDialog({
title: { key: "emailVerificationRequired" },
Expand Down
2 changes: 0 additions & 2 deletions apps/desktop/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { DeleteAccountComponent } from "../auth/delete-account.component";
import { EnvironmentComponent } from "../auth/environment.component";
import { HintComponent } from "../auth/hint.component";
import { LoginModule } from "../auth/login/login.module";
import { RegisterComponent } from "../auth/register.component";
import { RemovePasswordComponent } from "../auth/remove-password.component";
import { SetPasswordComponent } from "../auth/set-password.component";
import { SsoComponentV1 } from "../auth/sso-v1.component";
Expand Down Expand Up @@ -80,7 +79,6 @@ import { SendComponent } from "./tools/send/send.component";
NavComponent,
PasswordHistoryComponent,
PremiumComponent,
RegisterComponent,
RemovePasswordComponent,
SearchComponent,
SendAddEditComponent,
Expand Down
Loading

0 comments on commit 390b230

Please sign in to comment.