1
0
Fork 0

(consistency) channel nameWithHost copy button, comment avatar link

This commit is contained in:
Rigel Kent 2019-12-16 22:13:07 +01:00
parent 2de7f588eb
commit a0dedc02ca
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
6 changed files with 28 additions and 10 deletions

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

View File

@ -10,5 +10,11 @@
.actor-name {
flex-grow: 1;
.copy-button {
border: none;
padding: 5px;
margin-top: -2px;
}
}
}

View 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'))
}
}

View File

@ -17,7 +17,6 @@ menu {
padding: 0;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
color: var(--menuForegroundColor);
display: flex;
flex-direction: column;

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

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