(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-info">
<div class="actor-names"> <div class="actor-names">
<div class="actor-display-name">{{ videoChannel.displayName }}</div> <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> <my-subscribe-button #subscribeButton [videoChannel]="videoChannel"></my-subscribe-button>
</div> </div>

View File

@ -10,5 +10,11 @@
.actor-name { .actor-name {
flex-grow: 1; 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 { RestExtractor } from '@app/shared'
import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators' import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators'
import { Subscription } from 'rxjs' import { Subscription } from 'rxjs'
import { AuthService } from '@app/core' import { AuthService, Notifier } from '@app/core'
import { Hotkey, HotkeysService } from 'angular2-hotkeys' import { Hotkey, HotkeysService } from 'angular2-hotkeys'
import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component'
import { I18n } from '@ngx-translate/i18n-polyfill' import { I18n } from '@ngx-translate/i18n-polyfill'
@ -25,6 +25,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
constructor ( constructor (
private i18n: I18n, private i18n: I18n,
private route: ActivatedRoute, private route: ActivatedRoute,
private notifier: Notifier,
private authService: AuthService, private authService: AuthService,
private videoChannelService: VideoChannelService, private videoChannelService: VideoChannelService,
private restExtractor: RestExtractor, private restExtractor: RestExtractor,
@ -62,4 +63,8 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {
isUserLoggedIn () { isUserLoggedIn () {
return this.authService.isLoggedIn() return this.authService.isLoggedIn()
} }
activateCopiedMessage () {
this.notifier.success(this.i18n('Username copied'))
}
} }

View File

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

View File

@ -1,11 +1,12 @@
<div class="root-comment"> <div class="root-comment">
<div class="left"> <div class="left">
<img <a *ngIf="!comment.isDeleted" [href]="comment.account.url" target="_blank" rel="noopener noreferrer">
*ngIf="!comment.isDeleted" <img
class="comment-avatar" class="comment-avatar"
[src]="comment.accountAvatarUrl" [src]="comment.accountAvatarUrl"
alt="Avatar" alt="Avatar"
/> />
</a>
<div class="vertical-border"></div> <div class="vertical-border"></div>
</div> </div>

View File

@ -155,9 +155,10 @@ $video-info-margin-left: 44px;
.video-info-date-views { .video-info-date-views {
flex-grow: 1; flex-grow: 1;
align-self: start;
margin-bottom: 10px; margin-bottom: 10px;
margin-right: 10px; margin-right: 10px;
font-size: 16px; font-size: 1em;
} }
.video-info-channel { .video-info-channel {