mirror of
https://github.com/bitwarden/browser
synced 2026-02-21 03:43:58 +00:00
Merge branch 'main' into auth/pm-27086/input-password-use-new-km-data-types
This commit is contained in:
@@ -96,7 +96,9 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
|
||||
*/
|
||||
async getPageDetails(): Promise<AutofillPageDetails> {
|
||||
// Set up listeners on top-layer candidates that predate Mutation Observer setup
|
||||
this.setupInitialTopLayerListeners();
|
||||
if (this.autofillOverlayContentService) {
|
||||
this.setupInitialTopLayerListeners();
|
||||
}
|
||||
|
||||
if (!this.mutationObserver) {
|
||||
this.setupMutationObserver();
|
||||
@@ -1072,19 +1074,21 @@ export class CollectAutofillContentService implements CollectAutofillContentServ
|
||||
}
|
||||
|
||||
private setupTopLayerCandidateListener = (element: Element) => {
|
||||
const ownedTags = this.autofillOverlayContentService.getOwnedInlineMenuTagNames() || [];
|
||||
this.ownedExperienceTagNames = ownedTags;
|
||||
if (this.autofillOverlayContentService) {
|
||||
const ownedTags = this.autofillOverlayContentService.getOwnedInlineMenuTagNames() || [];
|
||||
this.ownedExperienceTagNames = ownedTags;
|
||||
|
||||
if (!ownedTags.includes(element.tagName)) {
|
||||
element.addEventListener("toggle", (event: ToggleEvent) => {
|
||||
if (event.newState === "open") {
|
||||
// Add a slight delay (but faster than a user's reaction), to ensure the layer
|
||||
// positioning happens after any triggered toggle has completed.
|
||||
setTimeout(this.autofillOverlayContentService.refreshMenuLayerPosition, 100);
|
||||
}
|
||||
});
|
||||
if (!ownedTags.includes(element.tagName)) {
|
||||
element.addEventListener("toggle", (event: ToggleEvent) => {
|
||||
if (event.newState === "open") {
|
||||
// Add a slight delay (but faster than a user's reaction), to ensure the layer
|
||||
// positioning happens after any triggered toggle has completed.
|
||||
setTimeout(this.autofillOverlayContentService.refreshMenuLayerPosition, 100);
|
||||
}
|
||||
});
|
||||
|
||||
this.autofillOverlayContentService.refreshMenuLayerPosition();
|
||||
this.autofillOverlayContentService.refreshMenuLayerPosition();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,12 +24,13 @@ pub fn get_supported_importers<T: InstalledBrowserRetriever>(
|
||||
let installed_browsers = T::get_installed_browsers().unwrap_or_default();
|
||||
|
||||
const IMPORTERS: &[(&str, &str)] = &[
|
||||
("arccsv", "Arc"),
|
||||
("bravecsv", "Brave"),
|
||||
("chromecsv", "Chrome"),
|
||||
("chromiumcsv", "Chromium"),
|
||||
("bravecsv", "Brave"),
|
||||
("edgecsv", "Microsoft Edge"),
|
||||
("operacsv", "Opera"),
|
||||
("vivaldicsv", "Vivaldi"),
|
||||
("edgecsv", "Microsoft Edge"),
|
||||
];
|
||||
|
||||
let supported: HashSet<&'static str> =
|
||||
@@ -91,6 +92,7 @@ mod tests {
|
||||
let map = get_supported_importers::<MockInstalledBrowserRetriever>();
|
||||
|
||||
let expected: HashSet<String> = HashSet::from([
|
||||
"arccsv".to_string(),
|
||||
"chromecsv".to_string(),
|
||||
"chromiumcsv".to_string(),
|
||||
"bravecsv".to_string(),
|
||||
@@ -113,6 +115,7 @@ mod tests {
|
||||
fn macos_specific_loaders_match_const_array() {
|
||||
let map = get_supported_importers::<MockInstalledBrowserRetriever>();
|
||||
let ids = [
|
||||
"arccsv",
|
||||
"chromecsv",
|
||||
"chromiumcsv",
|
||||
"bravecsv",
|
||||
|
||||
@@ -12,9 +12,13 @@ if [ -e "/usr/lib/x86_64-linux-gnu/libdbus-1.so.3" ]; then
|
||||
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libdbus-1.so.3"
|
||||
fi
|
||||
|
||||
# A bug in Electron 39 (which now enables Wayland by default) causes a crash on
|
||||
# systems using Wayland with hardware acceleration. Platform decided to
|
||||
# configure Electron to use X11 (with an opt-out) until the upstream bug is
|
||||
# fixed. The follow-up task is https://bitwarden.atlassian.net/browse/PM-31080.
|
||||
PARAMS="--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto"
|
||||
if [ "$USE_X11" = "true" ]; then
|
||||
PARAMS=""
|
||||
if [ "$USE_X11" != "false" ]; then
|
||||
PARAMS="--ozone-platform=x11"
|
||||
fi
|
||||
|
||||
$APP_PATH/bitwarden-app $PARAMS "$@"
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
[text]="organization.node.name"
|
||||
[appA11yTitle]="organization.node.name"
|
||||
(click)="applyFilter($event, organization)"
|
||||
/>
|
||||
@if (!organization.node.enabled) {
|
||||
<span class="tw-ml-auto">
|
||||
>
|
||||
@if (!organization.node.enabled) {
|
||||
<i
|
||||
slot="end"
|
||||
class="bwi bwi-fw bwi-exclamation-triangle text-danger mr-auto"
|
||||
[attr.aria-label]="'organizationIsDisabled' | i18n"
|
||||
[appA11yTitle]="'organizationIsDisabled' | i18n"
|
||||
></i>
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</bit-nav-item>
|
||||
}
|
||||
</bit-nav-group>
|
||||
}
|
||||
|
||||
@@ -79,6 +79,8 @@ import {
|
||||
VaultFilter,
|
||||
VaultFilterServiceAbstraction as VaultFilterService,
|
||||
RoutedVaultFilterBridgeService,
|
||||
VaultItemsTransferService,
|
||||
DefaultVaultItemsTransferService,
|
||||
} from "@bitwarden/vault";
|
||||
|
||||
import { SearchBarService } from "../../../app/layout/search/search-bar.service";
|
||||
@@ -130,6 +132,7 @@ const BroadcasterSubscriptionId = "VaultComponent";
|
||||
provide: COPY_CLICK_LISTENER,
|
||||
useExisting: VaultComponent,
|
||||
},
|
||||
{ provide: VaultItemsTransferService, useClass: DefaultVaultItemsTransferService },
|
||||
],
|
||||
})
|
||||
export class VaultComponent implements OnInit, OnDestroy, CopyClickListener {
|
||||
@@ -214,6 +217,7 @@ export class VaultComponent implements OnInit, OnDestroy, CopyClickListener {
|
||||
private archiveCipherUtilitiesService: ArchiveCipherUtilitiesService,
|
||||
private routedVaultFilterBridgeService: RoutedVaultFilterBridgeService,
|
||||
private vaultFilterService: VaultFilterService,
|
||||
private vaultItemTransferService: VaultItemsTransferService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -266,6 +270,11 @@ export class VaultComponent implements OnInit, OnDestroy, CopyClickListener {
|
||||
if (this.vaultItemsComponent) {
|
||||
await this.vaultItemsComponent.refresh().catch(() => {});
|
||||
}
|
||||
if (this.activeUserId) {
|
||||
void this.vaultItemTransferService.enforceOrganizationDataOwnership(
|
||||
this.activeUserId,
|
||||
);
|
||||
}
|
||||
break;
|
||||
case "modalShown":
|
||||
this.showingModal = true;
|
||||
@@ -372,6 +381,8 @@ export class VaultComponent implements OnInit, OnDestroy, CopyClickListener {
|
||||
.subscribe((collections) => {
|
||||
this.filteredCollections = collections;
|
||||
});
|
||||
|
||||
void this.vaultItemTransferService.enforceOrganizationDataOwnership(this.activeUserId);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
@@ -92,6 +92,8 @@ import {
|
||||
PasswordRepromptService,
|
||||
CipherFormComponent,
|
||||
ArchiveCipherUtilitiesService,
|
||||
VaultItemsTransferService,
|
||||
DefaultVaultItemsTransferService,
|
||||
} from "@bitwarden/vault";
|
||||
|
||||
import { NavComponent } from "../../../app/layout/nav.component";
|
||||
@@ -150,6 +152,7 @@ const BroadcasterSubscriptionId = "VaultComponent";
|
||||
provide: COPY_CLICK_LISTENER,
|
||||
useExisting: VaultV2Component,
|
||||
},
|
||||
{ provide: VaultItemsTransferService, useClass: DefaultVaultItemsTransferService },
|
||||
],
|
||||
})
|
||||
export class VaultV2Component<C extends CipherViewLike>
|
||||
@@ -264,6 +267,7 @@ export class VaultV2Component<C extends CipherViewLike>
|
||||
private policyService: PolicyService,
|
||||
private archiveCipherUtilitiesService: ArchiveCipherUtilitiesService,
|
||||
private masterPasswordService: MasterPasswordServiceAbstraction,
|
||||
private vaultItemTransferService: VaultItemsTransferService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -317,6 +321,11 @@ export class VaultV2Component<C extends CipherViewLike>
|
||||
.catch(() => {});
|
||||
await this.vaultFilterComponent.reloadOrganizations().catch(() => {});
|
||||
}
|
||||
if (this.activeUserId) {
|
||||
void this.vaultItemTransferService.enforceOrganizationDataOwnership(
|
||||
this.activeUserId,
|
||||
);
|
||||
}
|
||||
break;
|
||||
case "modalShown":
|
||||
this.showingModal = true;
|
||||
@@ -420,6 +429,8 @@ export class VaultV2Component<C extends CipherViewLike>
|
||||
.subscribe((collections) => {
|
||||
this.allCollections = collections;
|
||||
});
|
||||
|
||||
void this.vaultItemTransferService.enforceOrganizationDataOwnership(this.activeUserId);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user