-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move controls from settings.component.html to vault-settings.component.html Register VaultSettingsComponent within app.module Register route for VaultSettingsComponent Add new string in en/messages.json
- Loading branch information
Showing
6 changed files
with
97 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
apps/browser/src/vault/popup/settings/vault-settings.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<app-header> | ||
<div class="left"> | ||
<button type="button" routerLink="/tabs/settings"> | ||
<span class="header-icon"><i class="bwi bwi-angle-left" aria-hidden="true"></i></span> | ||
<span>{{ "back" | i18n }}</span> | ||
</button> | ||
</div> | ||
<h1 class="center"> | ||
<span class="title">{{ "vaultSettings" | i18n }}</span> | ||
</h1> | ||
<div class="right"> | ||
<app-pop-out></app-pop-out> | ||
</div> | ||
</app-header> | ||
<main tabindex="-1"> | ||
<div class="box list"> | ||
<div class="box-content single-line"> | ||
<button | ||
type="button" | ||
class="box-content-row box-content-row-flex text-default" | ||
routerLink="/folders" | ||
> | ||
<div class="row-main">{{ "folders" | i18n }}</div> | ||
<i class="bwi bwi-angle-right 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)="import()" | ||
> | ||
<div class="row-main">{{ "importItems" | i18n }}</div> | ||
<i | ||
class="bwi bwi-external-link bwi-lg row-sub-icon bwi-rotate-270 bwi-fw" | ||
aria-hidden="true" | ||
></i> | ||
</button> | ||
<button | ||
type="button" | ||
class="box-content-row box-content-row-flex text-default" | ||
routerLink="/export" | ||
> | ||
<div class="row-main">{{ "exportVault" | i18n }}</div> | ||
<i class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i> | ||
</button> | ||
<button | ||
type="button" | ||
class="box-content-row box-content-row-flex text-default" | ||
routerLink="/sync" | ||
> | ||
<div class="row-main">{{ "sync" | i18n }}</div> | ||
<i class="bwi bwi-angle-right bwi-lg row-sub-icon" aria-hidden="true"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</main> |
27 changes: 27 additions & 0 deletions
27
apps/browser/src/vault/popup/settings/vault-settings.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Component } from "@angular/core"; | ||
import { Router } from "@angular/router"; | ||
|
||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; | ||
|
||
import { BrowserApi } from "../../../platform/browser/browser-api"; | ||
import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; | ||
|
||
@Component({ | ||
selector: "vault-settings", | ||
templateUrl: "vault-settings.component.html", | ||
}) | ||
export class VaultSettingsComponent { | ||
constructor( | ||
public messagingService: MessagingService, | ||
private router: Router, | ||
) {} | ||
|
||
async import() { | ||
await this.router.navigate(["/import"]); | ||
if (await BrowserApi.isPopupOpen()) { | ||
// 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 | ||
BrowserPopupUtils.openCurrentPagePopout(window); | ||
} | ||
} | ||
} |