diff --git a/client/src/app/+manage/manage-routing.module.ts b/client/src/app/+manage/manage-routing.module.ts
new file mode 100644
index 000000000..14ae4f1e0
--- /dev/null
+++ b/client/src/app/+manage/manage-routing.module.ts
@@ -0,0 +1,31 @@
+import { NgModule } from '@angular/core'
+import { RouterModule, Routes } from '@angular/router'
+import { VideoChannelCreateComponent } from './video-channel-edit/video-channel-create.component'
+import { VideoChannelUpdateComponent } from './video-channel-edit/video-channel-update.component'
+
+const manageRoutes: Routes = [
+ {
+ path: 'create',
+ component: VideoChannelCreateComponent,
+ data: {
+ meta: {
+ title: $localize`Create a new video channel`
+ }
+ }
+ },
+ {
+ path: 'update/:videoChannelName',
+ component: VideoChannelUpdateComponent,
+ data: {
+ meta: {
+ title: $localize`Update video channel`
+ }
+ }
+ }
+]
+
+@NgModule({
+ imports: [ RouterModule.forChild(manageRoutes) ],
+ exports: [ RouterModule ]
+})
+export class ManageRoutingModule {}
diff --git a/client/src/app/+manage/manage.module.ts b/client/src/app/+manage/manage.module.ts
new file mode 100644
index 000000000..28939ec5a
--- /dev/null
+++ b/client/src/app/+manage/manage.module.ts
@@ -0,0 +1,31 @@
+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 { SharedActorImageModule } from '../shared/shared-actor-image/shared-actor-image.module'
+import { SharedActorImageEditModule } from '@app/shared/shared-actor-image-edit'
+import { VideoChannelCreateComponent } from './video-channel-edit/video-channel-create.component'
+import { VideoChannelUpdateComponent } from './video-channel-edit/video-channel-update.component'
+import { ManageRoutingModule } from './manage-routing.module'
+
+@NgModule({
+ imports: [
+ ManageRoutingModule,
+ SharedMainModule,
+ SharedFormModule,
+ SharedGlobalIconModule,
+ SharedActorImageModule,
+ SharedActorImageEditModule
+ ],
+
+ declarations: [
+ VideoChannelCreateComponent,
+ VideoChannelUpdateComponent
+ ],
+
+ exports: [
+ ],
+
+ providers: []
+})
+export class ManageModule { }
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
similarity index 91%
rename from client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
rename to client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
index fd00720d8..5f8e0278e 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
@@ -12,13 +12,13 @@ import {
import { FormValidatorService } from '@app/shared/shared-forms'
import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
import { HttpStatusCode, VideoChannelCreate } from '@shared/models'
-import { MyVideoChannelEdit } from './my-video-channel-edit'
+import { VideoChannelEdit } from './video-channel-edit'
@Component({
- templateUrl: './my-video-channel-edit.component.html',
- styleUrls: [ './my-video-channel-edit.component.scss' ]
+ templateUrl: './video-channel-edit.component.html',
+ styleUrls: [ './video-channel-edit.component.scss' ]
})
-export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements OnInit {
+export class VideoChannelCreateComponent extends VideoChannelEdit implements OnInit {
error: string
videoChannel = new VideoChannel({})
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html b/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
new file mode 100644
index 000000000..3751747a9
--- /dev/null
+++ b/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
@@ -0,0 +1,96 @@
+
{{ error }}
+
+
\ No newline at end of file
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.scss b/client/src/app/+manage/video-channel-edit/video-channel-edit.component.scss
similarity index 96%
rename from client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.scss
rename to client/src/app/+manage/video-channel-edit/video-channel-edit.component.scss
index d8bfe71b6..d010d6277 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.scss
+++ b/client/src/app/+manage/video-channel-edit/video-channel-edit.component.scss
@@ -1,6 +1,10 @@
@use '_variables' as *;
@use '_mixins' as *;
+.margin-content {
+ padding-top: 20px;
+}
+
label {
font-weight: $font-regular;
font-size: 100%;
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.ts b/client/src/app/+manage/video-channel-edit/video-channel-edit.ts
similarity index 85%
rename from client/src/app/+my-library/+my-video-channels/my-video-channel-edit.ts
rename to client/src/app/+manage/video-channel-edit/video-channel-edit.ts
index 33bb90f14..963b4cbbe 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-edit.ts
@@ -1,7 +1,7 @@
import { FormReactive } from '@app/shared/shared-forms'
import { VideoChannel } from '@app/shared/shared-main'
-export abstract class MyVideoChannelEdit extends FormReactive {
+export abstract class VideoChannelEdit extends FormReactive {
videoChannel: VideoChannel
abstract isCreation (): boolean
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
similarity index 89%
rename from client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
rename to client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
index f9521b8b5..21b6167b2 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
@@ -2,7 +2,7 @@ import { Subscription } from 'rxjs'
import { HttpErrorResponse } from '@angular/common/http'
import { Component, OnDestroy, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
-import { AuthService, Notifier, ServerService } from '@app/core'
+import { AuthService, Notifier, RedirectService, ServerService } from '@app/core'
import { genericUploadErrorHandler } from '@app/helpers'
import {
VIDEO_CHANNEL_DESCRIPTION_VALIDATOR,
@@ -12,14 +12,14 @@ import {
import { FormValidatorService } from '@app/shared/shared-forms'
import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
import { HTMLServerConfig, VideoChannelUpdate } from '@shared/models'
-import { MyVideoChannelEdit } from './my-video-channel-edit'
+import { VideoChannelEdit } from './video-channel-edit'
@Component({
selector: 'my-video-channel-update',
- templateUrl: './my-video-channel-edit.component.html',
- styleUrls: [ './my-video-channel-edit.component.scss' ]
+ templateUrl: './video-channel-edit.component.html',
+ styleUrls: [ './video-channel-edit.component.scss' ]
})
-export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements OnInit, OnDestroy {
+export class VideoChannelUpdateComponent extends VideoChannelEdit implements OnInit, OnDestroy {
error: string
videoChannel: VideoChannel
@@ -34,7 +34,8 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
private router: Router,
private route: ActivatedRoute,
private videoChannelService: VideoChannelService,
- private serverService: ServerService
+ private serverService: ServerService,
+ private redirectService: RedirectService
) {
super()
}
@@ -50,9 +51,9 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
})
this.paramsSub = this.route.params.subscribe(routeParams => {
- const videoChannelId = routeParams['videoChannelId']
+ const videoChannelName = routeParams['videoChannelName']
- this.videoChannelService.getVideoChannel(videoChannelId)
+ this.videoChannelService.getVideoChannel(videoChannelName)
.subscribe({
next: videoChannelToUpdate => {
this.videoChannel = videoChannelToUpdate
@@ -95,7 +96,7 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
this.notifier.success($localize`Video channel ${videoChannelUpdate.displayName} updated.`)
- this.router.navigate([ '/my-library', 'video-channels' ])
+ this.redirectService.redirectToPreviousRoute([ '/c', this.videoChannel.name ])
},
error: err => {
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html
deleted file mode 100644
index 2910dffad..000000000
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-edit.component.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-{{ error }}
-
-
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels-routing.module.ts b/client/src/app/+my-library/+my-video-channels/my-video-channels-routing.module.ts
index 6b8efad0b..b4962ed35 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channels-routing.module.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels-routing.module.ts
@@ -1,7 +1,5 @@
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
-import { MyVideoChannelUpdateComponent } from './my-video-channel-update.component'
-import { MyVideoChannelCreateComponent } from './my-video-channel-create.component'
import { MyVideoChannelsComponent } from './my-video-channels.component'
const myVideoChannelsRoutes: Routes = [
@@ -16,21 +14,11 @@ const myVideoChannelsRoutes: Routes = [
},
{
path: 'create',
- component: MyVideoChannelCreateComponent,
- data: {
- meta: {
- title: $localize`Create a new video channel`
- }
- }
+ redirectTo: '/manage/create'
},
{
- path: 'update/:videoChannelId',
- component: MyVideoChannelUpdateComponent,
- data: {
- meta: {
- title: $localize`Update video channel`
- }
- }
+ path: 'update/:videoChannelName',
+ redirectTo: '/manage/update/:videoChannelName'
}
]
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
index bbe583971..77947315b 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html
@@ -9,7 +9,7 @@