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 8df44f689..5093fb8f9 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 2f8cde98a..792567bbe 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 f98a21d5a..84284bb74 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 60c2a47ea..070042059 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 fa7eb7092..88d56306f 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 dfb36fa0b..34e03d6fd 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 ccafd34c9..a464cc168 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 78ea8031e..c5b1e185f 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 884520113..f9b3266e8 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 5a4f21928..766a4ec52 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 dc88f681c..452c259c0 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 c22c77b27..131dbde2f 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 57d65a4c1..88f15aa00 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 cab156548..09425ff94 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 a3a42e86d..c642d2a3a 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 ff50a9dcb..61aaf1865 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 87775188b..24b91cf1a 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 74701b654..1761b6000 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 135b4b408..000000000 --- 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 33a70ed34..cb74aad76 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 16a6823c9..7a5cdf5b7 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 3f71f2afd..59082ddb6 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 e01a07d9d..0bfea9f51 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 34f899358..62c6c9d66 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 aab902700..33627395d 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 a8692797c..f0fe8880e 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 2221e24af..f67358415 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 d61b7b068..2be5635e6 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 4efeb2983..0b24ceec6 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 fb4ac1f10..b91169c44 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 7a0e8fd73..624560a27 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 9b33ed8e5..af1357381 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 6a19d35bf..8a50d3f56 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 30de8dc8f..000000000 --- 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 0704fd22e..000000000 --- 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 5bb90a62f..000000000 --- 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 8aeceb90f..000000000 --- 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 8d876af31..348637c5b 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 6d616b372..000000000 --- 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 3a2ceda26..a0af800c1 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 f3ef9cdcd..000000000 --- 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 249cb149f..a11bc2211 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 6b9d6ec71..f3ed8804f 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 d393da469..59ee374ed 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 813846ab7..15c009fee 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 10e0a62eb..c4f18f5cf 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 743f81872..b6ee6c018 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 74bf83ee9..ff641a4be 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 963b4cbbe..dd341f0c7 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 94d7e7698..89488a4c1 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 621ef3c27..97e8c11e4 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 b7c9b6ca4..8c339763d 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 d32364795..2f2186fa1 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 f63dea763..154d2e788 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 f42af361e..000000000 --- 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 ac1623da8..38aec995a 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 644047c5f..000000000 --- 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 98dd67a9f..8806341a4 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 88a39bb97..000000000 --- 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 20b98e7d8..000000000 --- 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 8dc09fb25..ab0019f7c 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 5e1d51339..000000000 --- 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 cb7140b27..4fa2ed6d7 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 3cc049f8f..000000000 --- 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 d3c4dae54..44e3b3d9c 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 cc774bde3..000000000 --- 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 79fd68ca6..d9aaa58cc 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 21168b83a..b98ec7cf8 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 3109a85f8..179a96597 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 e242eb75b..1bc5829dd 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 2395bf438..b8c12a2d7 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 d0cb493a7..0cf70d6f9 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 6e3bf1ada..568db4071 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 176d51b2a..1d9cb73cf 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 2e808893b..7ddf34f3d 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 4d04f0581..2bc131aa9 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 c140e18e3..1d75133d8 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 007dbb81b..41ddaf3de 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 8dba9ad01..372cb5b8c 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 127960a58..8af71db98 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 77b920037..c7ea2f5ba 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 0960f4247..14e1c3b9f 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 4e8fa21cc..109cab800 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 78c612937..a74d517bb 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 1f174251d..a3d6e9ee0 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 1620aea32..5a12fa144 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 841541426..c50064c4e 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 7078f7f45..c428e4541 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 d5955f135..7ff9f472b 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 c2ab4b1fa..993ad3653 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 85b66b529..c77714266 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 3a2e1e8ae..ee9324cae 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 5e010f795..79fbbd095 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 { 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 3310e9627..dec0be5f8 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 { 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 69a3eb159..2a844bdd2 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