diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-03-08 13:39:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 13:39:27 +0100 |
commit | 2c102aac13ec537ff72ec09a50d3197ed3bc8185 (patch) | |
tree | 8224e2713866c17e54c927dc26f1a62a3353bc2e /server | |
parent | fc10ecf167bd07f32426441e74b49370d5ff919b (diff) | |
download | PeerTube-2c102aac13ec537ff72ec09a50d3197ed3bc8185.tar.gz PeerTube-2c102aac13ec537ff72ec09a50d3197ed3bc8185.tar.zst PeerTube-2c102aac13ec537ff72ec09a50d3197ed3bc8185.zip |
Display avatar in video miniatures (#4823)
* show avatar in video miniatures
closes #4040
* fix: videos for api, include avatars
* add config for display video miniature avatar
* Revert "fix: videos for api, include avatars"
This reverts commit 5520a3eda6805338317a394d0553f2f82095a425.
* video-min: set display avatar to false as default
* remove empty line
* rename display_avatar > display_author_avatar
* fix renaming displayAvatar > displayAuthorAvatar
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/checker-before-init.ts | 1 | ||||
-rw-r--r-- | server/initializers/config.ts | 3 | ||||
-rw-r--r-- | server/lib/server-config-manager.ts | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 36401f95c..10dd98f43 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -33,6 +33,7 @@ function checkMissedConfig () { | |||
33 | 'transcoding.resolutions.2160p', 'video_editor.enabled', | 33 | 'transcoding.resolutions.2160p', 'video_editor.enabled', |
34 | 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'auto_blacklist.videos.of_users.enabled', | 34 | 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'auto_blacklist.videos.of_users.enabled', |
35 | 'trending.videos.interval_days', | 35 | 'trending.videos.interval_days', |
36 | 'client.videos.miniature.display_author_avatar', | ||
36 | 'client.videos.miniature.prefer_author_display_name', 'client.menu.login.redirect_on_single_external_auth', | 37 | 'client.videos.miniature.prefer_author_display_name', 'client.menu.login.redirect_on_single_external_auth', |
37 | 'defaults.publish.download_enabled', 'defaults.publish.comments_enabled', 'defaults.publish.privacy', 'defaults.publish.licence', | 38 | 'defaults.publish.download_enabled', 'defaults.publish.comments_enabled', 'defaults.publish.privacy', 'defaults.publish.licence', |
38 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', | 39 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', |
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 63056b41d..7a13a1368 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -62,7 +62,8 @@ const CONFIG = { | |||
62 | CLIENT: { | 62 | CLIENT: { |
63 | VIDEOS: { | 63 | VIDEOS: { |
64 | MINIATURE: { | 64 | MINIATURE: { |
65 | get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') } | 65 | get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') }, |
66 | get DISPLAY_AUTHOR_AVATAR () { return config.get<boolean>('client.videos.miniature.display_author_avatar') } | ||
66 | } | 67 | } |
67 | }, | 68 | }, |
68 | MENU: { | 69 | MENU: { |
diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts index 38512f384..43ca2332b 100644 --- a/server/lib/server-config-manager.ts +++ b/server/lib/server-config-manager.ts | |||
@@ -46,6 +46,7 @@ class ServerConfigManager { | |||
46 | client: { | 46 | client: { |
47 | videos: { | 47 | videos: { |
48 | miniature: { | 48 | miniature: { |
49 | displayAuthorAvatar: CONFIG.CLIENT.VIDEOS.MINIATURE.DISPLAY_AUTHOR_AVATAR, | ||
49 | preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME | 50 | preferAuthorDisplayName: CONFIG.CLIENT.VIDEOS.MINIATURE.PREFER_AUTHOR_DISPLAY_NAME |
50 | } | 51 | } |
51 | }, | 52 | }, |