(consistency) channel nameWithHost copy button, comment avatar link
authorRigel Kent <sendmemail@rigelk.eu>
Mon, 16 Dec 2019 21:13:07 +0000 (22:13 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Mon, 16 Dec 2019 21:13:07 +0000 (22:13 +0100)
client/src/app/+video-channels/video-channels.component.html
client/src/app/+video-channels/video-channels.component.scss
client/src/app/+video-channels/video-channels.component.ts
client/src/app/menu/menu.component.scss
client/src/app/videos/+video-watch/comment/video-comment.component.html
client/src/app/videos/+video-watch/video-watch.component.scss

index 600b7a36577c1cd9039902efe40af36dc2c7017b..f8b7fa583839017c7f30f34abfa44c564cc5f16e 100644 (file)
@@ -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>
index 711b1839da3a583e8fba7578d317c166db5f2889..d29575027736790cd8368f0397f55d9db121f89f 100644 (file)
 
   .actor-name {
     flex-grow: 1;
+
+    .copy-button {
+      border: none;
+      padding: 5px;
+      margin-top: -2px;
+    }
   }
 }
\ No newline at end of file
index d2975b67c1720864213fa41ed216375c3ba6cfee..5ef46c58aaaf3771a6b71ec3347cc7502fb1ee12 100644 (file)
@@ -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'))
+  }
 }
index 0c9519a20320556462f8c48db604b2e8019822ad..79a28d258fd3a0dd0e59b677571ab14b3603ba7d 100644 (file)
@@ -17,7 +17,6 @@ menu {
   padding: 0;
   height: 100%;
   overflow-x: hidden;
-  overflow-y: auto;
   color: var(--menuForegroundColor);
   display: flex;
   flex-direction: column;
index 80e8cae1d4f26fe0f8da433527141ecf29f89864..04bb1f7a23e8b923309c186257c118f1c1d09b8b 100644 (file)
@@ -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>
index a8400c1962eaa6382e0993c2c992ce35821e10f9..ddf6ccceac6e0297d2868b7817b838909e822ae0 100644 (file)
@@ -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 {