mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add email translations
Convert emails from Pug template to Handlebars because i18next doesn't support Pug
This commit is contained in:
parent
b45fbf4337
commit
d6e4dac032
223 changed files with 9859 additions and 1426 deletions
|
@ -144,6 +144,8 @@ class ServerConfigManager {
|
|||
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
|
||||
},
|
||||
|
||||
defaultLanguage: CONFIG.INSTANCE.DEFAULT_LANGUAGE,
|
||||
|
||||
avatars: serverActor.Avatars.map(a => a.toFormattedJSON()),
|
||||
banners: serverActor.Banners.map(b => b.toFormattedJSON()),
|
||||
|
||||
|
@ -512,6 +514,24 @@ class ServerConfigManager {
|
|||
return maxBy(this.getOpenGraphLogos(serverActor), 'width')
|
||||
}
|
||||
|
||||
getLogoUrl (serverActor: MActorUploadImages, width: 192 | 512) {
|
||||
const customLogo = this.getLogo(serverActor, width)
|
||||
|
||||
if (customLogo) {
|
||||
return WEBSERVER.URL + customLogo.getStaticPath()
|
||||
}
|
||||
|
||||
return `${WEBSERVER.URL}/client/assets/images/icons/icon-${width}x${width}.png`
|
||||
}
|
||||
|
||||
getLogo (serverActor: MActorUploadImages, width: 192 | 512) {
|
||||
if (serverActor.Avatars.length > 0) {
|
||||
return findAppropriateImage(serverActor.Avatars, width)
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
private getFaviconLogos (serverActor: MActorUploadImages) {
|
||||
return this.getLogoWithFallbacks({
|
||||
serverActor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue