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
|
|
|
|
2022-05-09 14:19:18 +02:00
|
|
|
import { AuthGuard } from "jslib-angular/guards/auth.guard";
|
|
|
|
import { LockGuard } from "jslib-angular/guards/lock.guard";
|
2018-02-08 17:12:25 +01:00
|
|
|
|
2022-06-09 14:14:31 +02:00
|
|
|
import { AccessibilityCookieComponent } from "./accounts/accessibility-cookie.component";
|
2021-12-20 15:47:17 +01:00
|
|
|
import { HintComponent } from "./accounts/hint.component";
|
|
|
|
import { LockComponent } from "./accounts/lock.component";
|
|
|
|
import { LoginComponent } from "./accounts/login.component";
|
|
|
|
import { RegisterComponent } from "./accounts/register.component";
|
|
|
|
import { RemovePasswordComponent } from "./accounts/remove-password.component";
|
|
|
|
import { SetPasswordComponent } from "./accounts/set-password.component";
|
|
|
|
import { SsoComponent } from "./accounts/sso.component";
|
|
|
|
import { TwoFactorComponent } from "./accounts/two-factor.component";
|
|
|
|
import { UpdateTempPasswordComponent } from "./accounts/update-temp-password.component";
|
2022-05-09 14:19:18 +02:00
|
|
|
import { LoginGuard } from "./guards/login.guard";
|
2021-12-20 15:47:17 +01:00
|
|
|
import { SendComponent } from "./send/send.component";
|
|
|
|
import { VaultComponent } from "./vault/vault.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
|
|
|
},
|
|
|
|
{ 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 {}
|