2018-01-16 21:58:17 +01:00
|
|
|
import { NgModule } from "@angular/core";
|
|
|
|
import { RouterModule, Routes } from "@angular/router";
|
|
|
|
|
2021-06-07 19:26:36 +02:00
|
|
|
import { AuthGuardService } from "jslib-angular/services/auth-guard.service";
|
|
|
|
import { LockGuardService } from "jslib-angular/services/lock-guard.service";
|
2021-12-15 23:32:00 +01:00
|
|
|
import { LoginGuardService } from "../services/loginGuard.service";
|
2018-02-08 17:12:25 +01:00
|
|
|
|
2018-01-31 23:06:14 +01:00
|
|
|
import { HintComponent } from "./accounts/hint.component";
|
2018-02-10 04:47:53 +01:00
|
|
|
import { LockComponent } from "./accounts/lock.component";
|
2018-01-16 21:58:17 +01:00
|
|
|
import { LoginComponent } from "./accounts/login.component";
|
2018-01-31 20:19:21 +01:00
|
|
|
import { RegisterComponent } from "./accounts/register.component";
|
2021-11-09 19:00:01 +01:00
|
|
|
import { RemovePasswordComponent } from "./accounts/remove-password.component";
|
2020-08-21 15:50:36 +02:00
|
|
|
import { SetPasswordComponent } from "./accounts/set-password.component";
|
|
|
|
import { SsoComponent } from "./accounts/sso.component";
|
2018-02-01 04:54:13 +01:00
|
|
|
import { TwoFactorComponent } from "./accounts/two-factor.component";
|
2021-08-11 21:49:44 +02:00
|
|
|
import { UpdateTempPasswordComponent } from "./accounts/update-temp-password.component";
|
2018-06-06 20:35:56 +02:00
|
|
|
|
2021-02-03 22:24:49 +01:00
|
|
|
import { SendComponent } from "./send/send.component";
|
2018-01-16 21:58:17 +01:00
|
|
|
|
2021-02-05 18:44:45 +01:00
|
|
|
import { VaultComponent } from "./vault/vault.component";
|
|
|
|
|
2018-01-16 21:58:17 +01:00
|
|
|
const routes: Routes = [
|
2018-02-08 17:12:25 +01:00
|
|
|
{ path: "", redirectTo: "/vault", pathMatch: "full" },
|
2021-04-20 06:01:33 +02:00
|
|
|
{
|
|
|
|
path: "lock",
|
|
|
|
component: LockComponent,
|
2021-04-20 06:27:33 +02:00
|
|
|
canActivate: [LockGuardService],
|
2021-04-20 06:01:33 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "login",
|
|
|
|
component: LoginComponent,
|
2021-12-15 23:32:00 +01:00
|
|
|
canActivate: [LoginGuardService],
|
2021-04-20 06:01:33 +02:00
|
|
|
},
|
2018-02-01 04:54:13 +01:00
|
|
|
{ path: "2fa", component: TwoFactorComponent },
|
2018-01-31 20:19:21 +01:00
|
|
|
{ path: "register", component: RegisterComponent },
|
2018-02-08 17:12:25 +01:00
|
|
|
{
|
|
|
|
path: "vault",
|
|
|
|
component: VaultComponent,
|
2018-02-08 18:24:17 +01:00
|
|
|
canActivate: [AuthGuardService],
|
2018-02-08 17:12:25 +01:00
|
|
|
},
|
2018-01-31 23:06:14 +01:00
|
|
|
{ path: "hint", component: HintComponent },
|
2020-08-21 15:50:36 +02:00
|
|
|
{ path: "set-password", component: SetPasswordComponent },
|
|
|
|
{ path: "sso", component: SsoComponent },
|
2021-02-03 22:24:49 +01:00
|
|
|
{
|
|
|
|
path: "send",
|
|
|
|
component: SendComponent,
|
|
|
|
canActivate: [AuthGuardService],
|
|
|
|
},
|
2021-08-11 21:49:44 +02:00
|
|
|
{
|
|
|
|
path: "update-temp-password",
|
|
|
|
component: UpdateTempPasswordComponent,
|
|
|
|
canActivate: [AuthGuardService],
|
|
|
|
},
|
2021-11-09 19:00:01 +01:00
|
|
|
{
|
|
|
|
path: "remove-password",
|
|
|
|
component: RemovePasswordComponent,
|
|
|
|
canActivate: [AuthGuardService],
|
|
|
|
data: { titleId: "removeMasterPassword" },
|
|
|
|
},
|
2018-01-16 21:58:17 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
2018-01-16 23:30:57 +01:00
|
|
|
imports: [
|
|
|
|
RouterModule.forRoot(routes, {
|
|
|
|
useHash: true,
|
|
|
|
/*enableTracing: true,*/
|
|
|
|
}),
|
|
|
|
],
|
2018-01-16 21:58:17 +01:00
|
|
|
exports: [RouterModule],
|
|
|
|
})
|
|
|
|
export class AppRoutingModule {}
|