mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-25 18:20:31 -06:00
Small style fixes
This commit is contained in:
parent
4a7eeb62f1
commit
b2731bff28
@ -9,7 +9,7 @@
|
||||
"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",
|
||||
|
@ -12,7 +12,7 @@
|
||||
<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>
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
.video {
|
||||
display: flex;
|
||||
height: 130px;
|
||||
min-height: 130px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
input[type=checkbox] {
|
||||
@ -68,6 +68,10 @@
|
||||
flex-grow: 1;
|
||||
|
||||
.video-info-name {
|
||||
@include disable-default-a-behaviour;
|
||||
|
||||
color: #000;
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: $font-semibold;
|
||||
}
|
||||
@ -76,6 +80,10 @@
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.video-buttons {
|
||||
min-width: 190px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
|
@ -4,6 +4,7 @@ import { NotificationsService } from 'angular2-notifications'
|
||||
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'
|
||||
@ -21,6 +22,7 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit
|
||||
|
||||
constructor (protected router: Router,
|
||||
protected route: ActivatedRoute,
|
||||
protected authService: AuthService,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected confirmService: ConfirmService,
|
||||
private videoService: VideoService) {
|
||||
|
@ -12,6 +12,10 @@
|
||||
|
||||
<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>
|
||||
|
@ -2,6 +2,7 @@ import { OnInit } from '@angular/core'
|
||||
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'
|
||||
@ -17,9 +18,10 @@ export abstract class AbstractVideoList implements OnInit {
|
||||
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
|
||||
|
||||
@ -28,6 +30,10 @@ export abstract class AbstractVideoList implements OnInit {
|
||||
|
||||
abstract getVideosObservable (): Observable<{ videos: Video[], totalVideos: number}>
|
||||
|
||||
get user () {
|
||||
return this.authService.getUser()
|
||||
}
|
||||
|
||||
ngOnInit () {
|
||||
// Subscribe to route changes
|
||||
const routeParams = this.route.snapshot.params
|
||||
|
@ -43,12 +43,15 @@
|
||||
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;
|
||||
@ -219,16 +222,12 @@
|
||||
}
|
||||
|
||||
|
||||
@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;
|
||||
|
||||
@ -250,3 +249,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.video-bottom {
|
||||
margin: 20px 0 0 0;
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||
private markdownService: MarkdownService
|
||||
) {}
|
||||
|
||||
get user () {
|
||||
return this.authService.getUser()
|
||||
}
|
||||
|
||||
ngOnInit () {
|
||||
this.videoService.getVideos({ currentPage: 1, itemsPerPage: 5 }, '-createdAt')
|
||||
.subscribe(
|
||||
@ -204,7 +208,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
isVideoBlacklistable () {
|
||||
return this.video.isBlackistableBy(this.authService.getUser())
|
||||
return this.video.isBlackistableBy(this.user)
|
||||
}
|
||||
|
||||
getAvatarPath () {
|
||||
@ -264,7 +268,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||
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'
|
||||
|
@ -1,6 +1,7 @@
|
||||
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'
|
||||
@ -18,6 +19,7 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On
|
||||
constructor (protected router: Router,
|
||||
protected route: ActivatedRoute,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected authService: AuthService,
|
||||
private videoService: VideoService) {
|
||||
super()
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'
|
||||
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'
|
||||
|
||||
@ -21,6 +22,7 @@ export class VideoSearchComponent extends AbstractVideoList implements OnInit, O
|
||||
constructor (protected router: Router,
|
||||
protected route: ActivatedRoute,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected authService: AuthService,
|
||||
private videoService: VideoService) {
|
||||
super()
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
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'
|
||||
@ -18,6 +19,7 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit
|
||||
constructor (protected router: Router,
|
||||
protected route: ActivatedRoute,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected authService: AuthService,
|
||||
private videoService: VideoService) {
|
||||
super()
|
||||
}
|
||||
|
@ -322,6 +322,7 @@ $control-bar-height: 34px;
|
||||
border-left-color: #ffffff;
|
||||
transform: translateZ(0);
|
||||
animation: spinner 1.4s infinite linear;
|
||||
overflow: hidden;
|
||||
|
||||
&:before {
|
||||
animation: none !important;
|
||||
|
Loading…
Reference in New Issue
Block a user