aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-26 19:59:51 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-26 20:01:26 +0100
commit05a9feaa48cea560abd9561434a3479ab1021643 (patch)
treec0a8705a4a05fb806d5cdad294b74b78e8985723 /client/src/app/videos/video-watch
parentf282639b07deee1e35403bd86c46ea521fb4845e (diff)
downloadPeerTube-05a9feaa48cea560abd9561434a3479ab1021643.tar.gz
PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.tar.zst
PeerTube-05a9feaa48cea560abd9561434a3479ab1021643.zip
Client: add views information and sort
Diffstat (limited to 'client/src/app/videos/video-watch')
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.html23
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.scss8
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts3
3 files changed, 23 insertions, 11 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.html b/client/src/app/videos/video-watch/video-watch.component.html
index 8cee9959d..24d741ff9 100644
--- a/client/src/app/videos/video-watch/video-watch.component.html
+++ b/client/src/app/videos/video-watch/video-watch.component.html
@@ -57,17 +57,20 @@
57 <span class="glyphicon glyphicon-share"></span> Share 57 <span class="glyphicon glyphicon-share"></span> Share
58 </button> 58 </button>
59 59
60 <button title="Get magnet URI" id="magnet-uri" class="btn btn-default" (click)="showMagnetUriModal()"> 60 <div class="btn-group" dropdown>
61 <span class="glyphicon glyphicon-magnet"></span> Magnet
62 </button>
63
64 <div *ngIf="isUserLoggedIn()" class="btn-group" dropdown>
65 <button id="single-button" type="button" id="more" class="btn btn-default" dropdownToggle> 61 <button id="single-button" type="button" id="more" class="btn btn-default" dropdownToggle>
66 <span class="glyphicon glyphicon-option-horizontal"></span> More 62 <span class="glyphicon glyphicon-option-horizontal"></span> More
67 </button> 63 </button>
64
68 <ul dropdownMenu id="more-menu" role="menu" aria-labelledby="single-button"> 65 <ul dropdownMenu id="more-menu" role="menu" aria-labelledby="single-button">
69 <li role="menuitem"> 66 <li role="menuitem">
70 <a class="dropdown-item" href="#" (click)="showReportModal($event)"> 67 <a class="dropdown-item" title="Get magnet URI" href="#" (click)="showMagnetUriModal($event)">
68 <span class="glyphicon glyphicon-magnet"></span> Magnet
69 </a>
70 </li>
71
72 <li *ngIf="isUserLoggedIn()" role="menuitem">
73 <a class="dropdown-item" title="Report this video" href="#" (click)="showReportModal($event)">
71 <span class="glyphicon glyphicon-alert"></span> Report 74 <span class="glyphicon glyphicon-alert"></span> Report
72 </a> 75 </a>
73 </li> 76 </li>
@@ -76,12 +79,16 @@
76 </div> 79 </div>
77 </div> 80 </div>
78 81
79 <div id="video-tags" class="row"> 82 <div id="video-tags-views" class="row">
80 <div class="col-md-12"> 83 <div class="col-md-8">
81 <a *ngFor="let tag of video.tags" [routerLink]="['/videos/list', { field: 'tags', search: tag }]" class="label label-primary"> 84 <a *ngFor="let tag of video.tags" [routerLink]="['/videos/list', { field: 'tags', search: tag }]" class="label label-primary">
82 {{ tag }} 85 {{ tag }}
83 </a> 86 </a>
84 </div> 87 </div>
88
89 <div id="video-views" class="col-md-4 text-right">
90 {{ video.views }} views
91 </div>
85 </div> 92 </div>
86 93
87 <div id="video-description" class="row"> 94 <div id="video-description" class="row">
diff --git a/client/src/app/videos/video-watch/video-watch.component.scss b/client/src/app/videos/video-watch/video-watch.component.scss
index 794412707..0b8af52ce 100644
--- a/client/src/app/videos/video-watch/video-watch.component.scss
+++ b/client/src/app/videos/video-watch/video-watch.component.scss
@@ -47,7 +47,7 @@
47 top: 2px; 47 top: 2px;
48 } 48 }
49 49
50 #magnet-uri, #share, #more { 50 #share, #more {
51 font-weight: bold; 51 font-weight: bold;
52 opacity: 0.85; 52 opacity: 0.85;
53 } 53 }
@@ -71,12 +71,16 @@
71 } 71 }
72 } 72 }
73 73
74 #video-tags { 74 #video-tags-views {
75 margin-top: 10px; 75 margin-top: 10px;
76 76
77 a { 77 a {
78 margin-right: 5px; 78 margin-right: 5px;
79 } 79 }
80
81 #video-views {
82 font-weight: bold;
83 }
80 } 84 }
81 85
82 #video-description { 86 #video-description {
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts
index 9ac9342b7..d1abc81bc 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -145,7 +145,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
145 this.videoShareModal.show(); 145 this.videoShareModal.show();
146 } 146 }
147 147
148 showMagnetUriModal() { 148 showMagnetUriModal(event: Event) {
149 event.preventDefault();
149 this.videoMagnetModal.show(); 150 this.videoMagnetModal.show();
150 } 151 }
151 152