"outDir": "dist",
"deployUrl": "client/",
"assets": [
- { "glob": "**/*", "input": "./assets/images", "output": "./client/assets/" }
+ { "glob": "**/*", "input": "./assets/images", "output": "./client/assets/images" }
],
"index": "index.html",
"main": "main.ts",
<my-video-thumbnail [video]="video"></my-video-thumbnail>
<div class="video-info">
- <div class="video-info-name">{{ video.name }}</div>
+ <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
<span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
</div>
.video {
display: flex;
- height: 130px;
+ min-height: 130px;
padding-bottom: 20px;
input[type=checkbox] {
flex-grow: 1;
.video-info-name {
+ @include disable-default-a-behaviour;
+
+ color: #000;
+ display: block;
font-size: 16px;
font-weight: $font-semibold;
}
font-size: 13px;
}
}
+
+ .video-buttons {
+ min-width: 190px;
+ }
}
@media screen and (max-width: 800px) {
import 'rxjs/add/observable/from'
import 'rxjs/add/operator/concatAll'
import { Observable } from 'rxjs/Observable'
+import { AuthService } from '../../core/auth'
import { ConfirmService } from '../../core/confirm'
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
import { Video } from '../../shared/video/video.model'
constructor (protected router: Router,
protected route: ActivatedRoute,
+ protected authService: AuthService,
protected notificationsService: NotificationsService,
protected confirmService: ConfirmService,
private videoService: VideoService) {
<ul *dropdownMenu class="dropdown-menu">
<li>
+ <a routerLink="/account/settings" class="dropdown-item" title="My account">
+ My account
+ </a>
+
<a (click)="logout($event)" class="dropdown-item" title="Log out" href="#">
Log out
</a>
import { ActivatedRoute, Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications'
import { Observable } from 'rxjs/Observable'
+import { AuthService } from '../../core/auth'
import { SortField } from './sort-field.type'
import { VideoPagination } from './video-pagination.model'
import { Video } from './video.model'
videos: Video[] = []
loadOnInit = true
- protected notificationsService: NotificationsService
- protected router: Router
- protected route: ActivatedRoute
+ protected abstract notificationsService: NotificationsService
+ protected abstract authService: AuthService
+ protected abstract router: Router
+ protected abstract route: ActivatedRoute
protected abstract currentRoute: string
abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}>
+ get user () {
+ return this.authService.getUser()
+ }
+
ngOnInit () {
// Subscribe to route changes
const routeParams = this.route.snapshot.params
align-items: center;
.video-info-name {
+ margin-right: 30px;
font-size: 27px;
font-weight: $font-semibold;
flex-grow: 1;
}
.video-info-actions {
+ min-width: 215px;
+
.action-button {
@include peertube-button;
@include grey-button;
}
-@media screen and (max-width: 1000px) {
+@media screen and (max-width: 1200px) {
.other-videos {
display: none;
}
-}
-@media screen and (max-width: 800px) {
.video-bottom {
- margin: 20px 0 0 0;
-
.video-info {
margin-right: 0;
}
}
}
+
+@media screen and (max-width: 800px) {
+ .video-bottom {
+ margin: 20px 0 0 0;
+ }
+}
private markdownService: MarkdownService
) {}
+ get user () {
+ return this.authService.getUser()
+ }
+
ngOnInit () {
this.videoService.getVideos({ currentPage: 1, itemsPerPage: 5 }, '-createdAt')
.subscribe(
}
isVideoBlacklistable () {
- return this.video.isBlackistableBy(this.authService.getUser())
+ return this.video.isBlackistableBy(this.user)
}
getAvatarPath () {
this.video = video
let observable
- if (this.video.isVideoNSFWForUser(this.authService.getUser())) {
+ if (this.video.isVideoNSFWForUser(this.user)) {
observable = this.confirmService.confirm(
'This video contains mature or explicit content. Are you sure you want to watch it?',
'Mature or explicit content'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications'
+import { AuthService } from '../../core/auth'
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
import { SortField } from '../../shared/video/sort-field.type'
import { VideoService } from '../../shared/video/video.service'
constructor (protected router: Router,
protected route: ActivatedRoute,
protected notificationsService: NotificationsService,
+ protected authService: AuthService,
private videoService: VideoService) {
super()
}
import { ActivatedRoute, Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications'
import { Subscription } from 'rxjs/Subscription'
+import { AuthService } from '../../core/auth'
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
import { VideoService } from '../../shared/video/video.service'
constructor (protected router: Router,
protected route: ActivatedRoute,
protected notificationsService: NotificationsService,
+ protected authService: AuthService,
private videoService: VideoService) {
super()
}
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { NotificationsService } from 'angular2-notifications'
+import { AuthService } from '../../core/auth'
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
import { SortField } from '../../shared/video/sort-field.type'
import { VideoService } from '../../shared/video/video.service'
constructor (protected router: Router,
protected route: ActivatedRoute,
protected notificationsService: NotificationsService,
+ protected authService: AuthService,
private videoService: VideoService) {
super()
}
border-left-color: #ffffff;
transform: translateZ(0);
animation: spinner 1.4s infinite linear;
+ overflow: hidden;
&:before {
animation: none !important;