]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commit - server/controllers/api/accounts.ts
Implement avatar miniatures (#4639)
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Mon, 28 Feb 2022 07:34:43 +0000 (08:34 +0100)
committerGitHub <noreply@github.com>
Mon, 28 Feb 2022 07:34:43 +0000 (08:34 +0100)
commitd0800f7661f13fabe7bb6f4aa0ea50764f106405
treed43e6b0b6f4a5a32e03487e6464edbcaf288be2a
parent5cad2ca9db9b9d138f8a33058d10b94a9fd50c69
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>
150 files changed:
client/src/app/+accounts/account-video-channels/account-video-channels.component.html
client/src/app/+accounts/account-video-channels/account-video-channels.component.scss
client/src/app/+accounts/accounts.component.html
client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.html [deleted file]
client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
client/src/app/+my-library/+my-video-channels/my-video-channels.component.scss
client/src/app/+my-library/my-follows/my-followers.component.html
client/src/app/+my-library/my-follows/my-followers.component.scss
client/src/app/+my-library/my-follows/my-subscriptions.component.html
client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
client/src/app/+my-library/my-ownership/my-ownership.component.html
client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
client/src/app/+search/search.component.html
client/src/app/+search/search.component.scss
client/src/app/+video-channels/video-channels.component.html
client/src/app/+video-channels/video-channels.component.scss
client/src/app/+videos/+video-edit/video-add-components/video-send.ts
client/src/app/+videos/+video-edit/video-update.resolver.ts
client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html
client/src/app/+videos/+video-watch/shared/comment/video-comment.component.scss
client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html
client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss
client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts
client/src/app/+videos/video-list/overview/video-overview.component.html
client/src/app/+videos/video-list/overview/video-overview.component.scss
client/src/app/core/users/user.model.ts
client/src/app/core/users/user.service.ts
client/src/app/helpers/utils/channel.ts
client/src/app/modal/account-setup-warning-modal.component.ts
client/src/app/shared/shared-abuse-list/abuse-list-table.component.html
client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
client/src/app/shared/shared-actor-image/actor-avatar.component.scss
client/src/app/shared/shared-actor-image/actor-avatar.component.ts
client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.html
client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.scss
client/src/app/shared/shared-forms/select/select-channel.component.ts
client/src/app/shared/shared-main/account/account.model.ts
client/src/app/shared/shared-main/account/actor.model.ts
client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
client/src/app/shared/shared-main/users/user-notification.model.ts
client/src/app/shared/shared-main/video-channel/video-channel.model.ts
client/src/app/shared/shared-main/video-channel/video-channel.service.ts
client/src/app/shared/shared-main/video/video.model.ts
client/src/app/shared/shared-moderation/account-blocklist.component.html
client/src/app/shared/shared-video-miniature/video-miniature.component.html
client/src/assets/images/default-avatar-account-48x48.png [new file with mode: 0644]
client/src/assets/images/default-avatar-video-channel-48x48.png [new file with mode: 0644]
client/src/sass/include/_account-channel-page.scss
client/src/sass/include/_actor.scss
client/src/sass/include/_mixins.scss
scripts/migrations/peertube-4.2.ts [new file with mode: 0644]
server/controllers/activitypub/client.ts
server/controllers/api/accounts.ts
server/controllers/api/users/me.ts
server/controllers/api/users/my-notifications.ts
server/controllers/api/video-channel.ts
server/controllers/client.ts
server/controllers/lazy-static.ts
server/helpers/activitypub.ts
server/initializers/constants.ts
server/initializers/migrations/0685-multiple-actor-images.ts [new file with mode: 0644]
server/lib/activitypub/actors/image.ts
server/lib/activitypub/actors/shared/creator.ts
server/lib/activitypub/actors/shared/object-to-model-attributes.ts
server/lib/activitypub/actors/updater.ts
server/lib/actor-image.ts [new file with mode: 0644]
server/lib/client-html.ts
server/lib/local-actor.ts
server/lib/notifier/shared/comment/comment-mention.ts
server/lib/notifier/shared/comment/new-comment-for-video-owner.ts
server/models/abuse/abuse-message.ts
server/models/account/account-blocklist.ts
server/models/account/account-video-rate.ts
server/models/account/account.ts
server/models/actor/actor-follow.ts
server/models/actor/actor-image.ts
server/models/actor/actor.ts
server/models/server/plugin.ts
server/models/server/server-blocklist.ts
server/models/shared/index.ts
server/models/shared/model-builder.ts [new file with mode: 0644]
server/models/user/sql/user-notitication-list-query-builder.ts [new file with mode: 0644]
server/models/user/user-notification.ts
server/models/user/user.ts
server/models/utils.ts
server/models/video/sql/video/index.ts [new file with mode: 0644]
server/models/video/sql/video/shared/abstract-run-query.ts [moved from server/models/video/sql/shared/abstract-run-query.ts with 100% similarity]
server/models/video/sql/video/shared/abstract-video-query-builder.ts [moved from server/models/video/sql/shared/abstract-video-query-builder.ts with 95% similarity]
server/models/video/sql/video/shared/video-file-query-builder.ts [moved from server/models/video/sql/shared/video-file-query-builder.ts with 100% similarity]
server/models/video/sql/video/shared/video-model-builder.ts [moved from server/models/video/sql/shared/video-model-builder.ts with 89% similarity]
server/models/video/sql/video/shared/video-table-attributes.ts [moved from server/models/video/sql/shared/video-table-attributes.ts with 99% similarity]
server/models/video/sql/video/video-model-get-query-builder.ts [moved from server/models/video/sql/video-model-get-query-builder.ts with 100% similarity]
server/models/video/sql/video/videos-id-list-query-builder.ts [moved from server/models/video/sql/videos-id-list-query-builder.ts with 100% similarity]
server/models/video/sql/video/videos-model-list-query-builder.ts [moved from server/models/video/sql/videos-model-list-query-builder.ts with 100% similarity]
server/models/video/video-channel.ts
server/models/video/video-comment.ts
server/models/video/video-import.ts
server/models/video/video-playlist-element.ts
server/models/video/video-playlist.ts
server/models/video/video-share.ts
server/models/video/video.ts
server/tests/api/check-params/video-channels.ts
server/tests/api/moderation/abuses.ts
server/tests/api/moderation/blocklist.ts
server/tests/api/moderation/video-blacklist.ts
server/tests/api/notifications/notifications-api.ts
server/tests/api/search/search-activitypub-video-channels.ts
server/tests/api/search/search-activitypub-video-playlists.ts
server/tests/api/search/search-activitypub-videos.ts
server/tests/api/search/search-channels.ts
server/tests/api/search/search-index.ts
server/tests/api/search/search-playlists.ts
server/tests/api/search/search-videos.ts
server/tests/api/server/homepage.ts
server/tests/api/users/user-subscriptions.ts
server/tests/api/users/users-multiple-servers.ts
server/tests/api/users/users.ts
server/tests/api/videos/multiple-servers.ts
server/tests/api/videos/single-server.ts
server/tests/api/videos/video-channels.ts
server/tests/api/videos/video-comments.ts
server/tests/api/videos/video-playlists.ts
server/tests/api/videos/videos-common-filters.ts
server/tests/cli/prune-storage.ts
server/tests/feeds/feeds.ts
server/tests/fixtures/avatar-resized-120x120.gif [moved from server/tests/fixtures/avatar-resized.gif with 100% similarity]
server/tests/fixtures/avatar-resized-120x120.png [moved from server/tests/fixtures/avatar-resized.png with 100% similarity]
server/tests/fixtures/avatar-resized-48x48.gif [new file with mode: 0644]
server/tests/fixtures/avatar-resized-48x48.png [new file with mode: 0644]
server/tests/fixtures/avatar2-resized-120x120.png [moved from server/tests/fixtures/avatar2-resized.png with 100% similarity]
server/tests/fixtures/avatar2-resized-48x48.png [new file with mode: 0644]
server/tests/shared/notifications.ts
server/types/models/actor/actor-image.ts
server/types/models/actor/actor.ts
server/types/models/user/user-notification.ts
shared/models/activitypub/activitypub-actor.ts
shared/models/actors/account.model.ts
shared/models/actors/actor-image.model.ts
shared/models/actors/actor.model.ts
shared/models/users/user-notification.model.ts
shared/models/videos/channel/video-channel.model.ts
shared/server-commands/users/accounts.ts [new file with mode: 0644]
shared/server-commands/users/index.ts
shared/server-commands/videos/channels.ts
support/doc/api/openapi.yaml
support/nginx/peertube