aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.ts8
-rw-r--r--config/default.yaml4
-rw-r--r--config/production.yaml.example4
-rw-r--r--server/initializers/config.ts2
-rw-r--r--server/lib/server-config-manager.ts2
-rw-r--r--shared/models/server/server-config.model.ts2
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 {
101 ) {} 101 ) {}
102 102
103 get authorAccount () { 103 get authorAccount () {
104 return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.account.displayName : this.video.byAccount 104 return this.serverConfig.client.videos.miniature.preferAuthorDisplayName
105 ? this.video.account.displayName
106 : this.video.byAccount
105 } 107 }
106 108
107 get authorChannel () { 109 get authorChannel () {
108 return this.serverConfig.client.videos.miniature.showAuthorDisplayName ? this.video.channel.displayName : this.video.byVideoChannel 110 return this.serverConfig.client.videos.miniature.preferAuthorDisplayName
111 ? this.video.channel.displayName
112 : this.video.byVideoChannel
109 } 113 }
110 114
111 get isVideoBlur () { 115 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:
75 subject: 75 subject:
76 prefix: "[PeerTube]" 76 prefix: "[PeerTube]"
77 77
78# PeerTube client/interface configuration
78client: 79client:
79 videos: 80 videos:
80 miniature: 81 miniature:
81 show_author_display_name: false 82 # By default PeerTube client displays author username
83 prefer_author_display_name: false
82 84
83# From the project root directory 85# From the project root directory
84storage: 86storage:
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:
73 subject: 73 subject:
74 prefix: "[PeerTube]" 74 prefix: "[PeerTube]"
75 75
76# PeerTube client/interface configuration
76client: 77client:
77 videos: 78 videos:
78 miniature: 79 miniature:
79 show_author_display_name: false 80 # By default PeerTube client displays author username
81 prefer_author_display_name: false
80 82
81# From the project root directory 83# From the project root directory
82storage: 84storage:
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 = {
62 CLIENT: { 62 CLIENT: {
63 VIDEOS: { 63 VIDEOS: {
64 MINIATURE: { 64 MINIATURE: {
65 get SHOW_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.show_author_display_name') } 65 get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') }
66 } 66 }
67 } 67 }
68 }, 68 },
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 {
46 client: { 46 client: {
47 videos: { 47 videos: {
48 miniature: { 48 miniature: {
49 showAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.SHOW_AUTHOR_DISPLAY_NAME 49 preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME
50 } 50 }
51 } 51 }
52 }, 52 },
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 {
37 client: { 37 client: {
38 videos: { 38 videos: {
39 miniature: { 39 miniature: {
40 showAuthorDisplayName: boolean 40 preferAuthorDisplayName: boolean
41 } 41 }
42 } 42 }
43 } 43 }