test commit
This commit is contained in:
parent
b3e7254568
commit
e778fef3ab
14622
package-lock.json
generated
Normal file
14622
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,2 +1 @@
|
|||||||
<app-navigation></app-navigation>
|
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
|
|||||||
@ -6,37 +6,23 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
import { SharedModule } from './shared/shared.module';
|
import { SharedModule } from './shared/shared.module';
|
||||||
import { NavigationComponent } from './component/navigation/navigation.component';
|
import { HomeComponent } from './core/components/home/home.component';
|
||||||
import { HomeComponent } from './component/home/home.component';
|
import { CoreModule } from './core/core.module';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: 'home', component: HomeComponent },
|
{ path: 'home', component: HomeComponent },
|
||||||
{
|
|
||||||
path: 'video',
|
|
||||||
loadChildren: () =>
|
|
||||||
import('./feature/video/video.module').then((m) => m.VideoModule),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'analyze',
|
|
||||||
loadChildren: () =>
|
|
||||||
import('./feature/analyze/analyze.module').then((m) => m.AnalyzeModule),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'tag',
|
|
||||||
loadChildren: () =>
|
|
||||||
import('./feature/tag/tag.module').then((m) => m.TagModule),
|
|
||||||
},
|
|
||||||
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent, NavigationComponent, HomeComponent],
|
declarations: [AppComponent],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
RouterModule.forRoot(routes),
|
RouterModule.forRoot(routes),
|
||||||
SharedModule,
|
SharedModule,
|
||||||
|
CoreModule,
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
<div class="m-5 flex flex-nowrap overflow-x-auto gap-2">
|
<app-navigation></app-navigation>
|
||||||
<shared-tag-card *ngFor="let tag of tags" [tag]="tag" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<shared-video-list
|
<div>
|
||||||
(onReadList)="readList($event)"
|
Home
|
||||||
[total]="total"
|
</div>
|
||||||
[videos]="videos"
|
|
||||||
/>
|
|
||||||
@ -1,8 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { TagListEntry } from 'src/app/model/TagListEntry';
|
import { RequestService } from 'src/app/core/services/request.service';
|
||||||
import { VideoListEntry } from 'src/app/model/VideoListEntry';
|
|
||||||
import { RequestService } from 'src/app/request.service';
|
|
||||||
import { OnReadListModel } from 'src/app/shared/components/video-list/video-list.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-home',
|
selector: 'app-home',
|
||||||
@ -10,33 +7,6 @@ import { OnReadListModel } from 'src/app/shared/components/video-list/video-list
|
|||||||
styleUrls: ['./home.component.scss'],
|
styleUrls: ['./home.component.scss'],
|
||||||
})
|
})
|
||||||
export class HomeComponent {
|
export class HomeComponent {
|
||||||
total: number = 0;
|
|
||||||
videos: VideoListEntry[] = [];
|
|
||||||
tags: TagListEntry[] = [];
|
|
||||||
|
|
||||||
constructor(public requestService: RequestService) {
|
constructor(public requestService: RequestService) {
|
||||||
this.readTagList();
|
|
||||||
}
|
|
||||||
|
|
||||||
readList(model: OnReadListModel): void {
|
|
||||||
this.requestService.post(
|
|
||||||
'video-list/read-list',
|
|
||||||
{
|
|
||||||
query: model.query,
|
|
||||||
page: model.page,
|
|
||||||
perPage: model.perPage,
|
|
||||||
sortBy: model.sortBy,
|
|
||||||
},
|
|
||||||
(response: any) => {
|
|
||||||
this.videos = response.items;
|
|
||||||
this.total = response.total;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
readTagList(): void {
|
|
||||||
this.requestService.post('tag-list/read-list', {}, (response: any) => {
|
|
||||||
this.tags = response.items;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +1,5 @@
|
|||||||
<a routerLink="/home">
|
<a routerLink="/home">
|
||||||
<h1 class="w-full bg-zinc-700 p-5 text-white text-6xl font-bold text-center">
|
<h1 class="w-full bg-zinc-700 p-5 text-white text-6xl font-bold text-center">
|
||||||
Template
|
Navigation
|
||||||
</h1>
|
</h1>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ul
|
|
||||||
class="flex flex-wrap items-center justify-center text-xl font-bold bg-zinc-700 text-white"
|
|
||||||
>
|
|
||||||
<li *ngFor="let link of links" class="p-5 me-4">
|
|
||||||
<a [routerLink]="[link.routerLink]">
|
|
||||||
{{ link.caption }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
@ -1,28 +1,9 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
interface Link {
|
|
||||||
routerLink: string;
|
|
||||||
caption: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-navigation',
|
selector: 'app-navigation',
|
||||||
templateUrl: './navigation.component.html',
|
templateUrl: './navigation.component.html',
|
||||||
styleUrls: ['./navigation.component.scss'],
|
styleUrls: ['./navigation.component.scss'],
|
||||||
})
|
})
|
||||||
export class NavigationComponent {
|
export class NavigationComponent {
|
||||||
links: Link[] = [
|
|
||||||
{
|
|
||||||
routerLink: '/video/upload',
|
|
||||||
caption: 'Upload',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
routerLink: '/analyze',
|
|
||||||
caption: 'Analyse',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
routerLink: '/tag/list',
|
|
||||||
caption: 'Tags',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
15
src/app/core/core.module.ts
Normal file
15
src/app/core/core.module.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { HomeComponent } from './components/home/home.component';
|
||||||
|
import { NavigationComponent } from './components/navigation/navigation.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [HomeComponent, NavigationComponent],
|
||||||
|
exports: [HomeComponent, NavigationComponent],
|
||||||
|
imports: [
|
||||||
|
CommonModule
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class CoreModule { }
|
||||||
@ -5,8 +5,6 @@ import { FormComponent } from './components/form/form.component';
|
|||||||
import { CardComponent } from './components/card/card.component';
|
import { CardComponent } from './components/card/card.component';
|
||||||
import { PaginatorComponent } from './components/paginator/paginator.component';
|
import { PaginatorComponent } from './components/paginator/paginator.component';
|
||||||
import { TabControlComponent } from './components/tab-control/tab-control.component';
|
import { TabControlComponent } from './components/tab-control/tab-control.component';
|
||||||
import { VideoPresenterComponent } from './components/video-presenter/video-presenter.component';
|
|
||||||
import { ImagePresenterComponent } from './components/image-presenter/image-presenter.component';
|
|
||||||
import { TableComponent } from './components/table/table.component';
|
import { TableComponent } from './components/table/table.component';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { MatInputModule } from '@angular/material/input';
|
import { MatInputModule } from '@angular/material/input';
|
||||||
@ -30,37 +28,21 @@ import { MatPaginatorModule } from '@angular/material/paginator';
|
|||||||
import { MatTabsModule } from '@angular/material/tabs';
|
import { MatTabsModule } from '@angular/material/tabs';
|
||||||
import { MatTableModule } from '@angular/material/table';
|
import { MatTableModule } from '@angular/material/table';
|
||||||
import { MatChipsModule } from '@angular/material/chips';
|
import { MatChipsModule } from '@angular/material/chips';
|
||||||
import { VideoListComponent } from './components/video-list/video-list.component';
|
|
||||||
import { VideoCardComponent } from './components/video-card/video-card.component';
|
|
||||||
import { TagCardComponent } from './components/tag-card/tag-card.component';
|
|
||||||
import { TagSelectorComponent } from './components/tag-selector/tag-selector.component';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ImagePresenterComponent,
|
|
||||||
VideoPresenterComponent,
|
|
||||||
CardComponent,
|
CardComponent,
|
||||||
TabControlComponent,
|
TabControlComponent,
|
||||||
PaginatorComponent,
|
PaginatorComponent,
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
VideoListComponent,
|
|
||||||
VideoCardComponent,
|
|
||||||
TagCardComponent,
|
|
||||||
TagSelectorComponent,
|
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
ImagePresenterComponent,
|
|
||||||
VideoPresenterComponent,
|
|
||||||
CardComponent,
|
CardComponent,
|
||||||
TabControlComponent,
|
TabControlComponent,
|
||||||
PaginatorComponent,
|
PaginatorComponent,
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
VideoListComponent,
|
|
||||||
VideoCardComponent,
|
|
||||||
TagSelectorComponent,
|
|
||||||
TagCardComponent,
|
|
||||||
|
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user