]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix dropdown menu in video watch
authorChocobozzz <florian.bigard@gmail.com>
Thu, 7 Dec 2017 09:02:01 +0000 (10:02 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Thu, 7 Dec 2017 09:02:01 +0000 (10:02 +0100)
19 files changed:
client/src/app/account/account-settings/account-change-password/account-change-password.component.scss
client/src/app/account/account-settings/account-details/account-details.component.scss
client/src/app/account/account-videos/account-videos.component.scss
client/src/app/header/header.component.scss
client/src/app/login/login.component.scss
client/src/app/signup/signup.component.scss
client/src/app/videos/+video-watch/video-watch.component.html
client/src/app/videos/+video-watch/video-watch.component.scss
client/src/assets/images/global/edit.svg [moved from client/src/assets/images/account/edit.svg with 100% similarity]
client/src/assets/images/video/alert.svg [new file with mode: 0644]
client/src/assets/images/video/dislike-grey.svg [moved from client/src/assets/images/video/dislike.svg with 100% similarity]
client/src/assets/images/video/dislike-white.svg [new file with mode: 0644]
client/src/assets/images/video/download.svg [new file with mode: 0644]
client/src/assets/images/video/eye-closed.svg [new file with mode: 0644]
client/src/assets/images/video/like-grey.svg [moved from client/src/assets/images/video/like.svg with 100% similarity]
client/src/assets/images/video/like-white.svg [new file with mode: 0644]
client/src/sass/_mixins.scss
client/src/sass/_variables.scss
client/src/sass/application.scss

index 75827abbfa2ca01434a449f79f09fb1334576e3e..7a4fdb34daf1acc19b7c5ec15f98ede74d782c00 100644 (file)
@@ -9,6 +9,8 @@ input[type=password] {
 
 input[type=submit] {
   @include peertube-button;
+  @include orange-button;
+
   margin-top: 15px;
 }
 
index 687166d9efb9bfeff53a84ed579c6da169286b43..5c369f9689e298917eedf7fb4663f0fdff3bf628 100644 (file)
@@ -6,6 +6,7 @@ label {
 
 input[type=submit] {
   @include peertube-button;
+  @include orange-button;
 
   display: block;
   margin-top: 15px;
index e76e3f4e589981f5631c9578e65ff163f2a59355..04aaa8e89f862c3ab391f3acf6b448b8d2123a2b 100644 (file)
@@ -42,7 +42,7 @@
     top: -2px;
 
     &.icon-edit {
-      background-image: url('../../../assets/images/account/edit.svg');
+      background-image: url('../../../assets/images/global/edit.svg');
     }
 
     &.icon-delete-grey {
index 7ba8ef26cf174f2574c124c22d4f072ad7bc401f..e7761a9df5a1f890224d867f62a866ea0917c83b 100644 (file)
@@ -10,7 +10,7 @@
 
 .icon.icon-search {
   display: inline-block;
-  background: url('../../../assets/images/header/search.svg') no-repeat;
+  background: url('../../assets/images/header/search.svg') no-repeat;
   background-size: contain;
   width: 25px;
   height: 21px;
 
 .upload-button {
   @include peertube-button-link;
+  @include orange-button;
 
   margin-right: 25px;
 
   .icon.icon-upload {
     display: inline-block;
-    background: url('../../../assets/images/header/upload.svg') no-repeat;
+    background: url('../../assets/images/header/upload.svg') no-repeat;
     background-size: contain;
     width: 22px;
     height: 24px;
index fd6981c598358b8fb33d81f4003908ddefc9a7ae..3b4326de45a6f69af40c5d2449c6f5d61a41aee8 100644 (file)
@@ -5,4 +5,5 @@ input:not([type=submit]) {
 
 input[type=submit] {
   @include peertube-button;
+  @include orange-button;
 }
index fd6981c598358b8fb33d81f4003908ddefc9a7ae..3b4326de45a6f69af40c5d2449c6f5d61a41aee8 100644 (file)
@@ -5,4 +5,5 @@ input:not([type=submit]) {
 
 input[type=submit] {
   @include peertube-button;
+  @include orange-button;
 }
index 88d89f9e458a1a99c0c0f45bb62d3712a1e65527..583da4685017ed5fb0db615e703f43179066728e 100644 (file)
       <div class="video-info-name">{{ video.name }}</div>
 
       <div class="video-info-actions">
-        <div class="action-button">
-          <span
-              class="icon icon-like" title="Like this video"
-              [ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'like' }" (click)="setLike()"
-          ></span>
+        <div *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'like' }" class="action-button">
+          <span class="icon icon-like" title="Like this video" (click)="setLike()"></span>
         </div>
 
-        <div class="action-button">
-          <span
-            class="icon icon-dislike" title="Dislike this video"
-            [ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'dislike' }" (click)="setDislike()"
-          ></span>
+        <div *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'dislike' }" class="action-button">
+          <span class="icon icon-dislike" title="Dislike this video" (click)="setDislike()"></span>
         </div>
 
         <div (click)="showShareModal()" class="action-button">
           </div>
 
           <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">
               <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>
             </li>
 
             <li *ngIf="isUserLoggedIn()" role="menuitem">
               <a class="dropdown-item" title="Report this video" href="#" (click)="showReportModal($event)">
-                <span class="glyphicon glyphicon-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
+                <span class="icon icon-alert"></span> Report
               </a>
             </li>
 
             <li *ngIf="isVideoBlacklistable()" role="menuitem">
               <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>
             </li>
           </ul>
@@ -78,7 +60,7 @@
         {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
       </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>
     </div>
index d7f47ed7570127239c13cd55a34a7cfe094d9d97..3f36410f4ca2a6bdf020b850be234a9770f9eb88 100644 (file)
@@ -6,6 +6,11 @@
   #video-element {
     width: 888px;
     height: 500px;
+
+    // VideoJS create an inner video player
+    video {
+      outline: 0;
+    }
   }
 }
 
       .video-info-actions {
         .action-button {
           @include peertube-button;
+          @include grey-button;
 
           font-size: 15px;
           font-weight: $font-semibold;
-          color: #585858;
-          background-color: #E5E5E5;
           display: inline-block;
           padding: 0 10px 0 10px;
 
-          &:hover {
-            background-color: #EFEFEF;
+          .icon {
+            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');
+            }
           }
-        }
 
-        .action-more {
-          display: inline-block;
-        }
+          &.activated {
+            @include orange-button;
 
-        .icon {
-          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.svg');
-          }
+            .icon-like {
+              background-image: url('../../../assets/images/video/like-white.svg');
+            }
 
-          &.icon-dislike {
-            background-image: url('../../../assets/images/video/dislike.svg');
+            .icon-dislike {
+              background-image: url('../../../assets/images/video/dislike-white.svg');
+            }
           }
+        }
 
-          &.icon-share {
-            background-image: url('../../../assets/images/video/share.svg');
-          }
+        .action-more {
+          display: inline-block;
 
-          &.icon-more {
-            background-image: url('../../../assets/images/video/more.svg');
+          .dropdown-menu .icon {
+            display: inline-block;
+            background-repeat: no-repeat;
+            background-size: contain;
+            width: 21px;
+            height: 21px;
+            vertical-align: middle;
+            margin-right: 5px;
+            position: relative;
+            top: -1px;
+
+            &.icon-download {
+              background-image: url('../../../assets/images/video/download.svg');
+            }
+
+            &.icon-alert {
+              background-image: url('../../../assets/images/video/alert.svg');
+            }
+
+            &.icon-blacklist {
+              background-image: url('../../../assets/images/video/eye-closed.svg');
+            }
           }
         }
       }
diff --git a/client/src/assets/images/video/alert.svg b/client/src/assets/images/video/alert.svg
new file mode 100644 (file)
index 0000000..6d3af02
--- /dev/null
@@ -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>
diff --git a/client/src/assets/images/video/dislike-white.svg b/client/src/assets/images/video/dislike-white.svg
new file mode 100644 (file)
index 0000000..cfc6eaa
--- /dev/null
@@ -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>
diff --git a/client/src/assets/images/video/download.svg b/client/src/assets/images/video/download.svg
new file mode 100644 (file)
index 0000000..5b0cca5
--- /dev/null
@@ -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>
diff --git a/client/src/assets/images/video/eye-closed.svg b/client/src/assets/images/video/eye-closed.svg
new file mode 100644 (file)
index 0000000..c5b7396
--- /dev/null
@@ -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>
diff --git a/client/src/assets/images/video/like-white.svg b/client/src/assets/images/video/like-white.svg
new file mode 100644 (file)
index 0000000..88e5f6a
--- /dev/null
@@ -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>
index 6a18f7a76d31d77f4552f25fed97b0d32eb8d28d..ddc9c6766695802df1cbc082840ba29a06d13017 100644 (file)
   }
 }
 
+@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 {
   border: none;
-  color: #fff;
   font-weight: $font-semibold;
   font-size: 15px;
   height: $button-height;
   line-height: $button-height;
   border-radius: 3px;
   text-align: center;
-  background-color: $orange-color;
   padding: 0 17px 0 13px;
   cursor: pointer;
-
-  &:hover {
-    background-color: $orange-hoover-color;
-  }
 }
 
 @mixin peertube-button-link {
index cc1cee75be5e9553b7c38983a245711f9b8c689f..0d310409bbfdc676829278d1af98b18750b0bd5e 100644 (file)
@@ -2,7 +2,8 @@ $font-regular: 400;
 $font-semibold: 600;
 $font-bold: 700;
 
-$grey-color: #555;
+$grey-color: #E5E5E5;
+$grey-hoover-color: #EFEFEF;;
 $orange-color: #F1680D;
 $orange-hoover-color: #F97D46;
 
@@ -17,7 +18,6 @@ $button-height: 30px;
 
 $header-height: 50px;
 $header-border-color: #e9eff6;
-
 $search-input-width: 375px;
 
 $menu-color: #fff;
@@ -27,11 +27,3 @@ $footer-height: 30px;
 $footer-margin: 30px;
 
 $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;
index b860e1bf2b4ede5f560dd51fea6968a385c6c354..c810310210b8659e6c483c9fa916418f663e527d 100644 (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;
+  }
+}