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 --- .../+my-library/+my-video-channels/my-video-channels.component.html | 2 +- .../+my-library/+my-video-channels/my-video-channels.component.scss | 1 - client/src/app/+my-library/my-follows/my-followers.component.html | 2 +- client/src/app/+my-library/my-follows/my-followers.component.scss | 2 +- client/src/app/+my-library/my-follows/my-subscriptions.component.html | 2 +- .../my-ownership/my-accept-ownership/my-accept-ownership.component.ts | 4 ++-- client/src/app/+my-library/my-ownership/my-ownership.component.html | 2 +- .../my-video-playlists/my-video-playlist-create.component.ts | 4 ++-- .../my-video-playlists/my-video-playlist-update.component.ts | 4 ++-- 9 files changed, 11 insertions(+), 12 deletions(-) (limited to 'client/src/app/+my-library') diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html index 77947315b..c1ded0f6d 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html +++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html @@ -19,7 +19,7 @@
- +
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss index 998e46cb2..484355967 100644 --- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss +++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss @@ -24,7 +24,6 @@ my-edit-button { padding-bottom: 0; my-actor-avatar { - @include actor-avatar-size(80px); @include margin-right(10px); } } diff --git a/client/src/app/+my-library/my-follows/my-followers.component.html b/client/src/app/+my-library/my-follows/my-followers.component.html index eac750c86..4303695a3 100644 --- a/client/src/app/+my-library/my-follows/my-followers.component.html +++ b/client/src/app/+my-library/my-follows/my-followers.component.html @@ -14,7 +14,7 @@
- +
diff --git a/client/src/app/+my-library/my-follows/my-followers.component.scss b/client/src/app/+my-library/my-follows/my-followers.component.scss index 15b51c419..fae4cd972 100644 --- a/client/src/app/+my-library/my-follows/my-followers.component.scss +++ b/client/src/app/+my-library/my-follows/my-followers.component.scss @@ -12,7 +12,7 @@ input[type=text] { } .actor { - @include actor-row($avatar-size: 40px, $min-height: auto, $separator: true); + @include actor-row($min-height: auto, $separator: true); .actor-display-name { font-size: 16px; diff --git a/client/src/app/+my-library/my-follows/my-subscriptions.component.html b/client/src/app/+my-library/my-follows/my-subscriptions.component.html index 775f0e783..391c4d3be 100644 --- a/client/src/app/+my-library/my-follows/my-subscriptions.component.html +++ b/client/src/app/+my-library/my-follows/my-subscriptions.component.html @@ -14,7 +14,7 @@
- +
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts index 764da2369..8ead237c7 100644 --- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts +++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts @@ -1,7 +1,7 @@ import { SelectChannelItem } from 'src/types/select-options-item.model' import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' import { AuthService, Notifier } from '@app/core' -import { listUserChannels } from '@app/helpers' +import { listUserChannelsForSelect } from '@app/helpers' import { OWNERSHIP_CHANGE_CHANNEL_VALIDATOR } from '@app/shared/form-validators/video-ownership-change-validators' import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' import { VideoOwnershipService } from '@app/shared/shared-main' @@ -36,7 +36,7 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit { ngOnInit () { this.videoChannels = [] - listUserChannels(this.authService) + listUserChannelsForSelect(this.authService) .subscribe(channels => this.videoChannels = channels) this.buildForm({ diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.html b/client/src/app/+my-library/my-ownership/my-ownership.component.html index 4c02c78fc..cb032505e 100644 --- a/client/src/app/+my-library/my-ownership/my-ownership.component.html +++ b/client/src/app/+my-library/my-ownership/my-ownership.component.html @@ -37,7 +37,7 @@
- +
{{ videoChangeOwnership.initiatorAccount.displayName }} {{ videoChangeOwnership.initiatorAccount.nameWithHost }} diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts index 8bc78b2db..9eb3e9888 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core' import { Router } from '@angular/router' import { AuthService, Notifier, ServerService } from '@app/core' -import { listUserChannels } from '@app/helpers' +import { listUserChannelsForSelect } from '@app/helpers' import { setPlaylistChannelValidator, VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, @@ -46,7 +46,7 @@ export class MyVideoPlaylistCreateComponent extends MyVideoPlaylistEdit implemen setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) }) - listUserChannels(this.authService) + listUserChannelsForSelect(this.authService) .subscribe(channels => this.userVideoChannels = channels) this.serverService.getVideoPlaylistPrivacies() diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts index 06ac3ad50..ef7ba0018 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts @@ -3,7 +3,7 @@ import { map, switchMap } from 'rxjs/operators' import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { AuthService, Notifier, ServerService } from '@app/core' -import { listUserChannels } from '@app/helpers' +import { listUserChannelsForSelect } from '@app/helpers' import { setPlaylistChannelValidator, VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, @@ -51,7 +51,7 @@ export class MyVideoPlaylistUpdateComponent extends MyVideoPlaylistEdit implemen setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) }) - listUserChannels(this.authService) + listUserChannelsForSelect(this.authService) .subscribe(channels => this.userVideoChannels = channels) this.paramsSub = this.route.params -- cgit v1.2.3