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 --- client/src/app/+videos/+video-edit/video-add-components/video-send.ts | 4 ++-- client/src/app/+videos/+video-edit/video-update.resolver.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app/+videos/+video-edit') diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts index 3d0e1bf2a..9de373cd3 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts @@ -2,7 +2,7 @@ import { catchError, switchMap, tap } from 'rxjs/operators' import { SelectChannelItem } from 'src/types/select-options-item.model' import { Directive, EventEmitter, OnInit } from '@angular/core' import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' -import { listUserChannels } from '@app/helpers' +import { listUserChannelsForSelect } from '@app/helpers' import { FormReactive } from '@app/shared/shared-forms' import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' import { LoadingBarService } from '@ngx-loading-bar/core' @@ -38,7 +38,7 @@ export abstract class VideoSend extends FormReactive implements OnInit { ngOnInit () { this.buildForm({}) - listUserChannels(this.authService) + listUserChannelsForSelect(this.authService) .subscribe(channels => { this.userVideoChannels = channels this.firstStepChannelId = this.userVideoChannels[0].id diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts index 91e76b7fe..82dae5c1c 100644 --- a/client/src/app/+videos/+video-edit/video-update.resolver.ts +++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts @@ -3,7 +3,7 @@ import { map, switchMap } from 'rxjs/operators' import { Injectable } from '@angular/core' import { ActivatedRouteSnapshot, Resolve } from '@angular/router' import { AuthService } from '@app/core' -import { listUserChannels } from '@app/helpers' +import { listUserChannelsForSelect } from '@app/helpers' import { VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main' import { LiveVideoService } from '@app/shared/shared-video-live' @@ -33,7 +33,7 @@ export class VideoUpdateResolver implements Resolve { .loadCompleteDescription(video.descriptionPath) .pipe(map(description => Object.assign(video, { description }))), - listUserChannels(this.authService), + listUserChannelsForSelect(this.authService), this.videoCaptionService .listCaptions(video.id) -- cgit v1.2.3