浏览代码

Reorganize client shared modules

Chocobozzz 4 年之前
父节点
当前提交
67ed6552b8
共有 100 个文件被更改,包括 478 次插入595 次删除
  1. 4 6
      client/src/app/+about/about-follows/about-follows.component.ts
  2. 5 5
      client/src/app/+about/about-instance/about-instance.component.ts
  3. 5 6
      client/src/app/+about/about-instance/about-instance.resolver.ts
  4. 3 4
      client/src/app/+about/about-instance/contact-admin-modal.component.ts
  5. 1 1
      client/src/app/+about/about-peertube/about-peertube-contributors.component.ts
  6. 14 7
      client/src/app/+about/about.module.ts
  7. 3 4
      client/src/app/+accounts/account-about/account-about.component.ts
  8. 3 10
      client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
  9. 8 15
      client/src/app/+accounts/account-videos/account-videos.component.ts
  10. 5 11
      client/src/app/+accounts/accounts.component.ts
  11. 16 5
      client/src/app/+accounts/accounts.module.ts
  12. 3 5
      client/src/app/+admin/admin-routing.module.ts
  13. 3 3
      client/src/app/+admin/admin.component.ts
  14. 27 25
      client/src/app/+admin/admin.module.ts
  15. 1 1
      client/src/app/+admin/config/config.routes.ts
  16. 7 9
      client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
  17. 3 3
      client/src/app/+admin/config/shared/config.service.ts
  18. 5 6
      client/src/app/+admin/follows/followers-list/followers-list.component.ts
  19. 6 8
      client/src/app/+admin/follows/following-list/following-list.component.ts
  20. 4 5
      client/src/app/+admin/follows/follows.routes.ts
  21. 1 1
      client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts
  22. 1 0
      client/src/app/+admin/follows/video-redundancies-list/index.ts
  23. 5 7
      client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
  24. 1 0
      client/src/app/+admin/moderation/index.ts
  25. 3 3
      client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts
  26. 3 3
      client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts
  27. 1 1
      client/src/app/+admin/moderation/moderation.component.ts
  28. 4 4
      client/src/app/+admin/moderation/moderation.routes.ts
  29. 4 4
      client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts
  30. 2 3
      client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts
  31. 9 16
      client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts
  32. 7 11
      client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
  33. 7 8
      client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
  34. 6 8
      client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
  35. 7 8
      client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
  36. 14 12
      client/src/app/+admin/plugins/shared/plugin-api.service.ts
  37. 2 2
      client/src/app/+admin/system/debug/debug.component.ts
  38. 3 4
      client/src/app/+admin/system/debug/debug.service.ts
  39. 1 0
      client/src/app/+admin/system/index.ts
  40. 4 5
      client/src/app/+admin/system/jobs/job.service.ts
  41. 5 7
      client/src/app/+admin/system/jobs/jobs.component.ts
  42. 1 1
      client/src/app/+admin/system/logs/log-row.model.ts
  43. 3 3
      client/src/app/+admin/system/logs/logs.component.ts
  44. 4 5
      client/src/app/+admin/system/logs/logs.service.ts
  45. 6 6
      client/src/app/+admin/system/system.routes.ts
  46. 6 9
      client/src/app/+admin/users/user-edit/user-create.component.ts
  47. 4 7
      client/src/app/+admin/users/user-edit/user-edit.ts
  48. 3 7
      client/src/app/+admin/users/user-edit/user-password.component.ts
  49. 6 12
      client/src/app/+admin/users/user-edit/user-update.component.ts
  50. 5 8
      client/src/app/+admin/users/user-list/user-list.component.ts
  51. 3 5
      client/src/app/+admin/users/users.routes.ts
  52. 4 5
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts
  53. 0 0
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.html
  54. 0 0
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.scss
  55. 2 2
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.ts
  56. 5 8
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
  57. 0 0
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channels-routing.module.ts
  58. 0 0
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.html
  59. 0 0
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.scss
  60. 5 10
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.ts
  61. 12 6
      client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.module.ts
  62. 3 3
      client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts
  63. 3 3
      client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts
  64. 13 12
      client/src/app/+my-account/my-account-history/my-account-history.component.ts
  65. 1 1
      client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts
  66. 4 8
      client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts
  67. 4 6
      client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts
  68. 16 19
      client/src/app/+my-account/my-account-routing.module.ts
  69. 5 8
      client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
  70. 4 6
      client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
  71. 1 4
      client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts
  72. 0 1
      client/src/app/+my-account/my-account-settings/my-account-interface/index.ts
  73. 5 6
      client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
  74. 3 6
      client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
  75. 2 2
      client/src/app/+my-account/my-account-settings/my-account-settings.component.html
  76. 3 6
      client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
  77. 0 1
      client/src/app/+my-account/my-account-settings/my-account-video-settings/index.ts
  78. 4 5
      client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts
  79. 4 5
      client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts
  80. 4 5
      client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts
  81. 2 2
      client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-edit.ts
  82. 4 15
      client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts
  83. 7 9
      client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts
  84. 4 9
      client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts
  85. 8 14
      client/src/app/+my-account/my-account-videos/my-account-videos.component.ts
  86. 3 5
      client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
  87. 1 1
      client/src/app/+my-account/my-account.component.ts
  88. 41 31
      client/src/app/+my-account/my-account.module.ts
  89. 0 0
      client/src/app/+my-account/top-menu-dropdown.component.html
  90. 0 0
      client/src/app/+my-account/top-menu-dropdown.component.scss
  91. 4 11
      client/src/app/+my-account/top-menu-dropdown.component.ts
  92. 6 5
      client/src/app/+page-not-found/page-not-found.module.ts
  93. 1 2
      client/src/app/+signup/+register/register-routing.module.ts
  94. 4 6
      client/src/app/+signup/+register/register-step-channel.component.ts
  95. 4 6
      client/src/app/+signup/+register/register-step-user.component.ts
  96. 6 10
      client/src/app/+signup/+register/register.component.ts
  97. 11 8
      client/src/app/+signup/+register/register.module.ts
  98. 2 5
      client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts
  99. 2 4
      client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts
  100. 4 5
      client/src/app/+signup/+verify-account/verify-account.module.ts

+ 4 - 6
client/src/app/+about/about-follows/about-follows.component.ts

@@ -1,10 +1,8 @@
-import { Component, OnInit } from '@angular/core'
-import { FollowService } from '@app/shared/instance/follow.service'
-import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
-import { Notifier } from '@app/core'
-import { RestService } from '@app/shared'
 import { SortMeta } from 'primeng/api'
 import { Subject } from 'rxjs'
+import { Component, OnInit } from '@angular/core'
+import { ComponentPagination, hasMoreItems, Notifier, RestService } from '@app/core'
+import { InstanceFollowService } from '@app/shared/shared-instance'
 
 @Component({
   selector: 'my-about-follows',
@@ -38,7 +36,7 @@ export class AboutFollowsComponent implements OnInit {
   constructor (
     private restService: RestService,
     private notifier: Notifier,
-    private followService: FollowService
+    private followService: InstanceFollowService
   ) { }
 
   ngOnInit () {

+ 5 - 5
client/src/app/+about/about-instance/about-instance.component.ts

@@ -1,11 +1,11 @@
-import { Component, OnInit, ViewChild, AfterViewChecked } from '@angular/core'
-import { Notifier, ServerService } from '@app/core'
+import { ViewportScroller } from '@angular/common'
+import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core'
+import { ActivatedRoute } from '@angular/router'
 import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component'
-import { InstanceService } from '@app/shared/instance/instance.service'
+import { ServerService } from '@app/core'
+import { InstanceService } from '@app/shared/shared-instance'
 import { ServerConfig } from '@shared/models'
-import { ActivatedRoute } from '@angular/router'
 import { ResolverData } from './about-instance.resolver'
-import { ViewportScroller } from '@angular/common'
 
 @Component({
   selector: 'my-about-instance',

+ 5 - 6
client/src/app/+about/about-instance/about-instance.resolver.ts

@@ -1,17 +1,16 @@
+import { forkJoin } from 'rxjs'
+import { map, switchMap } from 'rxjs/operators'
 import { Injectable } from '@angular/core'
 import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
-import { map, switchMap } from 'rxjs/operators'
-import { forkJoin } from 'rxjs'
-import { InstanceService } from '@app/shared/instance/instance.service'
+import { InstanceService } from '@app/shared/shared-instance'
 import { About } from '@shared/models/server'
 
 export type ResolverData = { about: About, languages: string[], categories: string[] }
 
 @Injectable()
 export class AboutInstanceResolver implements Resolve<any> {
-  constructor (
-    private instanceService: InstanceService
-  ) {}
+
+  constructor (private instanceService: InstanceService) {}
 
   resolve (route: ActivatedRouteSnapshot) {
     return this.instanceService.getAbout()

+ 3 - 4
client/src/app/+about/about-instance/contact-admin-modal.component.ts

@@ -1,11 +1,10 @@
 import { Component, OnInit, ViewChild } from '@angular/core'
 import { Notifier, ServerService } from '@app/core'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
+import { FormReactive, FormValidatorService, InstanceValidatorsService } from '@app/shared/shared-forms'
+import { InstanceService } from '@app/shared/shared-instance'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
 import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
-import { FormReactive, InstanceValidatorsService } from '@app/shared'
-import { InstanceService } from '@app/shared/instance/instance.service'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 import { ServerConfig } from '@shared/models'
 
 @Component({

+ 1 - 1
client/src/app/+about/about-peertube/about-peertube-contributors.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core'
-import { MarkdownService } from '@app/shared/renderer'
+import { MarkdownService } from '@app/core'
 
 @Component({
   selector: 'my-about-peertube-contributors',

+ 14 - 7
client/src/app/+about/about.module.ts

@@ -1,18 +1,25 @@
 import { NgModule } from '@angular/core'
-import { AboutRoutingModule } from './about-routing.module'
-import { AboutComponent } from './about.component'
-import { SharedModule } from '../shared'
+import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component'
 import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component'
-import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
+import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver'
 import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component'
-import { AboutFollowsComponent } from '@app/+about/about-follows/about-follows.component'
 import { AboutPeertubeContributorsComponent } from '@app/+about/about-peertube/about-peertube-contributors.component'
-import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance.resolver'
+import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
+import { SharedFormModule } from '@app/shared/shared-forms'
+import { SharedGlobalIconModule } from '@app/shared/shared-icons'
+import { SharedInstanceModule } from '@app/shared/shared-instance'
+import { SharedMainModule } from '@app/shared/shared-main'
+import { AboutRoutingModule } from './about-routing.module'
+import { AboutComponent } from './about.component'
 
 @NgModule({
   imports: [
     AboutRoutingModule,
-    SharedModule
+
+    SharedMainModule,
+    SharedFormModule,
+    SharedInstanceModule,
+    SharedGlobalIconModule
   ],
 
   declarations: [

+ 3 - 4
client/src/app/+accounts/account-about/account-about.component.ts

@@ -1,9 +1,8 @@
+import { Subscription } from 'rxjs'
 import { Component, OnDestroy, OnInit } from '@angular/core'
-import { Account } from '@app/shared/account/account.model'
-import { AccountService } from '@app/shared/account/account.service'
+import { MarkdownService } from '@app/core'
+import { Account, AccountService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { Subscription } from 'rxjs'
-import { MarkdownService } from '@app/shared/renderer'
 
 @Component({
   selector: 'my-account-about',

+ 3 - 10
client/src/app/+accounts/account-video-channels/account-video-channels.component.ts

@@ -1,16 +1,9 @@
 import { from, Subject, Subscription } from 'rxjs'
 import { concatMap, map, switchMap, tap } from 'rxjs/operators'
 import { Component, OnDestroy, OnInit } from '@angular/core'
-import { User, UserService } from '@app/shared'
-import { Account } from '@app/shared/account/account.model'
-import { AccountService } from '@app/shared/account/account.service'
-import { ScreenService } from '@app/shared/misc/screen.service'
-import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
-import { VideoSortField } from '@app/shared/video/sort-field.type'
-import { Video } from '@app/shared/video/video.model'
-import { VideoService } from '@app/shared/video/video.service'
+import { ComponentPagination, hasMoreItems, ScreenService, User, UserService } from '@app/core'
+import { Account, AccountService, Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
+import { VideoSortField } from '@shared/models'
 
 @Component({
   selector: 'my-account-video-channels',

+ 8 - 15
client/src/app/+accounts/account-videos/account-videos.component.ts

@@ -1,25 +1,18 @@
+import { Subscription } from 'rxjs'
+import { first, tap } from 'rxjs/operators'
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { immutableAssign } from '@app/shared/misc/utils'
-import { AuthService } from '../../core/auth'
-import { ConfirmService } from '../../core/confirm'
-import { AbstractVideoList } from '../../shared/video/abstract-video-list'
-import { VideoService } from '../../shared/video/video.service'
-import { Account } from '@app/shared/account/account.model'
-import { AccountService } from '@app/shared/account/account.service'
-import { first, tap } from 'rxjs/operators'
+import { AuthService, ConfirmService, LocalStorageService, Notifier, ScreenService, ServerService, UserService } from '@app/core'
+import { immutableAssign } from '@app/helpers'
+import { Account, AccountService, VideoService } from '@app/shared/shared-main'
+import { AbstractVideoList } from '@app/shared/shared-video-miniature'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { Subscription } from 'rxjs'
-import { ScreenService } from '@app/shared/misc/screen.service'
-import { Notifier, ServerService } from '@app/core'
-import { UserService } from '@app/shared'
-import { LocalStorageService } from '@app/shared/misc/storage.service'
 
 @Component({
   selector: 'my-account-videos',
-  templateUrl: '../../shared/video/abstract-video-list.html',
+  templateUrl: '../../shared/shared-video-miniature/abstract-video-list.html',
   styleUrls: [
-    '../../shared/video/abstract-video-list.scss',
+    '../../shared/shared-video-miniature/abstract-video-list.scss',
     './account-videos.component.scss'
   ]
 })

+ 5 - 11
client/src/app/+accounts/accounts.component.ts

@@ -1,17 +1,11 @@
+import { Subscription } from 'rxjs'
+import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators'
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute } from '@angular/router'
-import { AccountService } from '@app/shared/account/account.service'
-import { Account } from '@app/shared/account/account.model'
-import { RestExtractor, UserService } from '@app/shared'
-import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators'
-import { Subscription } from 'rxjs'
-import { AuthService, Notifier, RedirectService } from '@app/core'
-import { User, UserRight } from '../../../../shared'
+import { AuthService, Notifier, RedirectService, RestExtractor, ScreenService, UserService } from '@app/core'
+import { Account, AccountService, ListOverflowItem, VideoChannel, VideoChannelService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
-import { ListOverflowItem } from '@app/shared/misc/list-overflow.component'
-import { ScreenService } from '@app/shared/misc/screen.service'
+import { User, UserRight } from '@shared/models'
 
 @Component({
   templateUrl: './accounts.component.html',

+ 16 - 5
client/src/app/+accounts/accounts.module.ts

@@ -1,15 +1,26 @@
 import { NgModule } from '@angular/core'
-import { SharedModule } from '../shared'
-import { AccountsRoutingModule } from './accounts-routing.module'
-import { AccountsComponent } from './accounts.component'
-import { AccountVideosComponent } from './account-videos/account-videos.component'
+import { SharedFormModule } from '@app/shared/shared-forms'
+import { SharedGlobalIconModule } from '@app/shared/shared-icons'
+import { SharedMainModule } from '@app/shared/shared-main'
+import { SharedModerationModule } from '@app/shared/shared-moderation'
+import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription'
+import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature'
 import { AccountAboutComponent } from './account-about/account-about.component'
 import { AccountVideoChannelsComponent } from './account-video-channels/account-video-channels.component'
+import { AccountVideosComponent } from './account-videos/account-videos.component'
+import { AccountsRoutingModule } from './accounts-routing.module'
+import { AccountsComponent } from './accounts.component'
 
 @NgModule({
   imports: [
     AccountsRoutingModule,
-    SharedModule
+
+    SharedMainModule,
+    SharedFormModule,
+    SharedUserSubscriptionModule,
+    SharedModerationModule,
+    SharedVideoMiniatureModule,
+    SharedGlobalIconModule
   ],
 
   declarations: [

+ 3 - 5
client/src/app/+admin/admin-routing.module.ts

@@ -1,15 +1,13 @@
 import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
 import { ConfigRoutes } from '@app/+admin/config'
-
+import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes'
+import { PluginsRoutes } from '@app/+admin/plugins/plugins.routes'
+import { SystemRoutes } from '@app/+admin/system'
 import { MetaGuard } from '@ngx-meta/core'
-
 import { AdminComponent } from './admin.component'
 import { FollowsRoutes } from './follows'
 import { UsersRoutes } from './users'
-import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes'
-import { SystemRoutes } from '@app/+admin/system'
-import { PluginsRoutes } from '@app/+admin/plugins/plugins.routes'
 
 const adminRoutes: Routes = [
   {

+ 3 - 3
client/src/app/+admin/admin.component.ts

@@ -1,8 +1,8 @@
 import { Component, OnInit } from '@angular/core'
-import { UserRight } from '../../../../shared'
-import { AuthService } from '../core/auth/auth.service'
-import { ListOverflowItem } from '@app/shared/misc/list-overflow.component'
+import { AuthService } from '@app/core'
+import { ListOverflowItem } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
+import { UserRight } from '@shared/models'
 
 @Component({
   templateUrl: './admin.component.html'

+ 27 - 25
client/src/app/+admin/admin.module.ts

@@ -1,39 +1,41 @@
-import { NgModule } from '@angular/core'
-import { ConfigComponent, EditCustomConfigComponent } from '@app/+admin/config'
-import { ConfigService } from '@app/+admin/config/shared/config.service'
+import { ChartModule } from 'primeng/chart'
+import { SelectButtonModule } from 'primeng/selectbutton'
 import { TableModule } from 'primeng/table'
-import { SharedModule } from '../shared'
+import { NgModule } from '@angular/core'
+import { SharedFormModule } from '@app/shared/shared-forms'
+import { SharedGlobalIconModule } from '@app/shared/shared-icons'
+import { SharedMainModule } from '@app/shared/shared-main'
+import { SharedModerationModule } from '@app/shared/shared-moderation'
 import { AdminRoutingModule } from './admin-routing.module'
 import { AdminComponent } from './admin.component'
+import { ConfigComponent, EditCustomConfigComponent } from './config'
+import { ConfigService } from './config/shared/config.service'
 import { FollowersListComponent, FollowsComponent, VideoRedundanciesListComponent } from './follows'
 import { FollowingListComponent } from './follows/following-list/following-list.component'
-import { UserCreateComponent, UserListComponent, UserPasswordComponent, UsersComponent, UserUpdateComponent } from './users'
-import {
-  ModerationCommentModalComponent,
-  VideoAbuseListComponent,
-  VideoBlockListComponent
-} from './moderation'
-import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
-import { RedundancyCheckboxComponent } from '@app/+admin/follows/shared/redundancy-checkbox.component'
-import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
-import { JobsComponent } from '@app/+admin/system/jobs/jobs.component'
-import { JobService, LogsComponent, LogsService, SystemComponent } from '@app/+admin/system'
-import { DebugComponent, DebugService } from '@app/+admin/system/debug'
-import { PluginsComponent } from '@app/+admin/plugins/plugins.component'
-import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component'
-import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component'
-import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component'
-import { SelectButtonModule } from 'primeng/selectbutton'
-import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
-import { VideoRedundancyInformationComponent } from '@app/+admin/follows/video-redundancies-list/video-redundancy-information.component'
-import { ChartModule } from 'primeng/chart'
+import { RedundancyCheckboxComponent } from './follows/shared/redundancy-checkbox.component'
+import { VideoRedundancyInformationComponent } from './follows/video-redundancies-list/video-redundancy-information.component'
+import { ModerationCommentModalComponent, VideoAbuseListComponent, VideoBlockListComponent } from './moderation'
+import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from './moderation/instance-blocklist'
+import { ModerationComponent } from './moderation/moderation.component'
 import { VideoAbuseDetailsComponent } from './moderation/video-abuse-list/video-abuse-details.component'
+import { PluginListInstalledComponent } from './plugins/plugin-list-installed/plugin-list-installed.component'
+import { PluginSearchComponent } from './plugins/plugin-search/plugin-search.component'
+import { PluginShowInstalledComponent } from './plugins/plugin-show-installed/plugin-show-installed.component'
+import { PluginsComponent } from './plugins/plugins.component'
+import { PluginApiService } from './plugins/shared/plugin-api.service'
+import { JobService, LogsComponent, LogsService, SystemComponent } from './system'
+import { DebugComponent, DebugService } from './system/debug'
+import { JobsComponent } from './system/jobs/jobs.component'
+import { UserCreateComponent, UserListComponent, UserPasswordComponent, UsersComponent, UserUpdateComponent } from './users'
 
 @NgModule({
   imports: [
     AdminRoutingModule,
 
-    SharedModule,
+    SharedMainModule,
+    SharedFormModule,
+    SharedModerationModule,
+    SharedGlobalIconModule,
 
     TableModule,
     SelectButtonModule,

+ 1 - 1
client/src/app/+admin/config/config.routes.ts

@@ -1,7 +1,7 @@
 import { Routes } from '@angular/router'
 import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config'
 import { UserRightGuard } from '@app/core'
-import { UserRight } from '../../../../../shared/models/users'
+import { UserRight } from '@shared/models'
 import { ConfigComponent } from './config.component'
 
 export const ConfigRoutes: Routes = [

+ 7 - 9
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts

@@ -1,16 +1,14 @@
-import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core'
-import { ConfigService } from '@app/+admin/config/shared/config.service'
-import { ServerService } from '@app/core/server/server.service'
-import { CustomConfigValidatorsService, FormReactive, UserValidatorsService } from '@app/shared'
-import { Notifier } from '@app/core'
-import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
 import { SelectItem } from 'primeng/api'
 import { forkJoin } from 'rxjs'
-import { ServerConfig } from '@shared/models'
 import { ViewportScroller } from '@angular/common'
+import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core'
+import { ConfigService } from '@app/+admin/config/shared/config.service'
+import { Notifier } from '@app/core'
+import { ServerService } from '@app/core/server/server.service'
+import { CustomConfigValidatorsService, FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 import { NgbNav } from '@ng-bootstrap/ng-bootstrap'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { CustomConfig, ServerConfig } from '@shared/models'
 
 @Component({
   selector: 'my-edit-custom-config',

+ 3 - 3
client/src/app/+admin/config/shared/config.service.ts

@@ -1,10 +1,10 @@
 import { catchError } from 'rxjs/operators'
 import { HttpClient } from '@angular/common/http'
 import { Injectable } from '@angular/core'
-import { CustomConfig } from '../../../../../../shared/models/server/custom-config.model'
-import { environment } from '../../../../environments/environment'
-import { RestExtractor } from '../../../shared'
+import { RestExtractor } from '@app/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
+import { CustomConfig } from '@shared/models'
+import { environment } from '../../../../environments/environment'
 
 @Injectable()
 export class ConfigService {

+ 5 - 6
client/src/app/+admin/follows/followers-list/followers-list.component.ts

@@ -1,10 +1,9 @@
-import { Component, OnInit } from '@angular/core'
-import { ConfirmService, Notifier } from '@app/core'
 import { SortMeta } from 'primeng/api'
-import { ActorFollow } from '../../../../../../shared/models/actors/follow.model'
-import { RestPagination, RestTable } from '../../../shared'
-import { FollowService } from '@app/shared/instance/follow.service'
+import { Component, OnInit } from '@angular/core'
+import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
+import { InstanceFollowService } from '@app/shared/shared-instance'
 import { I18n } from '@ngx-translate/i18n-polyfill'
+import { ActorFollow } from '@shared/models'
 
 @Component({
   selector: 'my-followers-list',
@@ -21,7 +20,7 @@ export class FollowersListComponent extends RestTable implements OnInit {
     private confirmService: ConfirmService,
     private notifier: Notifier,
     private i18n: I18n,
-    private followService: FollowService
+    private followService: InstanceFollowService
   ) {
     super()
   }

+ 6 - 8
client/src/app/+admin/follows/following-list/following-list.component.ts

@@ -1,12 +1,10 @@
-import { Component, OnInit, ViewChild } from '@angular/core'
-import { Notifier } from '@app/core'
 import { SortMeta } from 'primeng/api'
-import { ActorFollow } from '../../../../../../shared/models/actors/follow.model'
-import { ConfirmService } from '../../../core/confirm/confirm.service'
-import { RestPagination, RestTable } from '../../../shared'
-import { FollowService } from '@app/shared/instance/follow.service'
+import { Component, OnInit, ViewChild } from '@angular/core'
+import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
+import { InstanceFollowService } from '@app/shared/shared-instance'
+import { BatchDomainsModalComponent } from '@app/shared/shared-moderation'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { BatchDomainsModalComponent } from '@app/+admin/config/shared/batch-domains-modal.component'
+import { ActorFollow } from '@shared/models'
 
 @Component({
   selector: 'my-followers-list',
@@ -24,7 +22,7 @@ export class FollowingListComponent extends RestTable implements OnInit {
   constructor (
     private notifier: Notifier,
     private confirmService: ConfirmService,
-    private followService: FollowService,
+    private followService: InstanceFollowService,
     private i18n: I18n
   ) {
     super()

+ 4 - 5
client/src/app/+admin/follows/follows.routes.ts

@@ -1,11 +1,10 @@
 import { Routes } from '@angular/router'
-
-import { UserRightGuard } from '../../core'
-import { FollowsComponent } from './follows.component'
+import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list'
+import { UserRightGuard } from '@app/core'
+import { UserRight } from '@shared/models'
 import { FollowersListComponent } from './followers-list'
-import { UserRight } from '../../../../../shared'
 import { FollowingListComponent } from './following-list/following-list.component'
-import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list'
+import { FollowsComponent } from './follows.component'
 
 export const FollowsRoutes: Routes = [
   {

+ 1 - 1
client/src/app/+admin/follows/shared/redundancy-checkbox.component.ts

@@ -1,7 +1,7 @@
 import { Component, Input } from '@angular/core'
 import { Notifier } from '@app/core'
+import { RedundancyService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { RedundancyService } from '@app/shared/video/redundancy.service'
 
 @Component({
   selector: 'my-redundancy-checkbox',

+ 1 - 0
client/src/app/+admin/follows/video-redundancies-list/index.ts

@@ -1 +1,2 @@
 export * from './video-redundancies-list.component'
+export * from './video-redundancy-information.component'

+ 5 - 7
client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts

@@ -1,14 +1,12 @@
-import { Component, OnInit } from '@angular/core'
-import { Notifier, ServerService } from '@app/core'
+import { BytesPipe } from 'ngx-pipes'
 import { SortMeta } from 'primeng/api'
-import { ConfirmService } from '../../../core/confirm/confirm.service'
-import { RestPagination, RestTable } from '../../../shared'
+import { Component, OnInit } from '@angular/core'
+import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
+import { peertubeLocalStorage } from '@app/helpers/peertube-web-storage'
+import { RedundancyService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models'
-import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
 import { VideosRedundancyStats } from '@shared/models/server'
-import { BytesPipe } from 'ngx-pipes'
-import { RedundancyService } from '@app/shared/video/redundancy.service'
 
 @Component({
   selector: 'my-video-redundancies-list',

+ 1 - 0
client/src/app/+admin/moderation/index.ts

@@ -1,3 +1,4 @@
+export * from './instance-blocklist'
 export * from './video-abuse-list'
 export * from './video-block-list'
 export * from './moderation.component'

+ 3 - 3
client/src/app/+admin/moderation/instance-blocklist/instance-account-blocklist.component.ts

@@ -1,10 +1,10 @@
 import { Component } from '@angular/core'
-import { GenericAccountBlocklistComponent, BlocklistComponentType } from '@app/shared/blocklist'
+import { BlocklistComponentType, GenericAccountBlocklistComponent } from '@app/shared/shared-moderation'
 
 @Component({
   selector: 'my-instance-account-blocklist',
-  styleUrls: [ '../moderation.component.scss', '../../../shared/blocklist/account-blocklist.component.scss' ],
-  templateUrl: '../../../shared/blocklist/account-blocklist.component.html'
+  styleUrls: [ '../moderation.component.scss', '../../../shared/shared-moderation/account-blocklist.component.scss' ],
+  templateUrl: '../../../shared/shared-moderation/account-blocklist.component.html'
 })
 export class InstanceAccountBlocklistComponent extends GenericAccountBlocklistComponent {
   mode = BlocklistComponentType.Instance

+ 3 - 3
client/src/app/+admin/moderation/instance-blocklist/instance-server-blocklist.component.ts

@@ -1,10 +1,10 @@
 import { Component } from '@angular/core'
-import { GenericServerBlocklistComponent, BlocklistComponentType } from '@app/shared/blocklist'
+import { GenericServerBlocklistComponent, BlocklistComponentType } from '@app/shared/shared-moderation'
 
 @Component({
   selector: 'my-instance-server-blocklist',
-  styleUrls: [ '../../../shared/blocklist/server-blocklist.component.scss' ],
-  templateUrl: '../../../shared/blocklist/server-blocklist.component.html'
+  styleUrls: [ '../../../shared/shared-moderation/server-blocklist.component.scss' ],
+  templateUrl: '../../../shared/shared-moderation/server-blocklist.component.html'
 })
 export class InstanceServerBlocklistComponent extends GenericServerBlocklistComponent {
   mode = BlocklistComponentType.Instance

+ 1 - 1
client/src/app/+admin/moderation/moderation.component.ts

@@ -1,6 +1,6 @@
 import { Component, OnInit } from '@angular/core'
-import { UserRight } from '../../../../../shared'
 import { AuthService, ServerService } from '@app/core'
+import { UserRight } from '@shared/models'
 
 @Component({
   templateUrl: './moderation.component.html',

+ 4 - 4
client/src/app/+admin/moderation/moderation.routes.ts

@@ -1,10 +1,10 @@
 import { Routes } from '@angular/router'
-import { UserRight } from '../../../../../shared'
-import { UserRightGuard } from '@app/core'
+import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
+import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
 import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
 import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
-import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
-import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
+import { UserRightGuard } from '@app/core'
+import { UserRight } from '@shared/models'
 
 export const ModerationRoutes: Routes = [
   {

+ 4 - 4
client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts

@@ -1,11 +1,11 @@
 import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
 import { Notifier } from '@app/core'
-import { FormReactive, VideoAbuseService, VideoAbuseValidatorsService } from '../../../shared'
-import { I18n } from '@ngx-translate/i18n-polyfill'
+import { FormReactive, FormValidatorService, VideoAbuseValidatorsService } from '@app/shared/shared-forms'
+import { VideoAbuseService } from '@app/shared/shared-moderation'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
 import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
-import { FormValidatorService } from '../../../shared/forms/form-validators/form-validator.service'
-import { VideoAbuse } from '../../../../../../shared/models/videos'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { VideoAbuse } from '@shared/models'
 
 @Component({
   selector: 'my-moderation-comment-modal',

+ 2 - 3
client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.ts

@@ -1,9 +1,8 @@
 import { Component, Input } from '@angular/core'
-import { Actor } from '@app/shared/actor/actor.model'
+import { Actor } from '@app/shared/shared-main'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 import { VideoAbusePredefinedReasonsString } from '../../../../../../shared/models/videos/abuse/video-abuse-reason.model'
 import { ProcessedVideoAbuse } from './video-abuse-list.component'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { durationToString } from '@app/shared/misc/utils'
 
 @Component({
   selector: 'my-video-abuse-details',

+ 9 - 16
client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts

@@ -1,23 +1,16 @@
-import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'
-import { Account } from '@app/shared/account/account.model'
-import { Notifier } from '@app/core'
 import { SortMeta } from 'primeng/api'
-import { VideoAbuse, VideoAbuseState } from '../../../../../../shared'
-import { RestPagination, RestTable, VideoAbuseService, VideoBlockService } from '../../../shared'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { DropdownAction } from '../../../shared/buttons/action-dropdown.component'
-import { ConfirmService } from '../../../core/index'
-import { ModerationCommentModalComponent } from './moderation-comment-modal.component'
-import { Video } from '../../../shared/video/video.model'
-import { MarkdownService } from '@app/shared/renderer'
-import { Actor } from '@app/shared/actor/actor.model'
+import { filter } from 'rxjs/operators'
 import { buildVideoEmbed, buildVideoLink } from 'src/assets/player/utils'
+import { environment } from 'src/environments/environment'
+import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core'
 import { DomSanitizer } from '@angular/platform-browser'
-import { BlocklistService } from '@app/shared/blocklist'
-import { VideoService } from '@app/shared/video/video.service'
 import { ActivatedRoute, Params, Router } from '@angular/router'
-import { filter } from 'rxjs/operators'
-import { environment } from 'src/environments/environment'
+import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core'
+import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
+import { BlocklistService, VideoAbuseService, VideoBlockService } from '@app/shared/shared-moderation'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { VideoAbuse, VideoAbuseState } from '@shared/models'
+import { ModerationCommentModalComponent } from './moderation-comment-modal.component'
 
 export type ProcessedVideoAbuse = VideoAbuse & {
   moderationCommentHtml?: string,

+ 7 - 11
client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts

@@ -1,16 +1,12 @@
-import { Component, OnInit, AfterViewInit } from '@angular/core'
 import { SortMeta } from 'primeng/api'
-import { Notifier, ServerService } from '@app/core'
-import { ConfirmService } from '../../../core'
-import { RestPagination, RestTable, VideoBlockService } from '../../../shared'
-import { VideoBlacklist, VideoBlacklistType } from '../../../../../../shared'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { DropdownAction } from '../../../shared/buttons/action-dropdown.component'
-import { Video } from '../../../shared/video/video.model'
-import { MarkdownService } from '@app/shared/renderer'
-import { Params, ActivatedRoute, Router } from '@angular/router'
 import { filter, switchMap } from 'rxjs/operators'
-import { VideoService } from '@app/shared/video/video.service'
+import { AfterViewInit, Component, OnInit } from '@angular/core'
+import { ActivatedRoute, Params, Router } from '@angular/router'
+import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
+import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
+import { VideoBlockService } from '@app/shared/shared-moderation'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { VideoBlacklist, VideoBlacklistType } from '@shared/models'
 
 @Component({
   selector: 'my-video-block-list',

+ 7 - 8
client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts

@@ -1,14 +1,13 @@
+import { Subject } from 'rxjs'
 import { Component, OnInit } from '@angular/core'
-import { PluginType } from '@shared/models/plugins/plugin.type'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
-import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
-import { ConfirmService, Notifier } from '@app/core'
-import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
 import { ActivatedRoute, Router } from '@angular/router'
-import { compareSemVer } from '@shared/core-utils/miscs/miscs'
+import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
+import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core'
 import { PluginService } from '@app/core/plugins/plugin.service'
-import { Subject } from 'rxjs'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { compareSemVer } from '@shared/core-utils/miscs/miscs'
+import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
+import { PluginType } from '@shared/models/plugins/plugin.type'
 
 @Component({
   selector: 'my-plugin-list-installed',

+ 6 - 8
client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts

@@ -1,14 +1,12 @@
+import { Subject } from 'rxjs'
+import { debounceTime, distinctUntilChanged } from 'rxjs/operators'
 import { Component, OnInit } from '@angular/core'
-import { Notifier, ServerService } from '@app/core'
-import { ConfirmService } from '../../../core'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { PluginType } from '@shared/models/plugins/plugin.type'
-import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
-import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
 import { ActivatedRoute, Router } from '@angular/router'
+import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
+import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, ServerService } from '@app/core'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model'
-import { Subject } from 'rxjs'
-import { debounceTime, distinctUntilChanged } from 'rxjs/operators'
+import { PluginType } from '@shared/models/plugins/plugin.type'
 
 @Component({
   selector: 'my-plugin-search',

+ 7 - 8
client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts

@@ -1,13 +1,12 @@
-import { Component, OnDestroy, OnInit } from '@angular/core'
-import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
-import { Notifier } from '@app/core'
-import { ActivatedRoute } from '@angular/router'
 import { Subscription } from 'rxjs'
 import { map, switchMap } from 'rxjs/operators'
-import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared'
-import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model'
+import { Component, OnDestroy, OnInit } from '@angular/core'
+import { ActivatedRoute } from '@angular/router'
+import { Notifier } from '@app/core'
+import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared/shared-forms'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { PeerTubePlugin, RegisterServerSettingOptions } from '@shared/models'
+import { PluginApiService } from '../shared/plugin-api.service'
 
 @Component({
   selector: 'my-plugin-show-installed',

+ 14 - 12
client/src/app/+admin/plugins/shared/plugin-api.service.ts

@@ -1,19 +1,21 @@
+import { Observable } from 'rxjs'
 import { catchError, map, switchMap } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
-import { environment } from '../../../../environments/environment'
-import { RestExtractor, RestService } from '../../../shared'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { PluginType } from '@shared/models/plugins/plugin.type'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
-import { peertubeTranslate, ResultList } from '@shared/models'
-import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
-import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model'
-import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model'
-import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model'
-import { RegisteredServerSettings, RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model'
+import { ComponentPagination, RestExtractor, RestService } from '@app/core'
 import { PluginService } from '@app/core/plugins/plugin.service'
-import { Observable } from 'rxjs'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import {
+  InstallOrUpdatePlugin,
+  ManagePlugin,
+  PeerTubePlugin,
+  PeerTubePluginIndex,
+  peertubeTranslate,
+  PluginType,
+  RegisteredServerSettings,
+  ResultList
+} from '@shared/models'
+import { environment } from '../../../../environments/environment'
 
 @Injectable()
 export class PluginApiService {

+ 2 - 2
client/src/app/+admin/system/debug/debug.component.ts

@@ -1,7 +1,7 @@
 import { Component, OnInit } from '@angular/core'
 import { Notifier } from '@app/core'
-import { Debug } from '@shared/models/server'
-import { DebugService } from '@app/+admin/system/debug/debug.service'
+import { Debug } from '@shared/models'
+import { DebugService } from './debug.service'
 
 @Component({
   templateUrl: './debug.component.html',

+ 3 - 4
client/src/app/+admin/system/debug/debug.service.ts

@@ -1,10 +1,10 @@
+import { Observable } from 'rxjs'
 import { catchError } from 'rxjs/operators'
 import { HttpClient } from '@angular/common/http'
 import { Injectable } from '@angular/core'
-import { Observable } from 'rxjs'
+import { RestExtractor } from '@app/core'
+import { Debug } from '@shared/models'
 import { environment } from '../../../../environments/environment'
-import { RestExtractor, RestService } from '../../../shared'
-import { Debug } from '@shared/models/server'
 
 @Injectable()
 export class DebugService {
@@ -12,7 +12,6 @@ export class DebugService {
 
   constructor (
     private authHttp: HttpClient,
-    private restService: RestService,
     private restExtractor: RestExtractor
   ) {}
 

+ 1 - 0
client/src/app/+admin/system/index.ts

@@ -1,3 +1,4 @@
+export * from './debug'
 export * from './jobs'
 export * from './logs'
 export * from './system.component'

+ 4 - 5
client/src/app/+admin/system/jobs/job.service.ts

@@ -1,12 +1,11 @@
+import { SortMeta } from 'primeng/api'
+import { Observable } from 'rxjs'
 import { catchError, map } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
-import { SortMeta } from 'primeng/api'
-import { Observable } from 'rxjs'
-import { ResultList } from '../../../../../../shared'
-import { Job } from '../../../../../../shared/models/server/job.model'
+import { RestExtractor, RestPagination, RestService } from '@app/core'
+import { Job, ResultList } from '@shared/models'
 import { environment } from '../../../../environments/environment'
-import { RestExtractor, RestPagination, RestService } from '../../../shared'
 import { JobStateClient } from '../../../../types/job-state-client.type'
 import { JobTypeClient } from '../../../../types/job-type-client.type'
 

+ 5 - 7
client/src/app/+admin/system/jobs/jobs.component.ts

@@ -1,14 +1,12 @@
-import { Component, OnInit } from '@angular/core'
-import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage'
-import { Notifier } from '@app/core'
 import { SortMeta } from 'primeng/api'
-import { Job, JobType } from '../../../../../../shared/index'
-import { JobState } from '../../../../../../shared/models'
-import { RestPagination, RestTable } from '../../../shared'
-import { JobService } from './job.service'
+import { Component, OnInit } from '@angular/core'
+import { Notifier, RestPagination, RestTable } from '@app/core'
+import { peertubeLocalStorage } from '@app/helpers/peertube-web-storage'
 import { I18n } from '@ngx-translate/i18n-polyfill'
+import { Job, JobState, JobType } from '@shared/models'
 import { JobStateClient } from '../../../../types/job-state-client.type'
 import { JobTypeClient } from '../../../../types/job-type-client.type'
+import { JobService } from './job.service'
 
 @Component({
   selector: 'my-jobs',

+ 1 - 1
client/src/app/+admin/system/logs/log-row.model.ts

@@ -1,4 +1,4 @@
-import { LogLevel } from '@shared/models/server/log-level.type'
+import { LogLevel } from '@shared/models'
 import omit from 'lodash-es/omit'
 
 export class LogRow {

+ 3 - 3
client/src/app/+admin/system/logs/logs.component.ts

@@ -1,9 +1,9 @@
 import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
-import { LogsService } from '@app/+admin/system/logs/logs.service'
 import { Notifier } from '@app/core'
-import { LogRow } from '@app/+admin/system/logs/log-row.model'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { LogLevel } from '@shared/models/server/log-level.type'
+import { LogLevel } from '@shared/models'
+import { LogRow } from './log-row.model'
+import { LogsService } from './logs.service'
 
 @Component({
   templateUrl: './logs.component.html',

+ 4 - 5
client/src/app/+admin/system/logs/logs.service.ts

@@ -1,11 +1,11 @@
+import { Observable } from 'rxjs'
 import { catchError, map } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
-import { Observable } from 'rxjs'
+import { RestExtractor } from '@app/core'
+import { LogLevel } from '@shared/models'
 import { environment } from '../../../../environments/environment'
-import { RestExtractor, RestService } from '../../../shared'
-import { LogRow } from '@app/+admin/system/logs/log-row.model'
-import { LogLevel } from '@shared/models/server/log-level.type'
+import { LogRow } from './log-row.model'
 
 @Injectable()
 export class LogsService {
@@ -14,7 +14,6 @@ export class LogsService {
 
   constructor (
     private authHttp: HttpClient,
-    private restService: RestService,
     private restExtractor: RestExtractor
   ) {}
 

+ 6 - 6
client/src/app/+admin/system/system.routes.ts

@@ -1,10 +1,10 @@
 import { Routes } from '@angular/router'
-import { UserRightGuard } from '../../core'
-import { UserRight } from '../../../../../shared'
-import { JobsComponent } from '@app/+admin/system/jobs/jobs.component'
-import { LogsComponent } from '@app/+admin/system/logs'
-import { SystemComponent } from '@app/+admin/system/system.component'
-import { DebugComponent } from '@app/+admin/system/debug'
+import { UserRightGuard } from '@app/core'
+import { UserRight } from '@shared/models'
+import { DebugComponent } from './debug'
+import { JobsComponent } from './jobs/jobs.component'
+import { LogsComponent } from './logs'
+import { SystemComponent } from './system.component'
 
 export const SystemRoutes: Routes = [
   {

+ 6 - 9
client/src/app/+admin/users/user-edit/user-create.component.ts

@@ -1,14 +1,11 @@
 import { Component, OnInit } from '@angular/core'
-import { Router, ActivatedRoute } from '@angular/router'
-import { AuthService, Notifier, ServerService } from '@app/core'
-import { UserCreate, UserRole } from '../../../../../../shared'
-import { UserEdit } from './user-edit'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
+import { ActivatedRoute, Router } from '@angular/router'
 import { ConfigService } from '@app/+admin/config/shared/config.service'
-import { UserService } from '@app/shared'
-import { ScreenService } from '@app/shared/misc/screen.service'
+import { AuthService, Notifier, ScreenService, ServerService, UserService } from '@app/core'
+import { FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { UserCreate, UserRole } from '@shared/models'
+import { UserEdit } from './user-edit'
 
 @Component({
   selector: 'my-user-create',

+ 4 - 7
client/src/app/+admin/users/user-edit/user-edit.ts

@@ -1,11 +1,8 @@
-import { AuthService, ServerService } from '../../../core'
-import { FormReactive } from '../../../shared'
-import { ServerConfig, USER_ROLE_LABELS, UserRole, VideoResolution } from '../../../../../../shared'
-import { ConfigService } from '@app/+admin/config/shared/config.service'
-import { UserAdminFlag } from '@shared/models/users/user-flag.model'
 import { OnInit } from '@angular/core'
-import { User } from '@app/shared/users/user.model'
-import { ScreenService } from '@app/shared/misc/screen.service'
+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 { ServerConfig, USER_ROLE_LABELS, UserAdminFlag, UserRole, VideoResolution } from '@shared/models'
 
 export abstract class UserEdit extends FormReactive implements OnInit {
   videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = []

+ 3 - 7
client/src/app/+admin/users/user-edit/user-password.component.ts

@@ -1,12 +1,8 @@
 import { Component, Input, OnInit } from '@angular/core'
-import { ActivatedRoute, Router } from '@angular/router'
-import { UserService } from '@app/shared/users/user.service'
-import { Notifier } from '../../../core'
-import { User, UserUpdate } from '../../../../../../shared'
+import { Notifier, UserService } from '@app/core'
+import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
-import { FormReactive } from '../../../shared'
+import { UserUpdate } from '@shared/models'
 
 @Component({
   selector: 'my-user-password',

+ 6 - 12
client/src/app/+admin/users/user-edit/user-update.component.ts

@@ -1,18 +1,12 @@
+import { Subscription } from 'rxjs'
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { Subscription } from 'rxjs'
-import { AuthService, Notifier } from '@app/core'
-import { ServerService } from '../../../core'
-import { UserEdit } from './user-edit'
-import { User as UserType, UserUpdate, UserRole } from '../../../../../../shared'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
 import { ConfigService } from '@app/+admin/config/shared/config.service'
-import { UserService } from '@app/shared'
-import { UserAdminFlag } from '@shared/models/users/user-flag.model'
-import { User } from '@app/shared/users/user.model'
-import { ScreenService } from '@app/shared/misc/screen.service'
+import { AuthService, Notifier, ScreenService, ServerService, User, UserService } from '@app/core'
+import { FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models'
+import { UserEdit } from './user-edit'
 
 @Component({
   selector: 'my-user-update',

+ 5 - 8
client/src/app/+admin/users/user-list/user-list.component.ts

@@ -1,13 +1,10 @@
-import { Component, OnInit, ViewChild } from '@angular/core'
-import { AuthService, Notifier } from '@app/core'
 import { SortMeta } from 'primeng/api'
-import { ConfirmService, ServerService } from '../../../core'
-import { RestPagination, RestTable, UserService } from '../../../shared'
+import { Component, OnInit, ViewChild } from '@angular/core'
+import { AuthService, ConfirmService, Notifier, RestPagination, RestTable, ServerService, UserService } from '@app/core'
+import { Actor, DropdownAction } from '@app/shared/shared-main'
+import { UserBanModalComponent } from '@app/shared/shared-moderation'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { ServerConfig, User } from '../../../../../../shared'
-import { UserBanModalComponent } from '@app/shared/moderation'
-import { DropdownAction } from '@app/shared/buttons/action-dropdown.component'
-import { Actor } from '@app/shared/actor/actor.model'
+import { ServerConfig, User } from '@shared/models'
 
 @Component({
   selector: 'my-user-list',

+ 3 - 5
client/src/app/+admin/users/users.routes.ts

@@ -1,11 +1,9 @@
 import { Routes } from '@angular/router'
-
-import { UserRightGuard } from '../../core'
-import { UserRight } from '../../../../../shared'
-import { UsersComponent } from './users.component'
+import { ServerConfigResolver, UserRightGuard } from '@app/core'
+import { UserRight } from '@shared/models'
 import { UserCreateComponent, UserUpdateComponent } from './user-edit'
 import { UserListComponent } from './user-list'
-import { ServerConfigResolver } from '@app/core/routing/server-config-resolver.service'
+import { UsersComponent } from './users.component'
 
 export const UsersRoutes: Routes = [
   {

+ 4 - 5
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts → client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts

@@ -1,12 +1,11 @@
 import { Component, OnInit } from '@angular/core'
 import { Router } from '@angular/router'
 import { AuthService, Notifier } from '@app/core'
-import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
-import { VideoChannelCreate } from '../../../../../shared/models/videos'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
+import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms'
+import { VideoChannelService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service'
+import { VideoChannelCreate } from '@shared/models'
+import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
 
 @Component({
   selector: 'my-account-video-channel-create',

+ 0 - 0
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html → client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.html


+ 0 - 0
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss → client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.scss


+ 2 - 2
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts → client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.ts

@@ -1,5 +1,5 @@
-import { FormReactive } from '@app/shared'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
+import { FormReactive } from '@app/shared/shared-forms'
+import { VideoChannel } from '@app/shared/shared-main'
 
 export abstract class MyAccountVideoChannelEdit extends FormReactive {
   // We need it even in the create component because it's used in the edit template

+ 5 - 8
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts → client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts

@@ -1,15 +1,12 @@
+import { Subscription } from 'rxjs'
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
 import { AuthService, Notifier, ServerService } from '@app/core'
-import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
-import { VideoChannelUpdate } from '../../../../../shared/models/videos'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
-import { Subscription } from 'rxjs'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
+import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms'
+import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service'
-import { ServerConfig } from '@shared/models'
+import { ServerConfig, VideoChannelUpdate } from '@shared/models'
+import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
 
 @Component({
   selector: 'my-account-video-channel-update',

+ 0 - 0
client/src/app/+my-account/my-account-video-channels/my-account-video-channels-routing.module.ts → client/src/app/+my-account/+my-account-video-channels/my-account-video-channels-routing.module.ts


+ 0 - 0
client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html → client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.html


+ 0 - 0
client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss → client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.scss


+ 5 - 10
client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts → client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.ts

@@ -1,15 +1,10 @@
-import { Component, OnInit } from '@angular/core'
-import { Notifier } from '@app/core'
-import { AuthService } from '../../core/auth'
-import { ConfirmService } from '../../core/confirm'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
-import { ScreenService } from '@app/shared/misc/screen.service'
-import { User } from '@app/shared'
+import { ChartData } from 'chart.js'
+import { max, maxBy, min, minBy } from 'lodash-es'
 import { flatMap } from 'rxjs/operators'
+import { Component, OnInit } from '@angular/core'
+import { AuthService, ConfirmService, Notifier, ScreenService, User } from '@app/core'
+import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { min, minBy, max, maxBy } from 'lodash-es'
-import { ChartData } from 'chart.js'
 
 @Component({
   selector: 'my-account-video-channels',

+ 12 - 6
client/src/app/+my-account/my-account-video-channels/my-account-video-channels.module.ts → client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.module.ts

@@ -1,16 +1,22 @@
-import { NgModule } from '@angular/core'
 import { ChartModule } from 'primeng/chart'
-import { MyAccountVideoChannelsRoutingModule } from './my-account-video-channels-routing.module'
-import { MyAccountVideoChannelsComponent } from './my-account-video-channels.component'
+import { NgModule } from '@angular/core'
+import { SharedFormModule } from '@app/shared/shared-forms'
+import { SharedGlobalIconModule } from '@app/shared/shared-icons'
+import { SharedMainModule } from '@app/shared/shared-main'
 import { MyAccountVideoChannelCreateComponent } from './my-account-video-channel-create.component'
 import { MyAccountVideoChannelUpdateComponent } from './my-account-video-channel-update.component'
-import { SharedModule } from '@app/shared'
+import { MyAccountVideoChannelsRoutingModule } from './my-account-video-channels-routing.module'
+import { MyAccountVideoChannelsComponent } from './my-account-video-channels.component'
 
 @NgModule({
   imports: [
     MyAccountVideoChannelsRoutingModule,
-    SharedModule,
-    ChartModule
+
+    ChartModule,
+
+    SharedMainModule,
+    SharedFormModule,
+    SharedGlobalIconModule
   ],
 
   declarations: [

+ 3 - 3
client/src/app/+my-account/my-account-blocklist/my-account-blocklist.component.ts

@@ -1,10 +1,10 @@
 import { Component } from '@angular/core'
-import { GenericAccountBlocklistComponent, BlocklistComponentType } from '@app/shared/blocklist'
+import { BlocklistComponentType, GenericAccountBlocklistComponent } from '@app/shared/shared-moderation'
 
 @Component({
   selector: 'my-account-blocklist',
-  styleUrls: [ '../../shared/blocklist/account-blocklist.component.scss' ],
-  templateUrl: '../../shared/blocklist/account-blocklist.component.html'
+  styleUrls: [ '../../shared/shared-moderation/account-blocklist.component.scss' ],
+  templateUrl: '../../shared/shared-moderation/account-blocklist.component.html'
 })
 export class MyAccountBlocklistComponent extends GenericAccountBlocklistComponent {
   mode = BlocklistComponentType.Account

+ 3 - 3
client/src/app/+my-account/my-account-blocklist/my-account-server-blocklist.component.ts

@@ -1,10 +1,10 @@
 import { Component } from '@angular/core'
-import { GenericServerBlocklistComponent, BlocklistComponentType } from '@app/shared/blocklist'
+import { BlocklistComponentType, GenericServerBlocklistComponent } from '@app/shared/shared-moderation'
 
 @Component({
   selector: 'my-account-server-blocklist',
-  styleUrls: [ '../../+admin/moderation/moderation.component.scss', '../../shared/blocklist/server-blocklist.component.scss' ],
-  templateUrl: '../../shared/blocklist/server-blocklist.component.html'
+  styleUrls: [ '../../+admin/moderation/moderation.component.scss', '../../shared/shared-moderation/server-blocklist.component.scss' ],
+  templateUrl: '../../shared/shared-moderation/server-blocklist.component.html'
 })
 export class MyAccountServerBlocklistComponent extends GenericServerBlocklistComponent {
   mode = BlocklistComponentType.Account

+ 13 - 12
client/src/app/+my-account/my-account-history/my-account-history.component.ts

@@ -1,17 +1,19 @@
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { immutableAssign } from '@app/shared/misc/utils'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
-import { AuthService } from '../../core/auth'
-import { ConfirmService } from '../../core/confirm'
-import { AbstractVideoList } from '../../shared/video/abstract-video-list'
-import { VideoService } from '../../shared/video/video.service'
+import {
+  AuthService,
+  ComponentPagination,
+  ConfirmService,
+  LocalStorageService,
+  Notifier,
+  ScreenService,
+  ServerService,
+  UserService
+} from '@app/core'
+import { immutableAssign } from '@app/helpers'
+import { UserHistoryService } from '@app/shared/shared-main'
+import { AbstractVideoList } from '@app/shared/shared-video-miniature'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { ScreenService } from '@app/shared/misc/screen.service'
-import { UserHistoryService } from '@app/shared/users/user-history.service'
-import { UserService } from '@app/shared'
-import { Notifier, ServerService } from '@app/core'
-import { LocalStorageService } from '@app/shared/misc/storage.service'
 
 @Component({
   selector: 'my-account-history',
@@ -38,7 +40,6 @@ export class MyAccountHistoryComponent extends AbstractVideoList implements OnIn
     protected screenService: ScreenService,
     protected storageService: LocalStorageService,
     private confirmService: ConfirmService,
-    private videoService: VideoService,
     private userHistoryService: UserHistoryService
   ) {
     super()

+ 1 - 1
client/src/app/+my-account/my-account-notifications/my-account-notifications.component.ts

@@ -1,5 +1,5 @@
 import { Component, ViewChild } from '@angular/core'
-import { UserNotificationsComponent } from '@app/shared'
+import { UserNotificationsComponent } from '@app/shared/shared-main'
 
 @Component({
   templateUrl: './my-account-notifications.component.html',

+ 4 - 8
client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts

@@ -1,14 +1,10 @@
 import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'
 import { AuthService, Notifier } from '@app/core'
-import { FormReactive } from '@app/shared'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { VideoOwnershipService } from '@app/shared/video-ownership'
-import { VideoChangeOwnership } from '../../../../../../shared/models/videos'
-import { VideoAcceptOwnershipValidatorsService } from '@app/shared/forms/form-validators'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
-import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
-import { I18n } from '@ngx-translate/i18n-polyfill'
+import { FormReactive, FormValidatorService, VideoAcceptOwnershipValidatorsService } from '@app/shared/shared-forms'
+import { VideoChannelService, VideoOwnershipService } from '@app/shared/shared-main'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { VideoChangeOwnership, VideoChannel } from '@shared/models'
 
 @Component({
   selector: 'my-account-accept-ownership',

+ 4 - 6
client/src/app/+my-account/my-account-ownership/my-account-ownership.component.ts

@@ -1,10 +1,8 @@
-import { Component, OnInit, ViewChild } from '@angular/core'
-import { Notifier } from '@app/core'
-import { RestPagination, RestTable } from '@app/shared'
 import { SortMeta } from 'primeng/api'
-import { VideoChangeOwnership } from '../../../../../shared'
-import { VideoOwnershipService } from '@app/shared/video-ownership'
-import { Account } from '@app/shared/account/account.model'
+import { Component, OnInit, ViewChild } from '@angular/core'
+import { Notifier, RestPagination, RestTable } from '@app/core'
+import { Account, VideoOwnershipService } from '@app/shared/shared-main'
+import { VideoChangeOwnership } from '@shared/models'
 import { MyAccountAcceptOwnershipComponent } from './my-account-accept-ownership/my-account-accept-ownership.component'
 
 @Component({

+ 16 - 19
client/src/app/+my-account/my-account-routing.module.ts

@@ -2,26 +2,20 @@ import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
 import { MetaGuard } from '@ngx-meta/core'
 import { LoginGuard } from '../core'
-import { MyAccountComponent } from './my-account.component'
+import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
+import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
+import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component'
+import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
+import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component'
 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
+import { MyAccountSubscriptionsComponent } from './my-account-subscriptions/my-account-subscriptions.component'
+import { MyAccountVideoImportsComponent } from './my-account-video-imports/my-account-video-imports.component'
+import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playlists/my-account-video-playlist-create.component'
+import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component'
+import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component'
+import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component'
 import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
-import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
-import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component'
-import { MyAccountOwnershipComponent } from '@app/+my-account/my-account-ownership/my-account-ownership.component'
-import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component'
-import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component'
-import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component'
-import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component'
-import { MyAccountVideoPlaylistsComponent } from '@app/+my-account/my-account-video-playlists/my-account-video-playlists.component'
-import {
-  MyAccountVideoPlaylistCreateComponent
-} from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component'
-import {
-  MyAccountVideoPlaylistUpdateComponent
-} from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component'
-import {
-  MyAccountVideoPlaylistElementsComponent
-} from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component'
+import { MyAccountComponent } from './my-account.component'
 
 const myAccountRoutes: Routes = [
   {
@@ -46,7 +40,10 @@ const myAccountRoutes: Routes = [
 
       {
         path: 'video-channels',
-        loadChildren: () => import('./my-account-video-channels/my-account-video-channels.module').then(m => m.MyAccountVideoChannelsModule)
+        loadChildren: () => {
+          return import('./+my-account-video-channels/my-account-video-channels.module')
+            .then(m => m.MyAccountVideoChannelsModule)
+        }
       },
 
       {

+ 5 - 8
client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts

@@ -1,12 +1,10 @@
+import { forkJoin } from 'rxjs'
+import { tap } from 'rxjs/operators'
 import { Component, OnInit } from '@angular/core'
-import { AuthService, Notifier, ServerService } from '@app/core'
-import { FormReactive, UserService } from '../../../shared'
+import { AuthService, ServerService, UserService } from '@app/core'
+import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
-import { User } from '../../../../../../shared'
-import { tap } from 'rxjs/operators'
-import { forkJoin } from 'rxjs'
+import { User } from '@shared/models'
 
 @Component({
   selector: 'my-account-change-email',
@@ -21,7 +19,6 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni
   constructor (
     protected formValidatorService: FormValidatorService,
     private userValidatorsService: UserValidatorsService,
-    private notifier: Notifier,
     private authService: AuthService,
     private userService: UserService,
     private serverService: ServerService,

+ 4 - 6
client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts

@@ -1,11 +1,9 @@
+import { filter } from 'rxjs/operators'
 import { Component, OnInit } from '@angular/core'
-import { AuthService, Notifier } from '@app/core'
-import { FormReactive, UserService } from '../../../shared'
+import { AuthService, Notifier, UserService } from '@app/core'
+import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
-import { filter } from 'rxjs/operators'
-import { User } from '../../../../../../shared'
+import { User } from '@shared/models'
 
 @Component({
   selector: 'my-account-change-password',

+ 1 - 4
client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts

@@ -1,9 +1,6 @@
 import { Component, Input } from '@angular/core'
-import { Notifier } from '@app/core'
-import { AuthService, ConfirmService, RedirectService } from '../../../core'
-import { UserService } from '../../../shared'
+import { AuthService, ConfirmService, Notifier, RedirectService, User, UserService } from '@app/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { User } from '@app/shared'
 
 @Component({
   selector: 'my-account-danger-zone',

+ 0 - 1
client/src/app/+my-account/my-account-settings/my-account-interface/index.ts

@@ -1 +0,0 @@
-export * from './my-account-interface-settings.component'

+ 5 - 6
client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts

@@ -1,11 +1,10 @@
+import { debounce } from 'lodash-es'
+import { Subject } from 'rxjs'
 import { Component, Input, OnInit } from '@angular/core'
-import { User } from '@app/shared'
+import { Notifier, ServerService, User } from '@app/core'
+import { UserNotificationService } from '@app/shared/shared-main'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { Subject } from 'rxjs'
-import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '../../../../../../shared'
-import { Notifier, ServerService } from '@app/core'
-import { debounce } from 'lodash-es'
-import { UserNotificationService } from '@app/shared/users/user-notification.service'
+import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models'
 
 @Component({
   selector: 'my-account-notification-preferences',

+ 3 - 6
client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts

@@ -1,11 +1,8 @@
+import { Subject } from 'rxjs'
 import { Component, Input, OnInit } from '@angular/core'
-import { Notifier } from '@app/core'
-import { FormReactive, UserService } from '../../../shared'
-import { User } from '@app/shared'
+import { Notifier, User, UserService } from '@app/core'
+import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { Subject } from 'rxjs'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
 
 @Component({
   selector: 'my-account-profile',

+ 2 - 2
client/src/app/+my-account/my-account-settings/my-account-settings.component.html

@@ -34,7 +34,7 @@
   </div>
 
   <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
-    <my-account-video-settings [user]="user" [userInformationLoaded]="userInformationLoaded"></my-account-video-settings>
+    <my-user-video-settings [user]="user" [userInformationLoaded]="userInformationLoaded"></my-user-video-settings>
   </div>
 </div>
 
@@ -55,7 +55,7 @@
   </div>
 
   <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
-    <my-account-interface-settings [user]="user" [userInformationLoaded]="userInformationLoaded"></my-account-interface-settings>
+    <my-user-interface-settings [user]="user" [userInformationLoaded]="userInformationLoaded"></my-user-interface-settings>
   </div>
 </div>
 

+ 3 - 6
client/src/app/+my-account/my-account-settings/my-account-settings.component.ts

@@ -1,11 +1,8 @@
-import { Component, OnInit, AfterViewChecked } from '@angular/core'
-import { Notifier } from '@app/core'
 import { BytesPipe } from 'ngx-pipes'
-import { AuthService } from '../../core'
-import { User } from '../../shared'
-import { UserService } from '../../shared/users'
-import { I18n } from '@ngx-translate/i18n-polyfill'
 import { ViewportScroller } from '@angular/common'
+import { AfterViewChecked, Component, OnInit } from '@angular/core'
+import { AuthService, Notifier, User, UserService } from '@app/core'
+import { I18n } from '@ngx-translate/i18n-polyfill'
 
 @Component({
   selector: 'my-account-settings',

+ 0 - 1
client/src/app/+my-account/my-account-settings/my-account-video-settings/index.ts

@@ -1 +0,0 @@
-export * from './my-account-video-settings.component'

+ 4 - 5
client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts

@@ -1,9 +1,8 @@
-import { Component, OnInit } from '@angular/core'
-import { Notifier } from '@app/core'
-import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
-import { UserSubscriptionService } from '@app/shared/user-subscription'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
 import { Subject } from 'rxjs'
+import { Component, OnInit } from '@angular/core'
+import { ComponentPagination, Notifier } from '@app/core'
+import { VideoChannel } from '@app/shared/shared-main'
+import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
 
 @Component({
   selector: 'my-account-subscriptions',

+ 4 - 5
client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.ts

@@ -1,9 +1,8 @@
-import { Component, OnInit } from '@angular/core'
-import { RestPagination, RestTable } from '@app/shared'
 import { SortMeta } from 'primeng/api'
-import { Notifier } from '@app/core'
-import { VideoImport, VideoImportState } from '../../../../../shared/models/videos'
-import { VideoImportService } from '@app/shared/video-import'
+import { Component, OnInit } from '@angular/core'
+import { Notifier, RestPagination, RestTable } from '@app/core'
+import { VideoImportService } from '@app/shared/shared-main'
+import { VideoImport, VideoImportState } from '@shared/models'
 
 @Component({
   selector: 'my-account-video-imports',

+ 4 - 5
client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts

@@ -1,14 +1,13 @@
 import { Component, OnInit } from '@angular/core'
 import { Router } from '@angular/router'
 import { AuthService, Notifier, ServerService } from '@app/core'
-import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit'
+import { FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/shared-forms'
+import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { VideoPlaylistValidatorsService } from '@app/shared'
 import { VideoPlaylistCreate } from '@shared/models/videos/playlist/video-playlist-create.model'
-import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
 import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
-import { populateAsyncUserVideoChannels } from '@app/shared/misc/utils'
+import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit'
+import { populateAsyncUserVideoChannels } from '@app/helpers'
 
 @Component({
   selector: 'my-account-video-playlist-create',

+ 2 - 2
client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-edit.ts

@@ -1,6 +1,6 @@
-import { FormReactive } from '@app/shared'
-import { VideoPlaylist } from '@shared/models/videos/playlist/video-playlist.model'
+import { FormReactive } from '@app/shared/shared-forms'
 import { VideoConstant, VideoPlaylistPrivacy } from '@shared/models'
+import { VideoPlaylist } from '@shared/models/videos/playlist/video-playlist.model'
 
 export abstract class MyAccountVideoPlaylistEdit extends FormReactive {
   // Declare it here to avoid errors in create template

+ 4 - 15
client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts

@@ -1,16 +1,9 @@
-import { Component, OnDestroy, OnInit } from '@angular/core'
-import { Notifier, ServerService } from '@app/core'
-import { AuthService } from '../../core/auth'
-import { ConfirmService } from '../../core/confirm'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
 import { Subject, Subscription } from 'rxjs'
-import { ActivatedRoute } from '@angular/router'
-import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
-import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { ScreenService } from '@app/shared/misc/screen.service'
 import { CdkDragDrop } from '@angular/cdk/drag-drop'
-import { VideoPlaylistElement } from '@app/shared/video-playlist/video-playlist-element.model'
+import { Component, OnDestroy, OnInit } from '@angular/core'
+import { ActivatedRoute } from '@angular/router'
+import { ComponentPagination, Notifier, ScreenService } from '@app/core'
+import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
 
 @Component({
   selector: 'my-account-video-playlist-elements',
@@ -33,12 +26,8 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro
   private paramsSub: Subscription
 
   constructor (
-    private authService: AuthService,
-    private serverService: ServerService,
     private notifier: Notifier,
-    private confirmService: ConfirmService,
     private route: ActivatedRoute,
-    private i18n: I18n,
     private screenService: ScreenService,
     private videoPlaylistService: VideoPlaylistService
   ) {}

+ 7 - 9
client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts

@@ -1,16 +1,14 @@
+import { forkJoin, Subscription } from 'rxjs'
+import { map, switchMap } from 'rxjs/operators'
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
 import { AuthService, Notifier, ServerService } from '@app/core'
-import { forkJoin, Subscription } from 'rxjs'
+import { populateAsyncUserVideoChannels } from '@app/helpers'
+import { FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/shared-forms'
+import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { MyAccountVideoPlaylistEdit } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-edit'
-import { populateAsyncUserVideoChannels } from '@app/shared/misc/utils'
-import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
-import { VideoPlaylistValidatorsService } from '@app/shared'
-import { VideoPlaylistUpdate } from '@shared/models/videos/playlist/video-playlist-update.model'
-import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
-import { delayWhen, map, switchMap } from 'rxjs/operators'
+import { VideoPlaylistUpdate } from '@shared/models'
+import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit'
 
 @Component({
   selector: 'my-account-video-playlist-update',

+ 4 - 9
client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.ts

@@ -1,15 +1,10 @@
+import { Subject } from 'rxjs'
+import { debounceTime, flatMap } from 'rxjs/operators'
 import { Component, OnInit } from '@angular/core'
-import { Notifier } from '@app/core'
-import { AuthService } from '../../core/auth'
-import { ConfirmService } from '../../core/confirm'
-import { User } from '@app/shared'
-import { flatMap, debounceTime } from 'rxjs/operators'
+import { AuthService, ComponentPagination, ConfirmService, Notifier, User } from '@app/core'
+import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
-import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.service'
 import { VideoPlaylistType } from '@shared/models'
-import { Subject } from 'rxjs'
 
 @Component({
   selector: 'my-account-video-playlists',

+ 8 - 14
client/src/app/+my-account/my-account-videos/my-account-videos.component.ts

@@ -1,21 +1,15 @@
 import { concat, Observable, Subject } from 'rxjs'
-import { tap, toArray, debounceTime } from 'rxjs/operators'
-import { Component, ViewChild, OnInit } from '@angular/core'
+import { debounceTime, tap, toArray } from 'rxjs/operators'
+import { Component, OnInit, ViewChild } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { immutableAssign } from '@app/shared/misc/utils'
-import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
-import { Notifier, ServerService } from '@app/core'
-import { AuthService } from '../../core/auth'
-import { ConfirmService } from '../../core/confirm'
-import { Video } from '../../shared/video/video.model'
-import { VideoService } from '../../shared/video/video.service'
+import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core'
+import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
+import { immutableAssign } from '@app/helpers'
+import { Video, VideoService } from '@app/shared/shared-main'
+import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { ScreenService } from '@app/shared/misc/screen.service'
+import { VideoSortField } from '@shared/models'
 import { VideoChangeOwnershipComponent } from './video-change-ownership/video-change-ownership.component'
-import { MiniatureDisplayOptions, OwnerDisplayType } from '@app/shared/video/video-miniature.component'
-import { SelectionType, VideosSelectionComponent } from '@app/shared/video/videos-selection.component'
-import { VideoSortField } from '@app/shared/video/sort-field.type'
-import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
 
 @Component({
   selector: 'my-account-videos',

+ 3 - 5
client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts

@@ -1,11 +1,9 @@
 import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
-import { Notifier } from '@app/core'
+import { Notifier, UserService } from '@app/core'
+import { FormReactive, FormValidatorService, VideoChangeOwnershipValidatorsService } from '@app/shared/shared-forms'
+import { Video, VideoOwnershipService } from '@app/shared/shared-main'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
-import { FormReactive, UserService } from '../../../shared/index'
-import { Video } from '@app/shared/video/video.model'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { FormValidatorService, VideoChangeOwnershipValidatorsService } from '@app/shared'
-import { VideoOwnershipService } from '@app/shared/video-ownership'
 
 @Component({
   selector: 'my-video-change-ownership',

+ 1 - 1
client/src/app/+my-account/my-account.component.ts

@@ -1,8 +1,8 @@
 import { Component, OnInit } from '@angular/core'
 import { ServerService } from '@app/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { TopMenuDropdownParam } from '@app/shared/menu/top-menu-dropdown.component'
 import { ServerConfig } from '@shared/models'
+import { TopMenuDropdownParam } from './top-menu-dropdown.component'
 
 @Component({
   selector: 'my-my-account',

+ 41 - 31
client/src/app/+my-account/my-account.module.ts

@@ -1,47 +1,55 @@
-import { NgModule } from '@angular/core'
-import { TableModule } from 'primeng/table'
 import { AutoCompleteModule } from 'primeng/autocomplete'
 import { InputSwitchModule } from 'primeng/inputswitch'
-import { SharedModule } from '../shared'
+import { TableModule } from 'primeng/table'
+import { DragDropModule } from '@angular/cdk/drag-drop'
+import { NgModule } from '@angular/core'
+import { SharedGlobalIconModule } from '@app/shared/shared-icons'
+import { SharedMainModule } from '@app/shared/shared-main'
+import { SharedModerationModule } from '@app/shared/shared-moderation'
+import { SharedUserInterfaceSettingsModule } from '@app/shared/shared-user-settings'
+import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription/shared-user-subscription.module'
+import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature'
+import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist/shared-video-playlist.module'
+import { MyAccountBlocklistComponent } from './my-account-blocklist/my-account-blocklist.component'
+import { MyAccountServerBlocklistComponent } from './my-account-blocklist/my-account-server-blocklist.component'
+import { MyAccountHistoryComponent } from './my-account-history/my-account-history.component'
+import { MyAccountNotificationsComponent } from './my-account-notifications/my-account-notifications.component'
+import { MyAccountAcceptOwnershipComponent } from './my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component'
+import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component'
 import { MyAccountRoutingModule } from './my-account-routing.module'
+import { MyAccountChangeEmailComponent } from './my-account-settings/my-account-change-email'
 import { MyAccountChangePasswordComponent } from './my-account-settings/my-account-change-password/my-account-change-password.component'
+import { MyAccountDangerZoneComponent } from './my-account-settings/my-account-danger-zone'
+import { MyAccountNotificationPreferencesComponent } from './my-account-settings/my-account-notification-preferences'
+import { MyAccountProfileComponent } from './my-account-settings/my-account-profile/my-account-profile.component'
 import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
-import { MyAccountComponent } from './my-account.component'
+import { MyAccountSubscriptionsComponent } from './my-account-subscriptions/my-account-subscriptions.component'
+import { MyAccountVideoImportsComponent } from './my-account-video-imports/my-account-video-imports.component'
+import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playlists/my-account-video-playlist-create.component'
+import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component'
+import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component'
+import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component'
 import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
 import { VideoChangeOwnershipComponent } from './my-account-videos/video-change-ownership/video-change-ownership.component'
-import { MyAccountOwnershipComponent } from './my-account-ownership/my-account-ownership.component'
-import { MyAccountAcceptOwnershipComponent } from './my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component'
-import { MyAccountProfileComponent } from '@app/+my-account/my-account-settings/my-account-profile/my-account-profile.component'
-import { MyAccountVideoImportsComponent } from '@app/+my-account/my-account-video-imports/my-account-video-imports.component'
-import { MyAccountDangerZoneComponent } from '@app/+my-account/my-account-settings/my-account-danger-zone'
-import { MyAccountSubscriptionsComponent } from '@app/+my-account/my-account-subscriptions/my-account-subscriptions.component'
-import { MyAccountBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-blocklist.component'
-import { MyAccountServerBlocklistComponent } from '@app/+my-account/my-account-blocklist/my-account-server-blocklist.component'
-import { MyAccountHistoryComponent } from '@app/+my-account/my-account-history/my-account-history.component'
-import { MyAccountNotificationsComponent } from '@app/+my-account/my-account-notifications/my-account-notifications.component'
-import { MyAccountNotificationPreferencesComponent } from '@app/+my-account/my-account-settings/my-account-notification-preferences'
-import {
-  MyAccountVideoPlaylistCreateComponent
-} from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component'
-import {
-  MyAccountVideoPlaylistUpdateComponent
-} from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component'
-import { MyAccountVideoPlaylistsComponent } from '@app/+my-account/my-account-video-playlists/my-account-video-playlists.component'
-import {
-  MyAccountVideoPlaylistElementsComponent
-} from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component'
-import { DragDropModule } from '@angular/cdk/drag-drop'
-import { MyAccountChangeEmailComponent } from '@app/+my-account/my-account-settings/my-account-change-email'
+import { MyAccountComponent } from './my-account.component'
+import { TopMenuDropdownComponent } from './top-menu-dropdown.component'
 
 @NgModule({
   imports: [
-    TableModule,
     MyAccountRoutingModule,
+
     AutoCompleteModule,
-    SharedModule,
     TableModule,
     InputSwitchModule,
-    DragDropModule
+    DragDropModule,
+
+    SharedMainModule,
+    SharedModerationModule,
+    SharedVideoMiniatureModule,
+    SharedUserSubscriptionModule,
+    SharedVideoPlaylistModule,
+    SharedUserInterfaceSettingsModule,
+    SharedGlobalIconModule
   ],
 
   declarations: [
@@ -68,7 +76,9 @@ import { MyAccountChangeEmailComponent } from '@app/+my-account/my-account-setti
     MyAccountVideoPlaylistCreateComponent,
     MyAccountVideoPlaylistUpdateComponent,
     MyAccountVideoPlaylistsComponent,
-    MyAccountVideoPlaylistElementsComponent
+    MyAccountVideoPlaylistElementsComponent,
+
+    TopMenuDropdownComponent
   ],
 
   exports: [

+ 0 - 0
client/src/app/shared/menu/top-menu-dropdown.component.html → client/src/app/+my-account/top-menu-dropdown.component.html


+ 0 - 0
client/src/app/shared/menu/top-menu-dropdown.component.scss → client/src/app/+my-account/top-menu-dropdown.component.scss


+ 4 - 11
client/src/app/shared/menu/top-menu-dropdown.component.ts → client/src/app/+my-account/top-menu-dropdown.component.ts

@@ -1,17 +1,10 @@
-import {
-  Component,
-  Input,
-  OnDestroy,
-  OnInit,
-  ViewChild
-} from '@angular/core'
+import { Subscription } from 'rxjs'
 import { filter, take } from 'rxjs/operators'
+import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'
 import { NavigationEnd, Router } from '@angular/router'
-import { Subscription } from 'rxjs'
+import { MenuService, ScreenService } from '@app/core'
+import { GlobalIconName } from '@app/shared/shared-icons'
 import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap'
-import { GlobalIconName } from '@app/shared/images/global-icon.component'
-import { ScreenService } from '@app/shared/misc/screen.service'
-import { MenuService } from '@app/core/menu'
 
 export type TopMenuDropdownParam = {
   label: string

+ 6 - 5
client/src/app/+page-not-found/page-not-found.module.ts

@@ -1,12 +1,13 @@
+import { CommonModule } from '@angular/common'
 import { NgModule } from '@angular/core'
-import { SharedModule } from '../shared'
-import { PageNotFoundComponent } from '@app/+page-not-found/page-not-found.component'
-import { PageNotFoundRoutingModule } from '@app/+page-not-found/page-not-found-routing.module'
+import { PageNotFoundRoutingModule } from './page-not-found-routing.module'
+import { PageNotFoundComponent } from './page-not-found.component'
 
 @NgModule({
   imports: [
-    PageNotFoundRoutingModule,
-    SharedModule
+    CommonModule,
+
+    PageNotFoundRoutingModule
   ],
 
   declarations: [

+ 1 - 2
client/src/app/+signup/+register/register-routing.module.ts

@@ -1,9 +1,8 @@
 import { NgModule } from '@angular/core'
 import { RouterModule, Routes } from '@angular/router'
+import { ServerConfigResolver, UnloggedGuard } from '@app/core'
 import { MetaGuard } from '@ngx-meta/core'
 import { RegisterComponent } from './register.component'
-import { ServerConfigResolver } from '@app/core/routing/server-config-resolver.service'
-import { UnloggedGuard } from '@app/core/routing/unlogged-guard.service'
 
 const registerRoutes: Routes = [
   {

+ 4 - 6
client/src/app/+signup/+register/register-step-channel.component.ts

@@ -1,10 +1,9 @@
+import { concat, of } from 'rxjs'
+import { pairwise } from 'rxjs/operators'
 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
-import { AuthService } from '@app/core'
-import { FormReactive, UserService, VideoChannelValidatorsService } from '@app/shared'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
 import { FormGroup } from '@angular/forms'
-import { pairwise } from 'rxjs/operators'
-import { concat, of } from 'rxjs'
+import { UserService } from '@app/core'
+import { FormReactive, FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms'
 
 @Component({
   selector: 'my-register-step-channel',
@@ -17,7 +16,6 @@ export class RegisterStepChannelComponent extends FormReactive implements OnInit
 
   constructor (
     protected formValidatorService: FormValidatorService,
-    private authService: AuthService,
     private userService: UserService,
     private videoChannelValidatorsService: VideoChannelValidatorsService
   ) {

+ 4 - 6
client/src/app/+signup/+register/register-step-user.component.ts

@@ -1,10 +1,9 @@
+import { concat, of } from 'rxjs'
+import { pairwise } from 'rxjs/operators'
 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
-import { AuthService } from '@app/core'
-import { FormReactive, UserService, UserValidatorsService } from '@app/shared'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
 import { FormGroup } from '@angular/forms'
-import { pairwise } from 'rxjs/operators'
-import { concat, of } from 'rxjs'
+import { UserService } from '@app/core'
+import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 
 @Component({
   selector: 'my-register-step-user',
@@ -20,7 +19,6 @@ export class RegisterStepUserComponent extends FormReactive implements OnInit {
 
   constructor (
     protected formValidatorService: FormValidatorService,
-    private authService: AuthService,
     private userService: UserService,
     private userValidatorsService: UserValidatorsService
   ) {

+ 6 - 10
client/src/app/+signup/+register/register.component.ts

@@ -1,14 +1,13 @@
 import { Component, OnInit, ViewChild } from '@angular/core'
-import { AuthService, Notifier, RedirectService, ServerService } from '@app/core'
-import { UserService, UserValidatorsService } from '@app/shared'
-import { I18n } from '@ngx-translate/i18n-polyfill'
-import { UserRegister } from '@shared/models/users/user-register.model'
 import { FormGroup } from '@angular/forms'
-import { About, ServerConfig } from '@shared/models/server'
-import { InstanceService } from '@app/shared/instance/instance.service'
+import { ActivatedRoute } from '@angular/router'
+import { AuthService, Notifier, UserService } from '@app/core'
 import { HooksService } from '@app/core/plugins/hooks.service'
+import { InstanceService } from '@app/shared/shared-instance'
 import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap'
-import { ActivatedRoute } from '@angular/router'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+import { UserRegister } from '@shared/models'
+import { About, ServerConfig } from '@shared/models/server'
 
 @Component({
   selector: 'my-register',
@@ -40,11 +39,8 @@ export class RegisterComponent implements OnInit {
   constructor (
     private route: ActivatedRoute,
     private authService: AuthService,
-    private userValidatorsService: UserValidatorsService,
     private notifier: Notifier,
     private userService: UserService,
-    private serverService: ServerService,
-    private redirectService: RedirectService,
     private instanceService: InstanceService,
     private hooks: HooksService,
     private i18n: I18n

+ 11 - 8
client/src/app/+signup/+register/register.module.ts

@@ -1,21 +1,24 @@
+import { CdkStepperModule } from '@angular/cdk/stepper'
 import { NgModule } from '@angular/core'
+import { SignupSharedModule } from '@app/+signup/shared/signup-shared.module'
+import { SharedInstanceModule } from '@app/shared/shared-instance'
+import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'
+import { CustomStepperComponent } from './custom-stepper.component'
 import { RegisterRoutingModule } from './register-routing.module'
-import { RegisterComponent } from './register.component'
-import { SharedModule } from '@app/shared'
-import { CdkStepperModule } from '@angular/cdk/stepper'
 import { RegisterStepChannelComponent } from './register-step-channel.component'
 import { RegisterStepUserComponent } from './register-step-user.component'
-import { CustomStepperComponent } from './custom-stepper.component'
-import { SignupSharedModule } from '@app/+signup/shared/signup-shared.module'
-import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'
+import { RegisterComponent } from './register.component'
 
 @NgModule({
   imports: [
     RegisterRoutingModule,
-    SharedModule,
+
     CdkStepperModule,
+    NgbAccordionModule,
+
     SignupSharedModule,
-    NgbAccordionModule
+
+    SharedInstanceModule
   ],
 
   declarations: [

+ 2 - 5
client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts

@@ -1,10 +1,7 @@
 import { Component, OnInit } from '@angular/core'
+import { Notifier, RedirectService, ServerService, UserService } from '@app/core'
+import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { Notifier, RedirectService } from '@app/core'
-import { ServerService } from '@app/core/server'
-import { FormReactive, UserService } from '@app/shared'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
 import { ServerConfig } from '@shared/models'
 
 @Component({

+ 2 - 4
client/src/app/+signup/+verify-account/verify-account-email/verify-account-email.component.ts

@@ -1,8 +1,7 @@
 import { Component, OnInit } from '@angular/core'
-import { ActivatedRoute, Router } from '@angular/router'
+import { ActivatedRoute } from '@angular/router'
+import { AuthService, Notifier, UserService } from '@app/core'
 import { I18n } from '@ngx-translate/i18n-polyfill'
-import { AuthService, Notifier } from '@app/core'
-import { UserService } from '@app/shared'
 
 @Component({
   selector: 'my-verify-account-email',
@@ -21,7 +20,6 @@ export class VerifyAccountEmailComponent implements OnInit {
     private userService: UserService,
     private authService: AuthService,
     private notifier: Notifier,
-    private router: Router,
     private route: ActivatedRoute,
     private i18n: I18n
   ) {

+ 4 - 5
client/src/app/+signup/+verify-account/verify-account.module.ts

@@ -1,14 +1,13 @@
 import { NgModule } from '@angular/core'
-import { VerifyAccountRoutingModule } from './verify-account-routing.module'
-import { VerifyAccountEmailComponent } from './verify-account-email/verify-account-email.component'
+import { SignupSharedModule } from '../shared/signup-shared.module'
 import { VerifyAccountAskSendEmailComponent } from './verify-account-ask-send-email/verify-account-ask-send-email.component'
-import { SharedModule } from '@app/shared'
-import { SignupSharedModule } from '@app/+signup/shared/signup-shared.module'
+import { VerifyAccountEmailComponent } from './verify-account-email/verify-account-email.component'
+import { VerifyAccountRoutingModule } from './verify-account-routing.module'
 
 @NgModule({
   imports: [
     VerifyAccountRoutingModule,
-    SharedModule,
+
     SignupSharedModule
   ],
 

部分文件因为文件数量过多而无法显示