1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-16 10:45:20 +01:00

Move launch web-vault to about-page

This commit is contained in:
Daniel James Smith 2024-05-09 16:47:50 +02:00
parent c47f5803ea
commit 89d2cc7a06
No known key found for this signature in database
GPG Key ID: DA2E2EC600E1289B
5 changed files with 25 additions and 24 deletions

View File

@ -256,8 +256,8 @@
"passGenInfo": {
"message": "Automatically generate strong, unique passwords for your logins."
},
"bitWebVault": {
"message": "Bitwarden web vault"
"bitWebVaultApp": {
"message": "Bitwarden web app"
},
"importItems": {
"message": "Import items"

View File

@ -33,6 +33,15 @@
<div class="row-main">{{ "helpCenter" | i18n }}</div>
<i class="bwi bwi-external-link bwi-lg row-sub-icon" aria-hidden="true"></i>
</button>
<button
type="button"
class="box-content-row box-content-row-flex text-default"
appStopClick
(click)="openWebVault()"
>
<div class="row-main">{{ "bitWebVaultApp" | i18n }}</div>
<i class="bwi bwi-external-link bwi-lg row-sub-icon" aria-hidden="true"></i>
</button>
<button
type="button"
class="box-content-row box-content-row-flex text-default"

View File

@ -1,5 +1,7 @@
import { Component } from "@angular/core";
import { firstValueFrom } from "rxjs";
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
import { DialogService } from "@bitwarden/components";
import { BrowserApi } from "../../../../platform/browser/browser-api";
@ -10,7 +12,10 @@ import { AboutDialogComponent } from "../about-dialog/about-dialog.component";
templateUrl: "about-page.component.html",
})
export class AboutPageComponent {
constructor(private dialogService: DialogService) {}
constructor(
private dialogService: DialogService,
private environmentService: EnvironmentService,
) {}
about() {
this.dialogService.open(AboutDialogComponent);
@ -21,6 +26,13 @@ export class AboutPageComponent {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
BrowserApi.createNewTab("https://bitwarden.com/help/");
}
async openWebVault() {
const env = await firstValueFrom(this.environmentService.environment$);
const url = env.getWebVaultUrl();
await BrowserApi.createNewTab(url);
}
launchContactForm() {
// 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

View File

@ -61,20 +61,6 @@
</button>
</div>
</div>
<div class="box list">
<h2 class="box-header">{{ "tools" | i18n }}</h2>
<div class="box-content single-line">
<button
type="button"
class="box-content-row box-content-row-flex text-default"
appStopClick
(click)="webVault()"
>
<div class="row-main">{{ "bitWebVault" | i18n }}</div>
<i class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="box list">
<h2 class="box-header">{{ "other" | i18n }}</h2>
<div class="box-content single-line">

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";
import { firstValueFrom, Subject } from "rxjs";
import { Subject } from "rxjs";
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service";
import { DeviceType } from "@bitwarden/common/enums";
@ -60,12 +60,6 @@ export class SettingsComponent implements OnInit {
}
}
async webVault() {
const env = await firstValueFrom(this.environmentService.environment$);
const url = env.getWebVaultUrl();
await BrowserApi.createNewTab(url);
}
async import() {
await this.router.navigate(["/import"]);
if (await BrowserApi.isPopupOpen()) {