-<div class="wrapper" [ngClass]="{ 'generic-channel': genericChannel }">
+<div class="wrapper">
<my-actor-avatar
- class="channel" [channel]="video.channel"
- [internalHref]="[ '/c', video.byVideoChannel ]" [title]="channelLinkTitle"
+ *ngIf="showChannel"
+ class="channel"
+ [class.main-avatar]="showChannel"
+ [channel]="video.channel"
+ [internalHref]="[ '/c', video.byVideoChannel ]"
+ [title]="channelLinkTitle"
></my-actor-avatar>
<my-actor-avatar
- class="account" [account]="video.account"
- [internalHref]="[ '/a', video.byAccount ]" [title]="accountLinkTitle">
+ *ngIf="showAccount"
+ class="account"
+ [class.main-avatar]="!showChannel"
+ [class.second-avatar]="showChannel"
+ [account]="video.account"
+ [internalHref]="[ '/a', video.byAccount ]"
+ [title]="accountLinkTitle">
</my-actor-avatar>
</div>
position: relative;
margin-bottom: 5px;
- &.generic-channel {
- .account {
- @include main();
- }
-
- .channel {
- display: none !important;
- }
+ .main-avatar {
+ @include main();
}
- &:not(.generic-channel) {
- .account {
- @include secondary();
- }
-
- .channel {
- @include main();
- }
+ .second-avatar {
+ @include secondary();
}
}
@Input() video: Video
@Input() byAccount: string
- @Input() genericChannel: boolean
+ @Input() showAccount: boolean
+ @Input() showChannel: boolean
channelLinkTitle = ''
accountLinkTitle = ''
<div class="pt-3 border-top video-info-channel d-flex">
<div class="video-info-channel-left d-flex">
- <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel>
+ <my-video-avatar-channel [video]="video" [showAccount]="!onlyShowAuthorChannel" [showChannel]="!isChannelDisplayNameGeneric() || onlyShowAuthorChannel"></my-video-avatar-channel>
<div class="video-info-channel-left-links ml-1">
- <ng-container *ngIf="!isChannelDisplayNameGeneric()">
- <a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page">
+ <ng-container *ngIf="!isChannelDisplayNameGeneric() || onlyShowAuthorChannel">
+ <a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page" [class.single-link]="onlyShowAuthorChannel">
{{ video.channel.displayName }}
</a>
- <a [routerLink]="[ '/a', video.byAccount ]" i18n-title title="Account page">
+ <a [routerLink]="[ '/a', video.byAccount ]" i18n-title title="Account page" *ngIf="!onlyShowAuthorChannel">
<span i18n>By {{ video.byAccount }}</span>
</a>
</ng-container>
- <ng-container *ngIf="isChannelDisplayNameGeneric()">
+ <ng-container *ngIf="isChannelDisplayNameGeneric() && !onlyShowAuthorChannel">
<a [routerLink]="[ '/a', video.byAccount ]" class="single-link" i18n-title title="Account page">
<span i18n>{{ video.byAccount }}</span>
</a>
remoteServerDown = false
+ onlyShowAuthorChannel: boolean
+
private nextVideoUUID = ''
private nextVideoTitle = ''
ngOnInit () {
this.serverConfig = this.serverService.getHTMLConfig()
+ this.onlyShowAuthorChannel = this.serverConfig.instance.onlyShowAuthorChannel
+
PeertubePlayerManager.initState()
this.loadRouteParams()
</span>
<a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/c', video.byVideoChannel ]">
- {{ video.byAccount }}
+ {{ serverConfig.instance.showAuthorDisplayNameInMiniatures ? video.account.displayName : video.byAccount }}
</a>
<a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/c', video.byVideoChannel ]">
- {{ video.byVideoChannel }}
+ {{ serverConfig.instance.showAuthorDisplayNameInMiniatures ? video.channel.displayName : video.byVideoChannel }}
</a>
<div class="video-info-privacy">
}
private setUpBy () {
+ if (this.serverConfig.instance.onlyShowAuthorChannel === true) {
+ this.ownerDisplayType = 'videoChannel'
+ return
+ }
+
const accountName = this.video.account.name
// If the video channel name is an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12)
terms: 'No terms for now.' # Support markdown
code_of_conduct: '' # Supports markdown
+ only_show_channel_author: false
+ show_author_display_name_in_miniatures: false
+
# Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
moderation_information: '' # Supports markdown
terms: 'No terms for now.' # Support markdown
code_of_conduct: '' # Supports markdown
+ only_show_channel_author: false
+ show_author_display_name_in_miniatures: false
+
# Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
moderation_information: '' # Supports markdown
},
get ROBOTS () { return config.get<string>('instance.robots') },
get SECURITYTXT () { return config.get<string>('instance.securitytxt') },
- get SECURITYTXT_CONTACT () { return config.get<string>('admin.email') }
+ get SECURITYTXT_CONTACT () { return config.get<string>('admin.email') },
+
+ get ONLY_SHOW_CHANNEL_AUTHOR () { return config.get<boolean>('instance.only_show_channel_author') },
+ get SHOW_AUTHOR_DISPLAY_NAME_IN_MINIATURES () { return config.get<boolean>('instance.show_author_display_name_in_miniatures') }
},
SERVICES: {
TWITTER: {
customizations: {
javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
- }
+ },
+ onlyShowAuthorChannel: CONFIG.INSTANCE.ONLY_SHOW_CHANNEL_AUTHOR,
+ showAuthorDisplayNameInMiniatures: CONFIG.INSTANCE.SHOW_AUTHOR_DISPLAY_NAME_IN_MINIATURES
},
search: {
remoteUri: {
javascript: string
css: string
}
+ onlyShowAuthorChannel: boolean
+ showAuthorDisplayNameInMiniatures: boolean
}
search: {