Add commentor name alongside fid for video comments
authorRigel Kent <sendmemail@rigelk.eu>
Wed, 18 Dec 2019 12:27:51 +0000 (13:27 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Wed, 18 Dec 2019 12:28:29 +0000 (13:28 +0100)
client/src/app/app.component.scss
client/src/app/shared/video/video-miniature.component.scss
client/src/app/videos/+video-watch/comment/video-comment.component.html
client/src/app/videos/+video-watch/comment/video-comment.component.scss
client/src/app/videos/+video-watch/video-watch.component.scss

index c95b21ca37ef8fe0346154224111a4585442e4a9..51a7a3dd1df1dddbb02fbc72407b2e3ae18aab65 100644 (file)
@@ -25,7 +25,6 @@
     height: $header-height;
     display: flex;
     align-items: center;
-    flex: 1;
     min-width: 0;
 
     .icon {
@@ -81,6 +80,7 @@
     align-items: center;
     justify-content: flex-end;
     white-space: nowrap;
+    flex: 1;
   }
 }
 
index 4789c2454c6f7743e47ac60cfb8ee0c9af0a19a7..3988cc0556380d0135a1eb524a7aeb931e9c1962 100644 (file)
@@ -3,7 +3,7 @@
 @import '_miniature';
 
 $more-button-width: 41px;
-$more-margin-right: 10px;
+$more-margin-right: 15px;
 
 .video-miniature {
   width: $video-miniature-width;
index f53852385879dd1c4111745d861a5ab5383e6ff1..e261003465bad4667f5c615114ce6187e96b42cb 100644 (file)
         <div *ngIf="highlightedComment === true" class="highlighted-comment" i18n>Highlighted comment</div>
 
         <div class="comment-account-date">
-          <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer"
-             class="comment-account"
-             [ngClass]="{ 'video-author': video.account.id === comment.account.id }"
-          >{{ comment.by }}</a>
+          <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">
+            <span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }">{{ comment.account.displayName }}</span>
+            <span class="comment-account-fid ml-1">{{ comment.by }}</span>
+          </a>
           <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]"
-             class="comment-date">{{ comment.createdAt | myFromNow }}</a>
+             class="comment-date" [title]="comment.createdAt">{{ comment.createdAt | myFromNow }}</a>
         </div>
         <div
           class="comment-html"
index 0f95078c245957eb5256fec0fefd258bab5c1eaf..d8fd5c5de9eeb0a6e37c4c8457fef7861a5100d6 100644 (file)
 
         word-break: break-all;
         color: var(--mainForegroundColor);
-        font-weight: $font-bold;
+        font-weight: 600;
         font-size: 90%;
+
+        .comment-account-fid {
+          opacity: .6;
+        }
       }
 
       .comment-date {
@@ -81,7 +85,6 @@
 
     .comment-html {
       @include peertube-word-wrap;
-      margin-bottom: 10px;
 
       // Mentions
       ::ng-deep a {
 
       }
 
+      // Paragraphs
+      ::ng-deep p {
+        margin-bottom: .3rem;
+      }
+
       &.comment-html-deleted {
         color: $grey-foreground-color;
       }
index fe6a891d54c01d11fba6e8a50d1a071047ef5d54..1b5d355f8d536d8bb022d208cd3a4ae5b1082281 100644 (file)
@@ -412,6 +412,10 @@ $video-info-margin-left: 44px;
       @media screen and (max-width: 1800px - (3* $video-miniature-width)) {
         margin-left: 1rem;
       }
+      @media screen and (max-width: 500px) {
+        margin-left: 0;
+        margin-top: .5rem;
+      }
     }
   }
 }