1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 05:30:01 +00:00

Merge branch 'main' into PM-19521

This commit is contained in:
Maximilian Power
2025-03-27 15:10:46 +01:00
committed by GitHub
20 changed files with 46 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@bitwarden/browser",
"version": "2025.3.1",
"version": "2025.3.2",
"scripts": {
"build": "npm run build:chrome",
"build:chrome": "cross-env BROWSER=chrome MANIFEST_VERSION=3 NODE_OPTIONS=\"--max-old-space-size=8192\" webpack",

View File

@@ -95,7 +95,7 @@
</bit-card>
</bit-section>
<bit-section>
<bit-section disableMargin>
<bit-section-header>
<h2 bitTypography="h6">{{ "otherOptions" | i18n }}</h2>
</bit-section-header>

View File

@@ -209,7 +209,7 @@
</bit-form-field>
</bit-card>
</bit-section>
<bit-section>
<bit-section [disableMargin]="!blockBrowserInjectionsByDomainEnabled">
<bit-section-header>
<h2 bitTypography="h6">{{ "additionalOptions" | i18n }}</h2>
</bit-section-header>
@@ -270,7 +270,7 @@
</bit-form-field>
</bit-card>
</bit-section>
<bit-section *ngIf="blockBrowserInjectionsByDomainEnabled">
<bit-section *ngIf="blockBrowserInjectionsByDomainEnabled" disableMargin>
<bit-item>
<a bit-item-content routerLink="/blocked-domains">{{ "blockedDomains" | i18n }}</a>
<i slot="end" class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i>

View File

@@ -47,7 +47,7 @@
</bit-form-control>
</bit-card>
</bit-section>
<bit-section>
<bit-section disableMargin>
<bit-item>
<a bit-item-content routerLink="/excluded-domains">{{ "excludedDomains" | i18n }}</a>
<i slot="end" class="bwi bwi-angle-right row-sub-icon" aria-hidden="true"></i>

View File

@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extName__",
"short_name": "__MSG_appName__",
"version": "2025.3.1",
"version": "2025.3.2",
"description": "__MSG_extDesc__",
"default_locale": "en",
"author": "Bitwarden Inc.",

View File

@@ -3,7 +3,7 @@
"minimum_chrome_version": "102.0",
"name": "__MSG_extName__",
"short_name": "__MSG_appName__",
"version": "2025.3.1",
"version": "2025.3.2",
"description": "__MSG_extDesc__",
"default_locale": "en",
"author": "Bitwarden Inc.",

View File

@@ -19,7 +19,7 @@
[ngClass]="{ 'tw-invisible': loading }"
>
<div
class="tw-max-w-screen-sm tw-mx-auto tw-flex-1 tw-flex tw-flex-col tw-size-full"
class="tw-max-w-screen-sm tw-mx-auto tw-flex-1 tw-flex tw-flex-col tw-w-full"
[ngClass]="{ 'tw-p-3 bit-compact:tw-p-2': !disablePadding }"
>
<ng-content></ng-content>

View File

@@ -143,7 +143,10 @@ export class SshAgentService implements OnDestroy {
if (isListRequest) {
const sshCiphers = ciphers.filter(
(cipher) => cipher.type === CipherType.SshKey && !cipher.isDeleted,
(cipher) =>
cipher.type === CipherType.SshKey &&
!cipher.isDeleted &&
cipher.organizationId == null,
);
const keys = sshCiphers.map((cipher) => {
return {
@@ -247,7 +250,7 @@ export class SshAgentService implements OnDestroy {
(cipher) =>
cipher.type === CipherType.SshKey &&
!cipher.isDeleted &&
cipher.organizationId === null,
cipher.organizationId == null,
);
const keys = sshCiphers.map((cipher) => {
return {

View File

@@ -1,6 +1,5 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { import_ssh_key } from "@bitwarden/sdk-internal";
import { EncString } from "../../platform/models/domain/enc-string";
import { SshKey as SshKeyDomain } from "../../vault/models/domain/ssh-key";
@@ -18,18 +17,16 @@ export class SshKeyExport {
}
static toView(req: SshKeyExport, view = new SshKeyView()) {
const parsedKey = import_ssh_key(req.privateKey);
view.privateKey = parsedKey.privateKey;
view.publicKey = parsedKey.publicKey;
view.keyFingerprint = parsedKey.fingerprint;
view.privateKey = req.privateKey;
view.publicKey = req.publicKey;
view.keyFingerprint = req.keyFingerprint;
return view;
}
static toDomain(req: SshKeyExport, domain = new SshKeyDomain()) {
const parsedKey = import_ssh_key(req.privateKey);
domain.privateKey = new EncString(parsedKey.privateKey);
domain.publicKey = new EncString(parsedKey.publicKey);
domain.keyFingerprint = new EncString(parsedKey.fingerprint);
domain.privateKey = new EncString(req.privateKey);
domain.publicKey = new EncString(req.publicKey);
domain.keyFingerprint = new EncString(req.keyFingerprint);
return domain;
}

View File

@@ -1,4 +1,4 @@
<bit-section [formGroup]="sendOptionsForm">
<bit-section [formGroup]="sendOptionsForm" disableMargin>
<bit-section-header>
<h2 class="tw-mt-4" bitTypography="h6">{{ "additionalOptions" | i18n }}</h2>
</bit-section-header>

View File

@@ -1,4 +1,4 @@
<bit-section [formGroup]="sendDetailsForm">
<bit-section [formGroup]="sendDetailsForm" disableMargin>
<bit-section-header class="tw-mt-2">
<h2 bitTypography="h6">{{ "sendDetails" | i18n }}</h2>
</bit-section-header>

View File

@@ -1,4 +1,4 @@
<bit-section *ngIf="sends?.length > 0">
<bit-section *ngIf="sends?.length > 0" disableMargin>
<bit-section-header>
<h2 class="tw-font-bold" bitTypography="h6">
{{ headerText }}

View File

@@ -1,4 +1,7 @@
<bit-section [formGroup]="additionalOptionsForm">
<bit-section
[formGroup]="additionalOptionsForm"
[disableMargin]="disableSectionMargin && !hasCustomFields"
>
<bit-section-header>
<h2 bitTypography="h6">{{ "additionalOptions" | i18n }}</h2>
</bit-section-header>
@@ -29,4 +32,7 @@
</bit-card>
</bit-section>
<vault-custom-fields (numberOfFieldsChange)="handleCustomFieldChange($event)"></vault-custom-fields>
<vault-custom-fields
(numberOfFieldsChange)="handleCustomFieldChange($event)"
[disableSectionMargin]="disableSectionMargin"
></vault-custom-fields>

View File

@@ -1,4 +1,4 @@
import { Component } from "@angular/core";
import { Component, Input } from "@angular/core";
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { mock, MockProxy } from "jest-mock-extended";
import { BehaviorSubject } from "rxjs";
@@ -18,7 +18,9 @@ import { AdditionalOptionsSectionComponent } from "./additional-options-section.
selector: "vault-custom-fields",
template: "",
})
class MockCustomFieldsComponent {}
class MockCustomFieldsComponent {
@Input() disableSectionMargin: boolean;
}
describe("AdditionalOptionsSectionComponent", () => {
let component: AdditionalOptionsSectionComponent;

View File

@@ -1,7 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { CommonModule } from "@angular/common";
import { ChangeDetectorRef, Component, OnInit, ViewChild } from "@angular/core";
import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from "@angular/core";
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
import { FormBuilder, ReactiveFormsModule } from "@angular/forms";
import { shareReplay } from "rxjs";
@@ -59,6 +59,8 @@ export class AdditionalOptionsSectionComponent implements OnInit {
/** True when the form is in `partial-edit` mode */
isPartialEdit = false;
@Input() disableSectionMargin: boolean;
constructor(
private cipherFormContainer: CipherFormContainer,
private formBuilder: FormBuilder,

View File

@@ -28,7 +28,9 @@
[originalCipherView]="originalCipherView"
></vault-sshkey-section>
<vault-additional-options-section></vault-additional-options-section>
<vault-additional-options-section
[disableSectionMargin]="config.mode !== 'edit'"
></vault-additional-options-section>
<!-- Attachments are only available for existing ciphers -->
<ng-container *ngIf="config.mode == 'edit'">

View File

@@ -1,4 +1,4 @@
<bit-section *ngIf="hasCustomFields">
<bit-section *ngIf="hasCustomFields" [disableMargin]="disableSectionMargin">
<bit-section-header>
<h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
</bit-section-header>

View File

@@ -11,6 +11,7 @@ import {
ElementRef,
EventEmitter,
inject,
Input,
OnInit,
Output,
QueryList,
@@ -94,6 +95,8 @@ export class CustomFieldsComponent implements OnInit, AfterViewInit {
@ViewChildren("customFieldRow") customFieldRows: QueryList<ElementRef<HTMLDivElement>>;
@Input() disableSectionMargin: boolean;
customFieldsForm = this.formBuilder.group({
fields: new FormArray([]),
});

View File

@@ -1,4 +1,4 @@
<bit-section>
<bit-section disableMargin>
<bit-section-header>
<h2 bitTypography="h6">{{ "itemHistory" | i18n }}</h2>
</bit-section-header>

2
package-lock.json generated
View File

@@ -189,7 +189,7 @@
},
"apps/browser": {
"name": "@bitwarden/browser",
"version": "2025.3.1"
"version": "2025.3.2"
},
"apps/cli": {
"name": "@bitwarden/cli",