Always copy full actor handle in video-channels view
authorRigel Kent <sendmemail@rigelk.eu>
Thu, 5 Mar 2020 22:49:12 +0000 (23:49 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Thu, 5 Mar 2020 22:49:12 +0000 (23:49 +0100)
client/src/app/+accounts/accounts.component.ts
client/src/app/+video-channels/video-channels.component.html
client/src/app/shared/video-channel/video-channel.model.ts

index 061eb953ac63b5db3055807a34b4072de1c7fdcb..2ca6062c2c9030b5bf48aa2b4237ce0720c711a3 100644 (file)
@@ -3,8 +3,8 @@ import { ActivatedRoute } from '@angular/router'
 import { AccountService } from '@app/shared/account/account.service'
 import { Account } from '@app/shared/account/account.model'
 import { RestExtractor, UserService } from '@app/shared'
-import { catchError, distinctUntilChanged, first, map, switchMap, tap } from 'rxjs/operators'
-import { forkJoin, Subscription } from 'rxjs'
+import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators'
+import { Subscription } from 'rxjs'
 import { AuthService, Notifier, RedirectService } from '@app/core'
 import { User, UserRight } from '../../../../shared'
 import { I18n } from '@ngx-translate/i18n-polyfill'
index 1087de113aba42014184af8729ad75e889219861..6192b8ae5235b8f69cb678274ee40a1b90d755e0 100644 (file)
@@ -9,7 +9,7 @@
           <div class="actor-display-name">{{ videoChannel.displayName }}</div>
           <div class="actor-name">
             <span>{{ videoChannel.nameWithHost }}</span>
-            <button [cdkCopyToClipboard]="videoChannel.nameWithHost" (click)="activateCopiedMessage()"
+            <button [cdkCopyToClipboard]="videoChannel.nameWithHostForced" (click)="activateCopiedMessage()"
                     class="btn btn-outline-secondary btn-sm copy-button"
             >
               <span class="glyphicon glyphicon-copy"></span>
index 309b614aef8cda1bf502eeb49f6ca3bdd3050da7..fec050cdeccc4b2b691c53c47ddb6ebc18a684aa 100644 (file)
@@ -8,6 +8,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
   support: string
   isLocal: boolean
   nameWithHost: string
+  nameWithHostForced: string
   ownerAccount?: Account
   ownerBy?: string
   ownerAvatarUrl?: string
@@ -20,6 +21,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
     this.support = hash.support
     this.isLocal = hash.isLocal
     this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host)
+    this.nameWithHostForced = Actor.CREATE_BY_STRING(this.name, this.host, true)
 
     if (hash.ownerAccount) {
       this.ownerAccount = hash.ownerAccount