]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
extend client-overrides with default images (#4392)
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Tue, 12 Oct 2021 11:50:40 +0000 (13:50 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Oct 2021 11:50:40 +0000 (13:50 +0200)
* extend client-overrides with default images

Add:
* default-playlist.png
* default-avatar-account.png
* default-avatar-videochannel.png

solves #4108

* Rename to default-avatar-video-channel.png

Co-authored-by: Chocobozzz <me@florianbigard.com>
client/src/app/shared/shared-main/video-channel/video-channel.model.ts
client/src/assets/images/default-avatar-video-channel.png [moved from client/src/assets/images/default-avatar-videochannel.png with 100% similarity]
config/default.yaml
config/production.yaml.example
server/controllers/client.ts
support/docker/production/config/production.yaml
support/nginx/peertube

index 66d4cac687cede38ee3b9a0bf80520a2b6d1d793..ac2679b425656989e9376216ce6ff225c4fee0dc 100644 (file)
@@ -41,7 +41,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
   }
 
   static GET_DEFAULT_AVATAR_URL () {
-    return `${window.location.origin}/client/assets/images/default-avatar-videochannel.png`
+    return `${window.location.origin}/client/assets/images/default-avatar-video-channel.png`
   }
 
   constructor (hash: Partial<ServerVideoChannel>) {
index eb96b6bbb0ed478462540d59bb3d132a78b72c87..707187b7c177ce36a27bd4caf12da5485e70d025 100644 (file)
@@ -89,7 +89,13 @@ storage:
   captions: 'storage/captions/'
   cache: 'storage/cache/'
   plugins: 'storage/plugins/'
-  # Overridable client files : logo.svg, favicon.png and icons/*.png (PWA) in client/dist/assets/images
+  # Overridable client files in client/dist/assets/images :
+  # - logo.svg
+  # - favicon.png
+  # - default-playlist.jpg
+  # - default-avatar-account.png
+  # - default-avatar-video-channel.png
+  # - and icons/*.png (PWA)
   # Could contain for example assets/images/favicon.png
   # If the file exists, peertube will serve it
   # If not, peertube will fallback to the default fil
index 082c75e53519f106e23aadb9afcd83b0ac0be2a5..e405daa712f186330842d3eaf340a03afc57e5a9 100644 (file)
@@ -87,7 +87,13 @@ storage:
   captions: '/var/www/peertube/storage/captions/'
   cache: '/var/www/peertube/storage/cache/'
   plugins: '/var/www/peertube/storage/plugins/'
-  # Overridable client files : logo.svg, favicon.png and icons/*.png (PWA) in client/dist/assets/images
+  # Overridable client files in client/dist/assets/images :
+  # - logo.svg
+  # - favicon.png
+  # - default-playlist.jpg
+  # - default-avatar-account.png
+  # - default-avatar-video-channel.png
+  # - and icons/*.png (PWA)
   # Could contain for example assets/images/favicon.png
   # If the file exists, peertube will serve it
   # If not, peertube will fallback to the default file
index cdc556da2b98d66162b1351aa8fcb4ec57215f0e..86ac5fbbc30dd0f44427c5b93698a32e7e0ebcf9 100644 (file)
@@ -65,7 +65,10 @@ const staticClientOverrides = [
   'assets/images/icons/icon-96x96.png',
   'assets/images/icons/icon-144x144.png',
   'assets/images/icons/icon-192x192.png',
-  'assets/images/icons/icon-512x512.png'
+  'assets/images/icons/icon-512x512.png',
+  'assets/images/default-playlist.jpg',
+  'assets/images/default-avatar-account.png',
+  'assets/images/default-avatar-video-channel.png'
 ]
 
 for (const staticClientOverride of staticClientOverrides) {
index 8c8f8d6bcecbeaa682af8e45e309b684b84a3a29..3bff8a0b00d7c5b6f8296fce32562a1aaf4f3d64 100644 (file)
@@ -55,7 +55,13 @@ storage:
   captions: '../data/captions/'
   cache: '../data/cache/'
   plugins: '../data/plugins/'
-  # Overridable client files : logo.svg, favicon.png and icons/*.png (PWA) in client/dist/assets/images
+  # Overridable client files in client/dist/assets/images :
+  # - logo.svg
+  # - favicon.png
+  # - default-playlist.jpg
+  # - default-avatar-account.png
+  # - default-avatar-video-channel.png
+  # - and icons/*.png (PWA)
   # Could contain for example assets/images/favicon.png
   # If the file exists, peertube will serve it
   # If not, peertube will fallback to the default fil
index 3ef62367ca98399380f7d438bfc6fdf0f3ccf985..2b1600d97b7f03cf90c9e0a5a131693ea5c50275 100644 (file)
@@ -172,7 +172,7 @@ server {
 
   # Bypass PeerTube for performance reasons. Optional.
   # Should be consistent with client-overrides assets list in /server/controllers/client.ts
-  location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png))$ {
+  location ~ ^/client/(assets/images/(icons/icon-36x36\.png|icons/icon-48x48\.png|icons/icon-72x72\.png|icons/icon-96x96\.png|icons/icon-144x144\.png|icons/icon-192x192\.png|icons/icon-512x512\.png|logo\.svg|favicon\.png|default-playlist\.jpg|default-avatar-account\.png|default-avatar-video-channel\.png))$ {
     add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
 
     root /var/www/peertube;