diff --git a/Kyoo/ClientApp/src/app/app-routing.module.ts b/Kyoo/ClientApp/src/app/app-routing.module.ts index 9ab10171..668c8d09 100644 --- a/Kyoo/ClientApp/src/app/app-routing.module.ts +++ b/Kyoo/ClientApp/src/app/app-routing.module.ts @@ -8,18 +8,24 @@ import { ShowResolverService } from './services/show-resolver.service'; import { LibraryResolverService } from './services/library-resolver.service'; import { PlayerComponent } from "./player/player.component"; import { StreamResolverService } from "./services/stream-resolver.service"; +import { CollectionComponent } from "./collection/collection.component"; +import { CollectionResolverService } from "./services/collection-resolver.service"; const routes: Routes = [ { path: "browse", component: BrowseComponent, pathMatch: "full", resolve: { shows: LibraryResolverService } }, { path: "browse/:library-slug", component: BrowseComponent, resolve: { shows: LibraryResolverService } }, { path: "show/:show-slug", component: ShowDetailsComponent, resolve: { show: ShowResolverService } }, + { path: "collection/:collection-slug", component: CollectionComponent, resolve: { shows: CollectionResolverService } }, { path: "watch/:item", component: PlayerComponent, resolve: { item: StreamResolverService } }, { path: "**", component: NotFoundComponent } ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], + imports: [RouterModule.forRoot(routes, + { + scrollPositionRestoration: "enabled" + })], exports: [RouterModule], providers: [LibraryResolverService, ShowResolverService, StreamResolverService] }) diff --git a/Kyoo/ClientApp/src/app/app.component.html b/Kyoo/ClientApp/src/app/app.component.html index 60fde282..e2a76bd6 100644 --- a/Kyoo/ClientApp/src/app/app.component.html +++ b/Kyoo/ClientApp/src/app/app.component.html @@ -16,10 +16,10 @@
collection works!
diff --git a/Kyoo/ClientApp/src/app/collection/collection.component.scss b/Kyoo/ClientApp/src/app/collection/collection.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Kyoo/ClientApp/src/app/collection/collection.component.spec.ts b/Kyoo/ClientApp/src/app/collection/collection.component.spec.ts new file mode 100644 index 00000000..cb438b1d --- /dev/null +++ b/Kyoo/ClientApp/src/app/collection/collection.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CollectionComponent } from './collection.component'; + +describe('CollectionComponent', () => { + let component: CollectionComponent; + let fixture: ComponentFixture{{this.minutes | number: '2.0-0'}}:{{this.seconds | number: '2.0-0'}} / {{this.maxMinutes | number: '2.0-0'}}:{{this.maxSeconds | number: '2.0-0'}}