mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Implement avatar miniatures (#4639)
* client: remove unused file * refactor(client/my-actor-avatar): size from input Read size from component input instead of scss, to make it possible to use smaller avatar images when implemented. * implement avatar miniatures close #4560 * fix(test): max file size * fix(search-index): normalize res acc to avatarMini * refactor avatars to an array * client/search: resize channel avatar to 120 * refactor(client/videos): remove unused function * client(actor-avatar): set default size * fix tests and avatars full result When findOne is used only an array containting one avatar is returned. * update migration version and version notations * server/search: harmonize normalizing * Cleanup avatar miniature PR Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
parent
5cad2ca9db
commit
d0800f7661
150 changed files with 2027 additions and 1276 deletions
15
shared/server-commands/users/accounts.ts
Normal file
15
shared/server-commands/users/accounts.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { PeerTubeServer } from '../server/server'
|
||||
|
||||
async function setDefaultAccountAvatar (serversArg: PeerTubeServer | PeerTubeServer[], token?: string) {
|
||||
const servers = Array.isArray(serversArg)
|
||||
? serversArg
|
||||
: [ serversArg ]
|
||||
|
||||
for (const server of servers) {
|
||||
await server.users.updateMyAvatar({ fixture: 'avatar.png', token })
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
setDefaultAccountAvatar
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue