Fix dropdown menu in video watch

This commit is contained in:
Chocobozzz 2017-12-07 10:02:01 +01:00
parent 41c3dfac99
commit 7b272fd73f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
19 changed files with 192 additions and 71 deletions

View File

@ -9,6 +9,8 @@ input[type=password] {
input[type=submit] { input[type=submit] {
@include peertube-button; @include peertube-button;
@include orange-button;
margin-top: 15px; margin-top: 15px;
} }

View File

@ -6,6 +6,7 @@ label {
input[type=submit] { input[type=submit] {
@include peertube-button; @include peertube-button;
@include orange-button;
display: block; display: block;
margin-top: 15px; margin-top: 15px;

View File

@ -42,7 +42,7 @@
top: -2px; top: -2px;
&.icon-edit { &.icon-edit {
background-image: url('../../../assets/images/account/edit.svg'); background-image: url('../../../assets/images/global/edit.svg');
} }
&.icon-delete-grey { &.icon-delete-grey {

View File

@ -10,7 +10,7 @@
.icon.icon-search { .icon.icon-search {
display: inline-block; display: inline-block;
background: url('../../../assets/images/header/search.svg') no-repeat; background: url('../../assets/images/header/search.svg') no-repeat;
background-size: contain; background-size: contain;
width: 25px; width: 25px;
height: 21px; height: 21px;
@ -24,12 +24,13 @@
.upload-button { .upload-button {
@include peertube-button-link; @include peertube-button-link;
@include orange-button;
margin-right: 25px; margin-right: 25px;
.icon.icon-upload { .icon.icon-upload {
display: inline-block; display: inline-block;
background: url('../../../assets/images/header/upload.svg') no-repeat; background: url('../../assets/images/header/upload.svg') no-repeat;
background-size: contain; background-size: contain;
width: 22px; width: 22px;
height: 24px; height: 24px;

View File

@ -5,4 +5,5 @@ input:not([type=submit]) {
input[type=submit] { input[type=submit] {
@include peertube-button; @include peertube-button;
@include orange-button;
} }

View File

@ -5,4 +5,5 @@ input:not([type=submit]) {
input[type=submit] { input[type=submit] {
@include peertube-button; @include peertube-button;
@include orange-button;
} }

View File

@ -14,18 +14,12 @@
<div class="video-info-name">{{ video.name }}</div> <div class="video-info-name">{{ video.name }}</div>
<div class="video-info-actions"> <div class="video-info-actions">
<div class="action-button"> <div *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'like' }" class="action-button">
<span <span class="icon icon-like" title="Like this video" (click)="setLike()"></span>
class="icon icon-like" title="Like this video"
[ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'like' }" (click)="setLike()"
></span>
</div> </div>
<div class="action-button"> <div *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'dislike' }" class="action-button">
<span <span class="icon icon-dislike" title="Dislike this video" (click)="setDislike()"></span>
class="icon icon-dislike" title="Dislike this video"
[ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'dislike' }" (click)="setDislike()"
></span>
</div> </div>
<div (click)="showShareModal()" class="action-button"> <div (click)="showShareModal()" class="action-button">
@ -39,33 +33,21 @@
</div> </div>
<ul *dropdownMenu class="dropdown-menu" id="more-menu" role="menu" aria-labelledby="single-button"> <ul *dropdownMenu class="dropdown-menu" id="more-menu" role="menu" aria-labelledby="single-button">
<li *ngIf="canUserUpdateVideo()" role="menuitem">
<a class="dropdown-item" title="Update this video" href="#" [routerLink]="[ '/videos/edit', video.uuid ]">
<span class="glyphicon glyphicon-pencil"></span> Update
</a>
</li>
<li role="menuitem"> <li role="menuitem">
<a class="dropdown-item" title="Download the video" href="#" (click)="showDownloadModal($event)"> <a class="dropdown-item" title="Download the video" href="#" (click)="showDownloadModal($event)">
<span class="glyphicon glyphicon-download-alt"></span> Download <span class="icon icon-download"></span> Download
</a> </a>
</li> </li>
<li *ngIf="isUserLoggedIn()" role="menuitem"> <li *ngIf="isUserLoggedIn()" role="menuitem">
<a class="dropdown-item" title="Report this video" href="#" (click)="showReportModal($event)"> <a class="dropdown-item" title="Report this video" href="#" (click)="showReportModal($event)">
<span class="glyphicon glyphicon-alert"></span> Report <span class="icon icon-alert"></span> Report
</a>
</li>
<li *ngIf="isVideoRemovable()" role="menuitem">
<a class="dropdown-item" title="Delete this video" href="#" (click)="removeVideo($event)">
<span class="glyphicon glyphicon-remove"></span> Delete
</a> </a>
</li> </li>
<li *ngIf="isVideoBlacklistable()" role="menuitem"> <li *ngIf="isVideoBlacklistable()" role="menuitem">
<a class="dropdown-item" title="Blacklist this video" href="#" (click)="blacklistVideo($event)"> <a class="dropdown-item" title="Blacklist this video" href="#" (click)="blacklistVideo($event)">
<span class="glyphicon glyphicon-eye-close"></span> Blacklist <span class="icon icon-blacklist"></span> Blacklist
</a> </a>
</li> </li>
</ul> </ul>
@ -78,7 +60,7 @@
{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
</div> </div>
<div class="video-info-likes-dislikes-bar"> <div *ngIf="video.likes !== 0 || video.dislikes !== 0" class="video-info-likes-dislikes-bar">
<div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div> <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
</div> </div>
</div> </div>

View File

@ -6,6 +6,11 @@
#video-element { #video-element {
width: 888px; width: 888px;
height: 500px; height: 500px;
// VideoJS create an inner video player
video {
outline: 0;
}
} }
} }
@ -38,47 +43,78 @@
.video-info-actions { .video-info-actions {
.action-button { .action-button {
@include peertube-button; @include peertube-button;
@include grey-button;
font-size: 15px; font-size: 15px;
font-weight: $font-semibold; font-weight: $font-semibold;
color: #585858;
background-color: #E5E5E5;
display: inline-block; display: inline-block;
padding: 0 10px 0 10px; padding: 0 10px 0 10px;
&:hover { .icon {
background-color: #EFEFEF; display: inline-block;
background-repeat: no-repeat;
background-size: contain;
width: 21px;
height: 21px;
vertical-align: middle;
position: relative;
top: -2px;
&.icon-like {
background-image: url('../../../assets/images/video/like-grey.svg');
}
&.icon-dislike {
background-image: url('../../../assets/images/video/dislike-grey.svg');
}
&.icon-share {
background-image: url('../../../assets/images/video/share.svg');
}
&.icon-more {
background-image: url('../../../assets/images/video/more.svg');
}
}
&.activated {
@include orange-button;
.icon-like {
background-image: url('../../../assets/images/video/like-white.svg');
}
.icon-dislike {
background-image: url('../../../assets/images/video/dislike-white.svg');
}
} }
} }
.action-more { .action-more {
display: inline-block; display: inline-block;
}
.icon { .dropdown-menu .icon {
display: inline-block; display: inline-block;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
width: 21px; width: 21px;
height: 21px; height: 21px;
vertical-align: middle; vertical-align: middle;
position: relative; margin-right: 5px;
top: -2px; position: relative;
top: -1px;
&.icon-like { &.icon-download {
background-image: url('../../../assets/images/video/like.svg'); background-image: url('../../../assets/images/video/download.svg');
} }
&.icon-dislike { &.icon-alert {
background-image: url('../../../assets/images/video/dislike.svg'); background-image: url('../../../assets/images/video/alert.svg');
} }
&.icon-share { &.icon-blacklist {
background-image: url('../../../assets/images/video/share.svg'); background-image: url('../../../assets/images/video/eye-closed.svg');
} }
&.icon-more {
background-image: url('../../../assets/images/video/more.svg');
} }
} }
} }

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
<title>alert</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Artboard-4" transform="translate(-48.000000, -467.000000)">
<g id="161" transform="translate(48.000000, 467.000000)">
<path d="M12.8715755,3.50973876 L12,1.96027114 L11.1284245,3.50973876 L2.12842446,19.5097388 L1.29015252,21 L3,21 L21,21 L22.7098475,21 L21.8715755,19.5097388 L12.8715755,3.50973876 Z" id="Triangle-2" stroke="#585858" stroke-width="2" stroke-linejoin="round"></path>
<path d="M12,17.75 C12.6903559,17.75 13.25,17.1903559 13.25,16.5 C13.25,15.8096441 12.6903559,15.25 12,15.25 C11.3096441,15.25 10.75,15.8096441 10.75,16.5 C10.75,17.1903559 11.3096441,17.75 12,17.75 Z" id="Oval-8" fill="#585858"></path>
<rect id="Rectangle-3" fill="#585858" x="11" y="9" width="2" height="5" rx="1"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="Artboard-4" transform="translate(-752.000000, -1090.000000)" stroke="#ffffff" stroke-width="2">
<g id="Extras" transform="translate(48.000000, 1046.000000)">
<g id="thumbs-down" transform="translate(704.000000, 44.000000)">
<path d="M6,16 C6,18.5 6.5,21 8,21 L16.9938335,21 C17.5495239,21 18.1819788,20.5956028 18.4072817,20.0949295 L20.8562951,14.6526776 C21.7640882,12.6353595 20.7154925,11 18.5092545,11 L15.5,11 C15.5,11 18.5,5 15,5 C12.5,5 11.5,11 8,11 C6.5,11 6,13.5 6,16 Z" id="Path-188" stroke-linejoin="round" transform="translate(13.591488, 13.000000) scale(1, -1) translate(-13.591488, -13.000000) "></path>
<path d="M4,4.5 C4,4.5 3,7 3,10 C3,13 4,15.5 4,15.5" id="Path-189" transform="translate(3.500000, 10.000000) scale(1, -1) translate(-3.500000, -10.000000) "></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
<title>download</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="Artboard-4" transform="translate(-180.000000, -291.000000)" stroke="#585858" stroke-width="2">
<g id="84" transform="translate(180.000000, 291.000000)">
<path d="M12,3 L12,15" id="Path-58"></path>
<polyline id="Path-59" stroke-linejoin="round" transform="translate(12.000000, 14.000000) rotate(-270.000000) translate(-12.000000, -14.000000) " points="9 8 15 14 9 20"></polyline>
<path d="M3,18 L3,20.0590859 C3,20.6127331 3.44494889,21.0615528 3.99340349,21.0615528 L20.0067018,21.0615528 C20.5553434,21.0615528 21.0001052,20.6098102 21.0001051,20.0590859 L21.0001049,18" id="Path-12" stroke-linejoin="round"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="Artboard-4" transform="translate(-796.000000, -1046.000000)" stroke="#585858" stroke-width="2">
<g id="Extras" transform="translate(48.000000, 1046.000000)">
<g id="eye-closed" transform="translate(760.000000, 12.000000) scale(1, -1) translate(-760.000000, -12.000000) translate(748.000000, 0.000000)">
<path d="M2,14 C2,14 5,7 12,7 C19,7 22,14 22,14" id="Path-80" stroke-linejoin="round"></path>
<path d="M12,7 L12,5" id="Path-81"></path>
<path d="M18,8.5 L19,7" id="Path-81"></path>
<path d="M21,12 L22.5,11" id="Path-81"></path>
<path d="M1.5,12 L3,11" id="Path-81" transform="translate(2.250000, 11.500000) scale(1, -1) translate(-2.250000, -11.500000) "></path>
<path d="M5,8.5 L6,7" id="Path-81" transform="translate(5.500000, 7.750000) scale(-1, 1) translate(-5.500000, -7.750000) "></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
<title>thumbs-up</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
<g id="Artboard-4" transform="translate(-708.000000, -643.000000)" stroke="#ffffff" stroke-width="2">
<g id="256" transform="translate(708.000000, 643.000000)">
<path d="M6,14 C6,16.5 6.5,19 8,19 L16.9938335,19 C17.5495239,19 18.1819788,18.5956028 18.4072817,18.0949295 L20.8562951,12.6526776 C21.7640882,10.6353595 20.7154925,9 18.5092545,9 L15.5,9 C15.5,9 18.5,3 15,3 C12.5,3 11.5,9 8,9 C6.5,9 6,11.5 6,14 Z" id="Path-188" stroke-linejoin="round"></path>
<path d="M4,8.5 C4,8.5 3,11 3,14 C3,17 4,19.5 4,19.5" id="Path-189"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -19,22 +19,34 @@
} }
} }
@mixin orange-button {
color: #fff;
background-color: $orange-color;
&:hover {
background-color: $orange-hoover-color;
}
}
@mixin grey-button {
background-color: $grey-color;
color: #585858;
&:hover {
background-color: $grey-hoover-color;
}
}
@mixin peertube-button { @mixin peertube-button {
border: none; border: none;
color: #fff;
font-weight: $font-semibold; font-weight: $font-semibold;
font-size: 15px; font-size: 15px;
height: $button-height; height: $button-height;
line-height: $button-height; line-height: $button-height;
border-radius: 3px; border-radius: 3px;
text-align: center; text-align: center;
background-color: $orange-color;
padding: 0 17px 0 13px; padding: 0 17px 0 13px;
cursor: pointer; cursor: pointer;
&:hover {
background-color: $orange-hoover-color;
}
} }
@mixin peertube-button-link { @mixin peertube-button-link {

View File

@ -2,7 +2,8 @@ $font-regular: 400;
$font-semibold: 600; $font-semibold: 600;
$font-bold: 700; $font-bold: 700;
$grey-color: #555; $grey-color: #E5E5E5;
$grey-hoover-color: #EFEFEF;;
$orange-color: #F1680D; $orange-color: #F1680D;
$orange-hoover-color: #F97D46; $orange-hoover-color: #F97D46;
@ -17,7 +18,6 @@ $button-height: 30px;
$header-height: 50px; $header-height: 50px;
$header-border-color: #e9eff6; $header-border-color: #e9eff6;
$search-input-width: 375px; $search-input-width: 375px;
$menu-color: #fff; $menu-color: #fff;
@ -27,11 +27,3 @@ $footer-height: 30px;
$footer-margin: 30px; $footer-margin: 30px;
$footer-border-color: $header-border-color; $footer-border-color: $header-border-color;
$video-miniature-other-infos: #686767;
$video-watch-border-color: #eceef4;
$video-watch-title-height: 90px;
$video-watch-info-color: #9da0ae;
$video-watch-info-height: 120px;
$video-watch-info-padding-left: 40px;

View File

@ -138,3 +138,17 @@ p-datatable {
} }
} }
} }
.dropdown-menu {
border-radius: 3px;
box-shadow: 0 3px 6px;
font-size: 15px;
.dropdown-item {
padding: 3px 15px;
}
a {
color: #000 !important;
}
}