]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix circular dep issue
authorChocobozzz <me@florianbigard.com>
Wed, 25 Nov 2020 10:44:31 +0000 (11:44 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 25 Nov 2020 10:44:31 +0000 (11:44 +0100)
client/src/app/+videos/+video-watch/video-watch.component.html
client/src/app/shared/shared-main/account/index.ts
client/src/app/shared/shared-main/account/video-avatar-channel.component.html [moved from client/src/app/shared/shared-main/account/avatar.component.html with 100% similarity]
client/src/app/shared/shared-main/account/video-avatar-channel.component.scss [moved from client/src/app/shared/shared-main/account/avatar.component.scss with 100% similarity]
client/src/app/shared/shared-main/account/video-avatar-channel.component.ts [moved from client/src/app/shared/shared-main/account/avatar.component.ts with 68% similarity]
client/src/app/shared/shared-main/shared-main.module.ts
client/src/app/shared/shared-main/users/user-notification.model.ts
client/src/app/shared/shared-main/video/video.model.ts

index 9e469f0b0df9fe4afd9962be8c212d2abcc75513..a90908dbeee86e2f70c29c46ba9563bdf96e047d 100644 (file)
 
           <div class="pt-3 border-top video-info-channel d-flex">
             <div class="video-info-channel-left d-flex">
-              <avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></avatar-channel>
+              <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel>
 
               <div class="video-info-channel-left-links ml-1">
                 <ng-container *ngIf="!isChannelDisplayNameGeneric()">
index f5b9f3634a5bfd3753e2cb36ba4ce103c2abf924..61c800e5671d67520a7f33d0ae3ba6aa0b978013 100644 (file)
@@ -2,4 +2,4 @@ export * from './account.model'
 export * from './account.service'
 export * from './actor-avatar-info.component'
 export * from './actor.model'
-export * from './avatar.component'
+export * from './video-avatar-channel.component'
similarity index 68%
rename from client/src/app/shared/shared-main/account/avatar.component.ts
rename to client/src/app/shared/shared-main/account/video-avatar-channel.component.ts
index 2967828a05396a404a3aec1f68905070e5c190a1..440e2b522dd80e4a582f9c1993deeb4cab1f8fd0 100644 (file)
@@ -2,12 +2,14 @@ import { Component, Input, OnInit } from '@angular/core'
 import { Video } from '../video/video.model'
 
 @Component({
-  selector: 'avatar-channel',
-  templateUrl: './avatar.component.html',
-  styleUrls: [ './avatar.component.scss' ]
+  selector: 'my-video-avatar-channel',
+  templateUrl: './video-avatar-channel.component.html',
+  styleUrls: [ './video-avatar-channel.component.scss' ]
 })
-export class AvatarComponent implements OnInit {
+export class VideoAvatarChannelComponent implements OnInit {
   @Input() video: Video
+  @Input() byAccount: string
+
   @Input() size: 'md' | 'sm' = 'md'
   @Input() genericChannel: boolean
 
index be06303958aa5d0b4703682133a8d6efe8e798fd..74bb4559aaa4c69e89076db4b862293774441a91 100644 (file)
@@ -14,7 +14,7 @@ import {
   NgbTooltipModule
 } from '@ng-bootstrap/ng-bootstrap'
 import { SharedGlobalIconModule } from '../shared-icons'
-import { AccountService, ActorAvatarInfoComponent, AvatarComponent } from './account'
+import { AccountService, ActorAvatarInfoComponent, VideoAvatarChannelComponent } from './account'
 import {
   BytesPipe,
   DurationFormatterPipe,
@@ -57,7 +57,7 @@ import { VideoChannelService } from './video-channel'
   ],
 
   declarations: [
-    AvatarComponent,
+    VideoAvatarChannelComponent,
     ActorAvatarInfoComponent,
 
     FromNowPipe,
@@ -106,7 +106,7 @@ import { VideoChannelService } from './video-channel'
 
     PrimeSharedModule,
 
-    AvatarComponent,
+    VideoAvatarChannelComponent,
     ActorAvatarInfoComponent,
 
     FromNowPipe,
index b1df4a584c31f06d2d34acea4cbdd1ab7faa3802..1211995fd3a89e98ce3e02b43d9e9362f55d4df9 100644 (file)
@@ -1,14 +1,16 @@
+import { AuthUser } from '@app/core'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { Actor } from '@app/shared/shared-main/account/actor.model'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
 import {
   AbuseState,
   ActorInfo,
   FollowState,
   UserNotification as UserNotificationServer,
   UserNotificationType,
-  VideoInfo,
-  UserRight
+  UserRight,
+  VideoInfo
 } from '@shared/models'
-import { Account, Actor, VideoChannel } from '@app/shared/shared-main'
-import { AuthUser } from '@app/core'
 
 export class UserNotification implements UserNotificationServer {
   id: number
index 8e0e680209e3357d613a48643853f461a7bbac74..04e7bd7176f3a5ae4303c14d1dae21810c33c706 100644 (file)
@@ -1,6 +1,9 @@
 import { AuthUser } from '@app/core'
 import { User } from '@app/core/users/user.model'
 import { durationToString, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { Actor } from '@app/shared/shared-main/account/actor.model'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
 import { peertubeTranslate } from '@shared/core-utils/i18n'
 import {
   Avatar,
@@ -12,7 +15,6 @@ import {
   VideoScheduleUpdate,
   VideoState
 } from '@shared/models'
-import { Account, Actor, VideoChannel } from '@app/shared/shared-main'
 
 export class Video implements VideoServerModel {
   byVideoChannel: string