<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>
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'
constructor (
private i18n: I18n,
private route: ActivatedRoute,
+ private notifier: Notifier,
private authService: AuthService,
private videoChannelService: VideoChannelService,
private restExtractor: RestExtractor,
isUserLoggedIn () {
return this.authService.isLoggedIn()
}
+
+ activateCopiedMessage () {
+ this.notifier.success(this.i18n('Username copied'))
+ }
}
<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>