Skip to content

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

Remove barrels

Chocobozzz338633ce722c
diff --git a/client/src/app/+about/about-follows/about-follows.component.ts b/client/src/app/+about/about-follows/about-follows.component.ts
index 8df44f6892..5093fb8f9a 100644
--- a/client/src/app/+about/about-follows/about-follows.component.ts
+++ b/client/src/app/+about/about-follows/about-follows.component.ts
@@ -1,9 +1,9 @@
import { SortMeta } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ComponentPagination, hasMoreItems, Notifier, RestService, ServerService } from '@app/core'
-import { InstanceFollowService } from '@app/shared/shared-instance'
import { Actor } from '@peertube/peertube-models'
import { NgIf, NgFor } from '@angular/common'
+import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
@Component({
selector: 'my-about-follows',
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts
index 2f8cde98a7..792567bbe9 100644
--- a/client/src/app/+about/about-instance/about-instance.component.ts
+++ b/client/src/app/+about/about-instance/about-instance.component.ts
@@ -10,7 +10,7 @@ import { InstanceStatisticsComponent } from './instance-statistics.component'
import { InstanceFeaturesTableComponent } from '../../shared/shared-instance/instance-features-table.component'
import { PluginSelectorDirective } from '../../shared/shared-main/plugins/plugin-selector.directive'
import { CustomMarkupContainerComponent } from '../../shared/shared-custom-markup/custom-markup-container.component'
-import { AboutHTML } from '@app/shared/shared-main'
+import { AboutHTML } from '@app/shared/shared-main/instance/instance.service'
@Component({
selector: 'my-about-instance',
diff --git a/client/src/app/+about/about-instance/about-instance.resolver.ts b/client/src/app/+about/about-instance/about-instance.resolver.ts
index f98a21d5a7..84284bb745 100644
--- a/client/src/app/+about/about-instance/about-instance.resolver.ts
+++ b/client/src/app/+about/about-instance/about-instance.resolver.ts
@@ -2,9 +2,9 @@ import { forkJoin, Observable } from 'rxjs'
import { map, switchMap } from 'rxjs/operators'
import { Injectable } from '@angular/core'
import { ServerService } from '@app/core'
-import { CustomMarkupService } from '@app/shared/shared-custom-markup'
import { About, ServerStats } from '@peertube/peertube-models'
-import { InstanceService, AboutHTML } from '@app/shared/shared-main'
+import { AboutHTML, InstanceService } from '@app/shared/shared-main/instance/instance.service'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
export type ResolverData = {
serverStats: ServerStats
diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.ts b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
index 60c2a47ea2..0700420594 100644
--- a/client/src/app/+about/about-instance/contact-admin-modal.component.ts
+++ b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
@@ -7,14 +7,15 @@ import {
FROM_NAME_VALIDATOR,
SUBJECT_VALIDATOR
} from '@app/shared/form-validators/instance-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { InstanceService } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { HTMLServerConfig, HttpStatusCode } from '@peertube/peertube-models'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { InstanceService } from '@app/shared/shared-main/instance/instance.service'
type Prefill = {
subject?: string
diff --git a/client/src/app/+about/routes.ts b/client/src/app/+about/routes.ts
index fa7eb70927..88d56306fd 100644
--- a/client/src/app/+about/routes.ts
+++ b/client/src/app/+about/routes.ts
@@ -4,8 +4,9 @@ import { AboutInstanceComponent } from '@app/+about/about-instance/about-instanc
import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver'
import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
import { AboutComponent } from './about.component'
-import { InstanceFollowService } from '@app/shared/shared-instance'
-import { CustomMarkupService, DynamicElementService } from '@app/shared/shared-custom-markup'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
+import { DynamicElementService } from '@app/shared/shared-custom-markup/dynamic-element.service'
+import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
export default [
{
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
index dfb36fa0b1..34e03d6fd5 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
@@ -3,15 +3,19 @@ import { concatMap, map, switchMap, tap } from 'rxjs/operators'
import { Component, OnDestroy, OnInit } from '@angular/core'
import { ComponentPagination, hasMoreItems, MarkdownService, User, UserService } from '@app/core'
import { SimpleMemoize } from '@app/helpers'
-import { Account, AccountService, Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
-import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature'
import { NSFWPolicyType, VideoSortField } from '@peertube/peertube-models'
-import { VideoMiniatureComponent } from '../../shared/shared-video-miniature/video-miniature.component'
+import { MiniatureDisplayOptions, VideoMiniatureComponent } from '../../shared/shared-video-miniature/video-miniature.component'
import { SubscribeButtonComponent } from '../../shared/shared-user-subscription/subscribe-button.component'
import { RouterLink } from '@angular/router'
import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component'
import { InfiniteScrollerDirective } from '../../shared/shared-main/angular/infinite-scroller.directive'
import { NgIf, NgFor } from '@angular/common'
+import { AccountService } from '@app/shared/shared-main/account/account.service'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
@Component({
selector: 'my-account-video-channels',
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.ts
index ccafd34c96..a464cc1684 100644
--- a/client/src/app/+accounts/account-videos/account-videos.component.ts
+++ b/client/src/app/+accounts/account-videos/account-videos.component.ts
@@ -2,11 +2,13 @@ import { Subscription } from 'rxjs'
import { first } from 'rxjs/operators'
import { Component, OnDestroy, OnInit } from '@angular/core'
import { ComponentPaginationLight, DisableForReuseHook, ScreenService } from '@app/core'
-import { Account, AccountService, VideoService } from '@app/shared/shared-main'
-import { VideoFilters } from '@app/shared/shared-video-miniature'
import { VideoSortField } from '@peertube/peertube-models'
import { VideosListComponent } from '../../shared/shared-video-miniature/videos-list.component'
import { NgIf } from '@angular/common'
+import { AccountService } from '@app/shared/shared-main/account/account.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { VideoFilters } from '@app/shared/shared-video-miniature/video-filters.model'
@Component({
selector: 'my-account-videos',
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index 78ea8031e9..c5b1e185f7 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -3,19 +3,9 @@ import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/oper
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'
import { AuthService, MarkdownService, Notifier, RedirectService, RestExtractor, ScreenService, UserService } from '@app/core'
-import {
- Account,
- AccountService,
- DropdownAction,
- ListOverflowItem,
- VideoChannel,
- VideoChannelService,
- VideoService
-} from '@app/shared/shared-main'
-import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation'
import { HttpStatusCode, User, UserRight } from '@peertube/peertube-models'
import { SimpleSearchInputComponent } from '../shared/shared-main/misc/simple-search-input.component'
-import { ListOverflowComponent } from '../shared/shared-main/misc/list-overflow.component'
+import { ListOverflowComponent, ListOverflowItem } from '../shared/shared-main/misc/list-overflow.component'
import { SubscribeButtonComponent } from '../shared/shared-user-subscription/subscribe-button.component'
import { CopyButtonComponent } from '../shared/shared-main/buttons/copy-button.component'
import { AccountBlockBadgesComponent } from '../shared/shared-moderation/account-block-badges.component'
@@ -23,6 +13,14 @@ import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { UserModerationDropdownComponent } from '../shared/shared-moderation/user-moderation-dropdown.component'
import { ActorAvatarComponent } from '../shared/shared-actor-image/actor-avatar.component'
import { NgIf, NgClass, DatePipe } from '@angular/common'
+import { AccountService } from '@app/shared/shared-main/account/account.service'
+import { DropdownAction } from '@app/shared/shared-main/buttons/action-dropdown.component'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { AccountReportComponent } from '@app/shared/shared-moderation/report-modals'
@Component({
templateUrl: './accounts.component.html',
diff --git a/client/src/app/+accounts/routes.ts b/client/src/app/+accounts/routes.ts
index 8845201134..f9b3266e82 100644
--- a/client/src/app/+accounts/routes.ts
+++ b/client/src/app/+accounts/routes.ts
@@ -2,9 +2,11 @@ import { Routes } from '@angular/router'
import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component'
import { AccountVideosComponent } from './account-videos/account-videos.component'
import { AccountsComponent } from './accounts.component'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
-import { BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
export default [
{
@@ -18,7 +20,8 @@ export default [
UserSubscriptionService,
BlocklistService,
VideoPlaylistService,
- VideoBlockService
+ VideoBlockService,
+ AbuseService
],
children: [
{
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index 5a4f219289..766a4ec520 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -1,11 +1,11 @@
import { Component, OnInit } from '@angular/core'
import { AuthService, ScreenService, ServerService } from '@app/core'
-import { ListOverflowItem } from '@app/shared/shared-main'
import { TopMenuDropdownParam } from '@app/shared/shared-main/misc/top-menu-dropdown.component'
import { UserRight } from '@peertube/peertube-models'
import { RouterOutlet } from '@angular/router'
import { NgClass } from '@angular/common'
import { TopMenuDropdownComponent } from '../shared/shared-main/misc/top-menu-dropdown.component'
+import { ListOverflowItem } from '@app/shared/shared-main/misc/list-overflow.component'
@Component({
templateUrl: './admin.component.html',
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index dc88f681c2..452c259c05 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -26,8 +26,8 @@ import {
TRANSCODING_THREADS_VALIDATOR
} from '@app/shared/form-validators/custom-config-validators'
import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { CustomPageService } from '@app/shared/shared-main/custom-page'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { CustomConfig, CustomPage, HTMLServerConfig } from '@peertube/peertube-models'
import { EditConfigurationService } from './edit-configuration.service'
import { EditAdvancedConfigurationComponent } from './edit-advanced-configuration.component'
@@ -39,6 +39,7 @@ import { EditHomepageComponent } from './edit-homepage.component'
import { NgbNav, NgbNavItem, NgbNavLink, NgbNavLinkBase, NgbNavContent, NgbNavOutlet } from '@ng-bootstrap/ng-bootstrap'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgFor } from '@angular/common'
+import { CustomPageService } from '@app/shared/shared-main/custom-page/custom-page.service'
type ComponentCustomConfig = CustomConfig & {
instanceCustomHomepage: CustomPage
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts
index c22c77b275..131dbde2f4 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts
@@ -1,9 +1,9 @@
import { Component, Input } from '@angular/core'
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
-import { CustomMarkupService } from '@app/shared/shared-custom-markup'
import { NgIf } from '@angular/common'
import { MarkdownTextareaComponent } from '../../../shared/shared-forms/markdown-textarea.component'
import { CustomMarkupHelpComponent } from '../../../shared/shared-custom-markup/custom-markup-help.component'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
@Component({
selector: 'my-edit-homepage',
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.ts
index 57d65a4c1e..88f15aa00e 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.ts
@@ -1,11 +1,9 @@
import { SelectOptionsItem } from 'src/types/select-options-item.model'
import { Component, Input, OnInit } from '@angular/core'
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
-import { CustomMarkupService } from '@app/shared/shared-custom-markup'
import { Notifier, ServerService } from '@app/core'
import { HttpErrorResponse } from '@angular/common/http'
import { genericUploadErrorHandler } from '@app/helpers'
-import { InstanceService } from '@app/shared/shared-main'
import { ActorImage, HTMLServerConfig } from '@peertube/peertube-models'
import { HelpComponent } from '../../../shared/shared-main/misc/help.component'
import { PeerTubeTemplateDirective } from '../../../shared/shared-main/angular/peertube-template.directive'
@@ -17,6 +15,8 @@ import { CustomMarkupHelpComponent } from '../../../shared/shared-custom-markup/
import { NgClass, NgIf } from '@angular/common'
import { ActorBannerEditComponent } from '../../../shared/shared-actor-image-edit/actor-banner-edit.component'
import { ActorAvatarEditComponent } from '../../../shared/shared-actor-image-edit/actor-avatar-edit.component'
+import { InstanceService } from '@app/shared/shared-main/instance/instance.service'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
@Component({
selector: 'my-edit-instance-information',
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts
index cab1565487..09425ff946 100644
--- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts
+++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts
@@ -2,19 +2,17 @@ import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
import { formatICU } from '@app/helpers'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { InstanceFollowService } from '@app/shared/shared-instance'
-import { DropdownAction } from '@app/shared/shared-main'
import { ActorFollow } from '@peertube/peertube-models'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
import { DeleteButtonComponent } from '../../../shared/shared-main/buttons/delete-button.component'
import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
-import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component'
import { NgIf, DatePipe } from '@angular/common'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
@Component({
selector: 'my-followers-list',
diff --git a/client/src/app/+admin/follows/following-list/follow-modal.component.ts b/client/src/app/+admin/follows/following-list/follow-modal.component.ts
index a3a42e86dc..c642d2a3ab 100644
--- a/client/src/app/+admin/follows/following-list/follow-modal.component.ts
+++ b/client/src/app/+admin/follows/following-list/follow-modal.component.ts
@@ -2,13 +2,14 @@ import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/cor
import { Notifier } from '@app/core'
import { formatICU } from '@app/helpers'
import { splitAndGetNotEmpty, UNIQUE_HOSTS_OR_HANDLE_VALIDATOR } from '@app/shared/form-validators/host-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { InstanceFollowService } from '@app/shared/shared-instance'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { NgClass, NgIf } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
@Component({
selector: 'my-follow-modal',
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts
index ff50a9dcb8..61aaf1865c 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.ts
+++ b/client/src/app/+admin/follows/following-list/following-list.component.ts
@@ -1,20 +1,18 @@
import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit, ViewChild } from '@angular/core'
import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { InstanceFollowService } from '@app/shared/shared-instance'
import { ActorFollow } from '@peertube/peertube-models'
import { FollowModalComponent } from './follow-modal.component'
-import { DropdownAction } from '@app/shared/shared-main'
import { formatICU } from '@app/helpers'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
import { RedundancyCheckboxComponent } from '../shared/redundancy-checkbox.component'
import { DeleteButtonComponent } from '../../../shared/shared-main/buttons/delete-button.component'
-import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component'
import { NgIf, DatePipe } from '@angular/common'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
@Component({
templateUrl: './following-list.component.html',
diff --git a/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts b/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
index 87775188b7..24b91cf1a1 100644
--- a/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
+++ b/client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
@@ -1,8 +1,8 @@
import { Component, Input } from '@angular/core'
import { Notifier } from '@app/core'
-import { RedundancyService } from '@app/shared/shared-main'
import { FormsModule } from '@angular/forms'
import { PeertubeCheckboxComponent } from '../../../shared/shared-forms/peertube-checkbox.component'
+import { RedundancyService } from '@app/shared/shared-main/video/redundancy.service'
@Component({
selector: 'my-redundancy-checkbox',
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
index 74701b654a..1761b60008 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
@@ -2,7 +2,6 @@ import { ChartData, ChartOptions, TooltipItem } from 'chart.js'
import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
-import { BytesPipe, RedundancyService } from '@app/shared/shared-main'
import { VideoRedundanciesTarget, VideoRedundancy, VideosRedundancyStats } from '@peertube/peertube-models'
import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
import { ChartModule } from 'primeng/chart'
@@ -15,6 +14,8 @@ import { NgIf, NgFor } from '@angular/common'
import { TableModule } from 'primeng/table'
import { FormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { BytesPipe } from '@app/shared/shared-main/angular/bytes.pipe'
+import { RedundancyService } from '@app/shared/shared-main/video/redundancy.service'
@Component({
selector: 'my-video-redundancies-list',
diff --git a/client/src/app/+admin/moderation/index.ts b/client/src/app/+admin/moderation/index.ts
deleted file mode 100644
index 135b4b4084..0000000000
--- a/client/src/app/+admin/moderation/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from './abuse-list'
-export * from './instance-blocklist'
-export * from './video-block-list'
-export * from './registration-list'
-export * from './moderation.routes'
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts
index 33a70ed344..cb74aad760 100644
--- a/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts
+++ b/client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts
@@ -1,5 +1,4 @@
import { Component } from '@angular/core'
-import { BlocklistComponentType, GenericAccountBlocklistComponent } from '@app/shared/shared-moderation'
import { NgIf, DatePipe } from '@angular/common'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
import { ActorAvatarComponent } from '../../../shared/shared-actor-image/actor-avatar.component'
@@ -8,6 +7,8 @@ import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advan
import { SharedModule } from 'primeng/api'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { GenericAccountBlocklistComponent } from '@app/shared/shared-moderation/account-blocklist.component'
+import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service'
@Component({
selector: 'my-instance-account-blocklist',
diff --git a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts
index 16a6823c9b..7a5cdf5b71 100644
--- a/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts
+++ b/client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts
@@ -1,5 +1,4 @@
import { Component } from '@angular/core'
-import { GenericServerBlocklistComponent, BlocklistComponentType } from '@app/shared/shared-moderation'
import { BatchDomainsModalComponent } from '../../../shared/shared-moderation/batch-domains-modal.component'
import { NgIf, DatePipe } from '@angular/common'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
@@ -8,6 +7,8 @@ import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advan
import { SharedModule } from 'primeng/api'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { GenericServerBlocklistComponent } from '@app/shared/shared-moderation/server-blocklist.component'
+import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service'
@Component({
selector: 'my-instance-server-blocklist',
diff --git a/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts b/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts
index 3f71f2afd5..59082ddb6b 100644
--- a/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts
+++ b/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts
@@ -1,6 +1,7 @@
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
import { Notifier, ServerService } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { UserRegistration } from '@peertube/peertube-models'
diff --git a/client/src/app/+admin/moderation/registration-list/process-registration-validators.ts b/client/src/app/+admin/moderation/registration-list/process-registration-validators.ts
index e01a07d9d1..0bfea9f511 100644
--- a/client/src/app/+admin/moderation/registration-list/process-registration-validators.ts
+++ b/client/src/app/+admin/moderation/registration-list/process-registration-validators.ts
@@ -1,5 +1,5 @@
import { Validators } from '@angular/forms'
-import { BuildFormValidator } from '@app/shared/form-validators'
+import { BuildFormValidator } from '@app/shared/form-validators/form-validator.model'
export const REGISTRATION_MODERATION_RESPONSE_VALIDATOR: BuildFormValidator = {
VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ],
diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts
index 34f8993582..62c6c9d66f 100644
--- a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts
+++ b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts
@@ -3,8 +3,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
import { formatICU } from '@app/helpers'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { DropdownAction } from '@app/shared/shared-main'
import { UserRegistration, UserRegistrationState } from '@peertube/peertube-models'
import { AdminRegistrationService } from './admin-registration.service'
import { ProcessRegistrationModalComponent } from './process-registration-modal.component'
@@ -12,8 +10,8 @@ import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-c
import { UserEmailInfoComponent } from '../../shared/user-email-info.component'
import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
-import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component'
import { NgIf, NgClass, DatePipe } from '@angular/common'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
index aab9027001..33627395dc 100644
--- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
+++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
@@ -4,22 +4,21 @@ import { environment } from 'src/environments/environment'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { DropdownAction, VideoService } from '@app/shared/shared-main'
-import { VideoBlockService } from '@app/shared/shared-moderation'
import { buildVideoEmbedLink, decorateVideoLink } from '@peertube/peertube-core-utils'
import { VideoBlacklist, VideoBlacklistType, VideoBlacklistType_Type } from '@peertube/peertube-models'
import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
import { EmbedComponent } from '../../../shared/shared-main/video/embed.component'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
import { VideoCellComponent } from '../../../shared/shared-tables/video-cell.component'
-import { ActionDropdownComponent } from '../../../shared/shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component'
import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component'
import { NgIf, NgClass, DatePipe } from '@angular/common'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
-import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
@Component({
selector: 'my-video-block-list',
diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.ts b/client/src/app/+admin/overview/comments/video-comment-list.component.ts
index a8692797c9..f0fe8880ed 100644
--- a/client/src/app/+admin/overview/comments/video-comment-list.component.ts
+++ b/client/src/app/+admin/overview/comments/video-comment-list.component.ts
@@ -2,10 +2,6 @@ import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { AuthService, ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { DropdownAction } from '@app/shared/shared-main'
-import { BulkService } from '@app/shared/shared-moderation'
-import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment'
import { FeedFormat, UserRight } from '@peertube/peertube-models'
import { formatICU } from '@app/helpers'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
@@ -13,12 +9,15 @@ import { ActorAvatarComponent } from '../../../shared/shared-actor-image/actor-a
import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component'
-import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component'
import { NgIf, NgClass, DatePipe } from '@angular/common'
import { TableModule } from 'primeng/table'
import { FeedComponent } from '../../../shared/shared-main/feeds/feed.component'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { VideoCommentAdmin } from '@app/shared/shared-video-comment/video-comment.model'
+import { BulkService } from '@app/shared/shared-moderation/bulk.service'
+import { VideoCommentService } from '@app/shared/shared-video-comment/video-comment.service'
@Component({
selector: 'my-video-comment-list',
diff --git a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts
index 2221e24af4..f673584152 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts
@@ -12,8 +12,7 @@ import {
USER_VIDEO_QUOTA_DAILY_VALIDATOR,
USER_VIDEO_QUOTA_VALIDATOR
} from '@app/shared/form-validators/user-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { UserAdminService } from '@app/shared/shared-users'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { UserCreate, UserRole } from '@peertube/peertube-models'
import { UserEdit } from './user-edit'
import { BytesPipe } from '../../../../shared/shared-main/angular/bytes.pipe'
@@ -27,6 +26,7 @@ import { HelpComponent } from '../../../../shared/shared-main/misc/help.componen
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { ActorAvatarEditComponent } from '../../../../shared/shared-actor-image-edit/actor-avatar-edit.component'
import { NgIf, NgTemplateOutlet, NgClass, NgFor } from '@angular/common'
+import { UserAdminService } from '@app/shared/shared-users/user-admin.service'
@Component({
selector: 'my-user-create',
diff --git a/client/src/app/+admin/overview/users/user-edit/user-edit.ts b/client/src/app/+admin/overview/users/user-edit/user-edit.ts
index d61b7b0689..2be5635e6f 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-edit.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-edit.ts
@@ -1,10 +1,10 @@
import { Directive, OnInit } from '@angular/core'
import { ConfigService } from '@app/+admin/config/shared/config.service'
import { AuthService, ScreenService, ServerService, User } from '@app/core'
-import { FormReactive } from '@app/shared/shared-forms'
import { peertubeTranslate, USER_ROLE_LABELS } from '@peertube/peertube-core-utils'
import { HTMLServerConfig, UserAdminFlag, UserRole } from '@peertube/peertube-models'
import { SelectOptionsItem } from '../../../../../types/select-options-item.model'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
@Directive()
// eslint-disable-next-line @angular-eslint/directive-class-suffix
diff --git a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts
index 4efeb29839..0b24ceec69 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts
@@ -1,11 +1,12 @@
import { Component, Input, OnInit } from '@angular/core'
import { Notifier } from '@app/core'
import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { UserAdminService } from '@app/shared/shared-users'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { UserUpdate } from '@peertube/peertube-models'
import { NgClass, NgIf } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { UserAdminService } from '@app/shared/shared-users/user-admin.service'
@Component({
selector: 'my-user-password',
diff --git a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts
index fb4ac1f10c..b91169c445 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts
@@ -9,8 +9,7 @@ import {
USER_VIDEO_QUOTA_DAILY_VALIDATOR,
USER_VIDEO_QUOTA_VALIDATOR
} from '@app/shared/form-validators/user-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { TwoFactorService, UserAdminService } from '@app/shared/shared-users'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@peertube/peertube-models'
import { UserEdit } from './user-edit'
import { BytesPipe } from '../../../../shared/shared-main/angular/bytes.pipe'
@@ -24,6 +23,8 @@ import { HelpComponent } from '../../../../shared/shared-main/misc/help.componen
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { ActorAvatarEditComponent } from '../../../../shared/shared-actor-image-edit/actor-avatar-edit.component'
import { NgIf, NgTemplateOutlet, NgClass, NgFor } from '@angular/common'
+import { UserAdminService } from '@app/shared/shared-users/user-admin.service'
+import { TwoFactorService } from '@app/shared/shared-users/two-factor.service'
@Component({
selector: 'my-user-update',
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts
index 7a0e8fd73d..624560a278 100644
--- a/client/src/app/+admin/overview/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts
@@ -3,27 +3,31 @@ import { Component, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router, RouterLink } from '@angular/router'
import { AuthService, ConfirmService, LocalStorageService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
import { formatICU, getAPIHost } from '@app/helpers'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { Actor, DropdownAction } from '@app/shared/shared-main'
-import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation'
-import { UserAdminService } from '@app/shared/shared-users'
import { User, UserRole, UserRoleType } from '@peertube/peertube-models'
import { logger } from '@root-helpers/logger'
import { BytesPipe } from '../../../../shared/shared-main/angular/bytes.pipe'
import { AutoColspanDirective } from '../../../../shared/shared-main/angular/auto-colspan.directive'
import { UserEmailInfoComponent } from '../../../shared/user-email-info.component'
import { ActorAvatarComponent } from '../../../../shared/shared-actor-image/actor-avatar.component'
-import { UserModerationDropdownComponent } from '../../../../shared/shared-moderation/user-moderation-dropdown.component'
+import {
+ AccountMutedStatus,
+ UserModerationDisplayType,
+ UserModerationDropdownComponent
+} from '../../../../shared/shared-moderation/user-moderation-dropdown.component'
import { TableExpanderIconComponent } from '../../../../shared/shared-tables/table-expander-icon.component'
import { PeertubeCheckboxComponent } from '../../../../shared/shared-forms/peertube-checkbox.component'
import { FormsModule } from '@angular/forms'
import { SelectCheckboxComponent } from '../../../../shared/shared-forms/select/select-checkbox.component'
import { NgbDropdown, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
-import { AdvancedInputFilterComponent } from '../../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component'
import { NgIf, NgClass, DatePipe } from '@angular/common'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component'
+import { Actor } from '@app/shared/shared-main/account/actor.model'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { UserBanModalComponent } from '@app/shared/shared-moderation/user-ban-modal.component'
+import { UserAdminService } from '@app/shared/shared-users/user-admin.service'
type UserForList = User & {
rawVideoQuota: number
diff --git a/client/src/app/+admin/overview/videos/video-admin.service.ts b/client/src/app/+admin/overview/videos/video-admin.service.ts
index 9b33ed8e51..af1357381e 100644
--- a/client/src/app/+admin/overview/videos/video-admin.service.ts
+++ b/client/src/app/+admin/overview/videos/video-admin.service.ts
@@ -3,10 +3,11 @@ import { catchError, switchMap } from 'rxjs/operators'
import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor, RestPagination, RestService } from '@app/core'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { CommonVideoParams, Video, VideoService } from '@app/shared/shared-main'
import { ResultList, VideoInclude, VideoPrivacy } from '@peertube/peertube-models'
import { getAllPrivacies } from '@peertube/peertube-core-utils'
+import { VideoService, CommonVideoParams } from '@app/shared/shared-main/video/video.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { AdvancedInputFilter } from '@app/shared/shared-forms/advanced-input-filter.component'
@Injectable()
export class VideoAdminService {
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts
index 6a19d35bf0..8a50d3f563 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.ts
+++ b/client/src/app/+admin/overview/videos/video-list.component.ts
@@ -4,10 +4,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { AuthService, ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
import { formatICU, getAbsoluteAPIUrl } from '@app/helpers'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
-import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation'
-import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature'
import { getAllFiles } from '@peertube/peertube-core-utils'
import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@peertube/peertube-models'
import { VideoAdminService } from './video-admin.service'
@@ -15,15 +11,22 @@ import { BytesPipe } from '../../../shared/shared-main/angular/bytes.pipe'
import { EmbedComponent } from '../../../shared/shared-main/video/embed.component'
import { AutoColspanDirective } from '../../../shared/shared-main/angular/auto-colspan.directive'
import { VideoCellComponent } from '../../../shared/shared-tables/video-cell.component'
-import { VideoActionsDropdownComponent } from '../../../shared/shared-video-miniature/video-actions-dropdown.component'
+import {
+ VideoActionsDisplayType,
+ VideoActionsDropdownComponent
+} from '../../../shared/shared-video-miniature/video-actions-dropdown.component'
import { TableExpanderIconComponent } from '../../../shared/shared-tables/table-expander-icon.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component'
-import { AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../shared/shared-main/buttons/action-dropdown.component'
import { NgClass, NgIf, NgFor, DatePipe } from '@angular/common'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoBlockComponent } from '@app/shared/shared-moderation/video-block.component'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
@Component({
selector: 'my-video-list',
diff --git a/client/src/app/+admin/plugins/index.ts b/client/src/app/+admin/plugins/index.ts
deleted file mode 100644
index 30de8dc8f6..0000000000
--- a/client/src/app/+admin/plugins/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './shared'
-export * from './plugin-list-installed'
-export * from './plugin-search'
-export * from './plugin-show-installed'
diff --git a/client/src/app/+admin/plugins/plugin-list-installed/index.ts b/client/src/app/+admin/plugins/plugin-list-installed/index.ts
deleted file mode 100644
index 0704fd22e7..0000000000
--- a/client/src/app/+admin/plugins/plugin-list-installed/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './plugin-list-installed.component'
diff --git a/client/src/app/+admin/plugins/plugin-search/index.ts b/client/src/app/+admin/plugins/plugin-search/index.ts
deleted file mode 100644
index 5bb90a62f4..0000000000
--- a/client/src/app/+admin/plugins/plugin-search/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './plugin-search.component'
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/index.ts b/client/src/app/+admin/plugins/plugin-show-installed/index.ts
deleted file mode 100644
index 8aeceb90fd..0000000000
--- a/client/src/app/+admin/plugins/plugin-show-installed/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './plugin-show-installed.component'
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
index 8d876af310..348637c5b5 100644
--- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
@@ -3,13 +3,14 @@ import { map, switchMap } from 'rxjs/operators'
import { Component, OnDestroy, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { HooksService, Notifier, PluginService } from '@app/core'
-import { BuildFormArgument } from '@app/shared/form-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { PeerTubePlugin, RegisterServerSettingOptions } from '@peertube/peertube-models'
import { PluginApiService } from '../shared/plugin-api.service'
import { DynamicFormFieldComponent } from '../../../shared/shared-forms/dynamic-form-field.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgFor } from '@angular/common'
+import { BuildFormArgument } from '@app/shared/form-validators/form-validator.model'
@Component({
selector: 'my-plugin-show-installed',
diff --git a/client/src/app/+admin/plugins/shared/index.ts b/client/src/app/+admin/plugins/shared/index.ts
deleted file mode 100644
index 6d616b3726..0000000000
--- a/client/src/app/+admin/plugins/shared/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './plugin-api.service'
-export * from './plugin-card.component'
-export * from './plugin-navigation.component'
diff --git a/client/src/app/+admin/routes.ts b/client/src/app/+admin/routes.ts
index 3a2ceda266..a0af800c11 100644
--- a/client/src/app/+admin/routes.ts
+++ b/client/src/app/+admin/routes.ts
@@ -6,17 +6,23 @@ import { DebugService, JobService, LogsService, RunnerService, SystemRoutes } fr
import { AdminComponent } from './admin.component'
import { FollowsRoutes } from './follows'
import { OverviewRoutes, VideoAdminService } from './overview'
-import { TwoFactorService, UserAdminService } from '@app/shared/shared-users'
-import { AbuseService, BlocklistService, BulkService, VideoBlockService } from '@app/shared/shared-moderation'
-import { CustomMarkupService, DynamicElementService } from '@app/shared/shared-custom-markup'
-import { InstanceFollowService } from '@app/shared/shared-instance'
-import { CustomPageService } from '@app/shared/shared-main/custom-page'
-import { VideoCommentService } from '@app/shared/shared-video-comment'
import { AdminRegistrationService } from './moderation/registration-list'
import { PluginApiService } from './plugins/shared/plugin-api.service'
import { ConfigService } from './config/shared/config.service'
-import { FindInBulkService, SearchService } from '@app/shared/shared-search'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
+import { CustomPageService } from '@app/shared/shared-main/custom-page/custom-page.service'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
+import { DynamicElementService } from '@app/shared/shared-custom-markup/dynamic-element.service'
+import { InstanceFollowService } from '@app/shared/shared-instance/instance-follow.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { BulkService } from '@app/shared/shared-moderation/bulk.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { FindInBulkService } from '@app/shared/shared-search/find-in-bulk.service'
+import { SearchService } from '@app/shared/shared-search/search.service'
+import { TwoFactorService } from '@app/shared/shared-users/two-factor.service'
+import { UserAdminService } from '@app/shared/shared-users/user-admin.service'
+import { VideoCommentService } from '@app/shared/shared-video-comment/video-comment.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
export default [
{
diff --git a/client/src/app/+admin/shared/index.ts b/client/src/app/+admin/shared/index.ts
deleted file mode 100644
index f3ef9cdcd8..0000000000
--- a/client/src/app/+admin/shared/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './user-email-info.component'
-export * from './user-real-quota-info.component'
diff --git a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts
index 249cb149f5..a11bc22110 100644
--- a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts
+++ b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts
@@ -2,15 +2,13 @@ import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
import { formatICU } from '@app/helpers'
-import { DropdownAction } from '@app/shared/shared-main'
import { RunnerJob, RunnerJobState } from '@peertube/peertube-models'
import { RunnerJobFormatted, RunnerService } from '../runner.service'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
import { AutoColspanDirective } from '../../../../shared/shared-main/angular/auto-colspan.directive'
import { TableExpanderIconComponent } from '../../../../shared/shared-tables/table-expander-icon.component'
import { ButtonComponent } from '../../../../shared/shared-main/buttons/button.component'
-import { AdvancedInputFilterComponent } from '../../../../shared/shared-forms/advanced-input-filter.component'
-import { ActionDropdownComponent } from '../../../../shared/shared-main/buttons/action-dropdown.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../../../shared/shared-forms/advanced-input-filter.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component'
import { NgIf, NgClass } from '@angular/common'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { TableModule } from 'primeng/table'
diff --git a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts
index 6b9d6ec71d..f3ed8804f9 100644
--- a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts
+++ b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts
@@ -1,12 +1,11 @@
import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
-import { DropdownAction } from '@app/shared/shared-main'
import { Runner } from '@peertube/peertube-models'
import { RunnerService } from '../runner.service'
import { DatePipe } from '@angular/common'
import { AutoColspanDirective } from '../../../../shared/shared-main/angular/auto-colspan.directive'
-import { ActionDropdownComponent } from '../../../../shared/shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { TableModule } from 'primeng/table'
import { RouterLink } from '@angular/router'
diff --git a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts
index d393da4691..59ee374ed4 100644
--- a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts
+++ b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts
@@ -1,13 +1,12 @@
import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
-import { DropdownAction } from '@app/shared/shared-main'
import { RunnerRegistrationToken } from '@peertube/peertube-models'
import { RunnerService } from '../runner.service'
import { DatePipe } from '@angular/common'
import { AutoColspanDirective } from '../../../../shared/shared-main/angular/auto-colspan.directive'
import { CopyButtonComponent } from '../../../../shared/shared-main/buttons/copy-button.component'
-import { ActionDropdownComponent } from '../../../../shared/shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../../../../shared/shared-main/buttons/action-dropdown.component'
import { ButtonComponent } from '../../../../shared/shared-main/buttons/button.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { TableModule } from 'primeng/table'
diff --git a/client/src/app/+home/home.component.ts b/client/src/app/+home/home.component.ts
index 813846ab71..15c009feec 100644
--- a/client/src/app/+home/home.component.ts
+++ b/client/src/app/+home/home.component.ts
@@ -1,6 +1,6 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
-import { CustomPageService } from '@app/shared/shared-main/custom-page'
import { CustomMarkupContainerComponent } from '../shared/shared-custom-markup/custom-markup-container.component'
+import { CustomPageService } from '@app/shared/shared-main/custom-page/custom-page.service'
@Component({
templateUrl: './home.component.html',
diff --git a/client/src/app/+home/routes.ts b/client/src/app/+home/routes.ts
index 10e0a62eb6..c4f18f5cfe 100644
--- a/client/src/app/+home/routes.ts
+++ b/client/src/app/+home/routes.ts
@@ -1,10 +1,14 @@
import { Routes } from '@angular/router'
import { HomeComponent } from './home.component'
-import { CustomPageService } from '../shared/shared-main/custom-page'
-import { CustomMarkupService, DynamicElementService } from '@app/shared/shared-custom-markup'
-import { FindInBulkService, SearchService } from '@app/shared/shared-search'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
-import { BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
+import { CustomPageService } from '@app/shared/shared-main/custom-page/custom-page.service'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
+import { DynamicElementService } from '@app/shared/shared-custom-markup/dynamic-element.service'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { FindInBulkService } from '@app/shared/shared-search/find-in-bulk.service'
+import { SearchService } from '@app/shared/shared-search/search.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
export default [
{
@@ -18,7 +22,8 @@ export default [
CustomMarkupService,
DynamicElementService,
BlocklistService,
- VideoBlockService
+ VideoBlockService,
+ AbuseService
],
data: {
meta: {
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index 743f81872a..b6ee6c0182 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -5,8 +5,6 @@ import { AuthService, Notifier, RedirectService, SessionStorageService, UserServ
import { HooksService } from '@app/core/plugins/hooks.service'
import { LOGIN_PASSWORD_VALIDATOR, LOGIN_USERNAME_VALIDATOR } from '@app/shared/form-validators/login-validators'
import { USER_OTP_TOKEN_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService, InputTextComponent } from '@app/shared/shared-forms'
-import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
import { NgbAccordionDirective, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
import { getExternalAuthHref } from '@peertube/peertube-core-utils'
import { RegisteredExternalAuthConfig, ServerConfig, ServerErrorCode } from '@peertube/peertube-models'
@@ -16,6 +14,10 @@ import { AutofocusDirective } from '../shared/shared-main/angular/autofocus.dire
import { PluginSelectorDirective } from '../shared/shared-main/plugins/plugin-selector.directive'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass, NgTemplateOutlet, NgFor } from '@angular/common'
+import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance/instance-about-accordion.component'
+import { InputTextComponent } from '@app/shared/shared-forms/input-text.component'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
@Component({
selector: 'my-login',
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
index 74bf83ee9f..ff641a4be7 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
@@ -9,8 +9,7 @@ import {
VIDEO_CHANNEL_NAME_VALIDATOR,
VIDEO_CHANNEL_SUPPORT_VALIDATOR
} from '@app/shared/form-validators/video-channel-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { HttpStatusCode, VideoChannelCreate } from '@peertube/peertube-models'
import { VideoChannelEdit } from './video-channel-edit'
import { PeertubeCheckboxComponent } from '../../shared/shared-forms/peertube-checkbox.component'
@@ -20,6 +19,8 @@ import { ActorAvatarEditComponent } from '../../shared/shared-actor-image-edit/a
import { ActorBannerEditComponent } from '../../shared/shared-actor-image-edit/actor-banner-edit.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
@Component({
templateUrl: './video-channel-edit.component.html',
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-edit.ts b/client/src/app/+manage/video-channel-edit/video-channel-edit.ts
index 963b4cbbe2..dd341f0c78 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-edit.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-edit.ts
@@ -1,5 +1,5 @@
-import { FormReactive } from '@app/shared/shared-forms'
-import { VideoChannel } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
export abstract class VideoChannelEdit extends FormReactive {
videoChannel: VideoChannel
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
index 94d7e76980..89488a4c14 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
@@ -9,8 +9,7 @@ import {
VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR,
VIDEO_CHANNEL_SUPPORT_VALIDATOR
} from '@app/shared/form-validators/video-channel-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { VideoChannelUpdate } from '@peertube/peertube-models'
import { VideoChannelEdit } from './video-channel-edit'
import { shallowCopy } from '@peertube/peertube-core-utils'
@@ -21,6 +20,8 @@ import { ActorAvatarEditComponent } from '../../shared/shared-actor-image-edit/a
import { ActorBannerEditComponent } from '../../shared/shared-actor-image-edit/actor-banner-edit.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
@Component({
selector: 'my-video-channel-update',
diff --git a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts
index 621ef3c27a..97e8c11e49 100644
--- a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts
+++ b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts
@@ -1,10 +1,10 @@
import { Component, OnInit } from '@angular/core'
import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core'
-import { VideoService } from '@app/shared/shared-main'
import { FeedFormat, ScopedToken } from '@peertube/peertube-models'
import { environment } from '../../../environments/environment'
import { InputTextComponent } from '../../shared/shared-forms/input-text.component'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Component({
selector: 'my-account-applications',
diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts
index b7c9b6ca44..8c339763d8 100644
--- a/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts
+++ b/client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts
@@ -1,5 +1,4 @@
import { Component } from '@angular/core'
-import { BlocklistComponentType, GenericAccountBlocklistComponent } from '@app/shared/shared-moderation'
import { NgIf, DatePipe } from '@angular/common'
import { AutoColspanDirective } from '../../shared/shared-main/angular/auto-colspan.directive'
import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component'
@@ -8,6 +7,8 @@ import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced
import { SharedModule } from 'primeng/api'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { GenericAccountBlocklistComponent } from '@app/shared/shared-moderation/account-blocklist.component'
+import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service'
@Component({
selector: 'my-account-blocklist',
diff --git a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts
index d323647956..2f2186fa1a 100644
--- a/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts
+++ b/client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts
@@ -1,5 +1,4 @@
import { Component } from '@angular/core'
-import { BlocklistComponentType, GenericServerBlocklistComponent } from '@app/shared/shared-moderation'
import { BatchDomainsModalComponent } from '../../shared/shared-moderation/batch-domains-modal.component'
import { NgIf, DatePipe } from '@angular/common'
import { AutoColspanDirective } from '../../shared/shared-main/angular/auto-colspan.directive'
@@ -8,6 +7,8 @@ import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced
import { SharedModule } from 'primeng/api'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { BlocklistComponentType } from '@app/shared/shared-moderation/blocklist.service'
+import { GenericServerBlocklistComponent } from '@app/shared/shared-moderation/server-blocklist.component'
@Component({
selector: 'my-account-server-blocklist',
diff --git a/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts b/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts
index f63dea7632..154d2e7886 100644
--- a/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts
+++ b/client/src/app/+my-account/my-account-import-export/my-account-import.component.ts
@@ -6,10 +6,10 @@ import { HttpErrorResponse } from '@angular/common/http'
import { buildHTTPErrorResponse, genericUploadErrorHandler, getUploadXRetryConfig } from '@app/helpers'
import { HttpStatusCode, UserImport, UserImportState } from '@peertube/peertube-models'
import { UploadxService, UploadState, UploaderX } from 'ngx-uploadx'
-import { BytesPipe } from '@app/shared/shared-main'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { UploadProgressComponent } from '../../shared/standalone-upload/upload-progress.component'
import { NgIf, DatePipe } from '@angular/common'
+import { BytesPipe } from '@app/shared/shared-main/angular/bytes.pipe'
@Component({
selector: 'my-account-import',
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/index.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/index.ts
deleted file mode 100644
index f42af361ef..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-change-email/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './my-account-change-email.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
index ac1623da8f..38aec995a4 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
@@ -3,7 +3,8 @@ import { tap } from 'rxjs/operators'
import { Component, OnInit } from '@angular/core'
import { AuthService, Notifier, ServerService, UserService } from '@app/core'
import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { HttpStatusCode, User } from '@peertube/peertube-models'
import { InputTextComponent } from '../../../shared/shared-forms/input-text.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts
deleted file mode 100644
index 644047c5f7..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './my-account-change-password.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
index 98dd67a9f4..8806341a4f 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
@@ -6,7 +6,8 @@ import {
USER_EXISTING_PASSWORD_VALIDATOR,
USER_PASSWORD_VALIDATOR
} from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { HttpStatusCode, User } from '@peertube/peertube-models'
import { InputTextComponent } from '../../../shared/shared-forms/input-text.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/index.ts b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/index.ts
deleted file mode 100644
index 88a39bb97e..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './my-account-danger-zone.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/index.ts b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/index.ts
deleted file mode 100644
index 20b98e7d89..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './my-account-email-preferences.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts
index 8dc09fb250..ab0019f7c1 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts
@@ -1,7 +1,8 @@
import { Subject } from 'rxjs'
import { Component, Input, OnInit } from '@angular/core'
import { Notifier, UserService } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { User, UserUpdateMe } from '@peertube/peertube-models'
import { PeertubeCheckboxComponent } from '../../../shared/shared-forms/peertube-checkbox.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts
deleted file mode 100644
index 5e1d513397..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './my-account-notification-preferences.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
index cb7140b270..4fa2ed6d7a 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
@@ -2,12 +2,12 @@ import { debounce } from 'lodash-es'
import { Subject } from 'rxjs'
import { Component, Input, OnInit } from '@angular/core'
import { Notifier, ServerService, User } from '@app/core'
-import { UserNotificationService } from '@app/shared/shared-main'
import { objectKeysTyped } from '@peertube/peertube-core-utils'
import { UserNotificationSetting, UserNotificationSettingValue, UserRight, UserRightType } from '@peertube/peertube-models'
import { FormsModule } from '@angular/forms'
import { InputSwitchComponent } from '../../../shared/shared-forms/input-switch.component'
import { NgIf, NgFor } from '@angular/common'
+import { UserNotificationService } from '@app/shared/shared-main/users/user-notification.service'
@Component({
selector: 'my-account-notification-preferences',
diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/index.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/index.ts
deleted file mode 100644
index 3cc049f8ff..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-profile/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './my-account-profile.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
index d3c4dae54d..44e3b3d9c2 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
@@ -2,7 +2,8 @@ import { Subject } from 'rxjs'
import { Component, Input, OnInit } from '@angular/core'
import { Notifier, User, UserService } from '@app/core'
import { USER_DESCRIPTION_VALIDATOR, USER_DISPLAY_NAME_REQUIRED_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-two-factor/index.ts b/client/src/app/+my-account/my-account-settings/my-account-two-factor/index.ts
deleted file mode 100644
index cc774bde33..0000000000
--- a/client/src/app/+my-account/my-account-settings/my-account-two-factor/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './my-account-two-factor-button.component'
-export * from './my-account-two-factor.component'
diff --git a/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.ts b/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.ts
index 79fd68ca61..d9aaa58ccb 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor-button.component.ts
@@ -1,9 +1,9 @@
import { Subject } from 'rxjs'
import { Component, Input, OnInit } from '@angular/core'
import { AuthService, ConfirmService, Notifier, User } from '@app/core'
-import { TwoFactorService } from '@app/shared/shared-users'
import { ButtonComponent } from '../../../shared/shared-main/buttons/button.component'
import { NgIf } from '@angular/common'
+import { TwoFactorService } from '@app/shared/shared-users/two-factor.service'
@Component({
selector: 'my-account-two-factor-button',
diff --git a/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor.component.ts b/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor.component.ts
index 21168b83a8..b98ec7cf87 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-two-factor/my-account-two-factor.component.ts
@@ -3,12 +3,12 @@ import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
import { Router } from '@angular/router'
import { AuthService, Notifier, User } from '@app/core'
import { USER_EXISTING_PASSWORD_VALIDATOR, USER_OTP_TOKEN_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { TwoFactorService } from '@app/shared/shared-users'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { QRCodeModule } from 'angularx-qrcode'
import { InputTextComponent } from '../../../shared/shared-forms/input-text.component'
import { NgIf } from '@angular/common'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { TwoFactorService } from '@app/shared/shared-users/two-factor.service'
@Component({
selector: 'my-account-two-factor',
diff --git a/client/src/app/+my-account/routes.ts b/client/src/app/+my-account/routes.ts
index 3109a85f87..179a965978 100644
--- a/client/src/app/+my-account/routes.ts
+++ b/client/src/app/+my-account/routes.ts
@@ -6,12 +6,14 @@ import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-b
import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
-import { MyAccountTwoFactorComponent } from './my-account-settings/my-account-two-factor'
import { MyAccountImportExportComponent, UserImportExportService } from './my-account-import-export'
import { MyAccountComponent } from './my-account.component'
-import { TwoFactorService } from '@app/shared/shared-users'
-import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
-import { VideoCommentService } from '@app/shared/shared-video-comment'
+import { MyAccountTwoFactorComponent } from './my-account-settings/my-account-two-factor/my-account-two-factor.component'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { TwoFactorService } from '@app/shared/shared-users/two-factor.service'
+import { VideoCommentService } from '@app/shared/shared-video-comment/video-comment.service'
export default [
{
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
index e242eb75b8..1bc5829dd0 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
@@ -3,7 +3,6 @@ import { max, maxBy, min, minBy } from 'lodash-es'
import { Subject, first, map, switchMap } from 'rxjs'
import { Component } from '@angular/core'
import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifier, ScreenService } from '@app/core'
-import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
import { formatICU } from '@app/helpers'
import { NumberFormatterPipe } from '../../shared/shared-main/angular/number-formatter.pipe'
import { ChartModule } from 'primeng/chart'
@@ -17,6 +16,8 @@ import { ChannelsSetupMessageComponent } from '../../shared/shared-main/misc/cha
import { RouterLink } from '@angular/router'
import { NgIf, NgFor } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
@Component({
templateUrl: './my-video-channels.component.html',
diff --git a/client/src/app/+my-library/my-follows/my-followers.component.ts b/client/src/app/+my-library/my-follows/my-followers.component.ts
index 2395bf4383..b8c12a2d7b 100644
--- a/client/src/app/+my-library/my-follows/my-followers.component.ts
+++ b/client/src/app/+my-library/my-follows/my-followers.component.ts
@@ -2,14 +2,13 @@ import { Subject } from 'rxjs'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { AuthService, ComponentPagination, Notifier } from '@app/core'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
import { ActorFollow } from '@peertube/peertube-models'
import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component'
import { InfiniteScrollerDirective } from '../../shared/shared-main/angular/infinite-scroller.directive'
-import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
import { NgIf, NgFor } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
@Component({
templateUrl: './my-followers.component.html',
diff --git a/client/src/app/+my-library/my-follows/my-subscriptions.component.ts b/client/src/app/+my-library/my-follows/my-subscriptions.component.ts
index d0cb493a78..0cf70d6f91 100644
--- a/client/src/app/+my-library/my-follows/my-subscriptions.component.ts
+++ b/client/src/app/+my-library/my-follows/my-subscriptions.component.ts
@@ -1,8 +1,6 @@
import { Subject } from 'rxjs'
import { Component } from '@angular/core'
import { ComponentPagination, Notifier } from '@app/core'
-import { VideoChannel } from '@app/shared/shared-main'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
import { SubscribeButtonComponent } from '../../shared/shared-user-subscription/subscribe-button.component'
import { RouterLink } from '@angular/router'
import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component'
@@ -10,6 +8,8 @@ import { InfiniteScrollerDirective } from '../../shared/shared-main/angular/infi
import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
import { NgIf, NgFor } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
@Component({
templateUrl: './my-subscriptions.component.html',
diff --git a/client/src/app/+my-library/my-history/my-history.component.ts b/client/src/app/+my-library/my-history/my-history.component.ts
index 6e3bf1ada8..568db4071d 100644
--- a/client/src/app/+my-library/my-history/my-history.component.ts
+++ b/client/src/app/+my-library/my-history/my-history.component.ts
@@ -2,8 +2,6 @@ import { tap } from 'rxjs/operators'
import { Component, OnInit, ViewChild } from '@angular/core'
import { AuthService, ComponentPagination, ConfirmService, DisableForReuseHook, Notifier, User, UserService } from '@app/core'
import { immutableAssign } from '@app/helpers'
-import { UserHistoryService, Video } from '@app/shared/shared-main'
-import { MiniatureDisplayOptions, VideosSelectionComponent } from '@app/shared/shared-video-miniature'
import { DeleteButtonComponent } from '../../shared/shared-main/buttons/delete-button.component'
import { PeerTubeTemplateDirective } from '../../shared/shared-main/angular/peertube-template.directive'
import { FormsModule } from '@angular/forms'
@@ -11,6 +9,10 @@ import { InputSwitchComponent } from '../../shared/shared-forms/input-switch.com
import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
import { NgIf } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { UserHistoryService } from '@app/shared/shared-main/users/user-history.service'
+import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature/video-miniature.component'
+import { VideosSelectionComponent } from '@app/shared/shared-video-miniature/videos-selection.component'
@Component({
templateUrl: './my-history.component.html',
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
index 176d51b2a1..1d9cb73cf9 100644
--- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
@@ -3,14 +3,15 @@ import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '
import { AuthService, Notifier } from '@app/core'
import { listUserChannelsForSelect } from '@app/helpers'
import { OWNERSHIP_CHANGE_CHANNEL_VALIDATOR } from '@app/shared/form-validators/video-ownership-change-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { VideoOwnershipService } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { VideoChangeOwnership } from '@peertube/peertube-models'
import { NgIf } from '@angular/common'
import { SelectChannelComponent } from '../../../shared/shared-forms/select/select-channel.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { VideoOwnershipService } from '@app/shared/shared-main/video/video-ownership.service'
@Component({
selector: 'my-accept-ownership',
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-ownership.component.ts
index 2e808893b1..7ddf34f3d3 100644
--- a/client/src/app/+my-library/my-ownership/my-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-ownership.component.ts
@@ -1,7 +1,6 @@
import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit, ViewChild } from '@angular/core'
import { Notifier, RestPagination, RestTable } from '@app/core'
-import { Account, VideoOwnershipService } from '@app/shared/shared-main'
import { VideoChangeOwnership, VideoChangeOwnershipStatus, VideoChangeOwnershipStatusType } from '@peertube/peertube-models'
import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component'
import { AutoColspanDirective } from '../../shared/shared-main/angular/auto-colspan.directive'
@@ -11,6 +10,8 @@ import { NgIf, NgClass, DatePipe } from '@angular/common'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { VideoOwnershipService } from '@app/shared/shared-main/video/video-ownership.service'
+import { Account } from '@app/shared/shared-main/account/account.model'
@Component({
templateUrl: './my-ownership.component.html',
diff --git a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
index 4d04f0581a..2bc131aa9f 100644
--- a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
+++ b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
@@ -2,15 +2,16 @@ import { SortMeta, SharedModule } from 'primeng/api'
import { mergeMap } from 'rxjs'
import { Component, OnInit } from '@angular/core'
import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
-import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main'
import { HTMLServerConfig, VideoChannelSync, VideoChannelSyncState, VideoChannelSyncStateType } from '@peertube/peertube-models'
import { ActorAvatarComponent } from '../../shared/shared-actor-image/actor-avatar.component'
-import { ActionDropdownComponent } from '../../shared/shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../../shared/shared-main/buttons/action-dropdown.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { RouterLink } from '@angular/router'
import { TableModule } from 'primeng/table'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
import { NgIf, NgClass, DatePipe } from '@angular/common'
+import { VideoChannelSyncService } from '@app/shared/shared-main/video-channel-sync/video-channel-sync.service'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
@Component({
templateUrl: './my-video-channel-syncs.component.html',
diff --git a/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts b/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts
index c140e18e31..1d75133d8a 100644
--- a/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts
+++ b/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts
@@ -5,12 +5,14 @@ import { Router } from '@angular/router'
import { AuthService, Notifier } from '@app/core'
import { listUserChannelsForSelect } from '@app/helpers'
import { VIDEO_CHANNEL_EXTERNAL_URL_VALIDATOR } from '@app/shared/form-validators/video-channel-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { VideoChannelSyncCreate } from '@peertube/peertube-models'
import { SelectChannelComponent } from '../../../shared/shared-forms/select/select-channel.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
+import { VideoChannelSyncService } from '@app/shared/shared-main/video-channel-sync/video-channel-sync.service'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
@Component({
selector: 'my-video-channel-sync-edit',
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
index 007dbb81be..41ddaf3de2 100644
--- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
+++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
@@ -1,7 +1,6 @@
import { SortMeta, SharedModule } from 'primeng/api'
import { Component, OnInit } from '@angular/core'
import { Notifier, RestPagination, RestTable } from '@app/core'
-import { Video, VideoImportService } from '@app/shared/shared-main'
import { VideoImport, VideoImportState, VideoImportStateType } from '@peertube/peertube-models'
import { AutoColspanDirective } from '../../shared/shared-main/angular/auto-colspan.directive'
import { EditButtonComponent } from '../../shared/shared-main/buttons/edit-button.component'
@@ -14,6 +13,8 @@ import { TableModule } from 'primeng/table'
import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
import { RouterLink } from '@angular/router'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { VideoImportService } from '@app/shared/shared-main/video/video-import.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
@Component({
templateUrl: './my-video-imports.component.html',
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
index 8dba9ad017..372cb5b8c6 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
@@ -9,8 +9,7 @@ import {
VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR,
VIDEO_PLAYLIST_PRIVACY_VALIDATOR
} from '@app/shared/form-validators/video-playlist-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { VideoPlaylistCreate, VideoPlaylistPrivacy } from '@peertube/peertube-models'
import { MyVideoPlaylistEdit } from './my-video-playlist-edit'
import { SelectChannelComponent } from '../../shared/shared-forms/select/select-channel.component'
@@ -20,6 +19,7 @@ import { HelpComponent } from '../../shared/shared-main/misc/help.component'
import { PreviewUploadComponent } from '../../shared/shared-forms/preview-upload.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
templateUrl: './my-video-playlist-edit.component.html',
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts
index 127960a58b..8af71db98e 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts
@@ -1,6 +1,6 @@
-import { FormReactive } from '@app/shared/shared-forms'
import { VideoConstant, VideoPlaylist, VideoPlaylistPrivacyType } from '@peertube/peertube-models'
import { SelectChannelItem } from '../../../types/select-options-item.model'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
export abstract class MyVideoPlaylistEdit extends FormReactive {
// Declare it here to avoid errors in create template
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
index 77b9200379..c7ea2f5ba4 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
@@ -3,16 +3,17 @@ import { CdkDragDrop, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop'
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { ComponentPagination, ConfirmService, HooksService, Notifier, ScreenService } from '@app/core'
-import { DropdownAction } from '@app/shared/shared-main'
-import { VideoShareComponent } from '@app/shared/shared-share-modal'
-import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { VideoPlaylistType } from '@peertube/peertube-models'
import { VideoPlaylistElementMiniatureComponent } from '../../shared/shared-video-playlist/video-playlist-element-miniature.component'
import { InfiniteScrollerDirective } from '../../shared/shared-main/angular/infinite-scroller.directive'
-import { ActionDropdownComponent } from '../../shared/shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../../shared/shared-main/buttons/action-dropdown.component'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
import { VideoPlaylistMiniatureComponent } from '../../shared/shared-video-playlist/video-playlist-miniature.component'
import { NgIf, NgFor } from '@angular/common'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { VideoPlaylistElement } from '@app/shared/shared-video-playlist/video-playlist-element.model'
+import { VideoShareComponent } from '@app/shared/shared-share-modal/video-share.component'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
templateUrl: './my-video-playlist-elements.component.html',
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
index 0960f4247b..14e1c3b9f3 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
@@ -11,8 +11,7 @@ import {
VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR,
VIDEO_PLAYLIST_PRIVACY_VALIDATOR
} from '@app/shared/form-validators/video-playlist-validators'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { VideoPlaylistUpdate } from '@peertube/peertube-models'
import { MyVideoPlaylistEdit } from './my-video-playlist-edit'
import { SelectChannelComponent } from '../../shared/shared-forms/select/select-channel.component'
@@ -22,6 +21,8 @@ import { HelpComponent } from '../../shared/shared-main/misc/help.component'
import { PreviewUploadComponent } from '../../shared/shared-forms/preview-upload.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
templateUrl: './my-video-playlist-edit.component.html',
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
index 4e8fa21cc1..109cab8005 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
@@ -2,7 +2,6 @@ import { Subject } from 'rxjs'
import { mergeMap } from 'rxjs/operators'
import { Component } from '@angular/core'
import { AuthService, ComponentPagination, ConfirmService, Notifier } from '@app/core'
-import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { VideoPlaylistType } from '@peertube/peertube-models'
import { EditButtonComponent } from '../../shared/shared-main/buttons/edit-button.component'
import { DeleteButtonComponent } from '../../shared/shared-main/buttons/delete-button.component'
@@ -13,6 +12,8 @@ import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced
import { ChannelsSetupMessageComponent } from '../../shared/shared-main/misc/channels-setup-message.component'
import { NgIf, NgFor } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
templateUrl: './my-video-playlists.component.html',
diff --git a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
index 78c612937d..a74d517bb5 100644
--- a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
+++ b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
@@ -1,13 +1,15 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
import { Notifier, UserService } from '@app/core'
import { OWNERSHIP_CHANGE_USERNAME_VALIDATOR } from '@app/shared/form-validators/video-ownership-change-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { Video, VideoOwnershipService } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgIf } from '@angular/common'
import { AutoCompleteModule } from 'primeng/autocomplete'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
+import { VideoOwnershipService } from '@app/shared/shared-main/video/video-ownership.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
@Component({
selector: 'my-video-change-ownership',
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts
index 1f174251de..a3d6e9ee09 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.ts
+++ b/client/src/app/+my-library/my-videos/my-videos.component.ts
@@ -6,25 +6,25 @@ import { ActivatedRoute, Router, RouterLink } from '@angular/router'
import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenService, ServerService, User } from '@app/core'
import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
import { immutableAssign, formatICU } from '@app/helpers'
-import { AdvancedInputFilter } from '@app/shared/shared-forms'
-import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
-import { LiveStreamInformationComponent } from '@app/shared/shared-video-live'
-import {
- MiniatureDisplayOptions,
- SelectionType,
- VideoActionsDisplayType,
- VideosSelectionComponent
-} from '@app/shared/shared-video-miniature'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { VideoChannel, VideoExistInPlaylist, VideosExistInPlaylists, VideoSortField } from '@peertube/peertube-models'
import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component'
-import { VideoActionsDropdownComponent } from '../../shared/shared-video-miniature/video-actions-dropdown.component'
+import {
+ VideoActionsDisplayType,
+ VideoActionsDropdownComponent
+} from '../../shared/shared-video-miniature/video-actions-dropdown.component'
import { EditButtonComponent } from '../../shared/shared-main/buttons/edit-button.component'
import { PeerTubeTemplateDirective } from '../../shared/shared-main/angular/peertube-template.directive'
import { FormsModule } from '@angular/forms'
-import { AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../../shared/shared-forms/advanced-input-filter.component'
import { NgIf } from '@angular/common'
import { GlobalIconComponent } from '../../shared/shared-icons/global-icon.component'
+import { DropdownAction } from '@app/shared/shared-main/buttons/action-dropdown.component'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { LiveStreamInformationComponent } from '@app/shared/shared-video-live/live-stream-information.component'
+import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature/video-miniature.component'
+import { VideosSelectionComponent, SelectionType } from '@app/shared/shared-video-miniature/videos-selection.component'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
templateUrl: './my-videos.component.html',
diff --git a/client/src/app/+my-library/routes.ts b/client/src/app/+my-library/routes.ts
index 1620aea32e..5a12fa1447 100644
--- a/client/src/app/+my-library/routes.ts
+++ b/client/src/app/+my-library/routes.ts
@@ -13,10 +13,12 @@ import { MyVideoPlaylistElementsComponent } from './my-video-playlists/my-video-
import { MyVideoPlaylistUpdateComponent } from './my-video-playlists/my-video-playlist-update.component'
import { MyVideoPlaylistsComponent } from './my-video-playlists/my-video-playlists.component'
import { MyVideosComponent } from './my-videos/my-videos.component'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
-import { BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
-import { LiveVideoService } from '@app/shared/shared-video-live'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
export default [
{
@@ -26,6 +28,7 @@ export default [
VideoPlaylistService,
BlocklistService,
VideoBlockService,
+ AbuseService,
LiveVideoService,
UserSubscriptionService
],
diff --git a/client/src/app/+remote-interaction/remote-interaction.component.ts b/client/src/app/+remote-interaction/remote-interaction.component.ts
index 841541426f..c50064c4e6 100644
--- a/client/src/app/+remote-interaction/remote-interaction.component.ts
+++ b/client/src/app/+remote-interaction/remote-interaction.component.ts
@@ -1,9 +1,10 @@
import { forkJoin } from 'rxjs'
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
-import { Video, VideoChannel } from '@app/shared/shared-main'
-import { SearchService } from '@app/shared/shared-search'
import { NgIf } from '@angular/common'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { SearchService } from '@app/shared/shared-search/search.service'
@Component({
selector: 'my-remote-interaction',
diff --git a/client/src/app/+remote-interaction/routes.ts b/client/src/app/+remote-interaction/routes.ts
index 7078f7f457..c428e45413 100644
--- a/client/src/app/+remote-interaction/routes.ts
+++ b/client/src/app/+remote-interaction/routes.ts
@@ -1,7 +1,9 @@
import { Routes } from '@angular/router'
import { LoginGuard } from '@app/core'
import { RemoteInteractionComponent } from './remote-interaction.component'
-import { FindInBulkService, SearchService } from '@app/shared/shared-search'
+import { FindInBulkService } from '@app/shared/shared-search/find-in-bulk.service'
+import { SearchService } from '@app/shared/shared-search/search.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
export default [
{
@@ -9,7 +11,8 @@ export default [
component: RemoteInteractionComponent,
providers: [
FindInBulkService,
- SearchService
+ SearchService,
+ VideoPlaylistService
],
canActivate: [ LoginGuard ],
data: {
diff --git a/client/src/app/+reset-password/reset-password.component.ts b/client/src/app/+reset-password/reset-password.component.ts
index d5955f135f..7ff9f472b1 100644
--- a/client/src/app/+reset-password/reset-password.component.ts
+++ b/client/src/app/+reset-password/reset-password.component.ts
@@ -3,7 +3,8 @@ import { ActivatedRoute, Router } from '@angular/router'
import { Notifier, UserService } from '@app/core'
import { RESET_PASSWORD_CONFIRM_VALIDATOR } from '@app/shared/form-validators/reset-password-validators'
import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { InputTextComponent } from '../shared/shared-forms/input-text.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
diff --git a/client/src/app/+search/routes.ts b/client/src/app/+search/routes.ts
index c2ab4b1fa7..993ad3653d 100644
--- a/client/src/app/+search/routes.ts
+++ b/client/src/app/+search/routes.ts
@@ -2,8 +2,11 @@ import { Routes } from '@angular/router'
import { SearchComponent } from './search.component'
import { ChannelLazyLoadResolver, PlaylistLazyLoadResolver, VideoLazyLoadResolver } from './shared'
import { UserSubscriptionService } from '../shared/shared-user-subscription/user-subscription.service'
-import { VideoPlaylistService } from '../shared/shared-video-playlist'
-import { SearchService } from '@app/shared/shared-search'
+import { SearchService } from '@app/shared/shared-search/search.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
export default [
{
@@ -17,7 +20,13 @@ export default [
providers: [
SearchService,
VideoPlaylistService,
- UserSubscriptionService
+ UserSubscriptionService,
+ BlocklistService,
+ VideoBlockService,
+ AbuseService,
+ VideoLazyLoadResolver,
+ ChannelLazyLoadResolver,
+ PlaylistLazyLoadResolver
],
children: [
{
diff --git a/client/src/app/+search/search-filters.component.ts b/client/src/app/+search/search-filters.component.ts
index 85b66b5294..c777142661 100644
--- a/client/src/app/+search/search-filters.component.ts
+++ b/client/src/app/+search/search-filters.component.ts
@@ -1,10 +1,10 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { ServerService } from '@app/core'
-import { AdvancedSearch } from '@app/shared/shared-search'
import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models'
import { SelectTagsComponent } from '../shared/shared-forms/select/select-tags.component'
import { NgIf, NgFor } from '@angular/common'
import { FormsModule } from '@angular/forms'
+import { AdvancedSearch } from '@app/shared/shared-search/advanced-search.model'
type FormOption = { id: string, label: string }
diff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.ts
index 3a2e1e8ae9..ee9324cae0 100644
--- a/client/src/app/+search/search.component.ts
+++ b/client/src/app/+search/search.component.ts
@@ -5,20 +5,21 @@ import { ActivatedRoute, Router, RouterLink } from '@angular/router'
import { AuthService, HooksService, MetaService, Notifier, ServerService, User, UserService } from '@app/core'
import { immutableAssign, SimpleMemoize } from '@app/helpers'
import { validateHost } from '@app/shared/form-validators/host-validators'
-import { Video, VideoChannel } from '@app/shared/shared-main'
-import { AdvancedSearch, SearchService } from '@app/shared/shared-search'
-import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature'
-import { VideoPlaylist } from '@app/shared/shared-video-playlist'
import { HTMLServerConfig, SearchTargetType } from '@peertube/peertube-models'
import { NumberFormatterPipe } from '../shared/shared-main/angular/number-formatter.pipe'
import { VideoPlaylistMiniatureComponent } from '../shared/shared-video-playlist/video-playlist-miniature.component'
-import { VideoMiniatureComponent } from '../shared/shared-video-miniature/video-miniature.component'
+import { MiniatureDisplayOptions, VideoMiniatureComponent } from '../shared/shared-video-miniature/video-miniature.component'
import { SubscribeButtonComponent } from '../shared/shared-user-subscription/subscribe-button.component'
import { ActorAvatarComponent } from '../shared/shared-actor-image/actor-avatar.component'
import { SearchFiltersComponent } from './search-filters.component'
import { NgbCollapse } from '@ng-bootstrap/ng-bootstrap'
import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common'
import { InfiniteScrollerDirective } from '../shared/shared-main/angular/infinite-scroller.directive'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { AdvancedSearch } from '@app/shared/shared-search/advanced-search.model'
+import { SearchService } from '@app/shared/shared-search/search.service'
@Component({
selector: 'my-search',
diff --git a/client/src/app/+search/shared/channel-lazy-load.resolver.ts b/client/src/app/+search/shared/channel-lazy-load.resolver.ts
index 5e010f795b..79fbbd0954 100644
--- a/client/src/app/+search/shared/channel-lazy-load.resolver.ts
+++ b/client/src/app/+search/shared/channel-lazy-load.resolver.ts
@@ -1,8 +1,8 @@
import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
-import { VideoChannel } from '@app/shared/shared-main'
-import { SearchService } from '@app/shared/shared-search'
import { AbstractLazyLoadResolver } from './abstract-lazy-load.resolver'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { SearchService } from '@app/shared/shared-search/search.service'
@Injectable()
export class ChannelLazyLoadResolver extends AbstractLazyLoadResolver<VideoChannel> {
diff --git a/client/src/app/+search/shared/playlist-lazy-load.resolver.ts b/client/src/app/+search/shared/playlist-lazy-load.resolver.ts
index 3310e96271..dec0be5f89 100644
--- a/client/src/app/+search/shared/playlist-lazy-load.resolver.ts
+++ b/client/src/app/+search/shared/playlist-lazy-load.resolver.ts
@@ -1,8 +1,8 @@
import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
-import { SearchService } from '@app/shared/shared-search'
-import { VideoPlaylist } from '@app/shared/shared-video-playlist'
import { AbstractLazyLoadResolver } from './abstract-lazy-load.resolver'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { SearchService } from '@app/shared/shared-search/search.service'
@Injectable()
export class PlaylistLazyLoadResolver extends AbstractLazyLoadResolver<VideoPlaylist> {
diff --git a/client/src/app/+search/shared/video-lazy-load.resolver.ts b/client/src/app/+search/shared/video-lazy-load.resolver.ts
index 69a3eb159a..2a844bdd2f 100644
--- a/client/src/app/+search/shared/video-lazy-load.resolver.ts
+++ b/client/src/app/+search/shared/video-lazy-load.resolver.ts
@@ -1,8 +1,8 @@
import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
-import { Video } from '@app/shared/shared-main'
-import { SearchService } from '@app/shared/shared-search'
import { AbstractLazyLoadResolver } from './abstract-lazy-load.resolver'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { SearchService } from '@app/shared/shared-search/search.service'
@Injectable()
export class VideoLazyLoadResolver extends AbstractLazyLoadResolver<Video> {
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts
index 9e224f02e9..1a7bf5498f 100644
--- a/client/src/app/+signup/+register/register.component.ts
+++ b/client/src/app/+signup/+register/register.component.ts
@@ -4,7 +4,6 @@ import { FormGroup } from '@angular/forms'
import { ActivatedRoute, RouterLink } from '@angular/router'
import { AuthService, ServerService } from '@app/core'
import { HooksService } from '@app/core/plugins/hooks.service'
-import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
import { ServerConfig, ServerStats, UserRegister } from '@peertube/peertube-models'
import { SignupService } from '../shared/signup.service'
import { SignupSuccessBeforeEmailComponent } from '../shared/signup-success-before-email.component'
@@ -17,6 +16,7 @@ import { SignupStepTitleComponent } from '../shared/signup-step-title.component'
import { CustomStepperComponent } from './custom-stepper.component'
import { SignupLabelComponent } from '../../shared/shared-main/account/signup-label.component'
import { NgIf } from '@angular/common'
+import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance/instance-about-accordion.component'
@Component({
selector: 'my-register',
diff --git a/client/src/app/+signup/+register/shared/register-validators.ts b/client/src/app/+signup/+register/shared/register-validators.ts
index f14803b687..63a9a1e799 100644
--- a/client/src/app/+signup/+register/shared/register-validators.ts
+++ b/client/src/app/+signup/+register/shared/register-validators.ts
@@ -1,5 +1,5 @@
import { Validators } from '@angular/forms'
-import { BuildFormValidator } from '@app/shared/form-validators'
+import { BuildFormValidator } from '@app/shared/form-validators/form-validator.model'
export const REGISTER_TERMS_VALIDATOR: BuildFormValidator = {
VALIDATORS: [ Validators.requiredTrue ],
diff --git a/client/src/app/+signup/+register/steps/index.ts b/client/src/app/+signup/+register/steps/index.ts
deleted file mode 100644
index b5eae7468b..0000000000
--- a/client/src/app/+signup/+register/steps/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './register-step-about.component'
-export * from './register-step-channel.component'
-export * from './register-step-terms.component'
-export * from './register-step-user.component'
diff --git a/client/src/app/+signup/+register/steps/register-step-channel.component.ts b/client/src/app/+signup/+register/steps/register-step-channel.component.ts
index 8e5df41150..40e8bf0132 100644
--- a/client/src/app/+signup/+register/steps/register-step-channel.component.ts
+++ b/client/src/app/+signup/+register/steps/register-step-channel.component.ts
@@ -4,7 +4,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
import { SignupService } from '@app/+signup/shared/signup.service'
import { VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR, VIDEO_CHANNEL_NAME_VALIDATOR } from '@app/shared/form-validators/video-channel-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { BytesPipe } from '../../../shared/shared-main/angular/bytes.pipe'
import { NgIf, NgClass } from '@angular/common'
diff --git a/client/src/app/+signup/+register/steps/register-step-terms.component.ts b/client/src/app/+signup/+register/steps/register-step-terms.component.ts
index 9fdebfdeff..6aaaaef1a1 100644
--- a/client/src/app/+signup/+register/steps/register-step-terms.component.ts
+++ b/client/src/app/+signup/+register/steps/register-step-terms.component.ts
@@ -1,6 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { REGISTER_REASON_VALIDATOR, REGISTER_TERMS_VALIDATOR } from '../shared'
import { PeerTubeTemplateDirective } from '../../../shared/shared-main/angular/peertube-template.directive'
import { PeertubeCheckboxComponent } from '../../../shared/shared-forms/peertube-checkbox.component'
diff --git a/client/src/app/+signup/+register/steps/register-step-user.component.ts b/client/src/app/+signup/+register/steps/register-step-user.component.ts
index bb2439788d..d530d599cb 100644
--- a/client/src/app/+signup/+register/steps/register-step-user.component.ts
+++ b/client/src/app/+signup/+register/steps/register-step-user.component.ts
@@ -9,7 +9,8 @@ import {
USER_PASSWORD_VALIDATOR,
USER_USERNAME_VALIDATOR
} from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { InputTextComponent } from '../../../shared/shared-forms/input-text.component'
import { NgIf, NgClass } from '@angular/common'
diff --git a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
index 4001a5f7d8..823beabc41 100644
--- a/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
+++ b/client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core'
import { SignupService } from '@app/+signup/shared/signup.service'
import { Notifier, RedirectService, ServerService } from '@app/core'
import { USER_EMAIL_VALIDATOR } from '@app/shared/form-validators/user-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { NgIf, NgClass } from '@angular/common'
diff --git a/client/src/app/+stats/routes.ts b/client/src/app/+stats/routes.ts
index 31d54c30f2..316e9f2d7a 100644
--- a/client/src/app/+stats/routes.ts
+++ b/client/src/app/+stats/routes.ts
@@ -1,8 +1,8 @@
import { Routes } from '@angular/router'
import { LoginGuard } from '@app/core'
-import { VideoResolver } from '@app/shared/shared-main'
import { VideoStatsComponent, VideoStatsService } from './video'
-import { LiveVideoService } from '@app/shared/shared-video-live'
+import { VideoResolver } from '@app/shared/shared-main/video/video.resolver'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
export default [
{
diff --git a/client/src/app/+stats/video/video-stats.component.ts b/client/src/app/+stats/video/video-stats.component.ts
index 4b1410dafd..f85ad0516e 100644
--- a/client/src/app/+stats/video/video-stats.component.ts
+++ b/client/src/app/+stats/video/video-stats.component.ts
@@ -5,8 +5,6 @@ import { SelectOptionsItem } from 'src/types'
import { Component, Inject, LOCALE_ID, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { Notifier, PeerTubeRouterService } from '@app/core'
-import { NumberFormatterPipe, VideoDetails } from '@app/shared/shared-main'
-import { LiveVideoService } from '@app/shared/shared-video-live'
import { secondsToTime } from '@peertube/peertube-core-utils'
import {
HttpStatusCode,
@@ -26,6 +24,9 @@ import { EmbedComponent } from '../../shared/shared-main/video/embed.component'
import { PeerTubeTemplateDirective } from '../../shared/shared-main/angular/peertube-template.directive'
import { HelpComponent } from '../../shared/shared-main/misc/help.component'
import { NgFor, NgIf } from '@angular/common'
+import { NumberFormatterPipe } from '@app/shared/shared-main/angular/number-formatter.pipe'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
type ActiveGraphId = VideoStatsTimeserieMetric | 'retention' | 'countries' | 'regions'
diff --git a/client/src/app/+stats/video/video-stats.service.ts b/client/src/app/+stats/video/video-stats.service.ts
index 5d48178921..c8fb2f261e 100644
--- a/client/src/app/+stats/video/video-stats.service.ts
+++ b/client/src/app/+stats/video/video-stats.service.ts
@@ -3,8 +3,8 @@ import { environment } from 'src/environments/environment'
import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor } from '@app/core'
-import { VideoService } from '@app/shared/shared-main'
import { VideoStatsOverall, VideoStatsRetention, VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@peertube/peertube-models'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Injectable({
providedIn: 'root'
diff --git a/client/src/app/+video-channels/routes.ts b/client/src/app/+video-channels/routes.ts
index 9ddf980148..cb7be487b6 100644
--- a/client/src/app/+video-channels/routes.ts
+++ b/client/src/app/+video-channels/routes.ts
@@ -2,9 +2,12 @@ import { Routes } from '@angular/router'
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'
-import { BlocklistService, BulkService, AbuseService, VideoBlockService } from '@app/shared/shared-moderation'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { BulkService } from '@app/shared/shared-moderation/bulk.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
export default [
{
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 7c35d14a74..ce373e3311 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,11 +1,13 @@
import { Subject, Subscription } from 'rxjs'
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'
import { ComponentPagination, hasMoreItems, HooksService, ScreenService } from '@app/core'
-import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
-import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { VideoPlaylistMiniatureComponent } from '../../shared/shared-video-playlist/video-playlist-miniature.component'
import { InfiniteScrollerDirective } from '../../shared/shared-main/angular/infinite-scroller.directive'
import { NgIf, NgFor } from '@angular/common'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
selector: 'my-video-channel-playlists',
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 71d79b9912..923bc9d4fd 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
@@ -2,11 +2,14 @@ import { Subscription } from 'rxjs'
import { first } from 'rxjs/operators'
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'
import { ComponentPaginationLight, DisableForReuseHook, HooksService, ScreenService } from '@app/core'
-import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
-import { MiniatureDisplayOptions, VideoFilters } from '@app/shared/shared-video-miniature'
import { Video, VideoSortField } from '@peertube/peertube-models'
import { VideosListComponent } from '../../shared/shared-video-miniature/videos-list.component'
import { NgIf } from '@angular/common'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature/video-miniature.component'
+import { VideoFilters } from '@app/shared/shared-video-miniature/video-filters.model'
@Component({
selector: 'my-video-channel-videos',
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts
index 80fde6c104..72d9995c34 100644
--- a/client/src/app/+video-channels/video-channels.component.ts
+++ b/client/src/app/+video-channels/video-channels.component.ts
@@ -3,17 +3,20 @@ import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'
import { AuthService, MarkdownService, Notifier, RestExtractor, ScreenService, Hotkey, HotkeysService } from '@app/core'
-import { Account, ListOverflowItem, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
-import { BlocklistService } from '@app/shared/shared-moderation'
-import { SupportModalComponent } from '@app/shared/shared-support-modal'
-import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
import { HttpStatusCode, UserRight } from '@peertube/peertube-models'
-import { ListOverflowComponent } from '../shared/shared-main/misc/list-overflow.component'
+import { ListOverflowComponent, ListOverflowItem } from '../shared/shared-main/misc/list-overflow.component'
import { CopyButtonComponent } from '../shared/shared-main/buttons/copy-button.component'
import { AccountBlockBadgesComponent } from '../shared/shared-moderation/account-block-badges.component'
import { ActorAvatarComponent } from '../shared/shared-actor-image/actor-avatar.component'
import { GlobalIconComponent } from '../shared/shared-icons/global-icon.component'
import { NgIf, NgTemplateOutlet, NgClass, DatePipe } from '@angular/common'
+import { VideoChannelService } from '@app/shared/shared-main/video-channel/video-channel.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { SupportModalComponent } from '@app/shared/shared-support-modal/support-modal.component'
+import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription/subscribe-button.component'
@Component({
templateUrl: './video-channels.component.html',
diff --git a/client/src/app/+video-studio/edit/video-studio-edit.component.ts b/client/src/app/+video-studio/edit/video-studio-edit.component.ts
index 62e42af51e..587f69e3c8 100644
--- a/client/src/app/+video-studio/edit/video-studio-edit.component.ts
+++ b/client/src/app/+video-studio/edit/video-studio-edit.component.ts
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { ConfirmService, Notifier, ServerService } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { VideoDetails } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { logger } from '@root-helpers/logger'
import { secondsToTime } from '@peertube/peertube-core-utils'
@@ -14,6 +14,7 @@ import { ButtonComponent } from '../../shared/shared-main/buttons/button.compone
import { ReactiveFileComponent } from '../../shared/shared-forms/reactive-file.component'
import { TimestampInputComponent } from '../../shared/shared-forms/timestamp-input.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
@Component({
selector: 'my-video-studio-edit',
diff --git a/client/src/app/+video-studio/routes.ts b/client/src/app/+video-studio/routes.ts
index 2409544468..3c56174ccd 100644
--- a/client/src/app/+video-studio/routes.ts
+++ b/client/src/app/+video-studio/routes.ts
@@ -1,8 +1,8 @@
import { Routes } from '@angular/router'
import { LoginGuard } from '@app/core'
-import { VideoResolver } from '@app/shared/shared-main'
import { VideoStudioEditComponent } from './edit'
import { VideoStudioService } from './shared'
+import { VideoResolver } from '@app/shared/shared-main/video/video.resolver'
export default [
{
diff --git a/client/src/app/+video-studio/shared/video-studio.service.ts b/client/src/app/+video-studio/shared/video-studio.service.ts
index a3aabd347c..c7d6dd8485 100644
--- a/client/src/app/+video-studio/shared/video-studio.service.ts
+++ b/client/src/app/+video-studio/shared/video-studio.service.ts
@@ -3,8 +3,8 @@ import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor } from '@app/core'
import { objectToFormData } from '@app/helpers'
-import { VideoService } from '@app/shared/shared-main'
import { VideoStudioCreateEdition, VideoStudioTask } from '@peertube/peertube-models'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Injectable()
export class VideoStudioService {
diff --git a/client/src/app/+videos/+video-edit/add-routes.ts b/client/src/app/+videos/+video-edit/add-routes.ts
index db071c96a1..fde09c7280 100644
--- a/client/src/app/+videos/+video-edit/add-routes.ts
+++ b/client/src/app/+videos/+video-edit/add-routes.ts
@@ -1,9 +1,9 @@
import { Routes } from '@angular/router'
import { CanDeactivateGuard, LoginGuard } from '@app/core'
import { VideoAddComponent } from './video-add.component'
-import { LiveVideoService } from '@app/shared/shared-video-live'
import { I18nPrimengCalendarService } from './shared/i18n-primeng-calendar.service'
import { VideoUploadService } from './shared/video-upload.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
export default [
{
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
index 2656216f65..965145d843 100644
--- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
@@ -1,8 +1,8 @@
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
import { ServerService } from '@app/core'
import { VIDEO_CAPTION_FILE_VALIDATOR, VIDEO_CAPTION_LANGUAGE_VALIDATOR } from '@app/shared/form-validators/video-captions-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { VideoCaptionEdit } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models'
import { ReactiveFileComponent } from '../../../shared/shared-forms/reactive-file.component'
@@ -10,6 +10,7 @@ import { NgIf } from '@angular/common'
import { NgSelectModule } from '@ng-select/ng-select'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { VideoCaptionEdit } from '@app/shared/shared-main/video-caption/video-caption-edit.model'
@Component({
selector: 'my-video-caption-add-modal',
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts
index 25a849533a..90fb54c472 100644
--- a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts
@@ -1,13 +1,15 @@
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
import { VIDEO_CAPTION_FILE_CONTENT_VALIDATOR } from '@app/shared/form-validators/video-captions-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models'
import { ServerService } from '../../../../core'
import { NgClass, NgIf } from '@angular/common'
import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoCaptionWithPathEdit, VideoCaptionEdit } from '@app/shared/shared-main/video-caption/video-caption-edit.model'
/**
* https://github.com/valor-software/ngx-bootstrap/issues/3825
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts b/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts
index 214bde6805..6abe1b65c7 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit-utils.ts
@@ -1,5 +1,5 @@
import { FormGroup } from '@angular/forms'
-import { VideoEdit } from '@app/shared/shared-main'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
function hydrateFormFromVideo (formGroup: FormGroup, video: VideoEdit, thumbnailFiles: boolean) {
formGroup.patchValue(video.toFormPatch())
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index c3d6e31c95..48b52e3727 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -5,7 +5,6 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, NgZone, OnDestroy, O
import { AbstractControl, FormArray, FormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'
import { HooksService, PluginService, ServerService } from '@app/core'
import { removeElementFromArray } from '@app/helpers'
-import { BuildFormArgument, BuildFormValidator } from '@app/shared/form-validators'
import {
VIDEO_CATEGORY_VALIDATOR,
VIDEO_CHANNEL_VALIDATOR,
@@ -21,15 +20,6 @@ import {
VIDEO_TAGS_ARRAY_VALIDATOR
} from '@app/shared/form-validators/video-validators'
import { VIDEO_CHAPTERS_ARRAY_VALIDATOR, VIDEO_CHAPTER_TITLE_VALIDATOR } from '@app/shared/form-validators/video-chapter-validators'
-import { FormReactiveErrors, FormReactiveValidationMessages, FormValidatorService } from '@app/shared/shared-forms'
-import {
- InstanceService,
- VideoCaptionEdit,
- VideoCaptionWithPathEdit,
- VideoChaptersEdit,
- VideoEdit,
- VideoService
-} from '@app/shared/shared-main'
import { NgbModal, NgbNav, NgbNavItem, NgbNavLink, NgbNavLinkBase, NgbNavContent, NgbNavOutlet } from '@ng-bootstrap/ng-bootstrap'
import {
HTMLServerConfig,
@@ -67,6 +57,14 @@ import { PeerTubeTemplateDirective } from '../../../shared/shared-main/angular/p
import { HelpComponent } from '../../../shared/shared-main/misc/help.component'
import { NgIf, NgFor, NgTemplateOutlet, NgClass, DatePipe } from '@angular/common'
import { DynamicFormFieldComponent } from '../../../shared/shared-forms/dynamic-form-field.component'
+import { InstanceService } from '@app/shared/shared-main/instance/instance.service'
+import { VideoCaptionWithPathEdit, VideoCaptionEdit } from '@app/shared/shared-main/video-caption/video-caption-edit.model'
+import { VideoChaptersEdit } from '@app/shared/shared-main/video/video-chapters-edit.model'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { BuildFormArgument, BuildFormValidator } from '@app/shared/form-validators/form-validator.model'
+import { FormReactiveErrors, FormReactiveValidationMessages } from '@app/shared/shared-forms/form-reactive.service'
+import { FormValidatorService } from '@app/shared/shared-forms/form-validator.service'
type VideoLanguages = VideoConstant<string> & { group?: string }
type PluginField = {
diff --git a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts
index 82680174e9..2011b4e709 100644
--- a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts
@@ -1,9 +1,10 @@
import { UploaderX, UploadxOptions } from 'ngx-uploadx'
import { Injectable } from '@angular/core'
import { AuthService, Notifier, ServerService } from '@app/core'
-import { BytesPipe, VideoService } from '@app/shared/shared-main'
import { UploaderXFormData } from './uploaderx-form-data'
import { getUploadXRetryConfig } from '@app/helpers'
+import { BytesPipe } from '@app/shared/shared-main/angular/bytes.pipe'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Injectable()
export class VideoUploadService {
diff --git a/client/src/app/+videos/+video-edit/update-routes.ts b/client/src/app/+videos/+video-edit/update-routes.ts
index 24e2a0ae2a..d57a2ace16 100644
--- a/client/src/app/+videos/+video-edit/update-routes.ts
+++ b/client/src/app/+videos/+video-edit/update-routes.ts
@@ -2,9 +2,9 @@ import { Routes } from '@angular/router'
import { CanDeactivateGuard, LoginGuard } from '@app/core'
import { VideoUpdateComponent } from './video-update.component'
import { VideoUpdateResolver } from './video-update.resolver'
-import { LiveVideoService } from '@app/shared/shared-video-live'
import { I18nPrimengCalendarService } from './shared/i18n-primeng-calendar.service'
import { VideoUploadService } from './shared/video-upload.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
export default [
{
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
index a69c770c3d..f2c27428a9 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
@@ -3,9 +3,7 @@ import { AfterViewInit, Component, EventEmitter, OnInit, Output } from '@angular
import { Router } from '@angular/router'
import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core'
import { scrollToTop } from '@app/helpers'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { Video, VideoCaptionService, VideoChapterService, VideoEdit, VideoService } from '@app/shared/shared-main'
-import { LiveVideoService } from '@app/shared/shared-video-live'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { logger } from '@root-helpers/logger'
import {
@@ -26,6 +24,12 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { SelectChannelComponent } from '../../../shared/shared-forms/select/select-channel.component'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
import { NgIf } from '@angular/common'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
@Component({
selector: 'my-video-go-live',
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
index 78f74d5b74..638693c1ba 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
@@ -3,8 +3,7 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, OnInit, Output, Vie
import { Router } from '@angular/router'
import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core'
import { scrollToTop } from '@app/helpers'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { VideoCaptionService, VideoChapterService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { logger } from '@root-helpers/logger'
import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@peertube/peertube-models'
@@ -21,6 +20,11 @@ import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
import { DragDropDirective } from './drag-drop.directive'
import { NgIf } from '@angular/common'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { VideoImportService } from '@app/shared/shared-main/video/video-import.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Component({
selector: 'my-video-import-torrent',
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
index c682473d51..bb8d15fce9 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
@@ -4,8 +4,7 @@ import { AfterViewInit, Component, EventEmitter, OnInit, Output, ViewChild } fro
import { Router, RouterLink } from '@angular/router'
import { AuthService, CanComponentDeactivate, HooksService, Notifier, ServerService } from '@app/core'
import { scrollToTop } from '@app/helpers'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { VideoCaptionService, VideoChapterService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { logger } from '@root-helpers/logger'
import { VideoUpdate } from '@peertube/peertube-models'
@@ -20,6 +19,11 @@ import { PeerTubeTemplateDirective } from '../../../shared/shared-main/angular/p
import { HelpComponent } from '../../../shared/shared-main/misc/help.component'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
import { NgIf } from '@angular/common'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { VideoImportService } from '@app/shared/shared-main/video/video-import.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Component({
selector: 'my-video-import-url',
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
index 2c38e11a35..5ea962904a 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
@@ -3,18 +3,16 @@ import { SelectChannelItem } from 'src/types/select-options-item.model'
import { Directive, EventEmitter, OnInit } from '@angular/core'
import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core'
import { listUserChannelsForSelect } from '@app/helpers'
-import { FormReactive } from '@app/shared/shared-forms'
-import {
- VideoCaptionEdit,
- VideoCaptionService,
- VideoChapterService,
- VideoChaptersEdit,
- VideoEdit,
- VideoService
-} from '@app/shared/shared-main'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { HTMLServerConfig, VideoConstant, VideoPrivacyType } from '@peertube/peertube-models'
import { of } from 'rxjs'
+import { VideoCaptionEdit } from '@app/shared/shared-main/video-caption/video-caption-edit.model'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoChaptersEdit } from '@app/shared/shared-main/video/video-chapters-edit.model'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
@Directive()
// eslint-disable-next-line @angular-eslint/directive-class-suffix
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
index ab064b2d84..a8c12bb65e 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
@@ -6,8 +6,6 @@ import { AfterViewInit, Component, ElementRef, EventEmitter, OnDestroy, OnInit,
import { ActivatedRoute, Router } from '@angular/router'
import { AuthService, CanComponentDeactivate, HooksService, MetaService, Notifier, ServerService, UserService } from '@app/core'
import { buildHTTPErrorResponse, genericUploadErrorHandler, scrollToTop } from '@app/helpers'
-import { FormReactiveService } from '@app/shared/shared-forms'
-import { Video, VideoCaptionService, VideoChapterService, VideoEdit, VideoService } from '@app/shared/shared-main'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { logger } from '@root-helpers/logger'
import { HttpStatusCode, VideoCreateResult } from '@peertube/peertube-models'
@@ -24,6 +22,12 @@ import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { GlobalIconComponent } from '../../../shared/shared-icons/global-icon.component'
import { DragDropDirective } from './drag-drop.directive'
import { NgIf } from '@angular/common'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
@Component({
selector: 'my-video-upload',
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts
index 8c1c168199..4564ca8ae9 100644
--- a/client/src/app/+videos/+video-edit/video-update.component.ts
+++ b/client/src/app/+videos/+video-edit/video-update.component.ts
@@ -8,18 +8,8 @@ import { Component, HostListener, OnDestroy, OnInit, ViewChild } from '@angular/
import { ActivatedRoute, Router, RouterLink } from '@angular/router'
import { AuthService, CanComponentDeactivate, ConfirmService, Notifier, ServerService, UserService } from '@app/core'
import { buildHTTPErrorResponse, genericUploadErrorHandler } from '@app/helpers'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import {
- Video,
- VideoCaptionEdit,
- VideoCaptionService,
- VideoChapterService,
- VideoChaptersEdit,
- VideoDetails,
- VideoEdit,
- VideoService
-} from '@app/shared/shared-main'
-import { LiveVideoService } from '@app/shared/shared-video-live'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { simpleObjectsDeepEqual } from '@peertube/peertube-core-utils'
import { HttpStatusCode, LiveVideo, LiveVideoUpdate, VideoPrivacy, VideoSource, VideoState } from '@peertube/peertube-models'
@@ -31,6 +21,15 @@ import { ReactiveFileComponent } from '../../shared/shared-forms/reactive-file.c
import { NgIf } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { UploadProgressComponent } from '../../shared/standalone-upload/upload-progress.component'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
+import { VideoEdit } from '@app/shared/shared-main/video/video-edit.model'
+import { VideoCaptionEdit } from '@app/shared/shared-main/video-caption/video-caption-edit.model'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoChaptersEdit } from '@app/shared/shared-main/video/video-chapters-edit.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
const debugLogger = debug('peertube:video-update')
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts
index 0293f3c717..258cc49583 100644
--- a/client/src/app/+videos/+video-edit/video-update.resolver.ts
+++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts
@@ -4,9 +4,13 @@ import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot } from '@angular/router'
import { AuthService } from '@app/core'
import { listUserChannelsForSelect } from '@app/helpers'
-import { VideoCaptionService, VideoChapterService, VideoDetails, VideoPasswordService, VideoService } from '@app/shared/shared-main'
-import { LiveVideoService } from '@app/shared/shared-video-live'
import { VideoPrivacy } from '@peertube/peertube-models'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoPasswordService } from '@app/shared/shared-main/video/video-password.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
@Injectable()
export class VideoUpdateResolver {
diff --git a/client/src/app/+videos/+video-watch/routes.ts b/client/src/app/+videos/+video-watch/routes.ts
index 0490d30e1e..2a5dd763f5 100644
--- a/client/src/app/+videos/+video-watch/routes.ts
+++ b/client/src/app/+videos/+video-watch/routes.ts
@@ -1,13 +1,15 @@
import { Routes } from '@angular/router'
import { VideoWatchComponent } from './video-watch.component'
-import { BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { OverviewService } from '../video-list'
-import { LiveVideoService } from '@app/shared/shared-video-live'
-import { VideoCommentService } from '@app/shared/shared-video-comment'
import { RecentVideosRecommendationService, RecommendedVideosStore } from './shared'
-import { SearchService } from '@app/shared/shared-search'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { SearchService } from '@app/shared/shared-search/search.service'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
+import { VideoCommentService } from '@app/shared/shared-video-comment/video-comment.service'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
export default [
{
@@ -22,7 +24,8 @@ export default [
VideoCommentService,
RecentVideosRecommendationService,
RecommendedVideosStore,
- SearchService
+ SearchService,
+ AbuseService
],
children: [
{
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
index dd4f2a867a..417380f353 100644
--- a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
@@ -1,17 +1,20 @@
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core'
import { RedirectService, ScreenService } from '@app/core'
-import { VideoDetails } from '@app/shared/shared-main'
-import { VideoShareComponent } from '@app/shared/shared-share-modal'
-import { SupportModalComponent } from '@app/shared/shared-support-modal'
-import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/shared-video-miniature'
-import { VideoPlaylist } from '@app/shared/shared-video-playlist'
import { UserVideoRateType, VideoCaption, VideoPrivacy } from '@peertube/peertube-models'
-import { VideoActionsDropdownComponent } from '../../../../shared/shared-video-miniature/video-actions-dropdown.component'
+import {
+ VideoActionsDisplayType,
+ VideoActionsDropdownComponent
+} from '../../../../shared/shared-video-miniature/video-actions-dropdown.component'
import { VideoAddToPlaylistComponent } from '../../../../shared/shared-video-playlist/video-add-to-playlist.component'
import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component'
import { NgbTooltip, NgbDropdown, NgbDropdownToggle, NgbDropdownMenu } from '@ng-bootstrap/ng-bootstrap'
import { NgIf, NgClass, NgStyle } from '@angular/common'
import { VideoRateComponent } from './video-rate.component'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
+import { VideoShareComponent } from '@app/shared/shared-share-modal/video-share.component'
+import { SupportModalComponent } from '@app/shared/shared-support-modal/support-modal.component'
+import { VideoDownloadComponent } from '@app/shared/shared-video-miniature/video-download.component'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
@Component({
selector: 'my-action-buttons',
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts
index 9420f16b79..0c44b38928 100644
--- a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts
@@ -1,11 +1,12 @@
import { Observable } from 'rxjs'
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core'
import { Notifier, ScreenService, Hotkey, HotkeysService } from '@app/core'
-import { VideoDetails, VideoService } from '@app/shared/shared-main'
import { UserVideoRateType } from '@peertube/peertube-models'
import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component'
import { NgClass, NgIf } from '@angular/common'
import { NgbPopover, NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
@Component({
selector: 'my-video-rate',
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
index 73512d7d43..ae2ad3c939 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
@@ -15,9 +15,8 @@ import {
} from '@angular/core'
import { Notifier, User } from '@app/core'
import { VIDEO_COMMENT_TEXT_VALIDATOR } from '@app/shared/form-validators/video-comment-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { Video } from '@app/shared/shared-main'
-import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { VideoCommentCreate } from '@peertube/peertube-models'
import { LoginLinkComponent } from '../../../../shared/shared-main/angular/login-link.component'
@@ -28,6 +27,9 @@ import { HelpComponent } from '../../../../shared/shared-main/misc/help.componen
import { TextareaAutoResizeDirective } from '../../../../shared/shared-forms/textarea-autoresize.directive'
import { ActorAvatarComponent } from '../../../../shared/shared-actor-image/actor-avatar.component'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoComment } from '@app/shared/shared-video-comment/video-comment.model'
+import { VideoCommentService } from '@app/shared/shared-video-comment/video-comment.service'
@Component({
selector: 'my-video-comment-add',
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
index b1ed82bcb2..7e1ceffe76 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
@@ -1,9 +1,7 @@
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
import { MarkdownService, Notifier, UserService } from '@app/core'
import { AuthService } from '@app/core/auth'
-import { Account, DropdownAction, Video } from '@app/shared/shared-main'
import { CommentReportComponent } from '@app/shared/shared-moderation/report-modals/comment-report.component'
-import { VideoComment, VideoCommentThreadTree } from '@app/shared/shared-video-comment'
import { User, UserRight } from '@peertube/peertube-models'
import { FromNowPipe } from '../../../../shared/shared-main/angular/from-now.pipe'
import { VideoCommentAddComponent } from './video-comment-add.component'
@@ -12,6 +10,11 @@ import { TimestampRouteTransformerDirective } from '../timestamp-route-transform
import { RouterLink } from '@angular/router'
import { ActorAvatarComponent } from '../../../../shared/shared-actor-image/actor-avatar.component'
import { NgIf, NgClass, NgFor } from '@angular/common'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { Account } from '@app/shared/shared-main/account/account.model'
+import { DropdownAction } from '@app/shared/shared-main/buttons/action-dropdown.component'
+import { VideoComment } from '@app/shared/shared-video-comment/video-comment.model'
+import { VideoCommentThreadTree } from '@app/shared/shared-video-comment/video-comment-thread-tree.model'
@Component({
selector: 'my-video-comment',
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
index 82a2454c40..32a90f98d5 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
@@ -3,8 +3,6 @@ import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnIni
import { ActivatedRoute } from '@angular/router'
import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifier, User } from '@app/core'
import { HooksService } from '@app/core/plugins/hooks.service'
-import { Syndication, VideoDetails } from '@app/shared/shared-main'
-import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/shared/shared-video-comment'
import { PeerTubeProblemDocument, ServerErrorCode } from '@peertube/peertube-models'
import { LoaderComponent } from '../../../../shared/shared-main/loaders/loader.component'
import { VideoCommentComponent } from './video-comment.component'
@@ -13,6 +11,11 @@ import { VideoCommentAddComponent } from './video-comment-add.component'
import { NgIf, NgFor } from '@angular/common'
import { NgbDropdown, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownButtonItem, NgbDropdownItem } from '@ng-bootstrap/ng-bootstrap'
import { FeedComponent } from '../../../../shared/shared-main/feeds/feed.component'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
+import { Syndication } from '@app/shared/shared-main/feeds/syndication.model'
+import { VideoComment } from '@app/shared/shared-video-comment/video-comment.model'
+import { VideoCommentService } from '@app/shared/shared-video-comment/video-comment.service'
+import { VideoCommentThreadTree } from '@app/shared/shared-video-comment/video-comment-thread-tree.model'
@Component({
selector: 'my-video-comments',
diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
index 0b6b357660..a350075f45 100644
--- a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
@@ -1,6 +1,6 @@
import { Component, Input } from '@angular/core'
import { AuthUser } from '@app/core'
-import { VideoDetails } from '@app/shared/shared-main'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
import { VideoPrivacy, VideoState } from '@peertube/peertube-models'
import { NgIf, DatePipe } from '@angular/common'
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
index 6756154587..269ab87821 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
@@ -1,6 +1,6 @@
import { Component, Input, OnInit } from '@angular/core'
import { HooksService } from '@app/core'
-import { VideoDetails } from '@app/shared/shared-main'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
import { TimeDurationFormatterPipe } from '../../../../shared/shared-main/angular/time-duration-formatter.pipe'
import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon.component'
import { RouterLink } from '@angular/router'
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts
index 14c83534eb..9524d3e718 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts
@@ -1,7 +1,7 @@
import { Component, Input, OnInit } from '@angular/core'
-import { Video } from '@app/shared/shared-main/video'
import { ActorAvatarComponent } from '../../../../shared/shared-actor-image/actor-avatar.component'
import { NgIf } from '@angular/common'
+import { Video } from '@app/shared/shared-main/video/video.model'
@Component({
selector: 'my-video-avatar-channel',
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
index 6fafeb3f75..aa59408884 100644
--- a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts
@@ -1,8 +1,8 @@
import { Component, EventEmitter, Input, OnChanges, Output, ViewChild, ElementRef } from '@angular/core'
import { MarkdownService } from '@app/core'
-import { VideoDetails } from '@app/shared/shared-main'
import { NgClass, NgIf } from '@angular/common'
import { TimestampRouteTransformerDirective } from '../timestamp-route-transformer.directive'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
@Component({
selector: 'my-video-description',
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
index f1dd0d8e33..70e040b2b1 100644
--- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
@@ -2,7 +2,6 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'
import { Router } from '@angular/router'
import { AuthService, ComponentPagination, HooksService, Notifier, SessionStorageService, UserService } from '@app/core'
import { isInViewport } from '@app/helpers'
-import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { getBoolOrDefault } from '@root-helpers/local-storage-utils'
import { peertubeSessionStorage } from '@root-helpers/peertube-web-storage'
import { VideoPlaylistPrivacy } from '@peertube/peertube-models'
@@ -11,6 +10,9 @@ import { GlobalIconComponent } from '../../../../shared/shared-icons/global-icon
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { InfiniteScrollerDirective } from '../../../../shared/shared-main/angular/infinite-scroller.directive'
import { NgIf, NgClass, NgFor } from '@angular/common'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { VideoPlaylistElement } from '@app/shared/shared-video-playlist/video-playlist-element.model'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
@Component({
selector: 'my-video-watch-playlist',
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
index 5ef9fd19f7..4dbe2207e6 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
@@ -2,11 +2,13 @@ import { Observable, of } from 'rxjs'
import { map, switchMap } from 'rxjs/operators'
import { Injectable } from '@angular/core'
import { ServerService, UserService } from '@app/core'
-import { Video, VideoService } from '@app/shared/shared-main'
-import { AdvancedSearch, SearchService } from '@app/shared/shared-search'
import { HTMLServerConfig } from '@peertube/peertube-models'
import { RecommendationInfo } from './recommendation-info.model'
import { RecommendationService } from './recommendations.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { SearchService } from '@app/shared/shared-search/search.service'
+import { AdvancedSearch } from '@app/shared/shared-search/advanced-search.model'
/**
* Provides "recommendations" by providing the most recently uploaded videos.
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommendations.service.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommendations.service.ts
index 1d79d35f60..bef47cb427 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recommendations.service.ts
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommendations.service.ts
@@ -1,6 +1,6 @@
import { Observable } from 'rxjs'
-import { Video } from '@app/shared/shared-main'
import { RecommendationInfo } from './recommendation-info.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
export interface RecommendationService {
getRecommendations (recommendation: RecommendationInfo): Observable<Video[]>
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
index a218425905..15605f3ba9 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.ts
@@ -1,16 +1,15 @@
import { Observable, startWith, Subscription, switchMap } from 'rxjs'
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core'
import { AuthService, Notifier, User, UserService } from '@app/core'
-import { Video } from '@app/shared/shared-main'
-import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature'
-import { VideoPlaylist } from '@app/shared/shared-video-playlist'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { RecommendationInfo } from './recommendation-info.model'
import { RecommendedVideosStore } from './recommended-videos.store'
-import { VideoMiniatureComponent } from '../../../../shared/shared-video-miniature/video-miniature.component'
+import { MiniatureDisplayOptions, VideoMiniatureComponent } from '../../../../shared/shared-video-miniature/video-miniature.component'
import { FormsModule } from '@angular/forms'
import { InputSwitchComponent } from '../../../../shared/shared-forms/input-switch.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { NgClass, NgIf, NgFor, AsyncPipe } from '@angular/common'
+import { VideoPlaylist } from '@peertube/peertube-models'
@Component({
selector: 'my-recommended-videos',
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.store.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.store.ts
index 8c3fb64804..3a0412b03f 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.store.ts
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.store.ts
@@ -1,7 +1,7 @@
import { Observable, ReplaySubject } from 'rxjs'
import { map, shareReplay, switchMap, take } from 'rxjs/operators'
import { Inject, Injectable } from '@angular/core'
-import { Video } from '@app/shared/shared-main'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { RecentVideosRecommendationService } from './recent-videos-recommendation.service'
import { RecommendationInfo } from './recommendation-info.model'
import { RecommendationService } from './recommendations.service'
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 f49723fc1a..daa5cdfcf8 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -20,10 +20,6 @@ import {
} from '@app/core'
import { HooksService } from '@app/core/plugins/hooks.service'
import { isXPercentInViewport, scrollToTop, toBoolean } from '@app/helpers'
-import { Video, VideoCaptionService, VideoChapterService, VideoDetails, VideoFileTokenService, VideoService } from '@app/shared/shared-main'
-import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
-import { LiveVideoService } from '@app/shared/shared-video-live'
-import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
import { timeToInt } from '@peertube/peertube-core-utils'
import {
HTMLServerConfig,
@@ -63,6 +59,16 @@ import { VideoViewsCounterComponent } from '../../shared/shared-video/video-view
import { DateToggleComponent } from '../../shared/shared-main/date/date-toggle.component'
import { VideoAlertComponent } from './shared/information/video-alert.component'
import { PluginPlaceholderComponent } from '../../shared/shared-main/plugins/plugin-placeholder.component'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
+import { VideoCaptionService } from '@app/shared/shared-main/video-caption/video-caption.service'
+import { VideoChapterService } from '@app/shared/shared-main/video/video-chapter.service'
+import { VideoFileTokenService } from '@app/shared/shared-main/video/video-file-token.service'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
+import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription/subscribe-button.component'
+import { LiveVideoService } from '@app/shared/shared-video-live/live-video.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
type URLOptions = {
playerMode: PlayerMode
diff --git a/client/src/app/+videos/routes.ts b/client/src/app/+videos/routes.ts
index 480f5dcefe..66a4a649bd 100644
--- a/client/src/app/+videos/routes.ts
+++ b/client/src/app/+videos/routes.ts
@@ -3,9 +3,11 @@ import { LoginGuard } from '@app/core'
import { OverviewService, VideosListCommonPageComponent } from './video-list'
import { VideoOverviewComponent } from './video-list/overview/video-overview.component'
import { VideoUserSubscriptionsComponent } from './video-list/video-user-subscriptions.component'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
-import { BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
-import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
+import { BlocklistService } from '@app/shared/shared-moderation/blocklist.service'
+import { VideoBlockService } from '@app/shared/shared-moderation/video-block.service'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist/video-playlist.service'
+import { AbuseService } from '@app/shared/shared-moderation/abuse.service'
export default [
{
@@ -15,7 +17,8 @@ export default [
UserSubscriptionService,
VideoPlaylistService,
BlocklistService,
- VideoBlockService
+ VideoBlockService,
+ AbuseService
],
children: [
{
diff --git a/client/src/app/+videos/video-list/overview/overview.service.ts b/client/src/app/+videos/video-list/overview/overview.service.ts
index 581c6b8460..6fba0d9b53 100644
--- a/client/src/app/+videos/video-list/overview/overview.service.ts
+++ b/client/src/app/+videos/video-list/overview/overview.service.ts
@@ -4,11 +4,11 @@ import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor, ServerService } from '@app/core'
import { immutableAssign } from '@app/helpers'
-import { VideoService } from '@app/shared/shared-main'
import { objectKeysTyped, peertubeTranslate } from '@peertube/peertube-core-utils'
import { VideosOverview as VideosOverviewServer } from '@peertube/peertube-models'
import { environment } from '../../../../environments/environment'
import { VideosOverview } from './videos-overview.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
@Injectable()
export class OverviewService {
diff --git a/client/src/app/+videos/video-list/overview/video-overview.component.ts b/client/src/app/+videos/video-list/overview/video-overview.component.ts
index 384b70350e..3aaf338ba2 100644
--- a/client/src/app/+videos/video-list/overview/video-overview.component.ts
+++ b/client/src/app/+videos/video-list/overview/video-overview.component.ts
@@ -1,7 +1,7 @@
import { Subject, Subscription, switchMap } from 'rxjs'
import { Component, OnDestroy, OnInit } from '@angular/core'
import { Notifier, ScreenService, User, UserService } from '@app/core'
-import { Video } from '@app/shared/shared-main'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { OverviewService } from './overview.service'
import { VideosOverview } from './videos-overview.model'
import { ActorAvatarComponent } from '../../../shared/shared-actor-image/actor-avatar.component'
diff --git a/client/src/app/+videos/video-list/overview/videos-overview.model.ts b/client/src/app/+videos/video-list/overview/videos-overview.model.ts
index 1208d5a004..c7939ec4e1 100644
--- a/client/src/app/+videos/video-list/overview/videos-overview.model.ts
+++ b/client/src/app/+videos/video-list/overview/videos-overview.model.ts
@@ -1,4 +1,4 @@
-import { Video } from '@app/shared/shared-main'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { VideoChannelSummary, VideoConstant, VideosOverview as VideosOverviewServer } from '@peertube/peertube-models'
export class VideosOverview implements VideosOverviewServer {
diff --git a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
index 60e064b680..604af7c257 100644
--- a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
+++ b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
@@ -3,11 +3,11 @@ import { switchMap, tap } from 'rxjs/operators'
import { Component } from '@angular/core'
import { AuthService, ComponentPaginationLight, DisableForReuseHook, ScopedTokensService } from '@app/core'
import { HooksService } from '@app/core/plugins/hooks.service'
-import { VideoService } from '@app/shared/shared-main'
-import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
-import { VideoFilters } from '@app/shared/shared-video-miniature'
import { VideoSortField } from '@peertube/peertube-models'
import { VideosListComponent } from '../../shared/shared-video-miniature/videos-list.component'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription/user-subscription.service'
+import { VideoFilters } from '@app/shared/shared-video-miniature/video-filters.model'
@Component({
selector: 'my-videos-user-subscriptions',
diff --git a/client/src/app/+videos/video-list/videos-list-common-page.component.ts b/client/src/app/+videos/video-list/videos-list-common-page.component.ts
index 9fbfbae8e0..278c787c43 100644
--- a/client/src/app/+videos/video-list/videos-list-common-page.component.ts
+++ b/client/src/app/+videos/video-list/videos-list-common-page.component.ts
@@ -2,11 +2,11 @@ import { Component, OnDestroy, OnInit } from '@angular/core'
import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router'
import { ComponentPaginationLight, DisableForReuseHook, MetaService, RedirectService, ServerService } from '@app/core'
import { HooksService } from '@app/core/plugins/hooks.service'
-import { VideoService } from '@app/shared/shared-main'
import { VideoFilters, VideoFilterScope } from '@app/shared/shared-video-miniature/video-filters.model'
import { ClientFilterHookName, VideoSortField } from '@peertube/peertube-models'
import { Subscription } from 'rxjs'
import { VideosListComponent } from '../../shared/shared-video-miniature/videos-list.component'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
export type VideosListCommonPageRouteData = {
sort: VideoSortField
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index bdea095fb9..72c75beb0b 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -32,15 +32,14 @@ import { logger } from '@root-helpers/logger'
import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
import { MenuService } from './core/menu/menu.service'
import { POP_STATE_MODAL_DISMISS } from './helpers'
-import { GlobalIconName } from './shared/shared-icons'
import { SharedModule } from 'primeng/api'
import { ToastModule } from 'primeng/toast'
import { ConfirmComponent } from './modal/confirm.component'
-import { GlobalIconComponent } from './shared/shared-icons/global-icon.component'
+import { GlobalIconComponent, GlobalIconName } from './shared/shared-icons/global-icon.component'
import { MenuComponent } from './menu/menu.component'
import { HeaderComponent } from './header/header.component'
import { HotkeysCheatSheetComponent } from './hotkeys/hotkeys-cheat-sheet.component'
-import { InstanceService } from './shared/shared-main'
+import { InstanceService } from './shared/shared-main/instance/instance.service'
@Component({
selector: 'my-app',
diff --git a/client/src/app/app.routes.ts b/client/src/app/app.routes.ts
index 4b03969476..adaa860af6 100644
--- a/client/src/app/app.routes.ts
+++ b/client/src/app/app.routes.ts
@@ -5,7 +5,7 @@ import { MetaGuard } from './core'
import { EmptyComponent } from './empty.component'
import { HomepageRedirectComponent } from './homepage-redirect.component'
import { USER_USERNAME_REGEX_CHARACTERS } from './shared/form-validators/user-validators'
-import { ActorRedirectGuard } from './shared/shared-main'
+import { ActorRedirectGuard } from './shared/shared-main/router/actor-redirect-guard.service'
const routes: Routes = [
{
diff --git a/client/src/app/core/menu/menu.service.ts b/client/src/app/core/menu/menu.service.ts
index 39e89f6e3d..51d4bc578f 100644
--- a/client/src/app/core/menu/menu.service.ts
+++ b/client/src/app/core/menu/menu.service.ts
@@ -1,7 +1,7 @@
import { fromEvent } from 'rxjs'
import { debounceTime } from 'rxjs/operators'
import { Injectable } from '@angular/core'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { HTMLServerConfig } from '@peertube/peertube-models'
import { ScreenService } from '../wrappers'
diff --git a/client/src/app/header/index.ts b/client/src/app/header/index.ts
deleted file mode 100644
index 005e0c97da..0000000000
--- a/client/src/app/header/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './header.component'
-export * from './search-typeahead.component'
-export * from './suggestion.component'
diff --git a/client/src/app/hotkeys/index.ts b/client/src/app/hotkeys/index.ts
deleted file mode 100644
index a00ecee62b..0000000000
--- a/client/src/app/hotkeys/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './hotkeys-cheat-sheet.component'
diff --git a/client/src/app/menu/index.ts b/client/src/app/menu/index.ts
deleted file mode 100644
index a78928aac3..0000000000
--- a/client/src/app/menu/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './language-chooser.component'
-export * from './menu.component'
diff --git a/client/src/app/menu/language-chooser.component.ts b/client/src/app/menu/language-chooser.component.ts
index 5912598411..a570f41a11 100644
--- a/client/src/app/menu/language-chooser.component.ts
+++ b/client/src/app/menu/language-chooser.component.ts
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common'
import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core'
import { getDevLocale, isOnDevLocale } from '@app/helpers'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { getCompleteLocale, getShortLocale, I18N_LOCALES, objectKeysTyped, sortBy } from '@peertube/peertube-core-utils'
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 415624d9eb..2964fcd90c 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -24,10 +24,11 @@ import { HTMLServerConfig, ServerConfig, UserRight, UserRightType, VideoConstant
import { NotificationComponent } from './notification.component'
import { LanguageChooserComponent } from './language-chooser.component'
import { QuickSettingsModalComponent } from './quick-settings-modal.component'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
import { ActorAvatarComponent } from '@app/shared/shared-actor-image/actor-avatar.component'
-import { InputSwitchComponent } from '@app/shared/shared-forms'
-import { LoginLinkComponent, SignupLabelComponent } from '@app/shared/shared-main'
+import { InputSwitchComponent } from '@app/shared/shared-forms/input-switch.component'
+import { SignupLabelComponent } from '@app/shared/shared-main/account/signup-label.component'
+import { LoginLinkComponent } from '@app/shared/shared-main/angular/login-link.component'
const debugLogger = debug('peertube:menu:MenuComponent')
diff --git a/client/src/app/menu/notification.component.ts b/client/src/app/menu/notification.component.ts
index 105369f9ec..0e1d88d258 100644
--- a/client/src/app/menu/notification.component.ts
+++ b/client/src/app/menu/notification.component.ts
@@ -3,11 +3,12 @@ import { filter } from 'rxjs/operators'
import { Component, EventEmitter, Output, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { NavigationEnd, Router } from '@angular/router'
import { Notifier, PeerTubeSocket, ScreenService } from '@app/core'
-import { LoaderComponent, UserNotificationService } from '@app/shared/shared-main'
import { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'
import { UserNotificationsComponent } from '@app/shared/standalone-notifications/user-notifications.component'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
import { CommonModule } from '@angular/common'
+import { LoaderComponent } from '@app/shared/shared-main/loaders/loader.component'
+import { UserNotificationService } from '@app/shared/shared-main/users/user-notification.service'
@Component({
selector: 'my-notification',
diff --git a/client/src/app/menu/quick-settings-modal.component.ts b/client/src/app/menu/quick-settings-modal.component.ts
index 8c65357aff..d5e06b6b9d 100644
--- a/client/src/app/menu/quick-settings-modal.component.ts
+++ b/client/src/app/menu/quick-settings-modal.component.ts
@@ -6,8 +6,9 @@ import { AuthService, AuthStatus, LocalStorageService, User, UserService } from
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { CommonModule } from '@angular/common'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
-import { UserInterfaceSettingsComponent, UserVideoSettingsComponent } from '@app/shared/shared-user-settings'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
+import { UserInterfaceSettingsComponent } from '@app/shared/shared-user-settings/user-interface-settings.component'
+import { UserVideoSettingsComponent } from '@app/shared/shared-user-settings/user-video-settings.component'
@Component({
selector: 'my-quick-settings',
diff --git a/client/src/app/modal/account-setup-warning-modal.component.ts b/client/src/app/modal/account-setup-warning-modal.component.ts
index 5792bf2596..41d2cd4d17 100644
--- a/client/src/app/modal/account-setup-warning-modal.component.ts
+++ b/client/src/app/modal/account-setup-warning-modal.component.ts
@@ -2,8 +2,8 @@ import { CommonModule } from '@angular/common'
import { Component, ElementRef, ViewChild } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { Notifier, ServerService, User, UserService } from '@app/core'
-import { PeertubeCheckboxComponent } from '@app/shared/shared-forms'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
+import { PeertubeCheckboxComponent } from '@app/shared/shared-forms/peertube-checkbox.component'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
import { logger } from '@root-helpers/logger'
import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
diff --git a/client/src/app/modal/admin-welcome-modal.component.ts b/client/src/app/modal/admin-welcome-modal.component.ts
index 1eeb76c149..e42bacf128 100644
--- a/client/src/app/modal/admin-welcome-modal.component.ts
+++ b/client/src/app/modal/admin-welcome-modal.component.ts
@@ -1,6 +1,6 @@
import { Component, ElementRef, ViewChild } from '@angular/core'
import { Notifier, User, UserService } from '@app/core'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { logger } from '@root-helpers/logger'
import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
diff --git a/client/src/app/modal/instance-config-warning-modal.component.ts b/client/src/app/modal/instance-config-warning-modal.component.ts
index d86353d8ec..dadd4a7bf3 100644
--- a/client/src/app/modal/instance-config-warning-modal.component.ts
+++ b/client/src/app/modal/instance-config-warning-modal.component.ts
@@ -2,8 +2,8 @@ import { CommonModule, Location } from '@angular/common'
import { Component, ElementRef, ViewChild } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { Notifier, User, UserService } from '@app/core'
-import { PeertubeCheckboxComponent } from '@app/shared/shared-forms'
-import { GlobalIconComponent } from '@app/shared/shared-icons'
+import { PeertubeCheckboxComponent } from '@app/shared/shared-forms/peertube-checkbox.component'
+import { GlobalIconComponent } from '@app/shared/shared-icons/global-icon.component'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { About, ServerConfig } from '@peertube/peertube-models'
import { logger } from '@root-helpers/logger'
diff --git a/client/src/app/shared/form-validators/index.ts b/client/src/app/shared/form-validators/index.ts
deleted file mode 100644
index 0b605719c1..0000000000
--- a/client/src/app/shared/form-validators/index.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-export * from './form-validator.model'
-
-// Don't re export const variables because webpack cannot do tree shaking with them
-// export * from './abuse-validators'
-// export * from './batch-domains-validators'
-// export * from './custom-config-validators'
-// export * from './instance-validators'
-// export * from './login-validators'
-// export * from './reset-password-validators'
-// export * from './user-validators'
-// export * from './video-block-validators'
-// export * from './video-captions-validators'
-// export * from './video-channel-validators'
-// export * from './video-comment-validators'
-// export * from './video-playlist-validators'
-// export * from './video-validators'
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
index 32ad2f590f..31a87a3afc 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
@@ -3,12 +3,8 @@ import { SortMeta, SharedModule } from 'primeng/api'
import { Component, Input, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core'
-import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
-import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
-import { VideoCommentService } from '@app/shared/shared-video-comment'
import { AbuseState, AbuseStateType, AdminAbuse } from '@peertube/peertube-models'
import { logger } from '@root-helpers/logger'
-import { AdvancedInputFilter } from '../shared-forms'
import { AbuseMessageModalComponent } from './abuse-message-modal.component'
import { ModerationCommentModalComponent } from './moderation-comment-modal.component'
import { ProcessedAbuse } from './processed-abuse.model'
@@ -17,12 +13,20 @@ import { AutoColspanDirective } from '../shared-main/angular/auto-colspan.direct
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { VideoCellComponent } from '../shared-tables/video-cell.component'
import { ActorAvatarComponent } from '../shared-actor-image/actor-avatar.component'
-import { ActionDropdownComponent } from '../shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../shared-main/buttons/action-dropdown.component'
import { TableExpanderIconComponent } from '../shared-tables/table-expander-icon.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { NgIf, NgClass, DatePipe } from '@angular/common'
-import { AdvancedInputFilterComponent } from '../shared-forms/advanced-input-filter.component'
+import { AdvancedInputFilter, AdvancedInputFilterComponent } from '../shared-forms/advanced-input-filter.component'
import { TableModule } from 'primeng/table'
+import { Video } from '../shared-main/video/video.model'
+import { Actor } from '../shared-main/account/actor.model'
+import { VideoService } from '../shared-main/video/video.service'
+import { Account } from '../shared-main/account/account.model'
+import { AbuseService } from '../shared-moderation/abuse.service'
+import { BlocklistService } from '../shared-moderation/blocklist.service'
+import { VideoBlockService } from '../shared-moderation/video-block.service'
+import { VideoCommentService } from '../shared-video-comment/video-comment.service'
const debugLogger = debug('peertube:moderation:AbuseListTableComponent')
diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts
index aece19f6f7..a77e8e474d 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts
@@ -1,15 +1,16 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
import { AuthService, HtmlRendererService, Notifier } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { logger } from '@root-helpers/logger'
import { AbuseMessage, UserAbuse } from '@peertube/peertube-models'
import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators'
-import { AbuseService } from '../shared-moderation'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { NgIf, NgFor, NgClass, DatePipe } from '@angular/common'
+import { AbuseService } from '../shared-moderation/abuse.service'
@Component({
selector: 'my-abuse-message-modal',
diff --git a/client/src/app/shared/shared-abuse-list/index.ts b/client/src/app/shared/shared-abuse-list/index.ts
deleted file mode 100644
index 3bdd18201a..0000000000
--- a/client/src/app/shared/shared-abuse-list/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export * from './abuse-message-modal.component'
-export * from './abuse-list-table.component'
-export * from './abuse-details.component'
-export * from './moderation-comment-modal.component'
-export * from './processed-abuse.model'
-
-export * from './shared-abuse-list.module'
diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
index 0fb90d434b..1bc94ebb6a 100644
--- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
+++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
@@ -1,7 +1,7 @@
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
import { Notifier } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { AbuseService } from '@app/shared/shared-moderation'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { AdminAbuse } from '@peertube/peertube-models'
@@ -9,6 +9,7 @@ import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-val
import { NgClass, NgIf } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
+import { AbuseService } from '../shared-moderation/abuse.service'
@Component({
selector: 'my-moderation-comment-modal',
diff --git a/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts b/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts
index c51d6877ef..a4b87445ae 100644
--- a/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts
+++ b/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts
@@ -1,5 +1,5 @@
-import { Account } from '@app/shared/shared-main'
import { AdminAbuse } from '@peertube/peertube-models'
+import { Account } from '../shared-main/account/account.model'
// Don't use an abuse model because we need external services to compute some properties
// And this model is only used in this component
diff --git a/client/src/app/shared/shared-actor-image-edit/index.ts b/client/src/app/shared/shared-actor-image-edit/index.ts
deleted file mode 100644
index 276b2e2fb4..0000000000
--- a/client/src/app/shared/shared-actor-image-edit/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './shared-actor-image-edit.module'
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
index 666062431f..2956718b48 100644
--- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
+++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
@@ -1,9 +1,9 @@
import { Component, ElementRef, Input, OnChanges, OnInit, ViewChild, booleanAttribute, numberAttribute } from '@angular/core'
-import { VideoChannel } from '../shared-main'
import { Account } from '../shared-main/account/account.model'
import { objectKeysTyped } from '@peertube/peertube-core-utils'
import { RouterLink } from '@angular/router'
import { NgIf, NgClass, NgTemplateOutlet } from '@angular/common'
+import { VideoChannel } from '../shared-main/video-channel/video-channel.model'
export type ActorAvatarInput = {
name: string
diff --git a/client/src/app/shared/shared-actor-image/index.ts b/client/src/app/shared/shared-actor-image/index.ts
deleted file mode 100644
index 18a9038ebb..0000000000
--- a/client/src/app/shared/shared-actor-image/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './shared-actor-image.module'
diff --git a/client/src/app/shared/shared-custom-markup/index.ts b/client/src/app/shared/shared-custom-markup/index.ts
deleted file mode 100644
index 172fce8e25..0000000000
--- a/client/src/app/shared/shared-custom-markup/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './custom-markup.service'
-export * from './custom-markup-container.component'
-export * from './dynamic-element.service'
-export * from './custom-markup-help.component'
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/button-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/button-markup.component.ts
index 56562cbcef..bea0eda981 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/button-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/button-markup.component.ts
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
-import { VideoChannel } from '../../shared-main'
import { CustomMarkupComponent } from './shared'
import { NgClass } from '@angular/common'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
/*
* Markup component that creates a button
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
index 902d7eca77..39393c3146 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
@@ -2,14 +2,16 @@ import { from } from 'rxjs'
import { finalize, map, switchMap, tap } from 'rxjs/operators'
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { MarkdownService, Notifier, UserService } from '@app/core'
-import { FindInBulkService } from '@app/shared/shared-search'
import { VideoSortField } from '@peertube/peertube-models'
-import { Video, VideoChannel, VideoService } from '../../shared-main'
import { CustomMarkupComponent } from './shared'
import { VideoMiniatureMarkupComponent } from './video-miniature-markup.component'
import { RouterLink } from '@angular/router'
import { ActorAvatarComponent } from '../../shared-actor-image/actor-avatar.component'
import { NgIf } from '@angular/common'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { FindInBulkService } from '@app/shared/shared-search/find-in-bulk.service'
/*
* Markup component that creates a channel miniature only
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts
index f17bb1e747..4ea73f1ccf 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/playlist-miniature-markup.component.ts
@@ -1,12 +1,12 @@
import { finalize } from 'rxjs/operators'
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { Notifier } from '@app/core'
-import { FindInBulkService } from '@app/shared/shared-search'
-import { MiniatureDisplayOptions } from '../../shared-video-miniature'
-import { VideoPlaylist } from '../../shared-video-playlist'
import { CustomMarkupComponent } from './shared'
import { VideoPlaylistMiniatureComponent } from '../../shared-video-playlist/video-playlist-miniature.component'
import { NgIf } from '@angular/common'
+import { FindInBulkService } from '@app/shared/shared-search/find-in-bulk.service'
+import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature/video-miniature.component'
+import { VideoPlaylist } from '@app/shared/shared-video-playlist/video-playlist.model'
/*
* Markup component that creates a playlist miniature only
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
index 0646592173..cae23aa900 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
@@ -1,13 +1,12 @@
import { finalize } from 'rxjs/operators'
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { AuthService, Notifier } from '@app/core'
-import { FindInBulkService } from '@app/shared/shared-search'
import { objectKeysTyped } from '@peertube/peertube-core-utils'
-import { Video } from '../../shared-main'
-import { MiniatureDisplayOptions } from '../../shared-video-miniature'
import { CustomMarkupComponent } from './shared'
-import { VideoMiniatureComponent } from '../../shared-video-miniature/video-miniature.component'
+import { MiniatureDisplayOptions, VideoMiniatureComponent } from '../../shared-video-miniature/video-miniature.component'
import { NgIf } from '@angular/common'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { FindInBulkService } from '@app/shared/shared-search/find-in-bulk.service'
/*
* Markup component that creates a video miniature only
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts
index 0deefd5e3f..ec0ab8b19b 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts
@@ -3,12 +3,12 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In
import { AuthService, Notifier } from '@app/core'
import { objectKeysTyped } from '@peertube/peertube-core-utils'
import { ResultList, VideoSortField } from '@peertube/peertube-models'
-import { Video, VideoService } from '../../shared-main'
-import { MiniatureDisplayOptions } from '../../shared-video-miniature'
import { CustomMarkupComponent } from './shared'
import { Observable } from 'rxjs'
-import { VideoMiniatureComponent } from '../../shared-video-miniature/video-miniature.component'
+import { MiniatureDisplayOptions, VideoMiniatureComponent } from '../../shared-video-miniature/video-miniature.component'
import { NgStyle, NgFor } from '@angular/common'
+import { Video } from '@app/shared/shared-main/video/video.model'
+import { VideoService } from '@app/shared/shared-main/video/video.service'
/*
* Markup component list videos depending on criteria
diff --git a/client/src/app/shared/shared-forms/index.ts b/client/src/app/shared/shared-forms/index.ts
deleted file mode 100644
index b2293e1914..0000000000
--- a/client/src/app/shared/shared-forms/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export * from './advanced-input-filter.component'
-export * from './form-reactive.service'
-export * from './form-reactive'
-export * from './form-validator.service'
-export * from './form-validator.service'
-export * from './input-switch.component'
-export * from './input-text.component'
-export * from './markdown-textarea.component'
-export * from './peertube-checkbox.component'
-export * from './preview-upload.component'
-export * from './reactive-file.component'
-export * from './select'
-export * from './shared-form-providers'
-export * from './textarea-autoresize.directive'
-export * from './timestamp-input.component'
diff --git a/client/src/app/shared/shared-forms/peertube-checkbox.component.ts b/client/src/app/shared/shared-forms/peertube-checkbox.component.ts
index 4230d4aa6b..db5f1d83f5 100644
--- a/client/src/app/shared/shared-forms/peertube-checkbox.component.ts
+++ b/client/src/app/shared/shared-forms/peertube-checkbox.component.ts
@@ -1,8 +1,8 @@
import { AfterContentInit, Component, ContentChildren, forwardRef, Input, QueryList, TemplateRef } from '@angular/core'
import { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'
-import { PeerTubeTemplateDirective } from '@app/shared/shared-main'
import { HelpComponent } from '../shared-main/misc/help.component'
import { NgIf, NgTemplateOutlet } from '@angular/common'
+import { PeerTubeTemplateDirective } from '../shared-main/angular/peertube-template.directive'
@Component({
selector: 'my-peertube-checkbox',
diff --git a/client/src/app/shared/shared-forms/preview-upload.component.ts b/client/src/app/shared/shared-forms/preview-upload.component.ts
index 732a6544d2..10c159d7fe 100644
--- a/client/src/app/shared/shared-forms/preview-upload.component.ts
+++ b/client/src/app/shared/shared-forms/preview-upload.component.ts
@@ -3,9 +3,9 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
import { ServerService } from '@app/core'
import { imageToDataURL } from '@root-helpers/images'
import { HTMLServerConfig } from '@peertube/peertube-models'
-import { BytesPipe } from '../shared-main'
import { NgIf, NgStyle } from '@angular/common'
import { ReactiveFileComponent } from './reactive-file.component'
+import { BytesPipe } from '../shared-main/angular/bytes.pipe'
@Component({
selector: 'my-preview-upload',
diff --git a/client/src/app/shared/shared-forms/reactive-file.component.ts b/client/src/app/shared/shared-forms/reactive-file.component.ts
index 6b000b93c9..ce8f7810e5 100644
--- a/client/src/app/shared/shared-forms/reactive-file.component.ts
+++ b/client/src/app/shared/shared-forms/reactive-file.component.ts
@@ -1,7 +1,7 @@
import { Component, EventEmitter, forwardRef, Input, OnChanges, OnInit, Output } from '@angular/core'
import { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'
import { Notifier } from '@app/core'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { NgClass, NgIf } from '@angular/common'
diff --git a/client/src/app/shared/shared-forms/select/index.ts b/client/src/app/shared/shared-forms/select/index.ts
deleted file mode 100644
index a3d554ee2e..0000000000
--- a/client/src/app/shared/shared-forms/select/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export * from './select-categories.component'
-export * from './select-channel.component'
-export * from './select-checkbox-all.component'
-export * from './select-checkbox.component'
-export * from './select-custom-value.component'
-export * from './select-languages.component'
-export * from './select-options.component'
-export * from './select-tags.component'
diff --git a/client/src/app/shared/shared-forms/select/select-channel.component.ts b/client/src/app/shared/shared-forms/select/select-channel.component.ts
index 8b9619b739..4b5f888ff7 100644
--- a/client/src/app/shared/shared-forms/select/select-channel.component.ts
+++ b/client/src/app/shared/shared-forms/select/select-channel.component.ts
@@ -1,9 +1,9 @@
import { Component, forwardRef, Input, OnChanges } from '@angular/core'
import { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'
-import { VideoChannel } from '@app/shared/shared-main'
import { SelectChannelItem } from '../../../../types/select-options-item.model'
import { NgFor } from '@angular/common'
import { NgSelectModule } from '@ng-select/ng-select'
+import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
@Component({
selector: 'my-select-channel',
diff --git a/client/src/app/shared/shared-icons/index.ts b/client/src/app/shared/shared-icons/index.ts
deleted file mode 100644
index d1e9ca1b00..0000000000
--- a/client/src/app/shared/shared-icons/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './global-icon.component'
diff --git a/client/src/app/shared/shared-instance/index.ts b/client/src/app/shared/shared-instance/index.ts
deleted file mode 100644
index fbdef65fda..0000000000
--- a/client/src/app/shared/shared-instance/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from './feature-boolean.component'
-export * from './instance-about-accordion.component'
-export * from './instance-banner.component'
-export * from './instance-features-table.component'
-export * from './instance-follow.service'
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts
index 65955ed07f..53897b6670 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.ts
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts
@@ -2,12 +2,12 @@ import { Component, OnInit } from '@angular/core'
import { ServerService } from '@app/core'
import { formatICU } from '@app/helpers'
import { ServerConfig, ServerStats } from '@peertube/peertube-models'
-import { DaysDurationFormatterPipe } from '../shared-main'
import { BytesPipe } from '../shared-main/angular/bytes.pipe'
import { PeerTubeTemplateDirective } from '../shared-main/angular/peertube-template.directive'
import { HelpComponent } from '../shared-main/misc/help.component'
import { FeatureBooleanComponent } from './feature-boolean.component'
import { NgIf, NgFor } from '@angular/common'
+import { DaysDurationFormatterPipe } from '../shared-main/angular/days-duration-formatter.pipe'
@Component({
selector: 'my-instance-features-table',
diff --git a/client/src/app/shared/shared-instance/instance-follow.service.ts b/client/src/app/shared/shared-instance/instance-follow.service.ts
index f243273bac..78b31277c8 100644
--- a/client/src/app/shared/shared-instance/instance-follow.service.ts
+++ b/client/src/app/shared/shared-instance/instance-follow.service.ts
@@ -7,7 +7,7 @@ import { RestExtractor, RestPagination, RestService } from '@app/core'
import { arrayify } from '@peertube/peertube-core-utils'
import { ActivityPubActorType, ActorFollow, FollowState, ResultList, ServerFollowCreate } from '@peertube/peertube-models'
import { environment } from '../../../environments/environment'
-import { AdvancedInputFilter } from '../shared-forms'
+import { AdvancedInputFilter } from '../shared-forms/advanced-input-filter.component'
@Injectable()
export class InstanceFollowService {
diff --git a/client/src/app/shared/shared-main/account/index.ts b/client/src/app/shared/shared-main/account/index.ts
deleted file mode 100644
index dd41a5f05a..0000000000
--- a/client/src/app/shared/shared-main/account/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './account.model'
-export * from './account.service'
-export * from './actor.model'
-export * from './signup-label.component'
diff --git a/client/src/app/shared/shared-main/angular/index.ts b/client/src/app/shared/shared-main/angular/index.ts
deleted file mode 100644
index 8e1517f8f8..0000000000
--- a/client/src/app/shared/shared-main/angular/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export * from './auto-colspan.directive'
-export * from './autofocus.directive'
-export * from './bytes.pipe'
-export * from './days-duration-formatter.pipe'
-export * from './defer-loading.directive'
-export * from './from-now.pipe'
-export * from './infinite-scroller.directive'
-export * from './link.component'
-export * from './login-link.component'
-export * from './number-formatter.pipe'
-export * from './peertube-template.directive'
-export * from './time-duration-formatter.pipe'
diff --git a/client/src/app/shared/shared-main/auth/index.ts b/client/src/app/shared/shared-main/auth/index.ts
deleted file mode 100644
index 84a07196f3..0000000000
--- a/client/src/app/shared/shared-main/auth/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './auth-interceptor.service'
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
index 9fff9f5b70..3e5e8a5fe9 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { Params, RouterLink } from '@angular/router'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
import { NgbDropdown, NgbDropdownToggle, NgbDropdownMenu } from '@ng-bootstrap/ng-bootstrap'
import { NgIf, NgClass, NgFor, NgTemplateOutlet } from '@angular/common'
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts
index 04ecefe7f3..9c07a25805 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, booleanAttribute } from '@angular/core'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
import { LoaderComponent } from '../loaders/loader.component'
import { RouterLink } from '@angular/router'
diff --git a/client/src/app/shared/shared-main/buttons/index.ts b/client/src/app/shared/shared-main/buttons/index.ts
deleted file mode 100644
index 75efbdea3f..0000000000
--- a/client/src/app/shared/shared-main/buttons/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from './action-dropdown.component'
-export * from './button.component'
-export * from './copy-button.component'
-export * from './delete-button.component'
-export * from './edit-button.component'
diff --git a/client/src/app/shared/shared-main/custom-page/index.ts b/client/src/app/shared/shared-main/custom-page/index.ts
deleted file mode 100644
index 7269ece959..0000000000
--- a/client/src/app/shared/shared-main/custom-page/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './custom-page.service'
diff --git a/client/src/app/shared/shared-main/date/index.ts b/client/src/app/shared/shared-main/date/index.ts
deleted file mode 100644
index db00aef521..0000000000
--- a/client/src/app/shared/shared-main/date/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './date-toggle.component'
diff --git a/client/src/app/shared/shared-main/feeds/index.ts b/client/src/app/shared/shared-main/feeds/index.ts
deleted file mode 100644
index 6bc3966995..0000000000
--- a/client/src/app/shared/shared-main/feeds/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './feed.component'
-export * from './syndication.model'
diff --git a/client/src/app/shared/shared-main/index.ts b/client/src/app/shared/shared-main/index.ts
deleted file mode 100644
index 456bf8ebf9..0000000000
--- a/client/src/app/shared/shared-main/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-export * from './account'
-export * from './angular'
-export * from './buttons'
-export * from './date'
-export * from './instance'
-export * from './feeds'
-export * from './loaders'
-export * from './misc'
-export * from './peertube-modal'
-export * from './plugins'
-export * from './router'
-export * from './users'
-export * from './video'
-export * from './video-caption'
-export * from './video-channel'
-export * from './main-providers'
-export * from './video-channel-sync'
diff --git a/client/src/app/shared/shared-main/instance/index.ts b/client/src/app/shared/shared-main/instance/index.ts
deleted file mode 100644
index 851509953d..0000000000
--- a/client/src/app/shared/shared-main/instance/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './instance.service'
diff --git a/client/src/app/shared/shared-main/loaders/index.ts b/client/src/app/shared/shared-main/loaders/index.ts
deleted file mode 100644
index 60483727c3..0000000000
--- a/client/src/app/shared/shared-main/loaders/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './loader.component'
diff --git a/client/src/app/shared/shared-main/main-providers.ts b/client/src/app/shared/shared-main/main-providers.ts
index 48c10bcfaa..86a78da1d1 100644
--- a/client/src/app/shared/shared-main/main-providers.ts
+++ b/client/src/app/shared/shared-main/main-providers.ts
@@ -1,23 +1,22 @@
import { DatePipe } from '@angular/common'
-import { AccountService } from './account'
-import { FromNowPipe } from './angular'
-import { CustomPageService } from './custom-page'
-import { ActorRedirectGuard } from './router'
-import { UserHistoryService, UserNotificationService } from './users'
-import {
- RedundancyService,
- VideoImportService,
- VideoOwnershipService,
- VideoService,
- VideoFileTokenService,
- VideoResolver,
- VideoPasswordService,
- VideoChapterService
-} from './video'
-import { VideoCaptionService } from './video-caption'
-import { VideoChannelService } from './video-channel'
-import { AUTH_INTERCEPTOR_PROVIDER } from './auth'
-import { InstanceService } from './instance'
+import { AccountService } from './account/account.service'
+import { FromNowPipe } from './angular/from-now.pipe'
+import { UserHistoryService } from './users/user-history.service'
+import { UserNotificationService } from './users/user-notification.service'
+import { AUTH_INTERCEPTOR_PROVIDER } from './auth/auth-interceptor.service'
+import { CustomPageService } from './custom-page/custom-page.service'
+import { InstanceService } from './instance/instance.service'
+import { ActorRedirectGuard } from './router/actor-redirect-guard.service'
+import { VideoCaptionService } from './video-caption/video-caption.service'
+import { VideoChannelService } from './video-channel/video-channel.service'
+import { RedundancyService } from './video/redundancy.service'
+import { VideoChapterService } from './video/video-chapter.service'
+import { VideoFileTokenService } from './video/video-file-token.service'
+import { VideoImportService } from './video/video-import.service'
+import { VideoOwnershipService } from './video/video-ownership.service'
+import { VideoPasswordService } from './video/video-password.service'
+import { VideoResolver } from './video/video.resolver'
+import { VideoService } from './video/video.service'
export function getMainProviders () {
return [
diff --git a/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts b/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
index ef1d713603..9df43ca044 100644
--- a/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
+++ b/client/src/app/shared/shared-main/misc/channels-setup-message.component.ts
@@ -1,9 +1,9 @@
import { Component, Input, OnInit } from '@angular/core'
import { AuthService, User } from '@app/core'
-import { VideoChannel } from '@app/shared/shared-main'
import { RouterLink } from '@angular/router'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
import { NgIf } from '@angular/common'
+import { VideoChannel } from '../video-channel/video-channel.model'
@Component({
selector: 'my-channels-setup-message',
diff --git a/client/src/app/shared/shared-main/misc/help.component.ts b/client/src/app/shared/shared-main/misc/help.component.ts
index c6c1051ee7..17f97392c2 100644
--- a/client/src/app/shared/shared-main/misc/help.component.ts
+++ b/client/src/app/shared/shared-main/misc/help.component.ts
@@ -1,10 +1,10 @@
import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { ENHANCED_RULES, TEXT_RULES } from '@peertube/peertube-core-utils'
-import { PeerTubeTemplateDirective } from '../angular'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
import { NgIf, NgTemplateOutlet } from '@angular/common'
+import { PeerTubeTemplateDirective } from '../angular/peertube-template.directive'
@Component({
selector: 'my-help',
diff --git a/client/src/app/shared/shared-main/misc/index.ts b/client/src/app/shared/shared-main/misc/index.ts
deleted file mode 100644
index 24134d7cdd..0000000000
--- a/client/src/app/shared/shared-main/misc/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from './channels-setup-message.component'
-export * from './help.component'
-export * from './list-overflow.component'
-export * from './top-menu-dropdown.component'
-export * from './simple-search-input.component'
diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
index 7ab7f9ed5e..525375c50c 100644
--- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts
@@ -4,7 +4,7 @@ import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { NavigationEnd, Router, RouterLinkActive, RouterLink } from '@angular/router'
import { MenuService, ScreenService } from '@app/core'
import { scrollToTop } from '@app/helpers'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { NgbDropdown, NgbModal, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem } from '@ng-bootstrap/ng-bootstrap'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
import { NgClass, NgFor, NgIf } from '@angular/common'
diff --git a/client/src/app/shared/shared-main/peertube-modal/index.ts b/client/src/app/shared/shared-main/peertube-modal/index.ts
deleted file mode 100644
index d631522e4b..0000000000
--- a/client/src/app/shared/shared-main/peertube-modal/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './peertube-modal.service'
diff --git a/client/src/app/shared/shared-main/plugins/index.ts b/client/src/app/shared/shared-main/plugins/index.ts
deleted file mode 100644
index f45ed9b73c..0000000000
--- a/client/src/app/shared/shared-main/plugins/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './plugin-placeholder.component'
-export * from './plugin-selector.directive'
diff --git a/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts b/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts
index 53a48f8a1e..fc851fb9fb 100644
--- a/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts
+++ b/client/src/app/shared/shared-main/router/actor-redirect-guard.service.ts
@@ -2,8 +2,8 @@ import { forkJoin, of } from 'rxjs'
import { catchError, map } from 'rxjs/operators'
import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot, Router } from '@angular/router'
-import { AccountService } from '../account'
-import { VideoChannelService } from '../video-channel'
+import { AccountService } from '../account/account.service'
+import { VideoChannelService } from '../video-channel/video-channel.service'
@Injectable()
export class ActorRedirectGuard {
diff --git a/client/src/app/shared/shared-main/router/index.ts b/client/src/app/shared/shared-main/router/index.ts
deleted file mode 100644
index f4000b6740..0000000000
--- a/client/src/app/shared/shared-main/router/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './actor-redirect-guard.service'
diff --git a/client/src/app/shared/shared-main/users/index.ts b/client/src/app/shared/shared-main/users/index.ts
deleted file mode 100644
index ba2ae6e4d7..0000000000
--- a/client/src/app/shared/shared-main/users/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './user-history.service'
-export * from './user-notification.model'
-export * from './user-notification.service'
-export * from './user-quota.component'
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts
index 336111caa0..1a58a6218d 100644
--- a/client/src/app/shared/shared-main/users/user-notification.model.ts
+++ b/client/src/app/shared/shared-main/users/user-notification.model.ts
@@ -14,7 +14,7 @@ import {
VideoInfo
} from '@peertube/peertube-models'
import { logger } from '@root-helpers/logger'
-import { Video } from '../video'
+import { Video } from '../video/video.model'
export class UserNotification implements UserNotificationServer {
id: number
diff --git a/client/src/app/shared/shared-main/users/user-quota.component.ts b/client/src/app/shared/shared-main/users/user-quota.component.ts
index 8c55635c92..98d4a79ebb 100644
--- a/client/src/app/shared/shared-main/users/user-quota.component.ts
+++ b/client/src/app/shared/shared-main/users/user-quota.component.ts
@@ -1,9 +1,9 @@
import { Subject } from 'rxjs'
import { Component, Input, OnInit } from '@angular/core'
import { User, UserService } from '@app/core'
-import { BytesPipe } from '../angular'
import { NgIf } from '@angular/common'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
+import { BytesPipe } from '../angular/bytes.pipe'
@Component({
selector: 'my-user-quota',
diff --git a/client/src/app/shared/shared-main/video-caption/index.ts b/client/src/app/shared/shared-main/video-caption/index.ts
deleted file mode 100644
index 308200f27e..0000000000
--- a/client/src/app/shared/shared-main/video-caption/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './video-caption-edit.model'
-export * from './video-caption.service'
diff --git a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
index 5e4a27d4e2..502b26f951 100644
--- a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
+++ b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
@@ -4,11 +4,12 @@ import { HttpClient } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor, ServerService } from '@app/core'
import { objectToFormData } from '@app/helpers'
-import { VideoPasswordService, VideoService } from '@app/shared/shared-main/video'
import { peertubeTranslate, sortBy } from '@peertube/peertube-core-utils'
import { ResultList, VideoCaption } from '@peertube/peertube-models'
import { environment } from '../../../../environments/environment'
import { VideoCaptionEdit } from './video-caption-edit.model'
+import { VideoPasswordService } from '../video/video-password.service'
+import { VideoService } from '../video/video.service'
@Injectable()
export class VideoCaptionService {
diff --git a/client/src/app/shared/shared-main/video-channel-sync/index.ts b/client/src/app/shared/shared-main/video-channel-sync/index.ts
deleted file mode 100644
index 7134bcd186..0000000000
--- a/client/src/app/shared/shared-main/video-channel-sync/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './video-channel-sync.service'
diff --git a/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts b/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts
index a7d71c1e04..81b6826a87 100644
--- a/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts
+++ b/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts
@@ -5,7 +5,8 @@ import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor, RestPagination, RestService } from '@app/core'
import { ResultList, VideoChannelSync, VideoChannelSyncCreate } from '@peertube/peertube-models'
-import { Account, AccountService } from '../account'
+import { Account } from '../account/account.model'
+import { AccountService } from '../account/account.service'
@Injectable({
providedIn: 'root'
diff --git a/client/src/app/shared/shared-main/video-channel/index.ts b/client/src/app/shared/shared-main/video-channel/index.ts
deleted file mode 100644
index 1fcf6d3bee..0000000000
--- a/client/src/app/shared/shared-main/video-channel/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './video-channel.model'
-export * from './video-channel.service'
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
index 261ade14ee..61f4b7058f 100644
--- a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
+++ b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
@@ -12,9 +12,9 @@ import {
VideosImportInChannelCreate
} from '@peertube/peertube-models'
import { environment } from '../../../../environments/environment'
-import { Account } from '../account'
import { AccountService } from '../account/account.service'
import { VideoChannel } from './video-channel.model'
+import { Account } from '../account/account.model'
@Injectable({ providedIn: 'root' })
export class VideoChannelService {
diff --git a/client/src/app/shared/shared-main/video/index.ts b/client/src/app/shared/shared-main/video/index.ts
deleted file mode 100644
index 7414ded23e..0000000000
--- a/client/src/app/shared/shared-main/video/index.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export * from './embed.component'
-export * from './redundancy.service'
-export * from './video-chapter.service'
-export * from './video-chapters-edit.model'
-export * from './video-details.model'
-export * from './video-edit.model'
-export * from './video-file-token.service'
-export * from './video-import.service'
-export * from './video-ownership.service'
-export * from './video-password.service'
-export * from './video.model'
-export * from './video.resolver'
-export * from './video.service'
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts
index 7d7bd36439..f2ee6f3dc9 100644
--- a/client/src/app/shared/shared-main/video/video.service.ts
+++ b/client/src/app/shared/shared-main/video/video.service.ts
@@ -32,11 +32,12 @@ import {
import { environment } from '../../../../environments/environment'
import { Account } from '../account/account.model'
import { AccountService } from '../account/account.service'
-import { VideoChannel, VideoChannelService } from '../video-channel'
import { VideoDetails } from './video-details.model'
import { VideoEdit } from './video-edit.model'
import { VideoPasswordService } from './video-password.service'
import { Video } from './video.model'
+import { VideoChannel } from '../video-channel/video-channel.model'
+import { VideoChannelService } from '../video-channel/video-channel.service'
export type CommonVideoParams = {
videoPagination?: ComponentPaginationLight
diff --git a/client/src/app/shared/shared-moderation/account-block-badges.component.ts b/client/src/app/shared/shared-moderation/account-block-badges.component.ts
index 428caf0b06..5bba605116 100644
--- a/client/src/app/shared/shared-moderation/account-block-badges.component.ts
+++ b/client/src/app/shared/shared-moderation/account-block-badges.component.ts
@@ -1,6 +1,6 @@
import { Component, Input } from '@angular/core'
-import { Account } from '../shared-main'
import { NgIf } from '@angular/common'
+import { Account } from '../shared-main/account/account.model'
@Component({
selector: 'my-account-block-badges',
diff --git a/client/src/app/shared/shared-moderation/account-block.model.ts b/client/src/app/shared/shared-moderation/account-block.model.ts
index a5bde327a9..309b6e83b6 100644
--- a/client/src/app/shared/shared-moderation/account-block.model.ts
+++ b/client/src/app/shared/shared-moderation/account-block.model.ts
@@ -1,5 +1,5 @@
import { AccountBlock as AccountBlockServer } from '@peertube/peertube-models'
-import { Account } from '@app/shared/shared-main'
+import { Account } from '../shared-main/account/account.model'
export class AccountBlock implements AccountBlockServer {
byAccount: Account
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.ts b/client/src/app/shared/shared-moderation/account-blocklist.component.ts
index c22b94bde1..38dbbff788 100644
--- a/client/src/app/shared/shared-moderation/account-blocklist.component.ts
+++ b/client/src/app/shared/shared-moderation/account-blocklist.component.ts
@@ -4,9 +4,7 @@ import { Notifier, RestPagination, RestTable } from '@app/core'
import { AccountBlock } from './account-block.model'
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
-@Directive({
- providers: [ BlocklistService ]
-})
+@Directive()
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class GenericAccountBlocklistComponent extends RestTable implements OnInit {
// @ts-expect-error: "Abstract methods can only appear within an abstract class"
diff --git a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts b/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
index b2a408097c..9d33a12c14 100644
--- a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
+++ b/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
@@ -1,5 +1,6 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { splitAndGetNotEmpty, UNIQUE_HOSTS_VALIDATOR } from '../form-validators/host-validators'
diff --git a/client/src/app/shared/shared-moderation/blocklist.service.ts b/client/src/app/shared/shared-moderation/blocklist.service.ts
index f755b812ab..477e212139 100644
--- a/client/src/app/shared/shared-moderation/blocklist.service.ts
+++ b/client/src/app/shared/shared-moderation/blocklist.service.ts
@@ -7,7 +7,7 @@ import { RestExtractor, RestPagination, RestService } from '@app/core'
import { arrayify } from '@peertube/peertube-core-utils'
import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@peertube/peertube-models'
import { environment } from '../../../environments/environment'
-import { Account } from '../shared-main'
+import { Account } from '../shared-main/account/account.model'
import { AccountBlock } from './account-block.model'
export enum BlocklistComponentType { Account, Instance }
diff --git a/client/src/app/shared/shared-moderation/index.ts b/client/src/app/shared/shared-moderation/index.ts
deleted file mode 100644
index fbd46bd134..0000000000
--- a/client/src/app/shared/shared-moderation/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-export * from './report-modals'
-
-export * from './abuse.service'
-export * from './account-block-badges.component'
-export * from './account-block.model'
-export * from './account-blocklist.component'
-export * from './batch-domains-modal.component'
-export * from './blocklist.service'
-export * from './bulk.service'
-export * from './server-blocklist.component'
-export * from './user-ban-modal.component'
-export * from './user-moderation-dropdown.component'
-export * from './video-block.component'
-export * from './video-block.service'
diff --git a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts
index 6110460df9..ae54cceee4 100644
--- a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts
+++ b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts
@@ -2,8 +2,8 @@ import { mapValues, pickBy } from 'lodash-es'
import { Component, OnInit, ViewChild } from '@angular/core'
import { Notifier } from '@app/core'
import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { Account } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils'
@@ -14,6 +14,7 @@ import { PeertubeCheckboxComponent } from '../../shared-forms/peertube-checkbox.
import { NgFor, NgIf, NgClass } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
+import { Account } from '@app/shared/shared-main/account/account.model'
@Component({
selector: 'my-account-report',
@@ -29,8 +30,7 @@ import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
NgIf,
PeerTubeTemplateDirective,
NgClass
- ],
- providers: [ AbuseService ]
+ ]
})
export class AccountReportComponent extends FormReactive implements OnInit {
@ViewChild('modal', { static: true }) modal: NgbModal
diff --git a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts
index b657570dfb..9a0956a707 100644
--- a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts
+++ b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts
@@ -2,8 +2,8 @@ import { mapValues, pickBy } from 'lodash-es'
import { Component, Input, OnInit, ViewChild } from '@angular/core'
import { Notifier } from '@app/core'
import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { VideoComment } from '@app/shared/shared-video-comment'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils'
@@ -14,6 +14,7 @@ import { PeertubeCheckboxComponent } from '../../shared-forms/peertube-checkbox.
import { NgFor, NgIf, NgClass } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
+import { VideoComment } from '@app/shared/shared-video-comment/video-comment.model'
@Component({
selector: 'my-comment-report',
@@ -29,8 +30,7 @@ import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
NgIf,
PeerTubeTemplateDirective,
NgClass
- ],
- providers: [ AbuseService ]
+ ]
})
export class CommentReportComponent extends FormReactive implements OnInit {
@Input() comment: VideoComment = null
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts
index e4e71253b9..09ee2da5bc 100644
--- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts
+++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts
@@ -2,12 +2,12 @@ import { mapValues, pickBy } from 'lodash-es'
import { Component, Input, OnInit, ViewChild } from '@angular/core'
import { Notifier } from '@app/core'
import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-validators'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils'
import { AbusePredefinedReasonsString } from '@peertube/peertube-models'
-import { Video } from '../../shared-main'
import { AbuseService } from '../abuse.service'
import { TimestampInputComponent } from '../../shared-forms/timestamp-input.component'
import { EmbedComponent } from '../../shared-main/video/embed.component'
@@ -16,6 +16,7 @@ import { PeertubeCheckboxComponent } from '../../shared-forms/peertube-checkbox.
import { NgFor, NgIf, NgClass } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
+import { Video } from '@app/shared/shared-main/video/video.model'
@Component({
selector: 'my-video-report',
@@ -33,8 +34,7 @@ import { GlobalIconComponent } from '../../shared-icons/global-icon.component'
EmbedComponent,
TimestampInputComponent,
NgClass
- ],
- providers: [ AbuseService ]
+ ]
})
export class VideoReportComponent extends FormReactive implements OnInit {
@Input() video: Video = null
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.ts b/client/src/app/shared/shared-moderation/server-blocklist.component.ts
index b875197690..4105645fa7 100644
--- a/client/src/app/shared/shared-moderation/server-blocklist.component.ts
+++ b/client/src/app/shared/shared-moderation/server-blocklist.component.ts
@@ -5,9 +5,7 @@ import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-
import { ServerBlock } from '@peertube/peertube-models'
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
-@Directive({
- providers: [ BlocklistService ]
-})
+@Directive()
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class GenericServerBlocklistComponent extends RestTable implements OnInit {
@ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
index 8cb25d6146..1ff9fc993d 100644
--- a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
+++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
@@ -2,26 +2,26 @@ import { forkJoin } from 'rxjs'
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
import { Notifier } from '@app/core'
import { formatICU } from '@app/helpers'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { User } from '@peertube/peertube-models'
import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators'
-import { Account } from '../shared-main'
-import { UserAdminService } from '../shared-users'
+import { Account } from '../shared-main/account/account.model'
import { BlocklistService } from './blocklist.service'
import { PeertubeCheckboxComponent } from '../shared-forms/peertube-checkbox.component'
import { NgClass, NgIf } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
+import { UserAdminService } from '../shared-users/user-admin.service'
@Component({
selector: 'my-user-ban-modal',
templateUrl: './user-ban-modal.component.html',
styleUrls: [ './user-ban-modal.component.scss' ],
standalone: true,
- imports: [ GlobalIconComponent, FormsModule, ReactiveFormsModule, NgClass, NgIf, PeertubeCheckboxComponent ],
- providers: [ UserAdminService, BlocklistService ]
+ imports: [ GlobalIconComponent, FormsModule, ReactiveFormsModule, NgClass, NgIf, PeertubeCheckboxComponent ]
})
export class UserBanModalComponent extends FormReactive implements OnInit {
@ViewChild('modal', { static: true }) modal: NgbModal
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
index dba670ee4c..cd59982591 100644
--- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
@@ -1,13 +1,13 @@
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core'
-import { Account, DropdownAction } from '@app/shared/shared-main'
import { BulkRemoveCommentsOfBody, User, UserRight } from '@peertube/peertube-models'
-import { UserAdminService } from '../shared-users'
import { BlocklistService } from './blocklist.service'
import { BulkService } from './bulk.service'
import { UserBanModalComponent } from './user-ban-modal.component'
-import { ActionDropdownComponent } from '../shared-main/buttons/action-dropdown.component'
+import { ActionDropdownComponent, DropdownAction } from '../shared-main/buttons/action-dropdown.component'
import { NgIf } from '@angular/common'
+import { Account } from '../shared-main/account/account.model'
+import { UserAdminService } from '../shared-users/user-admin.service'
export type AccountMutedStatus =
Pick<Account, 'id' | 'nameWithHost' | 'host' | 'userId' |
@@ -23,8 +23,7 @@ export type UserModerationDisplayType = {
selector: 'my-user-moderation-dropdown',
templateUrl: './user-moderation-dropdown.component.html',
standalone: true,
- imports: [ NgIf, UserBanModalComponent, ActionDropdownComponent ],
- providers: [ UserAdminService, BlocklistService, BulkService ]
+ imports: [ NgIf, UserBanModalComponent, ActionDropdownComponent ]
})
export class UserModerationDropdownComponent implements OnInit, OnChanges {
@ViewChild('userBanModal') userBanModal: UserBanModalComponent
diff --git a/client/src/app/shared/shared-moderation/video-block.component.ts b/client/src/app/shared/shared-moderation/video-block.component.ts
index 588b1db501..5c633d4ffd 100644
--- a/client/src/app/shared/shared-moderation/video-block.component.ts
+++ b/client/src/app/shared/shared-moderation/video-block.component.ts
@@ -1,8 +1,9 @@
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
import { Notifier } from '@app/core'
import { formatICU } from '@app/helpers'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
-import { Video } from '@app/shared/shared-main'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
import { VIDEO_BLOCK_REASON_VALIDATOR } from '../form-validators/video-block-validators'
@@ -17,8 +18,7 @@ import { NgIf, NgClass } from '@angular/common'
templateUrl: './video-block.component.html',
styleUrls: [ './video-block.component.scss' ],
standalone: true,
- imports: [ NgIf, GlobalIconComponent, FormsModule, ReactiveFormsModule, NgClass, PeertubeCheckboxComponent ],
- providers: [ VideoBlockService ]
+ imports: [ NgIf, GlobalIconComponent, FormsModule, ReactiveFormsModule, NgClass, PeertubeCheckboxComponent ]
})
export class VideoBlockComponent extends FormReactive implements OnInit {
@ViewChild('modal', { static: true }) modal: NgbModal
diff --git a/client/src/app/shared/shared-search/find-in-bulk.service.ts b/client/src/app/shared/shared-search/find-in-bulk.service.ts
index 9c02a50000..53ec58d081 100644
--- a/client/src/app/shared/shared-search/find-in-bulk.service.ts
+++ b/client/src/app/shared/shared-search/find-in-bulk.service.ts
@@ -3,10 +3,11 @@ import { Observable, Subject } from 'rxjs'
import { filter, first, map } from 'rxjs/operators'
import { Injectable } from '@angular/core'
import { buildBulkObservable } from '@app/helpers'
-import { Video, VideoChannel } from '../shared-main'
-import { VideoPlaylist } from '../shared-video-playlist'
import { AdvancedSearch } from './advanced-search.model'
import { SearchService } from './search.service'
+import { VideoChannel } from '../shared-main/video-channel/video-channel.model'
+import { Video } from '../shared-main/video/video.model'
+import { VideoPlaylist } from '../shared-video-playlist/video-playlist.model'
const debugLogger = debug('peertube:search:FindInBulkService')
diff --git a/client/src/app/shared/shared-search/index.ts b/client/src/app/shared/shared-search/index.ts
deleted file mode 100644
index ede7ab1439..0000000000
--- a/client/src/app/shared/shared-search/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './advanced-search.model'
-export * from './find-in-bulk.service'
-export * from './search.service'
diff --git a/client/src/app/shared/shared-search/search.service.ts b/client/src/app/shared/shared-search/search.service.ts
index 301e857ccc..49f726c55e 100644
--- a/client/src/app/shared/shared-search/search.service.ts
+++ b/client/src/app/shared/shared-search/search.service.ts
@@ -3,7 +3,6 @@ import { catchError, map, switchMap } from 'rxjs/operators'
import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { ComponentPaginationLight, RestExtractor, RestPagination, RestService } from '@app/core'
-import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
import {
ResultList,
Video as VideoServerModel,
@@ -11,8 +10,13 @@ import {
VideoPlaylist as VideoPlaylistServerModel
} from '@peertube/peertube-models'
import { environment } from '../../../environments/environment'
-import { VideoPlaylist, VideoPlaylistService } from '../shared-video-playlist'
import { AdvancedSearch } from './advanced-search.model'
+import { Video } from '../shared-main/video/video.model'
+import { VideoChannel } from '../shared-main/video-channel/video-channel.model'
+import { VideoService } from '../shared-main/video/video.service'
+import { VideoChannelService } from '../shared-main/video-channel/video-channel.service'
+import { VideoPlaylist } from '../shared-video-playlist/video-playlist.model'
+import { VideoPlaylistService } from '../shared-video-playlist/video-playlist.service'
@Injectable()
export class SearchService {
diff --git a/client/src/app/shared/shared-share-modal/index.ts b/client/src/app/shared/shared-share-modal/index.ts
deleted file mode 100644
index adc1887094..0000000000
--- a/client/src/app/shared/shared-share-modal/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './video-share.component'
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts
index 9546e4caf5..15395446ff 100644
--- a/client/src/app/shared/shared-share-modal/video-share.component.ts
+++ b/client/src/app/shared/shared-share-modal/video-share.component.ts
@@ -1,8 +1,7 @@
import { Component, ElementRef, Input, ViewChild } from '@angular/core'
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'
import { HooksService, ServerService } from '@app/core'
-import { VideoDetails } from '@app/shared/shared-main'
-import { VideoPlaylist } from '@app/shared/shared-video-playlist'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
import {
NgbModal,
NgbNav,
@@ -25,6 +24,7 @@ import { InputTextComponent } from '../shared-forms/input-text.component'
import { RouterLink } from '@angular/router'
import { NgIf, NgClass, NgFor } from '@angular/common'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
+import { VideoPlaylist } from '../shared-video-playlist/video-playlist.model'
type Customizations = {
startAtCheckbox: boolean
diff --git a/client/src/app/shared/shared-support-modal/index.ts b/client/src/app/shared/shared-support-modal/index.ts
deleted file mode 100644
index 8ea66ae7a3..0000000000
--- a/client/src/app/shared/shared-support-modal/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './support-modal.component'
diff --git a/client/src/app/shared/shared-support-modal/support-modal.component.ts b/client/src/app/shared/shared-support-modal/support-modal.component.ts
index 7c0303baac..864fca2ba1 100644
--- a/client/src/app/shared/shared-support-modal/support-modal.component.ts
+++ b/client/src/app/shared/shared-support-modal/support-modal.component.ts
@@ -1,6 +1,6 @@
import { Component, Input, ViewChild } from '@angular/core'
import { MarkdownService } from '@app/core'
-import { VideoDetails } from '@app/shared/shared-main'
+import { VideoDetails } from '@app/shared/shared-main/video/video-details.model'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { VideoChannel } from '@peertube/peertube-models'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
diff --git a/client/src/app/shared/shared-tables/index.ts b/client/src/app/shared/shared-tables/index.ts
deleted file mode 100644
index 82aa4a73b1..0000000000
--- a/client/src/app/shared/shared-tables/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './table-expander-icon.component'
-export * from './video-cell.component'
diff --git a/client/src/app/shared/shared-tables/video-cell.component.ts b/client/src/app/shared/shared-tables/video-cell.component.ts
index 2e701c44b5..30b5774f72 100644
--- a/client/src/app/shared/shared-tables/video-cell.component.ts
+++ b/client/src/app/shared/shared-tables/video-cell.component.ts
@@ -1,5 +1,5 @@
import { Component, Input } from '@angular/core'
-import { Video } from '@app/shared/shared-main'
+import { Video } from '../shared-main/video/video.model'
@Component({
selector: 'my-video-cell',
diff --git a/client/src/app/shared/shared-thumbnail/index.ts b/client/src/app/shared/shared-thumbnail/index.ts
deleted file mode 100644
index b77ce2de8f..0000000000
--- a/client/src/app/shared/shared-thumbnail/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './video-thumbnail.component'
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
index 6daa9e22e8..f52390281c 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
@@ -1,11 +1,11 @@
import { Component, EventEmitter, Input, Output } from '@angular/core'
import { ScreenService } from '@app/core'
import { VideoState } from '@peertube/peertube-models'
-import { Video } from '../shared-main'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { RouterLink } from '@angular/router'
import { NgIf, NgTemplateOutlet, NgClass, NgStyle } from '@angular/common'
+import { Video } from '../shared-main/video/video.model'
@Component({
selector: 'my-video-thumbnail',
diff --git a/client/src/app/shared/shared-user-settings/index.ts b/client/src/app/shared/shared-user-settings/index.ts
deleted file mode 100644
index 6f06c0954f..0000000000
--- a/client/src/app/shared/shared-user-settings/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './user-interface-settings.component'
-export * from './user-video-settings.component'
diff --git a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
index bdca0b0a81..3214439dc8 100644
--- a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
@@ -1,7 +1,8 @@
import { Subject, Subscription } from 'rxjs'
import { Component, Input, OnDestroy, OnInit } from '@angular/core'
import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { HTMLServerConfig, User, UserUpdateMe } from '@peertube/peertube-models'
import { SelectOptionsItem } from 'src/types'
import { NgFor, NgIf } from '@angular/common'
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
index 075199360c..bf474ecec3 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
@@ -3,7 +3,8 @@ import { Subject, Subscription } from 'rxjs'
import { first } from 'rxjs/operators'
import { Component, Input, OnDestroy, OnInit } from '@angular/core'
import { AuthService, Notifier, ServerService, User, UserService } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { NSFWPolicyType, UserUpdateMe } from '@peertube/peertube-models'
import { NgIf } from '@angular/common'
import { RouterLink } from '@angular/router'
diff --git a/client/src/app/shared/shared-user-subscription/index.ts b/client/src/app/shared/shared-user-subscription/index.ts
deleted file mode 100644
index e76940f7b5..0000000000
--- a/client/src/app/shared/shared-user-subscription/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './user-subscription.service'
-export * from './subscribe-button.component'
-export * from './remote-subscribe.component'
diff --git a/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts b/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts
index e466a8dbf4..359d6dc20a 100644
--- a/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts
+++ b/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts
@@ -1,6 +1,7 @@
import { Component, Input, OnInit } from '@angular/core'
import { Notifier } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
import { logger } from '@root-helpers/logger'
import { USER_HANDLE_VALIDATOR } from '../form-validators/user-validators'
import { PeerTubeTemplateDirective } from '../shared-main/angular/peertube-template.directive'
diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
index 6f7d99ab53..8b9b7b4cf5 100644
--- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
@@ -1,13 +1,15 @@
import { concat, forkJoin, merge } from 'rxjs'
import { Component, Input, OnChanges, OnInit } from '@angular/core'
import { AuthService, Notifier, RedirectService } from '@app/core'
-import { Account, VideoChannel, VideoService } from '@app/shared/shared-main'
import { FeedFormat } from '@peertube/peertube-models'
import { UserSubscriptionService } from './user-subscription.service'
import { NumberFormatterPipe } from '../shared-main/angular/number-formatter.pipe'
import { RemoteSubscribeComponent } from './remote-subscribe.component'
import { NgbDropdown, NgbDropdownToggle, NgbDropdownMenu } from '@ng-bootstrap/ng-bootstrap'
import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common'
+import { VideoChannel } from '../shared-main/video-channel/video-channel.model'
+import { Account } from '../shared-main/account/account.model'
+import { VideoService } from '../shared-main/video/video.service'
@Component({
selector: 'my-subscribe-button',
diff --git a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
index b83f7ebc53..8779bfcaa1 100644
--- a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
+++ b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
@@ -5,9 +5,12 @@ import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core'
import { buildBulkObservable } from '@app/helpers'
-import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@peertube/peertube-models'
import { environment } from '../../../environments/environment'
+import { Video } from '../shared-main/video/video.model'
+import { VideoChannel } from '../shared-main/video-channel/video-channel.model'
+import { VideoService } from '../shared-main/video/video.service'
+import { VideoChannelService } from '../shared-main/video-channel/video-channel.service'
const debugLogger = debug('peertube:subscriptions:UserSubscriptionService')
diff --git a/client/src/app/shared/shared-users/index.ts b/client/src/app/shared/shared-users/index.ts
deleted file mode 100644
index a491f321c7..0000000000
--- a/client/src/app/shared/shared-users/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './user-admin.service'
-export * from './two-factor.service'
diff --git a/client/src/app/shared/shared-video-comment/index.ts b/client/src/app/shared/shared-video-comment/index.ts
deleted file mode 100644
index 2fc2c51271..0000000000
--- a/client/src/app/shared/shared-video-comment/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './video-comment.service'
-export * from './video-comment.model'
-export * from './video-comment-thread-tree.model'
diff --git a/client/src/app/shared/shared-video-comment/video-comment.model.ts b/client/src/app/shared/shared-video-comment/video-comment.model.ts
index 7048ed66fc..7b02f29cc8 100644
--- a/client/src/app/shared/shared-video-comment/video-comment.model.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment.model.ts
@@ -1,10 +1,11 @@
import { getAbsoluteAPIUrl } from '@app/helpers'
-import { Actor, Video } from '@app/shared/shared-main'
import {
Account as AccountInterface,
VideoComment as VideoCommentServerModel,
VideoCommentAdmin as VideoCommentAdminServerModel
} from '@peertube/peertube-models'
+import { Actor } from '../shared-main/account/actor.model'
+import { Video } from '../shared-main/video/video.model'
export class VideoComment implements VideoCommentServerModel {
id: number
diff --git a/client/src/app/shared/shared-video-comment/video-comment.service.ts b/client/src/app/shared/shared-video-comment/video-comment.service.ts
index d1db773c43..97c735d715 100644
--- a/client/src/app/shared/shared-video-comment/video-comment.service.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment.service.ts
@@ -18,7 +18,7 @@ import {
import { environment } from '../../../environments/environment'
import { VideoCommentThreadTree } from './video-comment-thread-tree.model'
import { VideoComment } from './video-comment.model'
-import { VideoPasswordService } from '../shared-main'
+import { VideoPasswordService } from '../shared-main/video/video-password.service'
@Injectable()
export class VideoCommentService {
diff --git a/client/src/app/shared/shared-video-live/index.ts b/client/src/app/shared/shared-video-live/index.ts
deleted file mode 100644
index b502f6fb18..0000000000
--- a/client/src/app/shared/shared-video-live/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './live-video.service'
-export * from './live-stream-information.component'
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.ts b/client/src/app/shared/shared-video-live/live-stream-information.component.ts
index 0a64181d37..b04191641a 100644
--- a/client/src/app/shared/shared-video-live/live-stream-information.component.ts
+++ b/client/src/app/shared/shared-video-live/live-stream-information.component.ts
@@ -1,5 +1,5 @@
import { Component, ElementRef, ViewChild } from '@angular/core'
-import { Video } from '@app/shared/shared-main'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { LiveVideo, LiveVideoError, LiveVideoErrorType, LiveVideoSession } from '@peertube/peertube-models'
import { LiveVideoService } from './live-video.service'
@@ -24,7 +24,8 @@ import { GlobalIconComponent } from '../shared-icons/global-icon.component'
RouterLink,
EditButtonComponent,
DatePipe
- ]
+ ],
+ providers: [ LiveVideoService ]
})
export class LiveStreamInformationComponent {
@ViewChild('modal', { static: true }) modal: ElementRef
diff --git a/client/src/app/shared/shared-video-live/live-video.service.ts b/client/src/app/shared/shared-video-live/live-video.service.ts
index 8ac0eb9242..29913ed369 100644
--- a/client/src/app/shared/shared-video-live/live-video.service.ts
+++ b/client/src/app/shared/shared-video-live/live-video.service.ts
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core'
import { RestExtractor } from '@app/core'
import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@peertube/peertube-models'
import { environment } from '../../../environments/environment'
-import { VideoService } from '../shared-main'
+import { VideoService } from '../shared-main/video/video.service'
@Injectable()
export class LiveVideoService {
diff --git a/client/src/app/shared/shared-video-miniature/index.ts b/client/src/app/shared/shared-video-miniature/index.ts
deleted file mode 100644
index 9735d772a0..0000000000
--- a/client/src/app/shared/shared-video-miniature/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export * from './video-actions-dropdown.component'
-export * from './video-download.component'
-export * from './video-filters-header.component'
-export * from './video-filters.model'
-export * from './video-miniature.component'
-export * from './videos-list.component'
-export * from './videos-selection.component'
diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts
index f89dc50fbe..186ea09e31 100644
--- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts
@@ -1,24 +1,27 @@
import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core'
import { AuthService, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core'
-import { BlocklistService, VideoBlockComponent, VideoBlockService, VideoReportComponent } from '@app/shared/shared-moderation'
import { NgbDropdown, NgbDropdownAnchor, NgbDropdownMenu } from '@ng-bootstrap/ng-bootstrap'
import { VideoCaption } from '@peertube/peertube-models'
+import { VideoDownloadComponent } from './video-download.component'
+import { of } from 'rxjs'
import {
- Actor,
+ ActionDropdownComponent,
DropdownAction,
DropdownButtonSize,
- DropdownDirection,
- RedundancyService,
- Video,
- VideoDetails,
- VideoService
-} from '../shared-main'
-import { LiveStreamInformationComponent } from '../shared-video-live'
-import { VideoAddToPlaylistComponent } from '../shared-video-playlist'
-import { VideoDownloadComponent } from './video-download.component'
-import { of } from 'rxjs'
-import { ActionDropdownComponent } from '../shared-main/buttons/action-dropdown.component'
+ DropdownDirection
+} from '../shared-main/buttons/action-dropdown.component'
import { NgIf } from '@angular/common'
+import { VideoDetails } from '../shared-main/video/video-details.model'
+import { Video } from '../shared-main/video/video.model'
+import { RedundancyService } from '../shared-main/video/redundancy.service'
+import { VideoService } from '../shared-main/video/video.service'
+import { Actor } from '../shared-main/account/actor.model'
+import { BlocklistService } from '../shared-moderation/blocklist.service'
+import { VideoReportComponent } from '../shared-moderation/report-modals'
+import { VideoBlockComponent } from '../shared-moderation/video-block.component'
+import { VideoBlockService } from '../shared-moderation/video-block.service'
+import { LiveStreamInformationComponent } from '../shared-video-live/live-stream-information.component'
+import { VideoAddToPlaylistComponent } from '../shared-video-playlist/video-add-to-playlist.component'
export type VideoActionsDisplayType = {
playlist?: boolean
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts
index 1c6e288d55..377dbdd8bc 100644
--- a/client/src/app/shared/shared-video-miniature/video-download.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts
@@ -18,11 +18,15 @@ import { logger } from '@root-helpers/logger'
import { videoRequiresFileToken } from '@root-helpers/video'
import { objectKeysTyped, pick } from '@peertube/peertube-core-utils'
import { VideoCaption, VideoFile } from '@peertube/peertube-models'
-import { BytesPipe, NumberFormatterPipe, VideoDetails, VideoFileTokenService, VideoService } from '../shared-main'
import { InputTextComponent } from '../shared-forms/input-text.component'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { FormsModule } from '@angular/forms'
import { NgIf, NgFor, KeyValuePipe } from '@angular/common'
+import { VideoDetails } from '../shared-main/video/video-details.model'
+import { BytesPipe } from '../shared-main/angular/bytes.pipe'
+import { NumberFormatterPipe } from '../shared-main/angular/number-formatter.pipe'
+import { VideoFileTokenService } from '../shared-main/video/video-file-token.service'
+import { VideoService } from '../shared-main/video/video.service'
type DownloadType = 'video' | 'subtitles'
type FileMetadata = { [key: string]: { label: string, value: string | number } }
diff --git a/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts b/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts
index ebea3a2a5c..264814e96f 100644
--- a/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts
@@ -5,7 +5,6 @@ import { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angul
import { AuthService } from '@app/core'
import { ServerService } from '@app/core/server/server.service'
import { UserRight } from '@peertube/peertube-models'
-import { PeertubeModalService } from '../shared-main'
import { VideoFilters } from './video-filters.model'
import { PeertubeCheckboxComponent } from '../shared-forms/peertube-checkbox.component'
import { SelectCategoriesComponent } from '../shared-forms/select/select-categories.component'
@@ -15,6 +14,7 @@ import { NgSelectModule } from '@ng-select/ng-select'
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { NgClass, NgIf, NgFor, NgTemplateOutlet } from '@angular/common'
import { RouterLink } from '@angular/router'
+import { PeertubeModalService } from '../shared-main/peertube-modal/peertube-modal.service'
const debugLogger = debug('peertube:videos:VideoFiltersHeaderComponent')
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index ff47a63123..bafe6f4436 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -14,8 +14,6 @@ import {
import { AuthService, ScreenService, ServerService, User } from '@app/core'
import { HTMLServerConfig, VideoExistInPlaylist, VideoPlaylistType, VideoPrivacy, VideoState } from '@peertube/peertube-models'
import { LinkType } from '../../../types/link.type'
-import { Video, VideoService } from '../shared-main'
-import { VideoPlaylistService } from '../shared-video-playlist'
import { VideoActionsDisplayType, VideoActionsDropdownComponent } from './video-actions-dropdown.component'
import { RouterLink } from '@angular/router'
import { VideoViewsCounterComponent } from '../shared-video/video-views-counter.component'
@@ -24,6 +22,9 @@ import { LinkComponent } from '../shared-main/angular/link.component'
import { ActorAvatarComponent } from '../shared-actor-image/actor-avatar.component'
import { VideoThumbnailComponent } from '../shared-thumbnail/video-thumbnail.component'
import { NgClass, NgIf, NgFor } from '@angular/common'
+import { Video } from '../shared-main/video/video.model'
+import { VideoService } from '../shared-main/video/video.service'
+import { VideoPlaylistService } from '../shared-video-playlist/video-playlist.service'
export type MiniatureDisplayOptions = {
date?: boolean
diff --git a/client/src/app/shared/shared-video-miniature/videos-list.component.ts b/client/src/app/shared/shared-video-miniature/videos-list.component.ts
index 5bbe0a0e9a..72010417c8 100644
--- a/client/src/app/shared/shared-video-miniature/videos-list.component.ts
+++ b/client/src/app/shared/shared-video-miniature/videos-list.component.ts
@@ -13,11 +13,10 @@ import {
User,
UserService
} from '@app/core'
-import { GlobalIconName } from '@app/shared/shared-icons'
+import { GlobalIconName } from '@app/shared/shared-icons/global-icon.component'
import { logger } from '@root-helpers/logger'
import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@peertube/peertube-core-utils'
import { ResultList, UserRight, VideoSortField } from '@peertube/peertube-models'
-import { Syndication, Video } from '../shared-main'
import { VideoFilters, VideoFilterScope } from './video-filters.model'
import { MiniatureDisplayOptions, VideoMiniatureComponent } from './video-miniature.component'
import { InfiniteScrollerDirective } from '../shared-main/angular/infinite-scroller.directive'
@@ -26,6 +25,8 @@ import { ButtonComponent } from '../shared-main/buttons/button.component'
import { FeedComponent } from '../shared-main/feeds/feed.component'
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'
import { NgIf, NgClass, NgFor, NgTemplateOutlet } from '@angular/common'
+import { Video } from '../shared-main/video/video.model'
+import { Syndication } from '../shared-main/feeds/syndication.model'
const debugLogger = debug('peertube:videos:VideosListComponent')
diff --git a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts
index 0b80a6b97d..4f06b1770e 100644
--- a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts
+++ b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts
@@ -4,12 +4,13 @@ import { ComponentPagination, Notifier, User } from '@app/core'
import { logger } from '@root-helpers/logger'
import { objectKeysTyped } from '@peertube/peertube-core-utils'
import { ResultList, VideosExistInPlaylists, VideoSortField } from '@peertube/peertube-models'
-import { PeerTubeTemplateDirective, Video } from '../shared-main'
import { MiniatureDisplayOptions, VideoMiniatureComponent } from './video-miniature.component'
import { FormsModule } from '@angular/forms'
import { PeertubeCheckboxComponent } from '../shared-forms/peertube-checkbox.component'
import { InfiniteScrollerDirective } from '../shared-main/angular/infinite-scroller.directive'
import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common'
+import { Video } from '../shared-main/video/video.model'
+import { PeerTubeTemplateDirective } from '../shared-main/angular/peertube-template.directive'
export type SelectionType = { [ id: number ]: boolean }
diff --git a/client/src/app/shared/shared-video-playlist/index.ts b/client/src/app/shared/shared-video-playlist/index.ts
deleted file mode 100644
index cacae6d0df..0000000000
--- a/client/src/app/shared/shared-video-playlist/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export * from './video-add-to-playlist.component'
-export * from './video-playlist-element-miniature.component'
-export * from './video-playlist-element.model'
-export * from './video-playlist-miniature.component'
-export * from './video-playlist.model'
-export * from './video-playlist.service'
diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
index ff974edd9c..77a88ef478 100644
--- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
+++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
@@ -3,7 +3,6 @@ import { Subject, Subscription } from 'rxjs'
import { debounceTime, filter } from 'rxjs/operators'
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'
import { AuthService, DisableForReuseHook, Notifier } from '@app/core'
-import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
import { secondsToTime } from '@peertube/peertube-core-utils'
import {
CachedVideoExistInPlaylist,
@@ -20,6 +19,8 @@ import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { PeertubeCheckboxComponent } from '../shared-forms/peertube-checkbox.component'
import { NgFor, NgClass, NgIf } from '@angular/common'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { FormReactive } from '@app/shared/shared-forms/form-reactive'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
const debugLogger = debug('peertube:playlists:VideoAddToPlaylistComponent')
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
index f76c87813e..c2ba405e22 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
@@ -1,6 +1,5 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
import { AuthService, Notifier, ServerService } from '@app/core'
-import { Video, VideoService } from '@app/shared/shared-main'
import { NgbDropdown, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownButtonItem, NgbDropdownItem } from '@ng-bootstrap/ng-bootstrap'
import { secondsToTime } from '@peertube/peertube-core-utils'
import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate, VideoPrivacy } from '@peertube/peertube-models'
@@ -17,6 +16,8 @@ import { VideoThumbnailComponent } from '../shared-thumbnail/video-thumbnail.com
import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { RouterLink } from '@angular/router'
import { NgClass, NgIf } from '@angular/common'
+import { Video } from '../shared-main/video/video.model'
+import { VideoService } from '../shared-main/video/video.service'
@Component({
selector: 'my-video-playlist-element-miniature',
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts
index 16b212281a..cad950759b 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts
@@ -1,4 +1,4 @@
-import { Video } from '@app/shared/shared-main'
+import { Video } from '@app/shared/shared-main/video/video.model'
import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType_Type } from '@peertube/peertube-models'
export class VideoPlaylistElement implements ServerVideoPlaylistElement {
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
index 24f1041ce2..e9ba4cf969 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
@@ -1,5 +1,4 @@
import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
-import { Actor } from '@app/shared/shared-main'
import { buildPlaylistWatchPath, peertubeTranslate } from '@peertube/peertube-core-utils'
import {
AccountSummary,
@@ -10,6 +9,7 @@ import {
VideoPlaylistType,
VideoPlaylistType_Type
} from '@peertube/peertube-models'
+import { Actor } from '../shared-main/account/actor.model'
export class VideoPlaylist implements ServerVideoPlaylist {
id: number
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
index 7f0da2be81..5d6362aacf 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
@@ -5,7 +5,6 @@ import { HttpClient, HttpContext, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { AuthService, AuthUser, ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core'
import { buildBulkObservable, objectToFormData } from '@app/helpers'
-import { Account, AccountService, VideoChannel, VideoChannelService } from '@app/shared/shared-main'
import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client'
import {
CachedVideoExistInPlaylist,
@@ -24,6 +23,10 @@ import {
import { environment } from '../../../environments/environment'
import { VideoPlaylistElement } from './video-playlist-element.model'
import { VideoPlaylist } from './video-playlist.model'
+import { VideoChannel } from '../shared-main/video-channel/video-channel.model'
+import { VideoChannelService } from '../shared-main/video-channel/video-channel.service'
+import { AccountService } from '../shared-main/account/account.service'
+import { Account } from '../shared-main/account/account.model'
const debugLogger = debug('peertube:playlists:VideoPlaylistService')
diff --git a/client/src/app/shared/shared-video/index.ts b/client/src/app/shared/shared-video/index.ts
deleted file mode 100644
index 5f08b467d2..0000000000
--- a/client/src/app/shared/shared-video/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './video-views-counter.component'
diff --git a/client/src/app/shared/shared-video/video-views-counter.component.ts b/client/src/app/shared/shared-video/video-views-counter.component.ts
index c70c24a5be..0871b76549 100644
--- a/client/src/app/shared/shared-video/video-views-counter.component.ts
+++ b/client/src/app/shared/shared-video/video-views-counter.component.ts
@@ -1,7 +1,7 @@
import { Component, Input } from '@angular/core'
-import { Video } from '../shared-main'
import { NumberFormatterPipe } from '../shared-main/angular/number-formatter.pipe'
import { NgIf } from '@angular/common'
+import { Video } from '../shared-main/video/video.model'
@Component({
selector: 'my-video-views-counter',
diff --git a/client/src/app/shared/standalone-notifications/user-notifications.component.ts b/client/src/app/shared/standalone-notifications/user-notifications.component.ts
index d1cf583f38..53b996a776 100644
--- a/client/src/app/shared/standalone-notifications/user-notifications.component.ts
+++ b/client/src/app/shared/standalone-notifications/user-notifications.component.ts
@@ -2,10 +2,13 @@ import { Subject } from 'rxjs'
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
import { ComponentPagination, hasMoreItems, Notifier } from '@app/core'
import { AbuseState } from '@peertube/peertube-models'
-import { FromNowPipe, InfiniteScrollerDirective, UserNotification, UserNotificationService } from '../shared-main'
import { CommonModule } from '@angular/common'
-import { GlobalIconComponent } from '../shared-icons'
+import { GlobalIconComponent } from '../shared-icons/global-icon.component'
import { RouterLink } from '@angular/router'
+import { FromNowPipe } from '../shared-main/angular/from-now.pipe'
+import { InfiniteScrollerDirective } from '../shared-main/angular/infinite-scroller.directive'
+import { UserNotificationService } from '../shared-main/users/user-notification.service'
+import { UserNotification } from '../shared-main/users/user-notification.model'
@Component({
selector: 'my-user-notifications',
diff --git a/client/src/app/shared/standalone-upload/index.ts b/client/src/app/shared/standalone-upload/index.ts
deleted file mode 100644
index b9fbbd517a..0000000000
--- a/client/src/app/shared/standalone-upload/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './upload-progress.component'
diff --git a/client/src/main.ts b/client/src/main.ts
index 5cd9b86b10..b7bbd5b33d 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -4,8 +4,6 @@ import { environment } from './environments/environment'
import { logger } from './root-helpers'
import { AppComponent } from './app/app.component'
import routes from './app/app.routes'
-import { getFormProviders } from './app/shared/shared-forms'
-import { getMainProviders } from './app/shared/shared-main'
import { ServiceWorkerModule } from '@angular/service-worker'
import { polyfillICU } from './app/helpers'
import { tap } from 'rxjs/operators'
@@ -26,6 +24,8 @@ import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { ToastModule } from 'primeng/toast'
+import { getMainProviders } from './app/shared/shared-main/main-providers'
+import { getFormProviders } from '@app/shared/shared-forms/shared-form-providers'
registerLocaleData(localeOc, 'oc')
diff --git a/client/tsconfig.json b/client/tsconfig.json
index 48c2ff7f7a..eef8b1cef3 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -62,8 +62,10 @@
"src/polyfills.ts"
],
"include": [
+ "src/polyfills.ts",
"src/main*.ts",
"src/**/*.d.ts",
+ "src/app/**/*.ts",
"src/shims/*.ts"
],
"angularCompilerOptions": {