From 911186dae411d78788ccede093c251303187589a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jun 2021 17:18:30 +0200 Subject: [PATCH] Reorganize watch components --- .../+video-watch/shared/comment/index.ts | 3 +++ .../comment/video-comment-add.component.html | 0 .../comment/video-comment-add.component.scss | 0 .../comment/video-comment-add.component.ts | 0 .../comment/video-comment.component.html | 0 .../comment/video-comment.component.scss | 0 .../comment/video-comment.component.ts | 0 .../comment/video-comments.component.html | 0 .../comment/video-comments.component.scss | 0 .../comment/video-comments.component.ts | 0 .../app/+videos/+video-watch/shared/index.ts | 5 +++++ .../+video-watch/shared/metadata/index.ts | 3 +++ .../video-avatar-channel.component.html | 0 .../video-avatar-channel.component.scss | 0 .../video-avatar-channel.component.ts | 0 .../video-description.component.html | 0 .../video-description.component.scss | 0 .../metadata}/video-description.component.ts | 0 .../metadata}/video-rate.component.html | 0 .../metadata}/video-rate.component.scss | 0 .../metadata}/video-rate.component.ts | 0 .../+video-watch/shared/playlist/index.ts | 1 + .../video-watch-playlist.component.html | 0 .../video-watch-playlist.component.scss | 0 .../video-watch-playlist.component.ts | 0 .../shared/recommendations/index.ts | 5 +++++ .../recent-videos-recommendation.service.ts | 0 .../recommendation-info.model.ts | 0 .../recommendations/recommendations.module.ts | 0 .../recommendations.service.ts | 0 .../recommended-videos.component.html | 0 .../recommended-videos.component.scss | 0 .../recommended-videos.component.ts | 0 .../recommended-videos.store.ts | 0 .../timestamp-route-transformer.directive.ts | 0 .../+video-watch/video-watch.component.ts | 2 +- .../+video-watch/video-watch.module.ts | 20 ++++++++++--------- 37 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 client/src/app/+videos/+video-watch/shared/comment/index.ts rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comment-add.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comment-add.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comment-add.component.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comment.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comment.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comment.component.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comments.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comments.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared}/comment/video-comments.component.ts (100%) create mode 100644 client/src/app/+videos/+video-watch/shared/index.ts create mode 100644 client/src/app/+videos/+video-watch/shared/metadata/index.ts rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-avatar-channel.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-avatar-channel.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-avatar-channel.component.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-description.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-description.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-description.component.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-rate.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-rate.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared/metadata}/video-rate.component.ts (100%) create mode 100644 client/src/app/+videos/+video-watch/shared/playlist/index.ts rename client/src/app/+videos/+video-watch/{ => shared/playlist}/video-watch-playlist.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared/playlist}/video-watch-playlist.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared/playlist}/video-watch-playlist.component.ts (100%) create mode 100644 client/src/app/+videos/+video-watch/shared/recommendations/index.ts rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recent-videos-recommendation.service.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommendation-info.model.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommendations.module.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommendations.service.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommended-videos.component.html (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommended-videos.component.scss (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommended-videos.component.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/recommendations/recommended-videos.store.ts (100%) rename client/src/app/+videos/+video-watch/{ => shared}/timestamp-route-transformer.directive.ts (100%) 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 000000000..2f2c69893 --- /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 000000000..a6c2d75ad --- /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 000000000..ba97f7011 --- /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 000000000..539705508 --- /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 000000000..ffcf84585 --- /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 e6b353220..9bc82d667 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 93b143542..f4484f1fe 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'