mirror of https://github.com/Chocobozzz/PeerTube
parent
4d3e611dd2
commit
46ed55544c
|
@ -1,11 +1,20 @@
|
||||||
<div class="wrapper" [ngClass]="{ 'generic-channel': genericChannel }">
|
<div class="wrapper">
|
||||||
<my-actor-avatar
|
<my-actor-avatar
|
||||||
class="channel" [channel]="video.channel"
|
*ngIf="showChannel"
|
||||||
[internalHref]="[ '/c', video.byVideoChannel ]" [title]="channelLinkTitle"
|
class="channel"
|
||||||
|
[class.main-avatar]="showChannel"
|
||||||
|
[channel]="video.channel"
|
||||||
|
[internalHref]="[ '/c', video.byVideoChannel ]"
|
||||||
|
[title]="channelLinkTitle"
|
||||||
></my-actor-avatar>
|
></my-actor-avatar>
|
||||||
|
|
||||||
<my-actor-avatar
|
<my-actor-avatar
|
||||||
class="account" [account]="video.account"
|
*ngIf="showAccount"
|
||||||
[internalHref]="[ '/a', video.byAccount ]" [title]="accountLinkTitle">
|
class="account"
|
||||||
|
[class.main-avatar]="!showChannel"
|
||||||
|
[class.second-avatar]="showChannel"
|
||||||
|
[account]="video.account"
|
||||||
|
[internalHref]="[ '/a', video.byAccount ]"
|
||||||
|
[title]="accountLinkTitle">
|
||||||
</my-actor-avatar>
|
</my-actor-avatar>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -20,23 +20,11 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
|
||||||
&.generic-channel {
|
.main-avatar {
|
||||||
.account {
|
@include main();
|
||||||
@include main();
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.generic-channel) {
|
.second-avatar {
|
||||||
.account {
|
@include secondary();
|
||||||
@include secondary();
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel {
|
|
||||||
@include main();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@ export class VideoAvatarChannelComponent implements OnInit {
|
||||||
@Input() video: Video
|
@Input() video: Video
|
||||||
@Input() byAccount: string
|
@Input() byAccount: string
|
||||||
|
|
||||||
@Input() genericChannel: boolean
|
@Input() showAccount: boolean
|
||||||
|
@Input() showChannel: boolean
|
||||||
|
|
||||||
channelLinkTitle = ''
|
channelLinkTitle = ''
|
||||||
accountLinkTitle = ''
|
accountLinkTitle = ''
|
||||||
|
|
|
@ -60,19 +60,19 @@
|
||||||
|
|
||||||
<div class="pt-3 border-top video-info-channel d-flex">
|
<div class="pt-3 border-top video-info-channel d-flex">
|
||||||
<div class="video-info-channel-left 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">
|
<div class="video-info-channel-left-links ml-1">
|
||||||
<ng-container *ngIf="!isChannelDisplayNameGeneric()">
|
<ng-container *ngIf="!isChannelDisplayNameGeneric() || onlyShowAuthorChannel">
|
||||||
<a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page">
|
<a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page" [class.single-link]="onlyShowAuthorChannel">
|
||||||
{{ video.channel.displayName }}
|
{{ video.channel.displayName }}
|
||||||
</a>
|
</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>
|
<span i18n>By {{ video.byAccount }}</span>
|
||||||
</a>
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngIf="isChannelDisplayNameGeneric()">
|
<ng-container *ngIf="isChannelDisplayNameGeneric() && !onlyShowAuthorChannel">
|
||||||
<a [routerLink]="[ '/a', video.byAccount ]" class="single-link" i18n-title title="Account page">
|
<a [routerLink]="[ '/a', video.byAccount ]" class="single-link" i18n-title title="Account page">
|
||||||
<span i18n>{{ video.byAccount }}</span>
|
<span i18n>{{ video.byAccount }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -67,6 +67,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
remoteServerDown = false
|
remoteServerDown = false
|
||||||
|
|
||||||
|
onlyShowAuthorChannel: boolean
|
||||||
|
|
||||||
private nextVideoUUID = ''
|
private nextVideoUUID = ''
|
||||||
private nextVideoTitle = ''
|
private nextVideoTitle = ''
|
||||||
|
|
||||||
|
@ -116,6 +118,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
this.serverConfig = this.serverService.getHTMLConfig()
|
this.serverConfig = this.serverService.getHTMLConfig()
|
||||||
|
|
||||||
|
this.onlyShowAuthorChannel = this.serverConfig.instance.onlyShowAuthorChannel
|
||||||
|
|
||||||
PeertubePlayerManager.initState()
|
PeertubePlayerManager.initState()
|
||||||
|
|
||||||
this.loadRouteParams()
|
this.loadRouteParams()
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/c', video.byVideoChannel ]">
|
<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>
|
||||||
<a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/c', video.byVideoChannel ]">
|
<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>
|
</a>
|
||||||
|
|
||||||
<div class="video-info-privacy">
|
<div class="video-info-privacy">
|
||||||
|
|
|
@ -240,6 +240,11 @@ export class VideoMiniatureComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private setUpBy () {
|
private setUpBy () {
|
||||||
|
if (this.serverConfig.instance.onlyShowAuthorChannel === true) {
|
||||||
|
this.ownerDisplayType = 'videoChannel'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const accountName = this.video.account.name
|
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)
|
// If the video channel name is an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12)
|
||||||
|
|
|
@ -399,6 +399,9 @@ instance:
|
||||||
terms: 'No terms for now.' # Support markdown
|
terms: 'No terms for now.' # Support markdown
|
||||||
code_of_conduct: '' # Supports 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
|
# Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
|
||||||
moderation_information: '' # Supports markdown
|
moderation_information: '' # Supports markdown
|
||||||
|
|
||||||
|
|
|
@ -409,6 +409,9 @@ instance:
|
||||||
terms: 'No terms for now.' # Support markdown
|
terms: 'No terms for now.' # Support markdown
|
||||||
code_of_conduct: '' # Supports 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
|
# Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
|
||||||
moderation_information: '' # Supports markdown
|
moderation_information: '' # Supports markdown
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,10 @@ const CONFIG = {
|
||||||
},
|
},
|
||||||
get ROBOTS () { return config.get<string>('instance.robots') },
|
get ROBOTS () { return config.get<string>('instance.robots') },
|
||||||
get SECURITYTXT () { return config.get<string>('instance.securitytxt') },
|
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: {
|
SERVICES: {
|
||||||
TWITTER: {
|
TWITTER: {
|
||||||
|
|
|
@ -51,7 +51,9 @@ class ServerConfigManager {
|
||||||
customizations: {
|
customizations: {
|
||||||
javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
|
javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
|
||||||
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
|
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
|
||||||
}
|
},
|
||||||
|
onlyShowAuthorChannel: CONFIG.INSTANCE.ONLY_SHOW_CHANNEL_AUTHOR,
|
||||||
|
showAuthorDisplayNameInMiniatures: CONFIG.INSTANCE.SHOW_AUTHOR_DISPLAY_NAME_IN_MINIATURES
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
remoteUri: {
|
remoteUri: {
|
||||||
|
|
|
@ -43,6 +43,8 @@ export interface ServerConfig {
|
||||||
javascript: string
|
javascript: string
|
||||||
css: string
|
css: string
|
||||||
}
|
}
|
||||||
|
onlyShowAuthorChannel: boolean
|
||||||
|
showAuthorDisplayNameInMiniatures: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
search: {
|
search: {
|
||||||
|
|
Loading…
Reference in New Issue