mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
fix(environment-urls): [PM-19890] [Defect][Extension] Environment URLs are removed (#14821)
* Return early to avoid setEnvironment * Remove ts-strict-ignore and update typing
This commit is contained in:
@@ -111,16 +111,16 @@ export class EnvironmentSelectorComponent implements OnInit, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* Opens the self-hosted settings dialog when the self-hosted option is selected.
|
* Opens the self-hosted settings dialog when the self-hosted option is selected.
|
||||||
*/
|
*/
|
||||||
if (
|
if (option === Region.SelfHosted) {
|
||||||
option === Region.SelfHosted &&
|
const dialogResult = await SelfHostedEnvConfigDialogComponent.open(this.dialogService);
|
||||||
(await SelfHostedEnvConfigDialogComponent.open(this.dialogService))
|
if (dialogResult) {
|
||||||
) {
|
this.toastService.showToast({
|
||||||
this.toastService.showToast({
|
variant: "success",
|
||||||
variant: "success",
|
title: "",
|
||||||
title: "",
|
message: this.i18nService.t("environmentSaved"),
|
||||||
message: this.i18nService.t("environmentSaved"),
|
});
|
||||||
});
|
}
|
||||||
|
// Don't proceed to setEnvironment when the self-hosted dialog is cancelled
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// FIXME: Update this file to be type safe and remove this and next line
|
|
||||||
// @ts-strict-ignore
|
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component, OnDestroy, OnInit } from "@angular/core";
|
import { Component, OnDestroy, OnInit } from "@angular/core";
|
||||||
import {
|
import {
|
||||||
@@ -83,17 +81,17 @@ export class SelfHostedEnvConfigDialogComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
const dialogResult = await firstValueFrom(dialogRef.closed);
|
const dialogResult = await firstValueFrom(dialogRef.closed);
|
||||||
|
|
||||||
return dialogResult;
|
return dialogResult ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
formGroup = this.formBuilder.group(
|
formGroup = this.formBuilder.group(
|
||||||
{
|
{
|
||||||
baseUrl: [null],
|
baseUrl: [""],
|
||||||
webVaultUrl: [null],
|
webVaultUrl: [""],
|
||||||
apiUrl: [null],
|
apiUrl: [""],
|
||||||
identityUrl: [null],
|
identityUrl: [""],
|
||||||
iconsUrl: [null],
|
iconsUrl: [""],
|
||||||
notificationsUrl: [null],
|
notificationsUrl: [""],
|
||||||
},
|
},
|
||||||
{ validators: selfHostedEnvSettingsFormValidator() },
|
{ validators: selfHostedEnvSettingsFormValidator() },
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user