mirror of https://github.com/Chocobozzz/PeerTube
extend client-overrides with default images (#4392)
* 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>pull/4461/head
parent
c3bb04413e
commit
c80e458afb
|
@ -41,7 +41,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
|
||||||
}
|
}
|
||||||
|
|
||||||
static GET_DEFAULT_AVATAR_URL () {
|
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>) {
|
constructor (hash: Partial<ServerVideoChannel>) {
|
||||||
|
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -89,7 +89,13 @@ storage:
|
||||||
captions: 'storage/captions/'
|
captions: 'storage/captions/'
|
||||||
cache: 'storage/cache/'
|
cache: 'storage/cache/'
|
||||||
plugins: 'storage/plugins/'
|
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
|
# Could contain for example assets/images/favicon.png
|
||||||
# If the file exists, peertube will serve it
|
# If the file exists, peertube will serve it
|
||||||
# If not, peertube will fallback to the default fil
|
# If not, peertube will fallback to the default fil
|
||||||
|
|
|
@ -87,7 +87,13 @@ storage:
|
||||||
captions: '/var/www/peertube/storage/captions/'
|
captions: '/var/www/peertube/storage/captions/'
|
||||||
cache: '/var/www/peertube/storage/cache/'
|
cache: '/var/www/peertube/storage/cache/'
|
||||||
plugins: '/var/www/peertube/storage/plugins/'
|
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
|
# Could contain for example assets/images/favicon.png
|
||||||
# If the file exists, peertube will serve it
|
# If the file exists, peertube will serve it
|
||||||
# If not, peertube will fallback to the default file
|
# If not, peertube will fallback to the default file
|
||||||
|
|
|
@ -65,7 +65,10 @@ const staticClientOverrides = [
|
||||||
'assets/images/icons/icon-96x96.png',
|
'assets/images/icons/icon-96x96.png',
|
||||||
'assets/images/icons/icon-144x144.png',
|
'assets/images/icons/icon-144x144.png',
|
||||||
'assets/images/icons/icon-192x192.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) {
|
for (const staticClientOverride of staticClientOverrides) {
|
||||||
|
|
|
@ -55,7 +55,13 @@ storage:
|
||||||
captions: '../data/captions/'
|
captions: '../data/captions/'
|
||||||
cache: '../data/cache/'
|
cache: '../data/cache/'
|
||||||
plugins: '../data/plugins/'
|
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
|
# Could contain for example assets/images/favicon.png
|
||||||
# If the file exists, peertube will serve it
|
# If the file exists, peertube will serve it
|
||||||
# If not, peertube will fallback to the default fil
|
# If not, peertube will fallback to the default fil
|
||||||
|
|
|
@ -172,7 +172,7 @@ server {
|
||||||
|
|
||||||
# Bypass PeerTube for performance reasons. Optional.
|
# Bypass PeerTube for performance reasons. Optional.
|
||||||
# Should be consistent with client-overrides assets list in /server/controllers/client.ts
|
# 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
|
add_header Cache-Control "public, max-age=31536000, immutable"; # Cache 1 year
|
||||||
|
|
||||||
root /var/www/peertube;
|
root /var/www/peertube;
|
||||||
|
|
Loading…
Reference in New Issue