From 80dea8f4d6293f8da72483ddb295e92d0b53b42f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Oct 2021 14:25:30 +0200 Subject: [PATCH] Rename config key --- .../shared-video-miniature/video-miniature.component.ts | 8 ++++++-- config/default.yaml | 4 +++- config/production.yaml.example | 4 +++- server/initializers/config.ts | 2 +- server/lib/server-config-manager.ts | 2 +- shared/models/server/server-config.model.ts | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts index 69f00fb10..37ff224ab 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts @@ -101,11 +101,15 @@ export class VideoMiniatureComponent implements OnInit { ) {} get authorAccount () { - return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.account.displayName : this.video.byAccount + return this.serverConfig.client.videos.miniature.preferAuthorDisplayName + ? this.video.account.displayName + : this.video.byAccount } get authorChannel () { - return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.channel.displayName : this.video.byVideoChannel + return this.serverConfig.client.videos.miniature.preferAuthorDisplayName + ? this.video.channel.displayName + : this.video.byVideoChannel } get isVideoBlur () { diff --git a/config/default.yaml b/config/default.yaml index dec34affd..8ad1d915f 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -75,10 +75,12 @@ email: subject: prefix: "[PeerTube]" +# PeerTube client/interface configuration client: videos: miniature: - show_author_display_name: false + # By default PeerTube client displays author username + prefer_author_display_name: false # From the project root directory storage: diff --git a/config/production.yaml.example b/config/production.yaml.example index a55c99eaa..5b87cbf5f 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -73,10 +73,12 @@ email: subject: prefix: "[PeerTube]" +# PeerTube client/interface configuration client: videos: miniature: - show_author_display_name: false + # By default PeerTube client displays author username + prefer_author_display_name: false # From the project root directory storage: diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 5ee08cf12..a37aae551 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -62,7 +62,7 @@ const CONFIG = { CLIENT: { VIDEOS: { MINIATURE: { - get SHOW_AUTHOR_DISPLAY_NAME () { return config.get('client.videos.miniature.show_author_display_name') } + get PREFER_AUTHOR_DISPLAY_NAME () { return config.get('client.videos.miniature.prefer_author_display_name') } } } }, diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts index 72fcf54cd..58a37b56c 100644 --- a/server/lib/server-config-manager.ts +++ b/server/lib/server-config-manager.ts @@ -46,7 +46,7 @@ class ServerConfigManager { client: { videos: { miniature: { - showAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.SHOW_AUTHOR_DISPLAY_NAME + preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME } } }, diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index df9380844..4bd4b0cb4 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts @@ -37,7 +37,7 @@ export interface ServerConfig { client: { videos: { miniature: { - showAuthorDisplayName: boolean + preferAuthorDisplayName: boolean } } } -- 2.41.0