mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
setup desktop router
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
import { RouterModule, Routes } from "@angular/router";
|
||||
|
||||
import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components/environment-selector.component";
|
||||
import { unauthUiRefreshSwap } from "@bitwarden/angular/auth/functions/unauth-ui-refresh-route-swap";
|
||||
import {
|
||||
authGuard,
|
||||
lockGuard,
|
||||
@@ -12,6 +14,7 @@ import { canAccessFeature } from "@bitwarden/angular/platform/guard/feature-flag
|
||||
import {
|
||||
AnonLayoutWrapperComponent,
|
||||
AnonLayoutWrapperData,
|
||||
LoginComponentV2,
|
||||
RegistrationFinishComponent,
|
||||
RegistrationStartComponent,
|
||||
RegistrationStartSecondaryComponent,
|
||||
@@ -51,11 +54,6 @@ const routes: Routes = [
|
||||
component: LockComponent,
|
||||
canActivate: [lockGuard()],
|
||||
},
|
||||
{
|
||||
path: "login",
|
||||
component: LoginComponent,
|
||||
canActivate: [maxAccountsGuardFn()],
|
||||
},
|
||||
{
|
||||
path: "login-with-device",
|
||||
component: LoginViaAuthRequestComponent,
|
||||
@@ -113,6 +111,35 @@ const routes: Routes = [
|
||||
canActivate: [authGuard],
|
||||
data: { titleId: "removeMasterPassword" },
|
||||
},
|
||||
...unauthUiRefreshSwap(
|
||||
LoginComponent,
|
||||
AnonLayoutWrapperComponent,
|
||||
{
|
||||
path: "login",
|
||||
component: LoginComponent,
|
||||
canActivate: [maxAccountsGuardFn()],
|
||||
},
|
||||
{
|
||||
path: "",
|
||||
children: [
|
||||
{
|
||||
path: "login",
|
||||
canActivate: [maxAccountsGuardFn()],
|
||||
data: {
|
||||
pageTitle: "logInToBitwarden",
|
||||
},
|
||||
children: [
|
||||
{ path: "", component: LoginComponentV2 },
|
||||
{
|
||||
path: "",
|
||||
component: EnvironmentSelectorComponent,
|
||||
outlet: "environment-selector",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
{
|
||||
path: "",
|
||||
component: AnonLayoutWrapperComponent,
|
||||
|
||||
@@ -508,6 +508,9 @@
|
||||
"logIn": {
|
||||
"message": "Log in"
|
||||
},
|
||||
"logInToBitwarden": {
|
||||
"message": "Log in to Bitwarden"
|
||||
},
|
||||
"submit": {
|
||||
"message": "Submit"
|
||||
},
|
||||
|
||||
@@ -162,3 +162,6 @@
|
||||
<form *ngIf="clientType === ClientType.Browser" [bitSubmit]="submit" [formGroup]="formGroup">
|
||||
<main tabindex="-1"></main>
|
||||
</form>
|
||||
|
||||
<!-- Desktop Template -->
|
||||
<form [bitSubmit]="submit" [formGroup]="formGroup">Desktop Template</form>
|
||||
|
||||
Reference in New Issue
Block a user