Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten authored Dec 12, 2024
2 parents de54454 + cecf1f2 commit 4276cd6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"**/node_modules/@bitwarden/desktop-napi/index.js",
"**/node_modules/@bitwarden/desktop-napi/desktop_napi.${platform}-${arch}*.node"
],
"electronVersion": "32.1.1",
"electronVersion": "33.2.1",
"generateUpdatesFilesForAllChannels": true,
"publish": {
"provider": "generic",
Expand Down
3 changes: 1 addition & 2 deletions apps/desktop/src/main/tray.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ export class TrayMain {
}

setupWindowListeners(win: BrowserWindow) {
win.on("minimize", async (e: Event) => {
win.on("minimize", async () => {
if (await firstValueFrom(this.desktopSettingsService.minimizeToTray$)) {
e.preventDefault();
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.hideToTray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const DisallowedPlanTypes = [
],
})
export class vNextClientsComponent {
providerId: string;
addableOrganizations: Organization[];
providerId: string = "";
addableOrganizations: Organization[] = [];
loading = true;
manageOrganizations = false;
showAddExisting = false;
Expand All @@ -79,8 +79,8 @@ export class vNextClientsComponent {
this.searchControl.setValue(queryParams.search);
});

this.activatedRoute.parent.params
.pipe(
this.activatedRoute.parent?.params
?.pipe(
switchMap((params) => {
this.providerId = params.providerId;
return this.providerService.get$(this.providerId).pipe(
Expand Down Expand Up @@ -125,7 +125,7 @@ export class vNextClientsComponent {
await this.webProviderService.detachOrganization(this.providerId, organization.id);
this.toastService.showToast({
variant: "success",
title: null,
title: "",
message: this.i18nService.t("detachedOrganization", organization.organizationName),
});
await this.load();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ import { vNextNoClientsComponent } from "./vnext-no-clients.component";
],
})
export class vNextManageClientsComponent {
providerId: string;
provider: Provider;
providerId: string = "";
provider: Provider | undefined;
loading = true;
isProviderAdmin = false;
dataSource: TableDataSource<ProviderOrganizationOrganizationDetailsResponse> =
new TableDataSource();

protected searchControl = new FormControl("", { nonNullable: true });
protected plans: PlanResponse[];
protected plans: PlanResponse[] = [];

constructor(
private billingApiService: BillingApiServiceAbstraction,
Expand All @@ -76,8 +76,8 @@ export class vNextManageClientsComponent {
this.searchControl.setValue(queryParams.search);
});

this.activatedRoute.parent.params
.pipe(
this.activatedRoute.parent?.params
?.pipe(
switchMap((params) => {
this.providerId = params.providerId;
return this.providerService.get$(this.providerId).pipe(
Expand Down Expand Up @@ -110,12 +110,12 @@ export class vNextManageClientsComponent {
async load() {
this.provider = await firstValueFrom(this.providerService.get$(this.providerId));

this.isProviderAdmin = this.provider.type === ProviderUserType.ProviderAdmin;
this.isProviderAdmin = this.provider?.type === ProviderUserType.ProviderAdmin;

const clients = (await this.billingApiService.getProviderClientOrganizations(this.providerId))
.data;

clients.forEach((client) => (client.plan = client.plan.replace(" (Monthly)", "")));
clients.forEach((client) => (client.plan = client.plan?.replace(" (Monthly)", "")));

this.dataSource.data = clients;

Expand Down Expand Up @@ -146,7 +146,7 @@ export class vNextManageClientsComponent {
organization: {
id: organization.id,
name: organization.organizationName,
seats: organization.seats,
seats: organization.seats ? organization.seats : 0,
},
},
});
Expand All @@ -164,7 +164,7 @@ export class vNextManageClientsComponent {
const dialogRef = openManageClientSubscriptionDialog(this.dialogService, {
data: {
organization,
provider: this.provider,
provider: this.provider!,
},
});

Expand All @@ -190,7 +190,7 @@ export class vNextManageClientsComponent {
await this.webProviderService.detachOrganization(this.providerId, organization.id);
this.toastService.showToast({
variant: "success",
title: null,
title: "",
message: this.i18nService.t("detachedOrganization", organization.organizationName),
});
await this.load();
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"copy-webpack-plugin": "12.0.2",
"cross-env": "7.0.3",
"css-loader": "7.1.2",
"electron": "32.1.1",
"electron": "33.2.1",
"electron-builder": "24.13.3",
"electron-log": "5.2.4",
"electron-reload": "2.0.0-alpha.1",
Expand Down

0 comments on commit 4276cd6

Please sign in to comment.