mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Generate small versions of banners too
This commit is contained in:
parent
aaa5acbb0c
commit
11521f231f
31 changed files with 184 additions and 345 deletions
|
@ -1,14 +1,13 @@
|
|||
import { escapeHTML } from '@peertube/peertube-core-utils'
|
||||
import { escapeHTML, maxBy } from '@peertube/peertube-core-utils'
|
||||
import { HttpStatusCode } from '@peertube/peertube-models'
|
||||
import express from 'express'
|
||||
import { CONFIG } from '../../../initializers/config.js'
|
||||
import { AccountModel } from '@server/models/account/account.js'
|
||||
import { ActorImageModel } from '@server/models/actor/actor-image.js'
|
||||
import { VideoChannelModel } from '@server/models/video/video-channel.js'
|
||||
import { MAccountHost, MChannelHost } from '@server/types/models/index.js'
|
||||
import { getBiggestActorImage } from '@server/lib/actor-image.js'
|
||||
import { ActorImageModel } from '@server/models/actor/actor-image.js'
|
||||
import { TagsHtml } from './tags-html.js'
|
||||
import express from 'express'
|
||||
import { CONFIG } from '../../../initializers/config.js'
|
||||
import { PageHtml } from './page-html.js'
|
||||
import { TagsHtml } from './tags-html.js'
|
||||
|
||||
export class ActorHtml {
|
||||
|
||||
|
@ -60,7 +59,7 @@ export class ActorHtml {
|
|||
const siteName = CONFIG.INSTANCE.NAME
|
||||
const title = entity.getDisplayName()
|
||||
|
||||
const avatar = getBiggestActorImage(entity.Actor.Avatars)
|
||||
const avatar = maxBy(entity.Actor.Avatars, 'width')
|
||||
const image = {
|
||||
url: ActorImageModel.getImageUrl(avatar),
|
||||
width: avatar?.width,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue