Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

(consistency) channel nameWithHost copy button, comment avatar link

Rigel Kenta0dedc02ca87
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index 600b7a3657..f8b7fa5838 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -7,7 +7,13 @@
<div class="actor-info">
<div class="actor-names">
<div class="actor-display-name">{{ videoChannel.displayName }}</div>
- <div class="actor-name">{{ videoChannel.nameWithHost }}</div>
+ <div class="actor-name">{{ videoChannel.nameWithHost }}
+ <button ngxClipboard [cbContent]="videoChannel.nameWithHost" (click)="activateCopiedMessage()"
+ class="btn btn-outline-secondary btn-sm copy-button"
+ >
+ <span class="glyphicon glyphicon-copy"></span>
+ </button>
+ </div>
<my-subscribe-button #subscribeButton [videoChannel]="videoChannel"></my-subscribe-button>
</div>
diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss
index 711b1839da..d295750277 100644
--- a/client/src/app/+video-channels/video-channels.component.scss
+++ b/client/src/app/+video-channels/video-channels.component.scss
@@ -10,5 +10,11 @@
.actor-name {
flex-grow: 1;
+
+ .copy-button {
+ border: none;
+ padding: 5px;
+ margin-top: -2px;
+ }
}
}
\ No newline at end of file
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts
index d2975b67c1..5ef46c58aa 100644
--- a/client/src/app/+video-channels/video-channels.component.ts
+++ b/client/src/app/+video-channels/video-channels.component.ts
@@ -5,7 +5,7 @@ import { VideoChannelService } from '@app/shared/video-channel/video-channel.ser
import { RestExtractor } from '@app/shared'
import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators'
import { Subscription } from 'rxjs'
-import { AuthService } from '@app/core'
+import { AuthService, Notifier } from '@app/core'
import { Hotkey, HotkeysService } from 'angular2-hotkeys'
import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component'
import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -25,6 +25,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
constructor (
private i18n: I18n,
private route: ActivatedRoute,
+ private notifier: Notifier,
private authService: AuthService,
private videoChannelService: VideoChannelService,
private restExtractor: RestExtractor,
@@ -62,4 +63,8 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
isUserLoggedIn () {
return this.authService.isLoggedIn()
}
+
+ activateCopiedMessage () {
+ this.notifier.success(this.i18n('Username copied'))
+ }
}
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss
index 0c9519a203..79a28d258f 100644
--- a/client/src/app/menu/menu.component.scss
+++ b/client/src/app/menu/menu.component.scss
@@ -17,7 +17,6 @@ menu {
padding: 0;
height: 100%;
overflow-x: hidden;
- overflow-y: auto;
color: var(--menuForegroundColor);
display: flex;
flex-direction: column;
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.html b/client/src/app/videos/+video-watch/comment/video-comment.component.html
index 80e8cae1d4..04bb1f7a23 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.component.html
+++ b/client/src/app/videos/+video-watch/comment/video-comment.component.html
@@ -1,11 +1,12 @@
<div class="root-comment">
<div class="left">
- <img
- *ngIf="!comment.isDeleted"
- class="comment-avatar"
- [src]="comment.accountAvatarUrl"
- alt="Avatar"
- />
+ <a *ngIf="!comment.isDeleted" [href]="comment.account.url" target="_blank" rel="noopener noreferrer">
+ <img
+ class="comment-avatar"
+ [src]="comment.accountAvatarUrl"
+ alt="Avatar"
+ />
+ </a>
<div class="vertical-border"></div>
</div>
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 a8400c1962..ddf6ccceac 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -155,9 +155,10 @@ $video-info-margin-left: 44px;
.video-info-date-views {
flex-grow: 1;
+ align-self: start;
margin-bottom: 10px;
margin-right: 10px;
- font-size: 16px;
+ font-size: 1em;
}
.video-info-channel {