From 67ed6552b831df66713bac9e672738796128d33f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Jun 2020 14:10:17 +0200 Subject: Reorganize client shared modules --- .../video-channel-about.component.ts | 7 +++---- .../video-channel-playlists.component.ts | 14 ++++--------- .../video-channel-videos.component.ts | 23 ++++++++-------------- .../video-channels-routing.module.ts | 6 +++--- .../+video-channels/video-channels.component.ts | 16 ++++++--------- .../app/+video-channels/video-channels.module.ts | 21 +++++++++++++++----- 6 files changed, 40 insertions(+), 47 deletions(-) (limited to 'client/src/app/+video-channels') diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts index 11f9391e1..19e4bc1f4 100644 --- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts +++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts @@ -1,9 +1,8 @@ +import { Subscription } from 'rxjs' import { Component, OnDestroy, OnInit } from '@angular/core' -import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { VideoChannel } from '@app/shared/video-channel/video-channel.model' +import { MarkdownService } from '@app/core' +import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' import { I18n } from '@ngx-translate/i18n-polyfill' -import { Subscription } from 'rxjs' -import { MarkdownService } from '@app/shared/renderer' @Component({ selector: 'my-video-channel-about', diff --git a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts index 0b0033082..8b507c626 100644 --- a/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts +++ b/client/src/app/+video-channels/video-channel-playlists/video-channel-playlists.component.ts @@ -1,12 +1,8 @@ -import { Component, OnDestroy, OnInit } from '@angular/core' -import { ConfirmService } from '../../core/confirm' -import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { VideoChannel } from '@app/shared/video-channel/video-channel.model' import { Subject, Subscription } from 'rxjs' -import { Notifier } from '@app/core' -import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model' -import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' -import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service' +import { Component, OnDestroy, OnInit } from '@angular/core' +import { ComponentPagination, hasMoreItems } from '@app/core' +import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' +import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' @Component({ selector: 'my-video-channel-playlists', @@ -28,8 +24,6 @@ export class VideoChannelPlaylistsComponent implements OnInit, OnDestroy { private videoChannel: VideoChannel constructor ( - private notifier: Notifier, - private confirmService: ConfirmService, private videoPlaylistService: VideoPlaylistService, private videoChannelService: VideoChannelService ) {} diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts index 5749701e8..267c328f2 100644 --- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts +++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts @@ -1,25 +1,18 @@ +import { Subscription } from 'rxjs' +import { first, tap } from 'rxjs/operators' import { Component, OnDestroy, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' -import { immutableAssign } from '@app/shared/misc/utils' -import { AuthService } from '../../core/auth' -import { ConfirmService } from '../../core/confirm' -import { AbstractVideoList } from '../../shared/video/abstract-video-list' -import { VideoService } from '../../shared/video/video.service' -import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { VideoChannel } from '@app/shared/video-channel/video-channel.model' -import { first, tap } from 'rxjs/operators' +import { AuthService, ConfirmService, LocalStorageService, Notifier, ScreenService, ServerService, UserService } from '@app/core' +import { immutableAssign } from '@app/helpers' +import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' +import { AbstractVideoList } from '@app/shared/shared-video-miniature' import { I18n } from '@ngx-translate/i18n-polyfill' -import { Subscription } from 'rxjs' -import { ScreenService } from '@app/shared/misc/screen.service' -import { Notifier, ServerService } from '@app/core' -import { UserService } from '@app/shared' -import { LocalStorageService } from '@app/shared/misc/storage.service' @Component({ selector: 'my-video-channel-videos', - templateUrl: '../../shared/video/abstract-video-list.html', + templateUrl: '../../shared/shared-video-miniature/abstract-video-list.html', styleUrls: [ - '../../shared/video/abstract-video-list.scss', + '../../shared/shared-video-miniature/abstract-video-list.scss', './video-channel-videos.component.scss' ] }) diff --git a/client/src/app/+video-channels/video-channels-routing.module.ts b/client/src/app/+video-channels/video-channels-routing.module.ts index d4872a0a5..e79e6a680 100644 --- a/client/src/app/+video-channels/video-channels-routing.module.ts +++ b/client/src/app/+video-channels/video-channels-routing.module.ts @@ -1,10 +1,10 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' import { MetaGuard } from '@ngx-meta/core' -import { VideoChannelsComponent } from './video-channels.component' -import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' import { VideoChannelAboutComponent } from './video-channel-about/video-channel-about.component' -import { VideoChannelPlaylistsComponent } from '@app/+video-channels/video-channel-playlists/video-channel-playlists.component' +import { VideoChannelPlaylistsComponent } from './video-channel-playlists/video-channel-playlists.component' +import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' +import { VideoChannelsComponent } from './video-channels.component' const videoChannelsRoutes: Routes = [ { diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index a3563c747..cae442ee7 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts @@ -1,16 +1,12 @@ +import { Hotkey, HotkeysService } from 'angular2-hotkeys' +import { Subscription } from 'rxjs' +import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators' import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute } from '@angular/router' -import { VideoChannel } from '@app/shared/video-channel/video-channel.model' -import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' -import { RestExtractor } from '@app/shared' -import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators' -import { Subscription } from 'rxjs' -import { AuthService, Notifier } from '@app/core' -import { Hotkey, HotkeysService } from 'angular2-hotkeys' -import { SubscribeButtonComponent } from '@app/shared/user-subscription/subscribe-button.component' +import { AuthService, Notifier, RestExtractor, ScreenService } from '@app/core' +import { ListOverflowItem, VideoChannel, VideoChannelService } from '@app/shared/shared-main' +import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' import { I18n } from '@ngx-translate/i18n-polyfill' -import { ListOverflowItem } from '@app/shared/misc/list-overflow.component' -import { ScreenService } from '@app/shared/misc/screen.service' @Component({ templateUrl: './video-channels.component.html', diff --git a/client/src/app/+video-channels/video-channels.module.ts b/client/src/app/+video-channels/video-channels.module.ts index 6975d05b2..05236ff85 100644 --- a/client/src/app/+video-channels/video-channels.module.ts +++ b/client/src/app/+video-channels/video-channels.module.ts @@ -1,15 +1,26 @@ import { NgModule } from '@angular/core' -import { SharedModule } from '../shared' +import { SharedFormModule } from '@app/shared/shared-forms' +import { SharedGlobalIconModule } from '@app/shared/shared-icons' +import { SharedMainModule } from '@app/shared/shared-main' +import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription' +import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature' +import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist' +import { VideoChannelAboutComponent } from './video-channel-about/video-channel-about.component' +import { VideoChannelPlaylistsComponent } from './video-channel-playlists/video-channel-playlists.component' +import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' import { VideoChannelsRoutingModule } from './video-channels-routing.module' import { VideoChannelsComponent } from './video-channels.component' -import { VideoChannelVideosComponent } from './video-channel-videos/video-channel-videos.component' -import { VideoChannelAboutComponent } from './video-channel-about/video-channel-about.component' -import { VideoChannelPlaylistsComponent } from '@app/+video-channels/video-channel-playlists/video-channel-playlists.component' @NgModule({ imports: [ VideoChannelsRoutingModule, - SharedModule + + SharedMainModule, + SharedFormModule, + SharedVideoPlaylistModule, + SharedVideoMiniatureModule, + SharedUserSubscriptionModule, + SharedGlobalIconModule ], declarations: [ -- cgit v1.2.3