From 17119e4a546522468878cf115558b17949ab50d0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Nov 2020 15:28:54 +0100 Subject: [PATCH] Reorganize left menu and account menu Add my-settings and my-library in left menu Move administration below my-library Split account menu: my-setting and my library --- client/e2e/src/po/my-account.ts | 6 +- ...y-account-video-channels-routing.module.ts | 41 --- .../my-account-video-channels.module.ts | 31 -- .../+my-account/my-account-routing.module.ts | 97 ++---- .../app/+my-account/my-account.component.ts | 84 +---- .../src/app/+my-account/my-account.module.ts | 37 +-- .../my-video-channel-create.component.ts} | 15 +- .../my-video-channel-edit.component.html} | 4 +- .../my-video-channel-edit.component.scss} | 0 .../my-video-channel-edit.ts} | 7 +- .../my-video-channel-update.component.ts} | 12 +- .../my-video-channels-routing.module.ts | 41 +++ .../my-video-channels.component.html} | 0 .../my-video-channels.component.scss} | 0 .../my-video-channels.component.ts} | 7 +- .../my-video-channels.module.ts | 31 ++ client/src/app/+my-library/index.ts | 3 + .../my-history/my-history.component.html} | 0 .../my-history/my-history.component.scss} | 0 .../my-history/my-history.component.ts} | 7 +- .../+my-library/my-library-routing.module.ts | 134 ++++++++ .../app/+my-library/my-library.component.html | 7 + .../app/+my-library/my-library.component.scss | 13 + .../app/+my-library/my-library.component.ts | 76 +++++ .../src/app/+my-library/my-library.module.ts | 79 +++++ .../my-accept-ownership.component.html} | 0 .../my-accept-ownership.component.scss} | 0 .../my-accept-ownership.component.ts} | 8 +- .../my-ownership/my-ownership.component.html} | 2 +- .../my-ownership/my-ownership.component.scss} | 0 .../my-ownership/my-ownership.component.ts} | 16 +- .../my-subscriptions.component.html} | 0 .../my-subscriptions.component.scss} | 0 .../my-subscriptions.component.ts} | 9 +- .../my-video-imports.component.html} | 0 .../my-video-imports.component.scss} | 0 .../my-video-imports.component.ts} | 9 +- .../my-video-playlist-create.component.ts} | 11 +- .../my-video-playlist-edit.component.html} | 4 +- .../my-video-playlist-edit.component.scss} | 0 .../my-video-playlist-edit.ts} | 2 +- ...my-video-playlist-elements.component.html} | 0 ...my-video-playlist-elements.component.scss} | 0 .../my-video-playlist-elements.component.ts} | 11 +- .../my-video-playlist-update.component.ts} | 11 +- .../my-video-playlists.component.html} | 0 .../my-video-playlists.component.scss} | 0 .../my-video-playlists.component.ts} | 7 +- .../video-change-ownership.component.html | 0 .../video-change-ownership.component.scss | 0 .../video-change-ownership.component.ts | 0 .../my-videos/my-videos.component.html} | 12 + .../my-videos/my-videos.component.scss} | 63 ++-- .../my-videos/my-videos.component.ts} | 7 +- .../video-channels.component.html | 2 +- .../video-import-torrent.component.ts | 2 +- .../video-import-url.component.ts | 2 +- .../video-user-subscriptions.component.ts | 2 +- client/src/app/app-routing.module.ts | 4 + client/src/app/core/auth/auth.service.ts | 6 +- client/src/app/menu/menu.component.html | 179 ++++++----- client/src/app/menu/menu.component.scss | 296 +++++++++++------- client/src/app/menu/menu.component.ts | 42 +-- .../users/user-notification.model.ts | 2 +- ...-playlist-element-miniature.component.html | 2 +- .../video-playlist-miniature.component.ts | 2 +- client/src/sass/include/_variables.scss | 5 +- server/lib/emailer.ts | 2 +- 68 files changed, 849 insertions(+), 603 deletions(-) delete mode 100644 client/src/app/+my-account/+my-account-video-channels/my-account-video-channels-routing.module.ts delete mode 100644 client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.module.ts rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts => +my-library/+my-video-channels/my-video-channel-create.component.ts} (79%) rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channel-edit.component.html => +my-library/+my-video-channels/my-video-channel-edit.component.html} (95%) rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channel-edit.component.scss => +my-library/+my-video-channels/my-video-channel-edit.component.scss} (100%) rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channel-edit.ts => +my-library/+my-video-channels/my-video-channel-edit.ts} (81%) rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts => +my-library/+my-video-channels/my-video-channel-update.component.ts} (89%) create mode 100644 client/src/app/+my-library/+my-video-channels/my-video-channels-routing.module.ts rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channels.component.html => +my-library/+my-video-channels/my-video-channels.component.html} (100%) rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channels.component.scss => +my-library/+my-video-channels/my-video-channels.component.scss} (100%) rename client/src/app/{+my-account/+my-account-video-channels/my-account-video-channels.component.ts => +my-library/+my-video-channels/my-video-channels.component.ts} (95%) create mode 100644 client/src/app/+my-library/+my-video-channels/my-video-channels.module.ts create mode 100644 client/src/app/+my-library/index.ts rename client/src/app/{+my-account/my-account-history/my-account-history.component.html => +my-library/my-history/my-history.component.html} (100%) rename client/src/app/{+my-account/my-account-history/my-account-history.component.scss => +my-library/my-history/my-history.component.scss} (100%) rename client/src/app/{+my-account/my-account-history/my-account-history.component.ts => +my-library/my-history/my-history.component.ts} (91%) create mode 100644 client/src/app/+my-library/my-library-routing.module.ts create mode 100644 client/src/app/+my-library/my-library.component.html create mode 100644 client/src/app/+my-library/my-library.component.scss create mode 100644 client/src/app/+my-library/my-library.component.ts create mode 100644 client/src/app/+my-library/my-library.module.ts rename client/src/app/{+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html => +my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.html} (100%) rename client/src/app/{+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.scss => +my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.scss} (100%) rename client/src/app/{+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts => +my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts} (89%) rename client/src/app/{+my-account/my-account-ownership/my-account-ownership.component.html => +my-library/my-ownership/my-ownership.component.html} (96%) rename client/src/app/{+my-account/my-account-ownership/my-account-ownership.component.scss => +my-library/my-ownership/my-ownership.component.scss} (100%) rename client/src/app/{+my-account/my-account-ownership/my-account-ownership.component.ts => +my-library/my-ownership/my-ownership.component.ts} (75%) rename client/src/app/{+my-account/my-account-subscriptions/my-account-subscriptions.component.html => +my-library/my-subscriptions/my-subscriptions.component.html} (100%) rename client/src/app/{+my-account/my-account-subscriptions/my-account-subscriptions.component.scss => +my-library/my-subscriptions/my-subscriptions.component.scss} (100%) rename client/src/app/{+my-account/my-account-subscriptions/my-account-subscriptions.component.ts => +my-library/my-subscriptions/my-subscriptions.component.ts} (89%) rename client/src/app/{+my-account/my-account-video-imports/my-account-video-imports.component.html => +my-library/my-video-imports/my-video-imports.component.html} (100%) rename client/src/app/{+my-account/my-account-video-imports/my-account-video-imports.component.scss => +my-library/my-video-imports/my-video-imports.component.scss} (100%) rename client/src/app/{+my-account/my-account-video-imports/my-account-video-imports.component.ts => +my-library/my-video-imports/my-video-imports.component.ts} (86%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts => +my-library/my-video-playlists/my-video-playlist-create.component.ts} (86%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-edit.component.html => +my-library/my-video-playlists/my-video-playlist-edit.component.html} (94%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-edit.component.scss => +my-library/my-video-playlists/my-video-playlist-edit.component.scss} (100%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-edit.ts => +my-library/my-video-playlists/my-video-playlist-edit.ts} (87%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.html => +my-library/my-video-playlists/my-video-playlist-elements.component.html} (100%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.scss => +my-library/my-video-playlists/my-video-playlist-elements.component.scss} (100%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts => +my-library/my-video-playlists/my-video-playlist-elements.component.ts} (93%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts => +my-library/my-video-playlists/my-video-playlist-update.component.ts} (90%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlists.component.html => +my-library/my-video-playlists/my-video-playlists.component.html} (100%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlists.component.scss => +my-library/my-video-playlists/my-video-playlists.component.scss} (100%) rename client/src/app/{+my-account/my-account-video-playlists/my-account-video-playlists.component.ts => +my-library/my-video-playlists/my-video-playlists.component.ts} (92%) rename client/src/app/{+my-account/my-account-videos => +my-library/my-videos}/modals/video-change-ownership.component.html (100%) rename client/src/app/{+my-account/my-account-videos => +my-library/my-videos}/modals/video-change-ownership.component.scss (100%) rename client/src/app/{+my-account/my-account-videos => +my-library/my-videos}/modals/video-change-ownership.component.ts (100%) rename client/src/app/{+my-account/my-account-videos/my-account-videos.component.html => +my-library/my-videos/my-videos.component.html} (80%) rename client/src/app/{+my-account/my-account-videos/my-account-videos.component.scss => +my-library/my-videos/my-videos.component.scss} (84%) rename client/src/app/{+my-account/my-account-videos/my-account-videos.component.ts => +my-library/my-videos/my-videos.component.ts} (96%) diff --git a/client/e2e/src/po/my-account.ts b/client/e2e/src/po/my-account.ts index 6d0d8d61e..a39e5cc58 100644 --- a/client/e2e/src/po/my-account.ts +++ b/client/e2e/src/po/my-account.ts @@ -3,15 +3,15 @@ import { by, element, browser } from 'protractor' export class MyAccountPage { navigateToMyVideos () { - return element(by.css('a[href="/my-account/videos"]')).click() + return element(by.css('a[href="/my-library/videos"]')).click() } navigateToMyPlaylists () { - return element(by.css('a[href="/my-account/video-playlists"]')).click() + return element(by.css('a[href="/my-library/video-playlists"]')).click() } navigateToMyHistory () { - return element(by.css('a[href="/my-account/history/videos"]')).click() + return element(by.css('a[href="/my-library/history/videos"]')).click() } // My account Videos diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels-routing.module.ts b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels-routing.module.ts deleted file mode 100644 index 3aa3e360f..000000000 --- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels-routing.module.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { NgModule } from '@angular/core' -import { RouterModule, Routes } from '@angular/router' -import { MyAccountVideoChannelUpdateComponent } from './my-account-video-channel-update.component' -import { MyAccountVideoChannelCreateComponent } from './my-account-video-channel-create.component' -import { MyAccountVideoChannelsComponent } from './my-account-video-channels.component' - -const myAccountVideoChannelsRoutes: Routes = [ - { - path: '', - component: MyAccountVideoChannelsComponent, - data: { - meta: { - title: $localize`Account video channels` - } - } - }, - { - path: 'create', - component: MyAccountVideoChannelCreateComponent, - data: { - meta: { - title: $localize`Create new video channel` - } - } - }, - { - path: 'update/:videoChannelId', - component: MyAccountVideoChannelUpdateComponent, - data: { - meta: { - title: $localize`Update video channel` - } - } - } -] - -@NgModule({ - imports: [ RouterModule.forChild(myAccountVideoChannelsRoutes) ], - exports: [ RouterModule ] -}) -export class MyAccountVideoChannelsRoutingModule {} diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.module.ts b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.module.ts deleted file mode 100644 index f8c6ad56b..000000000 --- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ChartModule } from 'primeng/chart' -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 { MyAccountVideoChannelsRoutingModule } from './my-account-video-channels-routing.module' -import { MyAccountVideoChannelsComponent } from './my-account-video-channels.component' - -@NgModule({ - imports: [ - MyAccountVideoChannelsRoutingModule, - - ChartModule, - - SharedMainModule, - SharedFormModule, - SharedGlobalIconModule - ], - - declarations: [ - MyAccountVideoChannelsComponent, - MyAccountVideoChannelCreateComponent, - MyAccountVideoChannelUpdateComponent - ], - - exports: [], - providers: [] -}) -export class MyAccountVideoChannelsModule { } diff --git a/client/src/app/+my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts index 0bcb38ef5..81380ec6e 100644 --- a/client/src/app/+my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts @@ -2,21 +2,12 @@ import { NgModule } from '@angular/core' import { RouterModule, Routes } from '@angular/router' import { MetaGuard } from '@ngx-meta/core' import { LoginGuard } from '../core' +import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.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 { MyAccountComponent } from './my-account.component' -import { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.component' const myAccountRoutes: Routes = [ { @@ -41,88 +32,50 @@ const myAccountRoutes: Routes = [ { path: 'video-channels', - loadChildren: () => { - return import('./+my-account-video-channels/my-account-video-channels.module') - .then(m => m.MyAccountVideoChannelsModule) - } + redirectTo: '/my-library/video-channels', + pathMatch: 'full' }, { path: 'video-playlists', - component: MyAccountVideoPlaylistsComponent, - data: { - meta: { - title: $localize`Account playlists` - } - } + redirectTo: '/my-library/video-playlists', + pathMatch: 'full' }, { path: 'video-playlists/create', - component: MyAccountVideoPlaylistCreateComponent, - data: { - meta: { - title: $localize`Create new playlist` - } - } + redirectTo: '/my-library/video-playlists/create', + pathMatch: 'full' }, { path: 'video-playlists/:videoPlaylistId', - component: MyAccountVideoPlaylistElementsComponent, - data: { - meta: { - title: $localize`Playlist elements` - } - } + redirectTo: '/my-library/video-playlists/:videoPlaylistId', + pathMatch: 'full' }, { path: 'video-playlists/update/:videoPlaylistId', - component: MyAccountVideoPlaylistUpdateComponent, - data: { - meta: { - title: $localize`Update playlist` - } - } + redirectTo: '/my-library/video-playlists/update/:videoPlaylistId', + pathMatch: 'full' }, { path: 'videos', - component: MyAccountVideosComponent, - data: { - meta: { - title: $localize`Account videos` - }, - reuse: { - enabled: true, - key: 'my-account-videos-list' - } - } + redirectTo: '/my-library/videos', + pathMatch: 'full' }, { path: 'video-imports', - component: MyAccountVideoImportsComponent, - data: { - meta: { - title: $localize`Account video imports` - } - } + redirectTo: '/my-library/video-imports', + pathMatch: 'full' }, { path: 'subscriptions', - component: MyAccountSubscriptionsComponent, - data: { - meta: { - title: $localize`Account subscriptions` - } - } + redirectTo: '/my-library/subscriptions', + pathMatch: 'full' }, { path: 'ownership', - component: MyAccountOwnershipComponent, - data: { - meta: { - title: $localize`Ownership changes` - } - } + redirectTo: '/my-library/ownership', + pathMatch: 'full' }, { path: 'blocklist/accounts', @@ -144,16 +97,8 @@ const myAccountRoutes: Routes = [ }, { path: 'history/videos', - component: MyAccountHistoryComponent, - data: { - meta: { - title: $localize`Videos history` - }, - reuse: { - enabled: true, - key: 'my-videos-history-list' - } - } + redirectTo: '/my-library/history/videos', + pathMatch: 'full' }, { path: 'notifications', diff --git a/client/src/app/+my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts index d3bf8d143..d6e9d1c15 100644 --- a/client/src/app/+my-account/my-account.component.ts +++ b/client/src/app/+my-account/my-account.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core' -import { AuthService, AuthUser, ScreenService, ServerService } from '@app/core' -import { ServerConfig } from '@shared/models' +import { AuthUser, ScreenService } from '@app/core' import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' @Component({ @@ -12,11 +11,7 @@ export class MyAccountComponent implements OnInit { menuEntries: TopMenuDropdownParam[] = [] user: AuthUser - private serverConfig: ServerConfig - constructor ( - private serverService: ServerService, - private authService: AuthService, private screenService: ScreenService ) { } @@ -25,67 +20,12 @@ export class MyAccountComponent implements OnInit { } ngOnInit (): void { - this.serverConfig = this.serverService.getTmpConfig() - this.serverService.getConfig() - .subscribe(config => this.serverConfig = config) - - this.user = this.authService.getUser() - - this.authService.userInformationLoaded.subscribe( - () => this.buildMenu() - ) - } - - isVideoImportEnabled () { - const importConfig = this.serverConfig.import.videos - - return importConfig.http.enabled || importConfig.torrent.enabled + this.buildMenu() } private buildMenu () { - const libraryEntries: TopMenuDropdownParam = { - label: $localize`My library`, - children: [ - { - label: $localize`My channels`, - routerLink: '/my-account/video-channels', - iconName: 'channel' - }, - { - label: $localize`My videos`, - routerLink: '/my-account/videos', - iconName: 'videos', - isDisplayed: () => this.user.canSeeVideosLink - }, - { - label: $localize`My playlists`, - routerLink: '/my-account/video-playlists', - iconName: 'playlists' - }, - { - label: $localize`My subscriptions`, - routerLink: '/my-account/subscriptions', - iconName: 'subscriptions' - }, - { - label: $localize`My history`, - routerLink: '/my-account/history/videos', - iconName: 'history' - } - ] - } - - if (this.isVideoImportEnabled()) { - libraryEntries.children.push({ - label: 'My imports', - routerLink: '/my-account/video-imports', - iconName: 'cloud-download', - isDisplayed: () => this.user.canSeeVideosLink - }) - } - - const miscEntries: TopMenuDropdownParam = { - label: $localize`Misc`, + const moderationEntries: TopMenuDropdownParam = { + label: $localize`Moderation`, children: [ { label: $localize`Muted accounts`, @@ -98,29 +38,25 @@ export class MyAccountComponent implements OnInit { iconName: 'peertube-x' }, { - label: $localize`My abuse reports`, + label: $localize`Abuse reports`, routerLink: '/my-account/abuses', iconName: 'flag' - }, - { - label: $localize`Ownership changes`, - routerLink: '/my-account/ownership', - iconName: 'download' } ] } this.menuEntries = [ { - label: $localize`My settings`, + label: $localize`Settings`, routerLink: '/my-account/settings' }, + { - label: $localize`My notifications`, + label: $localize`Notifications`, routerLink: '/my-account/notifications' }, - libraryEntries, - miscEntries + + moderationEntries ] } } diff --git a/client/src/app/+my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts index 6d21fff72..d3b6a9fa3 100644 --- a/client/src/app/+my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts @@ -6,21 +6,14 @@ import { NgModule } from '@angular/core' import { SharedAbuseListModule } from '@app/shared/shared-abuse-list' import { SharedFormModule } from '@app/shared/shared-forms' import { SharedGlobalIconModule } from '@app/shared/shared-icons' -import { SharedVideoLiveModule } from '@app/shared/shared-video-live' import { SharedMainModule } from '@app/shared/shared-main' import { SharedModerationModule } from '@app/shared/shared-moderation' import { SharedShareModal } from '@app/shared/shared-share-modal' 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 { MyAccountAbusesListComponent } from './my-account-abuses/my-account-abuses-list.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 { 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' @@ -28,14 +21,6 @@ import { MyAccountDangerZoneComponent } from './my-account-settings/my-account-d 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 { 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 { VideoChangeOwnershipComponent } from './my-account-videos/modals/video-change-ownership.component' -import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' import { MyAccountComponent } from './my-account.component' @NgModule({ @@ -50,14 +35,10 @@ import { MyAccountComponent } from './my-account.component' SharedMainModule, SharedFormModule, SharedModerationModule, - SharedVideoMiniatureModule, - SharedUserSubscriptionModule, - SharedVideoPlaylistModule, SharedUserInterfaceSettingsModule, SharedGlobalIconModule, SharedAbuseListModule, - SharedShareModal, - SharedVideoLiveModule + SharedShareModal ], declarations: [ @@ -67,26 +48,12 @@ import { MyAccountComponent } from './my-account.component' MyAccountProfileComponent, MyAccountChangeEmailComponent, - MyAccountVideosComponent, - - VideoChangeOwnershipComponent, - - MyAccountOwnershipComponent, - MyAccountAcceptOwnershipComponent, - MyAccountVideoImportsComponent, MyAccountDangerZoneComponent, - MyAccountSubscriptionsComponent, MyAccountBlocklistComponent, MyAccountAbusesListComponent, MyAccountServerBlocklistComponent, - MyAccountHistoryComponent, MyAccountNotificationsComponent, - MyAccountNotificationPreferencesComponent, - - MyAccountVideoPlaylistCreateComponent, - MyAccountVideoPlaylistUpdateComponent, - MyAccountVideoPlaylistsComponent, - MyAccountVideoPlaylistElementsComponent + MyAccountNotificationPreferencesComponent ], exports: [ diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts similarity index 79% rename from client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts rename to client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts index e2ea87fb8..1d0cbf246 100644 --- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts @@ -10,14 +10,13 @@ import { import { FormValidatorService } from '@app/shared/shared-forms' import { VideoChannelService } from '@app/shared/shared-main' import { VideoChannelCreate } from '@shared/models' -import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' +import { MyVideoChannelEdit } from './my-video-channel-edit' @Component({ - selector: 'my-account-video-channel-create', - templateUrl: './my-account-video-channel-edit.component.html', - styleUrls: [ './my-account-video-channel-edit.component.scss' ] + templateUrl: './my-video-channel-edit.component.html', + styleUrls: [ './my-video-channel-edit.component.scss' ] }) -export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelEdit implements OnInit { +export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements OnInit { error: string constructor ( @@ -30,10 +29,6 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE super() } - get instanceHost () { - return window.location.host - } - ngOnInit () { this.buildForm({ name: VIDEO_CHANNEL_NAME_VALIDATOR, @@ -59,7 +54,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE this.authService.refreshUserInformation() this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`) - this.router.navigate([ '/my-account', 'video-channels' ]) + this.router.navigate([ '/my-library', 'video-channels' ]) }, err => { diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html similarity index 95% rename from client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.html rename to client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html index 048d143cd..7e0c4e732 100644 --- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-edit.component.html +++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html @@ -1,7 +1,7 @@