-
-
-
-
-
-
+
-
+
-
+
diff --git a/client/src/app/+search/search.component.scss b/client/src/app/+search/search.component.scss
index 91c8272d7..a8002ba88 100644
--- a/client/src/app/+search/search.component.scss
+++ b/client/src/app/+search/search.component.scss
@@ -5,7 +5,7 @@
$image-size: min(130px, $video-img-width);
$margin-size: ($video-img-width - $image-size) / 2; // So we have the same width than the video miniature
- @include channel-avatar($image-size);
+ @include actor-avatar-size($image-size);
margin: 0 $margin-size 0 $margin-size;
}
@@ -53,10 +53,8 @@
max-width: 800px;
}
-.video-channel {
- img {
- @include build-channel-img-size($video-thumbnail-width);
- }
+.video-channel my-actor-avatar {
+ @include build-channel-img-size($video-thumbnail-width);
}
.video-channel-info {
@@ -92,14 +90,12 @@
grid-template-columns: auto 1fr;
grid-template-rows: auto auto;
- .link-avatar {
+ my-actor-avatar {
+ @include build-channel-img-size($video-thumbnail-medium-width);
+
grid-column: 1;
grid-row: 1 / -1;
}
-
- img {
- @include build-channel-img-size($video-thumbnail-medium-width);
- }
}
.video-channel-info {
@@ -115,7 +111,7 @@
}
@include on-mobile-main-col {
- .video-channel img {
+ .video-channel my-actor-avatar {
@include build-channel-img-size($video-thumbnail-small-width);
}
}
diff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.ts
index 2be952e16..ecede19a3 100644
--- a/client/src/app/+search/search.component.ts
+++ b/client/src/app/+search/search.component.ts
@@ -132,10 +132,6 @@ export class SearchComponent implements OnInit, OnDestroy {
return 'internal'
}
- isExternalChannelUrl () {
- return this.getVideoLinkType() === 'external'
- }
-
search () {
forkJoin([
this.getVideosObs(),
@@ -200,17 +196,33 @@ export class SearchComponent implements OnInit, OnDestroy {
this.results = this.results.filter(r => !this.isVideo(r) || r.id !== video.id)
}
- getChannelUrl (channel: VideoChannel) {
+ isExternalChannelUrl () {
+ return this.getVideoLinkType() === 'external'
+ }
+
+ getExternalChannelUrl (channel: VideoChannel) {
// Same algorithm than videos
if (this.getVideoLinkType() === 'external') {
return channel.url
}
- if (this.getVideoLinkType() === 'internal') {
+ // lazy-load or internal
+ return undefined
+ }
+
+ getInternalChannelUrl (channel: VideoChannel) {
+ const linkType = this.getVideoLinkType()
+
+ if (linkType === 'internal') {
return [ '/video-channels', channel.nameWithHost ]
}
- return [ '/search/lazy-load-channel', { url: channel.url } ]
+ if (linkType === 'lazy-load') {
+ return [ '/search/lazy-load-channel', { url: channel.url } ]
+ }
+
+ // external
+ return undefined
}
hideActions () {
diff --git a/client/src/app/+search/search.module.ts b/client/src/app/+search/search.module.ts
index e85ae07d0..390833abc 100644
--- a/client/src/app/+search/search.module.ts
+++ b/client/src/app/+search/search.module.ts
@@ -1,4 +1,5 @@
import { NgModule } from '@angular/core'
+import { SharedActorImageModule } from '@app/shared/shared-actor-image/shared-actor-image.module'
import { SharedFormModule } from '@app/shared/shared-forms'
import { SharedMainModule } from '@app/shared/shared-main'
import { SharedSearchModule } from '@app/shared/shared-search'
@@ -18,6 +19,7 @@ import { VideoLazyLoadResolver } from './video-lazy-load.resolver'
SharedMainModule,
SharedSearchModule,
SharedFormModule,
+ SharedActorImageModule,
SharedUserSubscriptionModule,
SharedVideoMiniatureModule
],
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index 9308d5bb6..b4d81fe39 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -6,16 +6,16 @@
-
- Manage channel
-
+
+ Manage channel
+
-
+
-
+
@@ -23,7 +23,7 @@
OWNER ACCOUNT
-
+
@@ -49,7 +49,7 @@
-
+
VIDEO CHANNEL
diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss
index e946707ef..360a99342 100644
--- a/client/src/app/+video-channels/video-channels.component.scss
+++ b/client/src/app/+video-channels/video-channels.component.scss
@@ -107,8 +107,8 @@
display: flex;
margin-bottom: 15px;
- img {
- @include avatar(48px);
+ .account-avatar {
+ @include actor-avatar-size(48px);
}
.actor-info {
@@ -289,8 +289,8 @@
margin-top: -5px;
}
- img {
- @include channel-avatar(64px);
+ .account-avatar {
+ @include actor-avatar-size(64px);
margin: -30px 0 0 15px;
}
diff --git a/client/src/app/+video-channels/video-channels.module.ts b/client/src/app/+video-channels/video-channels.module.ts
index 2e387f401..35c39cc2e 100644
--- a/client/src/app/+video-channels/video-channels.module.ts
+++ b/client/src/app/+video-channels/video-channels.module.ts
@@ -10,7 +10,7 @@ import { VideoChannelPlaylistsComponent } from './video-channel-playlists/video-
import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component'
import { VideoChannelsRoutingModule } from './video-channels-routing.module'
import { VideoChannelsComponent } from './video-channels.component'
-import { SharedAccountAvatarModule } from '../shared/shared-account-avatar/shared-account-avatar.module'
+import { SharedActorImageModule } from '../shared/shared-actor-image/shared-actor-image.module'
@NgModule({
imports: [
@@ -23,7 +23,7 @@ import { SharedAccountAvatarModule } from '../shared/shared-account-avatar/share
SharedUserSubscriptionModule,
SharedGlobalIconModule,
SharedSupportModal,
- SharedAccountAvatarModule
+ SharedActorImageModule
],
declarations: [
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
index 7bd9b7c90..42adfed8d 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
+++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
@@ -1,6 +1,6 @@