2022-03-06 12:34:33 +01:00
|
|
|
import { CommonModule } from '@angular/common';
|
2022-02-28 21:09:27 +01:00
|
|
|
import { NgModule } from '@angular/core';
|
2022-03-06 12:34:33 +01:00
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
import { MatButtonModule } from '@angular/material/button';
|
|
|
|
|
import { MatInputModule } from '@angular/material/input';
|
|
|
|
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
2022-02-28 21:09:27 +01:00
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
|
|
import { NgxDropzoneModule } from 'ngx-dropzone';
|
2022-02-28 23:18:07 +01:00
|
|
|
import { ApiModule } from '../api/api.module';
|
2022-03-06 12:34:33 +01:00
|
|
|
import { CopyFieldModule } from '../components/copyfield/copyfield.module';
|
2022-02-28 23:18:07 +01:00
|
|
|
import { PageNotFoundComponent } from '../components/pagenotfound/pagenotfound.component';
|
2022-03-06 12:34:33 +01:00
|
|
|
import { PageNotFoundModule } from '../components/pagenotfound/pagenotfound.module';
|
|
|
|
|
import { LoginComponent } from '../routes/login/login.component';
|
|
|
|
|
import { ProcessingComponent } from '../routes/processing/processing.component';
|
|
|
|
|
import { UploadComponent } from '../routes/upload/upload.component';
|
2022-02-28 23:18:07 +01:00
|
|
|
import { ViewComponent } from '../routes/view/view.component';
|
2022-03-01 21:51:21 +01:00
|
|
|
import { UtilModule } from '../util/util.module';
|
2022-03-06 12:34:33 +01:00
|
|
|
|
|
|
|
|
// TODO: split up router
|
2022-02-28 21:09:27 +01:00
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
|
{ path: '', component: UploadComponent },
|
|
|
|
|
{
|
|
|
|
|
path: 'processing',
|
|
|
|
|
component: ProcessingComponent,
|
|
|
|
|
},
|
2022-02-28 23:18:07 +01:00
|
|
|
{ path: 'view/:hash', component: ViewComponent },
|
2022-03-03 13:38:39 +01:00
|
|
|
{ path: 'login', component: LoginComponent },
|
2022-02-28 23:18:07 +01:00
|
|
|
{ path: '**', component: PageNotFoundComponent },
|
2022-02-28 21:09:27 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
|
imports: [
|
2022-03-03 13:38:39 +01:00
|
|
|
CommonModule,
|
2022-02-28 21:09:27 +01:00
|
|
|
NgxDropzoneModule,
|
2022-03-01 21:51:21 +01:00
|
|
|
UtilModule,
|
2022-02-28 21:09:27 +01:00
|
|
|
MatProgressSpinnerModule,
|
2022-03-01 20:41:55 +01:00
|
|
|
MatButtonModule,
|
2022-03-03 13:38:39 +01:00
|
|
|
MatInputModule,
|
|
|
|
|
FormsModule,
|
|
|
|
|
ReactiveFormsModule,
|
2022-02-28 23:18:07 +01:00
|
|
|
PageNotFoundModule,
|
|
|
|
|
CopyFieldModule,
|
|
|
|
|
ApiModule,
|
2022-03-03 13:38:39 +01:00
|
|
|
FormsModule,
|
2022-02-28 21:09:27 +01:00
|
|
|
RouterModule.forRoot(routes),
|
|
|
|
|
],
|
2022-03-03 13:38:39 +01:00
|
|
|
declarations: [
|
|
|
|
|
UploadComponent,
|
|
|
|
|
ProcessingComponent,
|
|
|
|
|
ViewComponent,
|
|
|
|
|
LoginComponent,
|
|
|
|
|
],
|
2022-02-28 21:09:27 +01:00
|
|
|
exports: [RouterModule],
|
|
|
|
|
})
|
|
|
|
|
export class AppRouterModule {}
|