BOXIT-29: merge module classes

This commit is contained in:
boxi committed 2021-05-29 17:53:15 +02:00
1 parent be4e56efd7
commit 71e28cdb64
8 files changed
+102 -194

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
grafana/.gitkeep grafana/*
!grafana/.gitkeep !grafana/.gitkeep
postgres/*/* postgres/*/*
+39 -2
View File
@@ -1,11 +1,48 @@
import {PreloadAllModules, RouterModule, Routes} from '@angular/router'; import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
import {NgModule} from '@angular/core'; import {NgModule} from '@angular/core';
import {AuthGuardService} from './auth/auth.guard.service'; import {AuthGuardService} from './auth/auth.guard.service';
import {NoteViewComponent} from "./box/note/note-view/note-view.component";
import {NoteEditComponent} from "./box/note/note-edit/note-edit.component";
import {FolderComponent} from "./box/folder/view/folder.component";
import {FolderEditComponent} from "./box/folder/folder-edit/folder-edit.component";
const appRoutes: Routes = [ const appRoutes: Routes = [
{path: '', redirectTo: 'folder', pathMatch: 'full'}, {path: '', redirectTo: 'folder', pathMatch: 'full'},
{path: 'folder', canActivate: [AuthGuardService], loadChildren: './box/folder/folder.module#FolderModule'}, {
{path: 'note', canActivate: [AuthGuardService], loadChildren: './box/note/note.module#NoteModule'} path: 'folder',
canActivate: [AuthGuardService],
children: [
{
path: '',
canActivate: [AuthGuardService],
component: FolderComponent
},
{
path: ':id',
canActivate: [AuthGuardService],
component: FolderComponent
},
{
path: ':id/:action',
canActivate: [AuthGuardService],
component: FolderEditComponent
}
]
},
{
path: 'note',
canActivate: [AuthGuardService],
children: [
{
path: ':id',
component: NoteViewComponent
},
{
path: ':id/edit',
component: NoteEditComponent
}
]
}
]; ];
@NgModule({ @NgModule({
+62 -3
View File
@@ -2,7 +2,6 @@ import {BrowserModule} from '@angular/platform-browser';
import {APP_INITIALIZER, NgModule} from '@angular/core'; import {APP_INITIALIZER, NgModule} from '@angular/core';
import {AppComponent} from './app.component'; import {AppComponent} from './app.component';
import {AppRoutingModule} from './app-routing.module'; import {AppRoutingModule} from './app-routing.module';
import {SharedModule} from './shared/shared.module';
import {AuthService} from './auth/auth.service'; import {AuthService} from './auth/auth.service';
import {AuthGuardService} from './auth/auth.guard.service'; import {AuthGuardService} from './auth/auth.guard.service';
import {BoxitApi} from './shared/boxit.api'; import {BoxitApi} from './shared/boxit.api';
@@ -12,17 +11,76 @@ import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/h
import {TranslateLoader, TranslateModule} from '@ngx-translate/core'; import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader'; import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {KeycloakAngularModule, KeycloakBearerInterceptor, KeycloakService} from 'keycloak-angular'; import {KeycloakAngularModule, KeycloakBearerInterceptor, KeycloakService} from 'keycloak-angular';
import {MapComponent} from "./box/note/location/map/map.component";
import {LocationViewComponent} from "./box/note/location/view/location-view.component";
import {LocationEditComponent} from "./box/note/location/edit/location-edit.component";
import {AttachmentComponent} from "./box/note/attachment-list/show/attachment/attachment.component";
import {DiashowComponent} from "./box/note/attachment-list/show/diashow/diashow.component";
import {AttachmentListComponent} from "./box/note/attachment-list/show/attachment-list.component";
import {NoteViewComponent} from "./box/note/note-view/note-view.component";
import {NoteEditComponent} from "./box/note/note-edit/note-edit.component";
import {AutoGrowDirective} from "./box/note/note-edit/auto-grow.directive";
import {AttachmentListEditComponent} from "./box/note/attachment-list/edit/attachment-list-edit.component";
import {NoteHeaderComponent} from "./box/note/note-header/note-header.component";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {NoteService} from "./box/note/note.service";
import {Boxview} from "./box/folder/view/item/boxview/boxview.component";
import {Listview} from "./box/folder/view/item/listview/listview.component";
import {FolderComponent} from "./box/folder/view/folder.component";
import {FolderEditComponent} from "./box/folder/folder-edit/folder-edit.component";
import {FolderBarComponent} from "./box/folder/folder-bar/folder-bar.component";
import {FolderSidebarComponent} from "./box/folder/view/folder-sidebar/folder-sidebar.component";
import {FolderItemBoxViewComponent} from "./box/folder/view/item/boxview/folder-item-box-view/folder-item.box-view.component";
import {NoteItemBoxViewComponent} from "./box/folder/view/item/boxview/note-item-box-view/note-item-box-view.component";
import {NoteitemListviewComponent} from "./box/folder/view/item/listview/noteitem-listview/noteitem-listview.component";
import {FolderitemListview} from "./box/folder/view/item/listview/folderitem-listview/folderitem-listview.component";
import {HeaderComponent} from "./box/folder/header/header.component";
import {FolderNameComponent} from "./box/folder/folder-name/folder-name.component";
import {ImageCropperModule} from "ngx-image-cropper";
import {CommonModule} from "@angular/common";
import {SecurePipe} from "./shared/secure.pipe";
import {DropdownComponent} from "./shared/components/dropdown/dropdown.component";
import {ModalComponent} from "./shared/components/modal/modal.component";
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent AppComponent,
MapComponent,
SecurePipe,
DropdownComponent,
ModalComponent,
LocationViewComponent,
LocationEditComponent,
AttachmentComponent,
DiashowComponent,
AttachmentListComponent,
NoteViewComponent,
NoteEditComponent,
AutoGrowDirective,
AttachmentListEditComponent,
NoteHeaderComponent,
Boxview,
Listview,
FolderComponent,
FolderEditComponent,
FolderBarComponent,
FolderSidebarComponent,
FolderItemBoxViewComponent,
NoteItemBoxViewComponent,
NoteitemListviewComponent,
FolderitemListview,
HeaderComponent,
FolderNameComponent,
], ],
imports: [ imports: [
CommonModule,
BrowserModule, BrowserModule,
SharedModule,
AppRoutingModule, AppRoutingModule,
FormsModule,
ReactiveFormsModule,
MarkdownModule.forRoot(), MarkdownModule.forRoot(),
HttpClientModule, HttpClientModule,
ImageCropperModule,
TranslateModule.forRoot({ TranslateModule.forRoot({
loader: { loader: {
provide: TranslateLoader, provide: TranslateLoader,
@@ -38,6 +96,7 @@ import {KeycloakAngularModule, KeycloakBearerInterceptor, KeycloakService} from
BoxitApi, BoxitApi,
HttpClientModule, HttpClientModule,
FolderService, FolderService,
NoteService,
{ {
provide: APP_INITIALIZER, provide: APP_INITIALIZER,
useFactory: initializer, useFactory: initializer,
@@ -1,19 +0,0 @@
import {RouterModule, Routes} from "@angular/router";
import {NgModule} from "@angular/core";
import {FolderComponent} from "./view/folder.component";
import {AuthGuardService} from "../../auth/auth.guard.service";
import {FolderEditComponent} from "./folder-edit/folder-edit.component";
const folderRoutes: Routes = [
{path: '', canActivate: [AuthGuardService], component: FolderComponent},
{path: ':id', canActivate: [AuthGuardService], component: FolderComponent},
{path: ':id/:action', canActivate: [AuthGuardService], component: FolderEditComponent}
];
@NgModule({
imports: [RouterModule.forChild(folderRoutes)],
exports: [RouterModule]
})
export class FolderRoutingModule {
}
@@ -1,56 +0,0 @@
import {NgModule} from '@angular/core';
import {SharedModule} from '../../shared/shared.module';
import {FolderRoutingModule} from './folder-routing.module';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {FolderComponent} from './view/folder.component';
import {FolderEditComponent} from './folder-edit/folder-edit.component';
import {FolderBarComponent} from './folder-bar/folder-bar.component';
import {FolderSidebarComponent} from './view/folder-sidebar/folder-sidebar.component';
import {ImageCropperModule} from 'ngx-image-cropper';
import {FolderItemBoxViewComponent} from './view/item/boxview/folder-item-box-view/folder-item.box-view.component';
import {NoteItemBoxViewComponent} from './view/item/boxview/note-item-box-view/note-item-box-view.component';
import {NoteitemListviewComponent} from './view/item/listview/noteitem-listview/noteitem-listview.component';
import {Boxview} from './view/item/boxview/boxview.component';
import {Listview} from './view/item/listview/listview.component';
import {FolderitemListview} from './view/item/listview/folderitem-listview/folderitem-listview.component';
import {HeaderComponent} from './header/header.component';
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {KeycloakBearerInterceptor} from 'keycloak-angular';
import { FolderNameComponent } from './folder-name/folder-name.component';
@NgModule({
declarations: [
Boxview,
Listview,
FolderComponent,
FolderEditComponent,
FolderBarComponent,
FolderSidebarComponent,
FolderItemBoxViewComponent,
NoteItemBoxViewComponent,
NoteitemListviewComponent,
FolderitemListview,
HeaderComponent,
FolderNameComponent,
],
imports: [
SharedModule,
FolderRoutingModule,
ReactiveFormsModule,
FormsModule,
ImageCropperModule,
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: KeycloakBearerInterceptor,
multi: true
}
],
exports: [
FolderBarComponent,
FolderNameComponent
]
})
export class FolderModule {
}
@@ -1,23 +0,0 @@
import {RouterModule, Routes} from "@angular/router";
import {NgModule} from "@angular/core";
import {NoteEditComponent} from "./note-edit/note-edit.component";
import {NoteViewComponent} from "./note-view/note-view.component";
const boxRoutes: Routes = [
{
path: ':id',
component: NoteViewComponent
},
{
path: ':id/edit',
component: NoteEditComponent
}
];
@NgModule({
imports: [RouterModule.forChild(boxRoutes)],
exports: [RouterModule]
})
export class NoteRoutingModule {
}
-54
View File
@@ -1,54 +0,0 @@
import {KeycloakBearerInterceptor} from 'keycloak-angular';
import {SharedModule} from "../../shared/shared.module";
import {NoteRoutingModule} from "./note-routing.module";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {MarkdownModule} from "ngx-markdown";
import {FolderModule} from "../folder/folder.module";
import {NoteService} from "./note.service";
import {HTTP_INTERCEPTORS} from "@angular/common/http";
import {NgModule} from "@angular/core";
import {MapComponent} from "./location/map/map.component";
import {LocationViewComponent} from "./location/view/location-view.component";
import {LocationEditComponent} from "./location/edit/location-edit.component";
import {AttachmentComponent} from "./attachment-list/show/attachment/attachment.component";
import {DiashowComponent} from "./attachment-list/show/diashow/diashow.component";
import { AttachmentListComponent } from './attachment-list/show/attachment-list.component';
import { NoteViewComponent } from './note-view/note-view.component';
import { NoteEditComponent } from './note-edit/note-edit.component';
import {AutoGrowDirective} from "./note-edit/auto-grow.directive";
import { AttachmentListEditComponent } from './attachment-list/edit/attachment-list-edit.component';
import { NoteHeaderComponent } from './note-header/note-header.component';
@NgModule({
declarations: [
MapComponent,
LocationViewComponent,
LocationEditComponent,
AttachmentComponent,
DiashowComponent,
AttachmentListComponent,
NoteViewComponent,
NoteEditComponent,
AutoGrowDirective,
AttachmentListEditComponent,
NoteHeaderComponent
],
imports: [
SharedModule,
FormsModule,
NoteRoutingModule,
ReactiveFormsModule,
MarkdownModule.forChild(),
FolderModule
],
providers: [
NoteService,
{
provide: HTTP_INTERCEPTORS,
useClass: KeycloakBearerInterceptor,
multi: true
}
]
})
export class NoteModule {
}
-36
View File
@@ -1,36 +0,0 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {TranslateModule} from '@ngx-translate/core';
import {SecurePipe} from './secure.pipe';
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {KeycloakBearerInterceptor} from 'keycloak-angular';
import {DropdownComponent} from './components/dropdown/dropdown.component';
import { ModalComponent } from './components/modal/modal.component';
@NgModule({
imports: [
CommonModule,
TranslateModule
],
exports: [
CommonModule,
TranslateModule,
SecurePipe,
DropdownComponent,
ModalComponent
],
declarations: [
SecurePipe,
DropdownComponent,
ModalComponent
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: KeycloakBearerInterceptor,
multi: true
}
]
})
export class SharedModule {
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.