1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-14 07:23:45 +00:00

fix(general-improvement): [PM-19617] Add Shortcut to Configure Local Server - Added secret keybind to speed up config of localhost service.

This commit is contained in:
Patrick Pimentel
2025-03-27 14:45:59 -04:00
parent 10695fd971
commit 5640dee8a3

View File

@@ -2,7 +2,7 @@
// @ts-strict-ignore
import { DialogRef } from "@angular/cdk/dialog";
import { CommonModule } from "@angular/common";
import { Component, OnDestroy, OnInit } from "@angular/core";
import { Component, OnDestroy, OnInit, HostListener } from "@angular/core";
import {
AbstractControl,
FormBuilder,
@@ -161,6 +161,21 @@ export class SelfHostedEnvConfigDialogComponent implements OnInit, OnDestroy {
});
}
@HostListener("document:keydown.control.b", ["$event"])
onCtrlB(event: KeyboardEvent) {
if (process.env.ENV === "development") {
event.preventDefault();
this.formGroup.patchValue({
baseUrl: "",
webVaultUrl: "https://localhost:8080",
apiUrl: "http://localhost:4000",
identityUrl: "http://localhost:33656",
iconsUrl: "http://localhost:50024",
notificationsUrl: "http://localhost:61840",
});
}
}
submit = async () => {
this.showErrorSummary = false;