From d0800f7661f13fabe7bb6f4aa0ea50764f106405 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Mon, 28 Feb 2022 08:34:43 +0100 Subject: 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 --- server/tests/api/search/search-videos.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/tests/api/search/search-videos.ts') diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index c544705d3..ff4c3c161 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts @@ -2,6 +2,8 @@ import 'mocha' import * as chai from 'chai' +import { wait } from '@shared/core-utils' +import { VideoPrivacy } from '@shared/models' import { cleanupTests, createSingleServer, @@ -9,11 +11,11 @@ import { PeerTubeServer, SearchCommand, setAccessTokensToServers, + setDefaultAccountAvatar, + setDefaultChannelAvatar, setDefaultVideoChannel, stopFfmpeg } from '@shared/server-commands' -import { VideoPrivacy } from '@shared/models' -import { wait } from '@shared/core-utils' const expect = chai.expect @@ -38,6 +40,8 @@ describe('Test videos search', function () { await setAccessTokensToServers([ server, remoteServer ]) await setDefaultVideoChannel([ server, remoteServer ]) + await setDefaultChannelAvatar(server) + await setDefaultAccountAvatar(servers) { const attributes1 = { -- cgit v1.2.3