Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Reorganize watch components

Chocobozzz911186dae411
diff --git a/client/src/app/+videos/+video-watch/shared/comment/index.ts b/client/src/app/+videos/+video-watch/shared/comment/index.ts
new file mode 100644
index 0000000000..2f2c698939
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/shared/comment/index.ts
@@ -0,0 +1,3 @@
+export * from './video-comment-add.component'
+export * from './video-comment.component'
+export * from './video-comments.component'
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comment-add.component.html
rename to client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.html
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comment-add.component.scss
rename to client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.scss
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts
rename to client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.html b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comment.component.html
rename to client/src/app/+videos/+video-watch/shared/comment/video-comment.component.html
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.scss b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comment.component.scss
rename to client/src/app/+videos/+video-watch/shared/comment/video-comment.component.scss
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comment.component.ts
rename to client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
diff --git a/client/src/app/+videos/+video-watch/comment/video-comments.component.html b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comments.component.html
rename to client/src/app/+videos/+video-watch/shared/comment/video-comments.component.html
diff --git a/client/src/app/+videos/+video-watch/comment/video-comments.component.scss b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comments.component.scss
rename to client/src/app/+videos/+video-watch/shared/comment/video-comments.component.scss
diff --git a/client/src/app/+videos/+video-watch/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/comment/video-comments.component.ts
rename to client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
diff --git a/client/src/app/+videos/+video-watch/shared/index.ts b/client/src/app/+videos/+video-watch/shared/index.ts
new file mode 100644
index 0000000000..a6c2d75ad3
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/shared/index.ts
@@ -0,0 +1,5 @@
+export * from './comment'
+export * from './metadata'
+export * from './playlist'
+export * from './recommendations'
+export * from './timestamp-route-transformer.directive'
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/index.ts b/client/src/app/+videos/+video-watch/shared/metadata/index.ts
new file mode 100644
index 0000000000..ba97f70112
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/shared/metadata/index.ts
@@ -0,0 +1,3 @@
+export * from './video-avatar-channel.component'
+export * from './video-description.component'
+export * from './video-rate.component'
diff --git a/client/src/app/+videos/+video-watch/video-avatar-channel.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-avatar-channel.component.html
rename to client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.html
diff --git a/client/src/app/+videos/+video-watch/video-avatar-channel.component.scss b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-avatar-channel.component.scss
rename to client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.scss
diff --git a/client/src/app/+videos/+video-watch/video-avatar-channel.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-avatar-channel.component.ts
rename to client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts
diff --git a/client/src/app/+videos/+video-watch/video-description.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-description.component.html
rename to client/src/app/+videos/+video-watch/shared/metadata/video-description.component.html
diff --git a/client/src/app/+videos/+video-watch/video-description.component.scss b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-description.component.scss
rename to client/src/app/+videos/+video-watch/shared/metadata/video-description.component.scss
diff --git a/client/src/app/+videos/+video-watch/video-description.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-description.component.ts
rename to client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
diff --git a/client/src/app/+videos/+video-watch/video-rate.component.html b/client/src/app/+videos/+video-watch/shared/metadata/video-rate.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-rate.component.html
rename to client/src/app/+videos/+video-watch/shared/metadata/video-rate.component.html
diff --git a/client/src/app/+videos/+video-watch/video-rate.component.scss b/client/src/app/+videos/+video-watch/shared/metadata/video-rate.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-rate.component.scss
rename to client/src/app/+videos/+video-watch/shared/metadata/video-rate.component.scss
diff --git a/client/src/app/+videos/+video-watch/video-rate.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-rate.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-rate.component.ts
rename to client/src/app/+videos/+video-watch/shared/metadata/video-rate.component.ts
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/index.ts b/client/src/app/+videos/+video-watch/shared/playlist/index.ts
new file mode 100644
index 0000000000..539705508f
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/shared/playlist/index.ts
@@ -0,0 +1 @@
+export * from './video-watch-playlist.component'
diff --git a/client/src/app/+videos/+video-watch/video-watch-playlist.component.html b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-watch-playlist.component.html
rename to client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.html
diff --git a/client/src/app/+videos/+video-watch/video-watch-playlist.component.scss b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-watch-playlist.component.scss
rename to client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.scss
diff --git a/client/src/app/+videos/+video-watch/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/video-watch-playlist.component.ts
rename to client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/index.ts b/client/src/app/+videos/+video-watch/shared/recommendations/index.ts
new file mode 100644
index 0000000000..ffcf84585d
--- /dev/null
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/index.ts
@@ -0,0 +1,5 @@
+export * from './recent-videos-recommendation.service'
+export * from './recommendation-info.model'
+export * from './recommendations.module'
+export * from './recommended-videos.component'
+export * from './recommended-videos.store'
diff --git a/client/src/app/+videos/+video-watch/recommendations/recent-videos-recommendation.service.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recent-videos-recommendation.service.ts
rename to client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommendation-info.model.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommendation-info.model.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommendation-info.model.ts
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommendation-info.model.ts
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommendations.module.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommendations.module.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommendations.module.ts
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommendations.module.ts
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommendations.service.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommendations.service.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommendations.service.ts
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommendations.service.ts
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.html b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.html
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.scss
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.ts
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.store.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.store.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/recommendations/recommended-videos.store.ts
rename to client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.store.ts
diff --git a/client/src/app/+videos/+video-watch/timestamp-route-transformer.directive.ts b/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
similarity index 100%
rename from client/src/app/+videos/+video-watch/timestamp-route-transformer.directive.ts
rename to client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index e6b3532208..9bc82d667e 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -53,7 +53,7 @@ import {
} from '../../../assets/player/peertube-player-manager'
import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils'
import { environment } from '../../../environments/environment'
-import { VideoWatchPlaylistComponent } from './video-watch-playlist.component'
+import { VideoWatchPlaylistComponent } from './shared'
type URLOptions = CustomizationOptions & { playerMode: PlayerMode }
diff --git a/client/src/app/+videos/+video-watch/video-watch.module.ts b/client/src/app/+videos/+video-watch/video-watch.module.ts
index 93b143542f..f4484f1feb 100644
--- a/client/src/app/+videos/+video-watch/video-watch.module.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.module.ts
@@ -12,16 +12,18 @@ import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature'
import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist'
import { SharedActorImageModule } from '../../shared/shared-actor-image/shared-actor-image.module'
import { VideoCommentService } from '../../shared/shared-video-comment/video-comment.service'
-import { VideoCommentAddComponent } from './comment/video-comment-add.component'
-import { VideoCommentComponent } from './comment/video-comment.component'
-import { VideoCommentsComponent } from './comment/video-comments.component'
import { PlayerStylesComponent } from './player-styles.component'
-import { RecommendationsModule } from './recommendations/recommendations.module'
-import { TimestampRouteTransformerDirective } from './timestamp-route-transformer.directive'
-import { VideoAvatarChannelComponent } from './video-avatar-channel.component'
-import { VideoDescriptionComponent } from './video-description.component'
-import { VideoRateComponent } from './video-rate.component'
-import { VideoWatchPlaylistComponent } from './video-watch-playlist.component'
+import {
+ RecommendationsModule,
+ VideoAvatarChannelComponent,
+ VideoDescriptionComponent,
+ VideoRateComponent,
+ VideoWatchPlaylistComponent
+} from './shared'
+import { VideoCommentAddComponent } from './shared/comment/video-comment-add.component'
+import { VideoCommentComponent } from './shared/comment/video-comment.component'
+import { VideoCommentsComponent } from './shared/comment/video-comments.component'
+import { TimestampRouteTransformerDirective } from './shared/timestamp-route-transformer.directive'
import { VideoWatchRoutingModule } from './video-watch-routing.module'
import { VideoWatchComponent } from './video-watch.component'