aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/account
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-01 18:56:26 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-01 18:56:26 +0100
commit202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7 (patch)
tree605df063371b6be32ca0773bf2917b0c5d9163ae /client/src/app/account
parentc30745f342480b59fb0856a059c8c2fbffbcfc6a (diff)
downloadPeerTube-202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7.tar.gz
PeerTube-202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7.tar.zst
PeerTube-202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7.zip
Begin videos of an account
Diffstat (limited to 'client/src/app/account')
-rw-r--r--client/src/app/account/account-routing.module.ts19
-rw-r--r--client/src/app/account/account-videos/account-videos.component.html9
-rw-r--r--client/src/app/account/account-videos/account-videos.component.scss0
-rw-r--r--client/src/app/account/account-videos/account-videos.component.ts35
-rw-r--r--client/src/app/account/account.module.ts4
5 files changed, 57 insertions, 10 deletions
diff --git a/client/src/app/account/account-routing.module.ts b/client/src/app/account/account-routing.module.ts
index 2e9de1cfb..070b9b5c5 100644
--- a/client/src/app/account/account-routing.module.ts
+++ b/client/src/app/account/account-routing.module.ts
@@ -6,6 +6,7 @@ import { MetaGuard } from '@ngx-meta/core'
6import { LoginGuard } from '../core' 6import { LoginGuard } from '../core'
7import { AccountComponent } from './account.component' 7import { AccountComponent } from './account.component'
8import { AccountSettingsComponent } from './account-settings/account-settings.component' 8import { AccountSettingsComponent } from './account-settings/account-settings.component'
9import { AccountVideosComponent } from './account-videos/account-videos.component'
9 10
10const accountRoutes: Routes = [ 11const accountRoutes: Routes = [
11 { 12 {
@@ -22,15 +23,15 @@ const accountRoutes: Routes = [
22 } 23 }
23 } 24 }
24 }, 25 },
25 // { 26 {
26 // path: 'videos', 27 path: 'videos',
27 // component: AccountVideosComponent, 28 component: AccountVideosComponent,
28 // data: { 29 data: {
29 // meta: { 30 meta: {
30 // title: 'Account videos' 31 title: 'Account videos'
31 // } 32 }
32 // } 33 }
33 // } 34 }
34 ] 35 ]
35 } 36 }
36] 37]
diff --git a/client/src/app/account/account-videos/account-videos.component.html b/client/src/app/account/account-videos/account-videos.component.html
new file mode 100644
index 000000000..6c8ac4508
--- /dev/null
+++ b/client/src/app/account/account-videos/account-videos.component.html
@@ -0,0 +1,9 @@
1<div
2 infiniteScroll
3 [infiniteScrollDistance]="0.5"
4 (scrolled)="onNearOfBottom()"
5>
6 <div *ngFor="let video of videos">
7 <my-video-thumbnail [video]="video"></my-video-thumbnail>
8 </div>
9</div>
diff --git a/client/src/app/account/account-videos/account-videos.component.scss b/client/src/app/account/account-videos/account-videos.component.scss
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/client/src/app/account/account-videos/account-videos.component.scss
diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.ts
new file mode 100644
index 000000000..ff945825d
--- /dev/null
+++ b/client/src/app/account/account-videos/account-videos.component.ts
@@ -0,0 +1,35 @@
1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { AbstractVideoList } from '../../shared/video/abstract-video-list'
3import { ActivatedRoute } from '@angular/router'
4import { Router } from '@angular/router'
5import { NotificationsService } from 'angular2-notifications'
6import { VideoService } from '../../shared/video/video.service'
7
8@Component({
9 selector: 'my-account-videos',
10 templateUrl: './account-videos.component.html',
11 styleUrls: [ './account-videos.component.scss' ]
12})
13export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
14 titlePage = 'My videos'
15 currentRoute = '/account/videos'
16
17 constructor (protected router: Router,
18 protected route: ActivatedRoute,
19 protected notificationsService: NotificationsService,
20 private videoService: VideoService) {
21 super()
22 }
23
24 ngOnInit () {
25 super.ngOnInit()
26 }
27
28 ngOnDestroy () {
29 super.ngOnDestroy()
30 }
31
32 getVideosObservable () {
33 return this.videoService.getMyVideos(this.pagination, this.sort)
34 }
35}
diff --git a/client/src/app/account/account.module.ts b/client/src/app/account/account.module.ts
index ff444ddeb..020199e23 100644
--- a/client/src/app/account/account.module.ts
+++ b/client/src/app/account/account.module.ts
@@ -6,6 +6,7 @@ import { AccountDetailsComponent } from './account-settings/account-details/acco
6import { AccountSettingsComponent } from './account-settings/account-settings.component' 6import { AccountSettingsComponent } from './account-settings/account-settings.component'
7import { AccountComponent } from './account.component' 7import { AccountComponent } from './account.component'
8import { AccountService } from './account.service' 8import { AccountService } from './account.service'
9import { AccountVideosComponent } from './account-videos/account-videos.component'
9 10
10@NgModule({ 11@NgModule({
11 imports: [ 12 imports: [
@@ -17,7 +18,8 @@ import { AccountService } from './account.service'
17 AccountComponent, 18 AccountComponent,
18 AccountSettingsComponent, 19 AccountSettingsComponent,
19 AccountChangePasswordComponent, 20 AccountChangePasswordComponent,
20 AccountDetailsComponent 21 AccountDetailsComponent,
22 AccountVideosComponent
21 ], 23 ],
22 24
23 exports: [ 25 exports: [