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