2021-12-20 15:47:17 +01:00
|
|
|
import { NgModule } from "@angular/core";
|
|
|
|
import { RouterModule, Routes } from "@angular/router";
|
2018-01-16 21:58:17 +01:00
|
|
|
|
2023-02-06 22:53:37 +01:00
|
|
|
import { AuthGuard } from "@bitwarden/angular/auth/guards/auth.guard";
|
|
|
|
import { LockGuard } from "@bitwarden/angular/auth/guards/lock.guard";
|
2018-02-08 17:12:25 +01:00
|
|
|
|
2023-02-06 22:53:37 +01:00
|
|
|
import { AccessibilityCookieComponent } from "../auth/accessibility-cookie.component";
|
|
|
|
import { LoginGuard } from "../auth/guards/login.guard";
|
2023-02-08 20:57:41 +01:00
|
|
|
import { HintComponent } from "../auth/hint.component";
|
2023-02-06 22:53:37 +01:00
|
|
|
import { LockComponent } from "../auth/lock.component";
|
|
|
|
import { LoginWithDeviceComponent } from "../auth/login/login-with-device.component";
|
|
|
|
import { LoginComponent } from "../auth/login/login.component";
|
|
|
|
import { RegisterComponent } from "../auth/register.component";
|
|
|
|
import { RemovePasswordComponent } from "../auth/remove-password.component";
|
|
|
|
import { SetPasswordComponent } from "../auth/set-password.component";
|
|
|
|
import { SsoComponent } from "../auth/sso.component";
|
|
|
|
import { TwoFactorComponent } from "../auth/two-factor.component";
|
|
|
|
import { UpdateTempPasswordComponent } from "../auth/update-temp-password.component";
|
2023-01-31 22:08:37 +01:00
|
|
|
import { VaultComponent } from "../vault/app/vault/vault.component";
|
|
|
|
|
2021-12-20 15:47:17 +01:00
|
|
|
import { SendComponent } from "./send/send.component";
|
2021-02-05 18:44:45 +01:00
|
|
|
|
2018-01-16 21:58:17 +01:00
|
|
|
const routes: Routes = [
|
2021-12-20 15:47:17 +01:00
|
|
|
{ path: "", redirectTo: "/vault", pathMatch: "full" },
|
|
|
|
{
|
|
|
|
path: "lock",
|
|
|
|
component: LockComponent,
|
2022-05-09 14:19:18 +02:00
|
|
|
canActivate: [LockGuard],
|
2021-12-20 15:47:17 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "login",
|
|
|
|
component: LoginComponent,
|
2022-05-09 14:19:18 +02:00
|
|
|
canActivate: [LoginGuard],
|
2021-12-20 15:47:17 +01:00
|
|
|
},
|
2023-02-05 16:57:21 +01:00
|
|
|
{
|
|
|
|
path: "login-with-device",
|
|
|
|
component: LoginWithDeviceComponent,
|
|
|
|
},
|
2021-12-20 15:47:17 +01:00
|
|
|
{ path: "2fa", component: TwoFactorComponent },
|
|
|
|
{ path: "register", component: RegisterComponent },
|
|
|
|
{
|
|
|
|
path: "vault",
|
|
|
|
component: VaultComponent,
|
2022-05-09 14:19:18 +02:00
|
|
|
canActivate: [AuthGuard],
|
2021-12-20 15:47:17 +01:00
|
|
|
},
|
2022-06-09 14:14:31 +02:00
|
|
|
{ path: "accessibility-cookie", component: AccessibilityCookieComponent },
|
2021-12-20 15:47:17 +01:00
|
|
|
{ path: "hint", component: HintComponent },
|
|
|
|
{ path: "set-password", component: SetPasswordComponent },
|
|
|
|
{ path: "sso", component: SsoComponent },
|
|
|
|
{
|
|
|
|
path: "send",
|
|
|
|
component: SendComponent,
|
2022-05-09 14:19:18 +02:00
|
|
|
canActivate: [AuthGuard],
|
2021-12-20 15:47:17 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "update-temp-password",
|
|
|
|
component: UpdateTempPasswordComponent,
|
2022-05-09 14:19:18 +02:00
|
|
|
canActivate: [AuthGuard],
|
2021-12-20 15:47:17 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "remove-password",
|
|
|
|
component: RemovePasswordComponent,
|
2022-05-09 14:19:18 +02:00
|
|
|
canActivate: [AuthGuard],
|
2021-12-20 15:47:17 +01:00
|
|
|
data: { titleId: "removeMasterPassword" },
|
|
|
|
},
|
2018-01-16 21:58:17 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2021-12-20 15:47:17 +01:00
|
|
|
imports: [
|
|
|
|
RouterModule.forRoot(routes, {
|
|
|
|
useHash: true,
|
|
|
|
/*enableTracing: true,*/
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
exports: [RouterModule],
|
2018-01-16 21:58:17 +01:00
|
|
|
})
|
2021-12-20 15:47:17 +01:00
|
|
|
export class AppRoutingModule {}
|