]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Small style fixes
authorChocobozzz <me@florianbigard.com>
Tue, 12 Dec 2017 13:41:59 +0000 (14:41 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 12 Dec 2017 13:41:59 +0000 (14:41 +0100)
12 files changed:
client/.angular-cli.json
client/src/app/account/account-videos/account-videos.component.html
client/src/app/account/account-videos/account-videos.component.scss
client/src/app/account/account-videos/account-videos.component.ts
client/src/app/menu/menu.component.html
client/src/app/shared/video/abstract-video-list.ts
client/src/app/videos/+video-watch/video-watch.component.scss
client/src/app/videos/+video-watch/video-watch.component.ts
client/src/app/videos/video-list/video-recently-added.component.ts
client/src/app/videos/video-list/video-search.component.ts
client/src/app/videos/video-list/video-trending.component.ts
client/src/sass/video-js-custom.scss

index e277f96b848b493b1b483df86bea705dd41de4b6..9ed4a7ab3d5e61028fdf1cd662acbdfdf912c40f 100644 (file)
@@ -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",
index f69c0487d0d8d2559cd40034d25a80d0b27a9793..4f3a774bd1af89545268d9fb010dcd5571664274 100644 (file)
@@ -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>
 
index 28b298c3df8c25eea46930071f97066471c2ee97..0d478edd7552507dd49dbb9a11968d72ae61c397 100644 (file)
@@ -43,7 +43,7 @@
 
 .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) {
index 5f12cfce0c270cfa51d5a21ca72c856b6de4ae5f..22941619d337f9b6bf922aaa0ee0654a47311640 100644 (file)
@@ -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) {
index 2671dd90b52ac64d5058a07a1cfa4815b3a24eaf..6f52f4f45cbca6e7d7406256c6c885e1d3f579ae 100644 (file)
 
       <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>
index ba1635a180966c2c5a9150b47fbfad705ab8c57d..2b6870a789b2b06c5c0101df5ae8477604203ff0 100644 (file)
@@ -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
index 52082944a21d513113477c44bef784a771d1b112..e742e1329518058b287e59713ae22587c112022c 100644 (file)
       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;
+  }
+}
index 3825e8449019d68efe569acb9adadc01b5d0b8e6..5e4823c9ce24d415ee64f4642ef7f0614aa6048f 100644 (file)
@@ -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'
index 6168fac9512b0a13a7fae01f28717826d5119acc..3020b8c3019c53d41616215ab52a8e36865df186 100644 (file)
@@ -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()
   }
index e874636af0081d840210a449173610dfd4cb762f..b7556c13ef17ef5547b9af8a19a114e8863993dc 100644 (file)
@@ -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()
   }
index 82567e02defad4a56e111941248c95cd6686f83d..fc48086d6ec184cdd0f086342e71b9ea1ba0e309 100644 (file)
@@ -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()
   }
index 1c5701bea215433c031c3bd5bc9fab73e1519751..25362c5af7cadac679df76fa563efd0901ad853c 100644 (file)
@@ -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;