1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

migrate setup-provider.component (#14026)

This commit is contained in:
Brandon Treston
2025-03-31 11:12:24 -04:00
committed by GitHub
parent 78c74f7acd
commit 753875219a
3 changed files with 22 additions and 25 deletions

View File

@@ -4,7 +4,7 @@ import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms"; import { FormsModule } from "@angular/forms";
import { JslibModule } from "@bitwarden/angular/jslib.module"; import { JslibModule } from "@bitwarden/angular/jslib.module";
import { SearchModule } from "@bitwarden/components"; import { CardComponent, SearchModule } from "@bitwarden/components";
import { DangerZoneComponent } from "@bitwarden/web-vault/app/auth/settings/account/danger-zone.component"; import { DangerZoneComponent } from "@bitwarden/web-vault/app/auth/settings/account/danger-zone.component";
import { OrganizationPlansComponent } from "@bitwarden/web-vault/app/billing"; import { OrganizationPlansComponent } from "@bitwarden/web-vault/app/billing";
import { VerifyBankAccountComponent } from "@bitwarden/web-vault/app/billing/shared/verify-bank-account/verify-bank-account.component"; import { VerifyBankAccountComponent } from "@bitwarden/web-vault/app/billing/shared/verify-bank-account/verify-bank-account.component";
@@ -51,6 +51,7 @@ import { VerifyRecoverDeleteProviderComponent } from "./verify-recover-delete-pr
DangerZoneComponent, DangerZoneComponent,
ScrollingModule, ScrollingModule,
VerifyBankAccountComponent, VerifyBankAccountComponent,
CardComponent,
], ],
declarations: [ declarations: [
AcceptProviderComponent, AcceptProviderComponent,

View File

@@ -1,9 +1,9 @@
<div class="mt-5 d-flex justify-content-center" *ngIf="loading"> <div class="tw-mt-12 tw-flex tw-justify-center" *ngIf="loading">
<div> <div>
<img class="mb-4 logo logo-themed" alt="Bitwarden" /> <bit-icon class="tw-w-72 tw-block tw-mb-4" [icon]="logo"></bit-icon>
<p class="text-center"> <p class="tw-text-center">
<i <i
class="bwi bwi-spinner bwi-spin bwi-2x text-muted" class="bwi bwi-spinner bwi-spin bwi-2x tw-text-muted"
title="{{ 'loading' | i18n }}" title="{{ 'loading' | i18n }}"
aria-hidden="true" aria-hidden="true"
></i> ></i>
@@ -11,25 +11,15 @@
</p> </p>
</div> </div>
</div> </div>
<div class="container" *ngIf="!loading && !authed"> <div class="tw-flex tw-flex-row tw-justify-center tw-mt-12" *ngIf="!loading && !authed">
<div class="row justify-content-md-center mt-5"> <div class="tw-w-[400px] tw-mt-5">
<div class="col-5"> <h2 class="tw-flex tw-justify-center tw-mb-4">{{ "setupProvider" | i18n }}</h2>
<p class="lead text-center mb-4">{{ "setupProvider" | i18n }}</p> <bit-card>
<div class="card d-block"> <p>{{ "setupProviderLoginDesc" | i18n }}</p>
<div class="card-body"> <hr />
<p>{{ "setupProviderLoginDesc" | i18n }}</p> <button bitButton type="button" [block]="true" (click)="login()" buttonType="primary">
<hr /> {{ "logIn" | i18n }}
<div class="d-flex"> </button>
<a </bit-card>
routerLink="/login"
[queryParams]="{ email: email }"
class="btn btn-primary btn-block"
>
{{ "logIn" | i18n }}
</a>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>

View File

@@ -1,6 +1,7 @@
import { Component } from "@angular/core"; import { Component } from "@angular/core";
import { Params } from "@angular/router"; import { Params } from "@angular/router";
import { BitwardenLogo } from "@bitwarden/auth/angular";
import { BaseAcceptComponent } from "@bitwarden/web-vault/app/common/base.accept.component"; import { BaseAcceptComponent } from "@bitwarden/web-vault/app/common/base.accept.component";
@Component({ @Component({
@@ -8,6 +9,7 @@ import { BaseAcceptComponent } from "@bitwarden/web-vault/app/common/base.accept
templateUrl: "setup-provider.component.html", templateUrl: "setup-provider.component.html",
}) })
export class SetupProviderComponent extends BaseAcceptComponent { export class SetupProviderComponent extends BaseAcceptComponent {
protected logo = BitwardenLogo;
failedShortMessage = "inviteAcceptFailedShort"; failedShortMessage = "inviteAcceptFailedShort";
failedMessage = "inviteAcceptFailed"; failedMessage = "inviteAcceptFailed";
@@ -20,4 +22,8 @@ export class SetupProviderComponent extends BaseAcceptComponent {
async unauthedHandler(qParams: Params) { async unauthedHandler(qParams: Params) {
// Empty // Empty
} }
login() {
this.router.navigate(["/login"], { queryParams: { email: this.email } });
}
} }