Begin videos of an account
This commit is contained in:
parent
c30745f342
commit
202f6b6c9d
|
@ -6,6 +6,7 @@ import { MetaGuard } from '@ngx-meta/core'
|
||||||
import { LoginGuard } from '../core'
|
import { LoginGuard } from '../core'
|
||||||
import { AccountComponent } from './account.component'
|
import { AccountComponent } from './account.component'
|
||||||
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
||||||
|
import { AccountVideosComponent } from './account-videos/account-videos.component'
|
||||||
|
|
||||||
const accountRoutes: Routes = [
|
const accountRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
@ -22,15 +23,15 @@ const accountRoutes: Routes = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: 'videos',
|
path: 'videos',
|
||||||
// component: AccountVideosComponent,
|
component: AccountVideosComponent,
|
||||||
// data: {
|
data: {
|
||||||
// meta: {
|
meta: {
|
||||||
// title: 'Account videos'
|
title: 'Account videos'
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<div
|
||||||
|
infiniteScroll
|
||||||
|
[infiniteScrollDistance]="0.5"
|
||||||
|
(scrolled)="onNearOfBottom()"
|
||||||
|
>
|
||||||
|
<div *ngFor="let video of videos">
|
||||||
|
<my-video-thumbnail [video]="video"></my-video-thumbnail>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { Component, OnDestroy, OnInit } from '@angular/core'
|
||||||
|
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
|
||||||
|
import { ActivatedRoute } from '@angular/router'
|
||||||
|
import { Router } from '@angular/router'
|
||||||
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
|
import { VideoService } from '../../shared/video/video.service'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'my-account-videos',
|
||||||
|
templateUrl: './account-videos.component.html',
|
||||||
|
styleUrls: [ './account-videos.component.scss' ]
|
||||||
|
})
|
||||||
|
export class AccountVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||||
|
titlePage = 'My videos'
|
||||||
|
currentRoute = '/account/videos'
|
||||||
|
|
||||||
|
constructor (protected router: Router,
|
||||||
|
protected route: ActivatedRoute,
|
||||||
|
protected notificationsService: NotificationsService,
|
||||||
|
private videoService: VideoService) {
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit () {
|
||||||
|
super.ngOnInit()
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy () {
|
||||||
|
super.ngOnDestroy()
|
||||||
|
}
|
||||||
|
|
||||||
|
getVideosObservable () {
|
||||||
|
return this.videoService.getMyVideos(this.pagination, this.sort)
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ import { AccountDetailsComponent } from './account-settings/account-details/acco
|
||||||
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
import { AccountSettingsComponent } from './account-settings/account-settings.component'
|
||||||
import { AccountComponent } from './account.component'
|
import { AccountComponent } from './account.component'
|
||||||
import { AccountService } from './account.service'
|
import { AccountService } from './account.service'
|
||||||
|
import { AccountVideosComponent } from './account-videos/account-videos.component'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -17,7 +18,8 @@ import { AccountService } from './account.service'
|
||||||
AccountComponent,
|
AccountComponent,
|
||||||
AccountSettingsComponent,
|
AccountSettingsComponent,
|
||||||
AccountChangePasswordComponent,
|
AccountChangePasswordComponent,
|
||||||
AccountDetailsComponent
|
AccountDetailsComponent,
|
||||||
|
AccountVideosComponent
|
||||||
],
|
],
|
||||||
|
|
||||||
exports: [
|
exports: [
|
||||||
|
|
|
@ -20,6 +20,9 @@ import { SearchComponent, SearchService } from './search'
|
||||||
import { UserService } from './users'
|
import { UserService } from './users'
|
||||||
import { VideoAbuseService } from './video-abuse'
|
import { VideoAbuseService } from './video-abuse'
|
||||||
import { VideoBlacklistService } from './video-blacklist'
|
import { VideoBlacklistService } from './video-blacklist'
|
||||||
|
import { VideoThumbnailComponent } from './video/video-thumbnail.component'
|
||||||
|
import { VideoService } from './video/video.service'
|
||||||
|
import { InfiniteScrollModule } from 'ngx-infinite-scroll'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -34,7 +37,8 @@ import { VideoBlacklistService } from './video-blacklist'
|
||||||
ProgressbarModule.forRoot(),
|
ProgressbarModule.forRoot(),
|
||||||
|
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
PrimeSharedModule
|
PrimeSharedModule,
|
||||||
|
InfiniteScrollModule
|
||||||
],
|
],
|
||||||
|
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -42,6 +46,7 @@ import { VideoBlacklistService } from './video-blacklist'
|
||||||
KeysPipe,
|
KeysPipe,
|
||||||
SearchComponent,
|
SearchComponent,
|
||||||
LoaderComponent,
|
LoaderComponent,
|
||||||
|
VideoThumbnailComponent,
|
||||||
NumberFormatterPipe,
|
NumberFormatterPipe,
|
||||||
FromNowPipe
|
FromNowPipe
|
||||||
],
|
],
|
||||||
|
@ -58,11 +63,13 @@ import { VideoBlacklistService } from './video-blacklist'
|
||||||
ProgressbarModule,
|
ProgressbarModule,
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
PrimeSharedModule,
|
PrimeSharedModule,
|
||||||
|
InfiniteScrollModule,
|
||||||
BytesPipe,
|
BytesPipe,
|
||||||
KeysPipe,
|
KeysPipe,
|
||||||
|
|
||||||
SearchComponent,
|
SearchComponent,
|
||||||
LoaderComponent,
|
LoaderComponent,
|
||||||
|
VideoThumbnailComponent,
|
||||||
|
|
||||||
NumberFormatterPipe,
|
NumberFormatterPipe,
|
||||||
FromNowPipe
|
FromNowPipe
|
||||||
|
@ -75,7 +82,8 @@ import { VideoBlacklistService } from './video-blacklist'
|
||||||
SearchService,
|
SearchService,
|
||||||
VideoAbuseService,
|
VideoAbuseService,
|
||||||
VideoBlacklistService,
|
VideoBlacklistService,
|
||||||
UserService
|
UserService,
|
||||||
|
VideoService
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SharedModule { }
|
export class SharedModule { }
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { OnDestroy, OnInit } from '@angular/core'
|
import { OnDestroy, OnInit } from '@angular/core'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
|
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
import { Observable } from 'rxjs/Observable'
|
import { Observable } from 'rxjs/Observable'
|
||||||
import { Subscription } from 'rxjs/Subscription'
|
import { Subscription } from 'rxjs/Subscription'
|
||||||
|
import { SortField } from './sort-field.type'
|
||||||
import { SortField, Video, VideoPagination } from '../../shared'
|
import { VideoPagination } from './video-pagination.model'
|
||||||
|
import { Video } from './video.model'
|
||||||
|
|
||||||
export abstract class AbstractVideoList implements OnInit, OnDestroy {
|
export abstract class AbstractVideoList implements OnInit, OnDestroy {
|
||||||
pagination: VideoPagination = {
|
pagination: VideoPagination = {
|
||||||
|
@ -76,7 +76,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
|
||||||
protected hasMoreVideos () {
|
protected hasMoreVideos () {
|
||||||
if (!this.pagination.totalItems) return true
|
if (!this.pagination.totalItems) return true
|
||||||
|
|
||||||
const maxPage = this.pagination.totalItems/this.pagination.itemsPerPage
|
const maxPage = this.pagination.totalItems / this.pagination.itemsPerPage
|
||||||
return maxPage > this.pagination.currentPage
|
return maxPage > this.pagination.currentPage
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Video } from './video.model'
|
import { Video } from '../../shared/video/video.model'
|
||||||
import { AuthUser } from '../../core'
|
import { AuthUser } from '../../core'
|
||||||
import {
|
import {
|
||||||
VideoDetails as VideoDetailsServerModel,
|
VideoDetails as VideoDetailsServerModel,
|
|
@ -0,0 +1,10 @@
|
||||||
|
<a
|
||||||
|
[routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name"
|
||||||
|
class="video-thumbnail"
|
||||||
|
>
|
||||||
|
<img [attr.src]="video.thumbnailUrl" alt="video thumbnail" [ngClass]="{ 'blur-filter': nsfw }" />
|
||||||
|
|
||||||
|
<div class="video-thumbnail-overlay">
|
||||||
|
{{ video.durationLabel }}
|
||||||
|
</div>
|
||||||
|
</a>
|
|
@ -0,0 +1,28 @@
|
||||||
|
.video-thumbnail {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.blur-filter {
|
||||||
|
filter: blur(5px);
|
||||||
|
transform : scale(1.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-thumbnail-overlay {
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
bottom: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: $font-bold;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { Component, Input } from '@angular/core'
|
||||||
|
import { Video } from './video.model'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'my-video-thumbnail',
|
||||||
|
styleUrls: [ './video-thumbnail.component.scss' ],
|
||||||
|
templateUrl: './video-thumbnail.component.html'
|
||||||
|
})
|
||||||
|
export class VideoThumbnailComponent {
|
||||||
|
@Input() video: Video
|
||||||
|
@Input() nsfw = false
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import { Video as VideoServerModel } from '../../../../../shared'
|
import { Video as VideoServerModel } from '../../../../../shared'
|
||||||
import { User } from '../../shared'
|
import { User } from '../'
|
||||||
|
|
||||||
export class Video implements VideoServerModel {
|
export class Video implements VideoServerModel {
|
||||||
account: string
|
account: string
|
|
@ -1,29 +1,23 @@
|
||||||
import { Injectable } from '@angular/core'
|
|
||||||
import { Observable } from 'rxjs/Observable'
|
|
||||||
import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'
|
import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'
|
||||||
|
import { Injectable } from '@angular/core'
|
||||||
import 'rxjs/add/operator/catch'
|
import 'rxjs/add/operator/catch'
|
||||||
import 'rxjs/add/operator/map'
|
import 'rxjs/add/operator/map'
|
||||||
|
import { Observable } from 'rxjs/Observable'
|
||||||
|
import { Video as VideoServerModel, VideoDetails as VideoDetailsServerModel } from '../../../../../shared'
|
||||||
|
import { ResultList } from '../../../../../shared/models/result-list.model'
|
||||||
|
import { UserVideoRateUpdate } from '../../../../../shared/models/videos/user-video-rate-update.model'
|
||||||
|
import { UserVideoRate } from '../../../../../shared/models/videos/user-video-rate.model'
|
||||||
|
import { VideoRateType } from '../../../../../shared/models/videos/video-rate.type'
|
||||||
|
import { VideoUpdate } from '../../../../../shared/models/videos/video-update.model'
|
||||||
|
import { RestExtractor } from '../rest/rest-extractor.service'
|
||||||
|
import { RestService } from '../rest/rest.service'
|
||||||
|
import { Search } from '../search/search.model'
|
||||||
|
import { UserService } from '../users/user.service'
|
||||||
import { SortField } from './sort-field.type'
|
import { SortField } from './sort-field.type'
|
||||||
import {
|
|
||||||
RestExtractor,
|
|
||||||
RestService,
|
|
||||||
UserService,
|
|
||||||
Search
|
|
||||||
} from '../../shared'
|
|
||||||
import { Video } from './video.model'
|
|
||||||
import { VideoDetails } from './video-details.model'
|
import { VideoDetails } from './video-details.model'
|
||||||
import { VideoEdit } from './video-edit.model'
|
import { VideoEdit } from './video-edit.model'
|
||||||
import { VideoPagination } from './video-pagination.model'
|
import { VideoPagination } from './video-pagination.model'
|
||||||
import {
|
import { Video } from './video.model'
|
||||||
UserVideoRate,
|
|
||||||
VideoRateType,
|
|
||||||
VideoUpdate,
|
|
||||||
UserVideoRateUpdate,
|
|
||||||
Video as VideoServerModel,
|
|
||||||
VideoDetails as VideoDetailsServerModel,
|
|
||||||
ResultList
|
|
||||||
} from '../../../../../shared'
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class VideoService {
|
export class VideoService {
|
|
@ -3,7 +3,7 @@ import { NgModule } from '@angular/core'
|
||||||
import { TagInputModule } from 'ngx-chips'
|
import { TagInputModule } from 'ngx-chips'
|
||||||
import { TabsModule } from 'ngx-bootstrap/tabs'
|
import { TabsModule } from 'ngx-bootstrap/tabs'
|
||||||
|
|
||||||
import { VideoService, MarkdownService, VideoDescriptionComponent } from '../../shared'
|
import { MarkdownService, VideoDescriptionComponent } from '../../shared'
|
||||||
import { SharedModule } from '../../../shared'
|
import { SharedModule } from '../../../shared'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -26,7 +26,6 @@ import { SharedModule } from '../../../shared'
|
||||||
],
|
],
|
||||||
|
|
||||||
providers: [
|
providers: [
|
||||||
VideoService,
|
|
||||||
MarkdownService
|
MarkdownService
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
|
import { HttpEventType, HttpResponse } from '@angular/common/http'
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core'
|
import { Component, OnInit, ViewChild } from '@angular/core'
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms'
|
import { FormBuilder, FormGroup } from '@angular/forms'
|
||||||
import { Router } from '@angular/router'
|
import { Router } from '@angular/router'
|
||||||
|
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
|
import { VideoService } from 'app/shared/video/video.service'
|
||||||
|
import { VideoCreate } from '../../../../../shared'
|
||||||
|
import { AuthService, ServerService } from '../../core'
|
||||||
import {
|
import {
|
||||||
FormReactive,
|
FormReactive,
|
||||||
VIDEO_NAME,
|
|
||||||
VIDEO_CATEGORY,
|
VIDEO_CATEGORY,
|
||||||
VIDEO_LICENCE,
|
|
||||||
VIDEO_LANGUAGE,
|
|
||||||
VIDEO_DESCRIPTION,
|
|
||||||
VIDEO_TAGS,
|
|
||||||
VIDEO_CHANNEL,
|
VIDEO_CHANNEL,
|
||||||
|
VIDEO_DESCRIPTION,
|
||||||
VIDEO_FILE,
|
VIDEO_FILE,
|
||||||
VIDEO_PRIVACY
|
VIDEO_LANGUAGE,
|
||||||
|
VIDEO_LICENCE,
|
||||||
|
VIDEO_NAME,
|
||||||
|
VIDEO_PRIVACY,
|
||||||
|
VIDEO_TAGS
|
||||||
} from '../../shared'
|
} from '../../shared'
|
||||||
import { AuthService, ServerService } from '../../core'
|
|
||||||
import { VideoService } from '../shared'
|
|
||||||
import { VideoCreate } from '../../../../../shared'
|
|
||||||
import { HttpEventType, HttpResponse } from '@angular/common/http'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-videos-add',
|
selector: 'my-videos-add',
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
import { Component, OnInit } from '@angular/core'
|
import { Component, OnInit } from '@angular/core'
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms'
|
import { FormBuilder, FormGroup } from '@angular/forms'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import 'rxjs/add/observable/forkJoin'
|
|
||||||
|
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
|
import 'rxjs/add/observable/forkJoin'
|
||||||
|
import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
|
||||||
import { ServerService } from '../../core'
|
import { ServerService } from '../../core'
|
||||||
import {
|
import {
|
||||||
FormReactive,
|
FormReactive,
|
||||||
VIDEO_NAME,
|
|
||||||
VIDEO_CATEGORY,
|
VIDEO_CATEGORY,
|
||||||
VIDEO_LICENCE,
|
|
||||||
VIDEO_LANGUAGE,
|
|
||||||
VIDEO_DESCRIPTION,
|
VIDEO_DESCRIPTION,
|
||||||
VIDEO_TAGS,
|
VIDEO_LANGUAGE,
|
||||||
VIDEO_PRIVACY
|
VIDEO_LICENCE,
|
||||||
|
VIDEO_NAME,
|
||||||
|
VIDEO_PRIVACY,
|
||||||
|
VIDEO_TAGS
|
||||||
} from '../../shared'
|
} from '../../shared'
|
||||||
import { VideoEdit, VideoService } from '../shared'
|
import { VideoService } from '../../shared/video/video.service'
|
||||||
import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy.enum'
|
import { VideoEdit } from '../../shared/video/video-edit.model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-videos-update',
|
selector: 'my-videos-update',
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { Component, Input, ViewChild } from '@angular/core'
|
import { Component, Input, ViewChild } from '@angular/core'
|
||||||
|
|
||||||
import { ModalDirective } from 'ngx-bootstrap/modal'
|
import { ModalDirective } from 'ngx-bootstrap/modal'
|
||||||
|
import { VideoDetails } from '../../shared/video/video-details.model'
|
||||||
import { VideoDetails } from '../shared'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-download',
|
selector: 'my-video-download',
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import { Component, Input, OnInit, ViewChild } from '@angular/core'
|
import { Component, Input, OnInit, ViewChild } from '@angular/core'
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms'
|
import { FormBuilder, FormGroup } from '@angular/forms'
|
||||||
|
|
||||||
import { ModalDirective } from 'ngx-bootstrap/modal'
|
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
|
import { ModalDirective } from 'ngx-bootstrap/modal'
|
||||||
import { FormReactive, VideoAbuseService, VIDEO_ABUSE_REASON } from '../../shared'
|
import { FormReactive, VIDEO_ABUSE_REASON, VideoAbuseService } from '../../shared'
|
||||||
import { VideoDetails, VideoService } from '../shared'
|
import { VideoDetails } from '../../shared/video/video-details.model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-report',
|
selector: 'my-video-report',
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { Component, Input, ViewChild } from '@angular/core'
|
import { Component, Input, ViewChild } from '@angular/core'
|
||||||
|
|
||||||
import { ModalDirective } from 'ngx-bootstrap/modal'
|
import { ModalDirective } from 'ngx-bootstrap/modal'
|
||||||
|
import { VideoDetails } from '../../shared/video/video-details.model'
|
||||||
import { VideoDetails } from '../shared'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-share',
|
selector: 'my-video-share',
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/co
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { MetaService } from '@ngx-meta/core'
|
import { MetaService } from '@ngx-meta/core'
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
|
import { VideoService } from 'app/shared/video/video.service'
|
||||||
import { Observable } from 'rxjs/Observable'
|
import { Observable } from 'rxjs/Observable'
|
||||||
import { Subscription } from 'rxjs/Subscription'
|
import { Subscription } from 'rxjs/Subscription'
|
||||||
import videojs from 'video.js'
|
import videojs from 'video.js'
|
||||||
|
@ -9,10 +10,11 @@ import { UserVideoRateType, VideoRateType } from '../../../../../shared'
|
||||||
import '../../../assets/player/peertube-videojs-plugin'
|
import '../../../assets/player/peertube-videojs-plugin'
|
||||||
import { AuthService, ConfirmService } from '../../core'
|
import { AuthService, ConfirmService } from '../../core'
|
||||||
import { VideoBlacklistService } from '../../shared'
|
import { VideoBlacklistService } from '../../shared'
|
||||||
import { MarkdownService, VideoDetails, VideoService } from '../shared'
|
import { MarkdownService } from '../shared'
|
||||||
import { VideoDownloadComponent } from './video-download.component'
|
import { VideoDownloadComponent } from './video-download.component'
|
||||||
import { VideoReportComponent } from './video-report.component'
|
import { VideoReportComponent } from './video-report.component'
|
||||||
import { VideoShareComponent } from './video-share.component'
|
import { VideoShareComponent } from './video-share.component'
|
||||||
|
import { VideoDetails } from '../../shared/video/video-details.model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-watch',
|
selector: 'my-video-watch',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
|
|
||||||
import { VideoWatchRoutingModule } from './video-watch-routing.module'
|
import { VideoWatchRoutingModule } from './video-watch-routing.module'
|
||||||
import { VideoService, MarkdownService } from '../shared'
|
import { MarkdownService } from '../shared'
|
||||||
import { SharedModule } from '../../shared'
|
import { SharedModule } from '../../shared'
|
||||||
|
|
||||||
import { VideoWatchComponent } from './video-watch.component'
|
import { VideoWatchComponent } from './video-watch.component'
|
||||||
|
@ -28,8 +28,7 @@ import { VideoDownloadComponent } from './video-download.component'
|
||||||
],
|
],
|
||||||
|
|
||||||
providers: [
|
providers: [
|
||||||
MarkdownService,
|
MarkdownService
|
||||||
VideoService
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class VideoWatchModule { }
|
export class VideoWatchModule { }
|
||||||
|
|
|
@ -1,8 +1,2 @@
|
||||||
export * from './sort-field.type'
|
|
||||||
export * from './markdown.service'
|
export * from './markdown.service'
|
||||||
export * from './video.model'
|
|
||||||
export * from './video-details.model'
|
|
||||||
export * from './video-edit.model'
|
|
||||||
export * from './video.service'
|
|
||||||
export * from './video-description.component'
|
export * from './video-description.component'
|
||||||
export * from './video-pagination.model'
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
export * from './abstract-video-list'
|
|
||||||
export * from './video-miniature.component'
|
export * from './video-miniature.component'
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
<div class="video-miniature">
|
<div class="video-miniature">
|
||||||
<a
|
<my-video-thumbnail [video]="video" [nsfw]="isVideoNSFWForThisUser()"></my-video-thumbnail>
|
||||||
[routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.description"
|
|
||||||
class="video-miniature-thumbnail"
|
|
||||||
>
|
|
||||||
<img [attr.src]="video.thumbnailUrl" alt="video thumbnail" [ngClass]="{ 'blur-filter': isVideoNSFWForThisUser() }" />
|
|
||||||
|
|
||||||
<div class="video-miniature-thumbnail-overlay">
|
|
||||||
{{ video.durationLabel }}
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="video-miniature-information">
|
<div class="video-miniature-information">
|
||||||
<span class="video-miniature-name">
|
<span class="video-miniature-name">
|
||||||
|
|
|
@ -5,35 +5,6 @@
|
||||||
height: 175px;
|
height: 175px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
||||||
.video-miniature-thumbnail {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
border-radius: 4px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.blur-filter {
|
|
||||||
filter: blur(5px);
|
|
||||||
transform : scale(1.03);
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-miniature-thumbnail-overlay {
|
|
||||||
position: absolute;
|
|
||||||
right: 5px;
|
|
||||||
bottom: 5px;
|
|
||||||
display: inline-block;
|
|
||||||
background-color: rgba(0, 0, 0, 0.7);
|
|
||||||
color: #fff;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: $font-bold;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-miniature-information {
|
.video-miniature-information {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, Input } from '@angular/core'
|
import { Component, Input } from '@angular/core'
|
||||||
|
|
||||||
import { SortField, Video } from '../../shared'
|
|
||||||
import { User } from '../../../shared'
|
import { User } from '../../../shared'
|
||||||
|
import { SortField } from '../../../shared/video/sort-field.type'
|
||||||
|
import { Video } from '../../../shared/video/video.model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-miniature',
|
selector: 'my-video-miniature',
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { Component, OnDestroy, OnInit } from '@angular/core'
|
import { Component, OnDestroy, OnInit } from '@angular/core'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
import { VideoService } from '../shared'
|
import { VideoService } from '../../shared/video/video.service'
|
||||||
import { AbstractVideoList } from './shared'
|
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-videos-recently-added',
|
selector: 'my-videos-recently-added',
|
||||||
styleUrls: [ './shared/abstract-video-list.scss' ],
|
styleUrls: [ '../../shared/video/abstract-video-list.scss' ],
|
||||||
templateUrl: './shared/abstract-video-list.html'
|
templateUrl: '../../shared/video/abstract-video-list.html'
|
||||||
})
|
})
|
||||||
export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
export class VideoRecentlyAddedComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||||
titlePage = 'Recently added'
|
titlePage = 'Recently added'
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { Component, OnDestroy, OnInit } from '@angular/core'
|
import { Component, OnDestroy, OnInit } from '@angular/core'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { NotificationsService } from 'angular2-notifications'
|
import { NotificationsService } from 'angular2-notifications'
|
||||||
import { VideoService } from '../shared'
|
import { VideoService } from '../../shared/video/video.service'
|
||||||
import { AbstractVideoList } from './shared'
|
import { AbstractVideoList } from 'app/shared/video/abstract-video-list'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-videos-trending',
|
selector: 'my-videos-trending',
|
||||||
styleUrls: [ './shared/abstract-video-list.scss' ],
|
styleUrls: [ '../../shared/video/abstract-video-list.scss' ],
|
||||||
templateUrl: './shared/abstract-video-list.html'
|
templateUrl: '../../shared/video/abstract-video-list.html'
|
||||||
})
|
})
|
||||||
export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
export class VideoTrendingComponent extends AbstractVideoList implements OnInit, OnDestroy {
|
||||||
titlePage = 'Trending'
|
titlePage = 'Trending'
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll'
|
|
||||||
import { SharedModule } from '../shared'
|
import { SharedModule } from '../shared'
|
||||||
import { VideoService } from './shared'
|
|
||||||
import { VideoMiniatureComponent } from './video-list'
|
import { VideoMiniatureComponent } from './video-list'
|
||||||
import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
|
import { VideoRecentlyAddedComponent } from './video-list/video-recently-added.component'
|
||||||
import { VideoTrendingComponent } from './video-list/video-trending.component'
|
import { VideoTrendingComponent } from './video-list/video-trending.component'
|
||||||
|
@ -11,8 +9,7 @@ import { VideosComponent } from './videos.component'
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
VideosRoutingModule,
|
VideosRoutingModule,
|
||||||
SharedModule,
|
SharedModule
|
||||||
InfiniteScrollModule
|
|
||||||
],
|
],
|
||||||
|
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -27,8 +24,6 @@ import { VideosComponent } from './videos.component'
|
||||||
VideosComponent
|
VideosComponent
|
||||||
],
|
],
|
||||||
|
|
||||||
providers: [
|
providers: []
|
||||||
VideoService
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class VideosModule { }
|
export class VideosModule { }
|
||||||
|
|
Loading…
Reference in New Issue