Add commentor name alongside fid for video comments

pull/2356/head
Rigel Kent 2019-12-18 13:27:51 +01:00
parent 9f0327aeb3
commit 5dfb7c1dec
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
5 changed files with 21 additions and 9 deletions

View 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;
}
}

View 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;

View File

@ -19,12 +19,12 @@
<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"

View File

@ -67,8 +67,12 @@
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 {
@ -96,6 +99,11 @@
}
// Paragraphs
::ng-deep p {
margin-bottom: .3rem;
}
&.comment-html-deleted {
color: $grey-foreground-color;
}

View 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;
}
}
}
}