<ng-container *ngFor="let video of (videos$ | async); let i = index; let length = count">
<my-video-miniature
[displayOptions]="displayOptions" [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow"
- (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()">
+ (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()"
+ actorImageSize="32"
+ >
</my-video-miniature>
<hr *ngIf="!playlist && i == 0 && length > 1" />
url: string
}
+export type ActorAvatarSize = '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120'
+
@Component({
selector: 'my-actor-avatar',
styleUrls: [ './actor-avatar.component.scss' ],
@Input() previewImage: SafeResourceUrl
- @Input() size: '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120'
+ @Input() size: ActorAvatarSize
// Use an external link
@Input() href: string
<div class="d-flex video-miniature-meta">
<my-actor-avatar
*ngIf="displayOptions.avatar && displayOwnerVideoChannel()" [title]="channelLinkTitle"
- [channel]="video.channel" size="40" [internalHref]="[ '/video-channels', video.byVideoChannel ]"
+ [channel]="video.channel" [size]="actorImageSize" [internalHref]="[ '/video-channels', video.byVideoChannel ]"
></my-actor-avatar>
<my-actor-avatar
*ngIf="displayOptions.avatar && displayOwnerAccount()" [title]="channelLinkTitle"
- [account]="video.account" size="40" [internalHref]="[ '/video-channels', video.byVideoChannel ]"
+ [account]="video.account" [size]="actorImageSize" [internalHref]="[ '/video-channels', video.byVideoChannel ]"
></my-actor-avatar>
<div class="w-100 d-flex flex-column">
} from '@angular/core'
import { AuthService, ScreenService, ServerService, User } from '@app/core'
import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models'
+import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component'
import { Video } from '../shared-main'
import { VideoPlaylistService } from '../shared-video-playlist'
import { VideoActionsDisplayType } from './video-actions-dropdown.component'
}
@Input() displayVideoActions = true
+ @Input() actorImageSize: ActorAvatarSize = '40'
+
@Input() displayAsRow = false
@Input() videoLinkType: VideoLinkType = 'internal'
@mixin miniature-name {
@include ellipsis-multiline(1.1em, 2);
+ @include peertube-word-wrap(false);
- word-break: break-all;
- word-wrap: break-word;
transition: color 0.2s;
font-weight: $font-semibold;
color: pvar(--mainForegroundColor);
}
}
-@mixin peertube-word-wrap {
+@mixin peertube-word-wrap ($with-hyphen: true) {
word-break: break-word;
word-wrap: break-word;
overflow-wrap: break-word;
- hyphens: auto;
+
+ @if $with-hyphen {
+ hyphens: auto;
+ }
}
@mixin apply-svg-color ($color) {