+
OTHER INFORMATION
@@ -298,11 +328,11 @@
diff --git a/client/src/app/+admin/config/pages/admin-config-information.component.ts b/client/src/app/+admin/config/pages/admin-config-information.component.ts
new file mode 100644
index 000000000..b0f35be94
--- /dev/null
+++ b/client/src/app/+admin/config/pages/admin-config-information.component.ts
@@ -0,0 +1,299 @@
+import { CommonModule } from '@angular/common'
+import { HttpErrorResponse } from '@angular/common/http'
+import { Component, OnInit, inject } from '@angular/core'
+import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { ActivatedRoute, RouterLink } from '@angular/router'
+import { CanComponentDeactivate, Notifier, ServerService } from '@app/core'
+import { genericUploadErrorHandler } from '@app/helpers'
+import { URL_VALIDATOR } from '@app/shared/form-validators/common-validators'
+import {
+ ADMIN_EMAIL_VALIDATOR,
+ INSTANCE_NAME_VALIDATOR,
+ INSTANCE_SHORT_DESCRIPTION_VALIDATOR
+} from '@app/shared/form-validators/custom-config-validators'
+import {
+ BuildFormArgumentTyped,
+ FormDefaultTyped,
+ FormReactiveErrorsTyped,
+ FormReactiveMessagesTyped
+} from '@app/shared/form-validators/form-validator.model'
+import { CustomMarkupService } from '@app/shared/shared-custom-markup/custom-markup.service'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
+import { SelectRadioComponent } from '@app/shared/shared-forms/select/select-radio.component'
+import { InstanceService } from '@app/shared/shared-main/instance/instance.service'
+import { maxBy } from '@peertube/peertube-core-utils'
+import { ActorImage, CustomConfig, HTMLServerConfig, NSFWPolicyType, VideoConstant } from '@peertube/peertube-models'
+import { SelectOptionsItem } from 'src/types/select-options-item.model'
+import { ActorAvatarEditComponent } from '../../../shared/shared-actor-image-edit/actor-avatar-edit.component'
+import { ActorBannerEditComponent } from '../../../shared/shared-actor-image-edit/actor-banner-edit.component'
+import { CustomMarkupHelpComponent } from '../../../shared/shared-custom-markup/custom-markup-help.component'
+import { MarkdownTextareaComponent } from '../../../shared/shared-forms/markdown-textarea.component'
+import { PeertubeCheckboxComponent } from '../../../shared/shared-forms/peertube-checkbox.component'
+import { SelectCheckboxComponent } from '../../../shared/shared-forms/select/select-checkbox.component'
+import { HelpComponent } from '../../../shared/shared-main/buttons/help.component'
+import { PeerTubeTemplateDirective } from '../../../shared/shared-main/common/peertube-template.directive'
+import { AdminConfigService } from '../shared/admin-config.service'
+import { AdminSaveBarComponent } from '../shared/admin-save-bar.component'
+
+type Form = {
+ admin: FormGroup<{
+ email: FormControl
+ }>
+
+ contactForm: FormGroup<{
+ enabled: FormControl
+ }>
+
+ instance: FormGroup<{
+ name: FormControl
+ shortDescription: FormControl
+ description: FormControl
+ categories: FormControl
+ languages: FormControl
+ serverCountry: FormControl
+
+ support: FormGroup<{
+ text: FormControl
+ }>
+
+ social: FormGroup<{
+ externalLink: FormControl
+ mastodonLink: FormControl
+ blueskyLink: FormControl
+ }>
+
+ isNSFW: FormControl
+ defaultNSFWPolicy: FormControl
+
+ terms: FormControl
+ codeOfConduct: FormControl
+ moderationInformation: FormControl
+ administrator: FormControl
+ creationReason: FormControl
+ maintenanceLifetime: FormControl
+ businessModel: FormControl
+ hardwareInformation: FormControl
+ }>
+}
+
+@Component({
+ selector: 'my-admin-config-information',
+ templateUrl: './admin-config-information.component.html',
+ styleUrls: [ './admin-config-common.scss' ],
+ imports: [
+ FormsModule,
+ ReactiveFormsModule,
+ ActorAvatarEditComponent,
+ ActorBannerEditComponent,
+ SelectRadioComponent,
+ CommonModule,
+ CustomMarkupHelpComponent,
+ MarkdownTextareaComponent,
+ SelectCheckboxComponent,
+ RouterLink,
+ PeertubeCheckboxComponent,
+ PeerTubeTemplateDirective,
+ HelpComponent,
+ AdminSaveBarComponent
+ ]
+})
+export class AdminConfigInformationComponent implements OnInit, CanComponentDeactivate {
+ private customMarkup = inject(CustomMarkupService)
+ private notifier = inject(Notifier)
+ private instanceService = inject(InstanceService)
+ private server = inject(ServerService)
+ private route = inject(ActivatedRoute)
+ private formReactiveService = inject(FormReactiveService)
+ private adminConfigService = inject(AdminConfigService)
+
+ form: FormGroup
@@ -193,7 +195,7 @@
formControlName="threads"
[clearable]="false"
>
-
{{ formErrors().live.transcoding.threads }}
+
{{ formErrors.live.transcoding.threads }}
diff --git a/client/src/app/+admin/config/pages/admin-config-live.component.ts b/client/src/app/+admin/config/pages/admin-config-live.component.ts
new file mode 100644
index 000000000..bdf3271fa
--- /dev/null
+++ b/client/src/app/+admin/config/pages/admin-config-live.component.ts
@@ -0,0 +1,224 @@
+import { CommonModule } from '@angular/common'
+import { Component, OnInit, inject } from '@angular/core'
+import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'
+import { ActivatedRoute, RouterLink } from '@angular/router'
+import { CanComponentDeactivate, ServerService } from '@app/core'
+import {
+ MAX_INSTANCE_LIVES_VALIDATOR,
+ MAX_LIVE_DURATION_VALIDATOR,
+ MAX_USER_LIVES_VALIDATOR,
+ TRANSCODING_MAX_FPS_VALIDATOR,
+ TRANSCODING_THREADS_VALIDATOR
+} from '@app/shared/form-validators/custom-config-validators'
+import {
+ BuildFormArgumentTyped,
+ FormDefaultTyped,
+ FormReactiveErrorsTyped,
+ FormReactiveMessagesTyped
+} from '@app/shared/form-validators/form-validator.model'
+import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
+import { CustomConfig } from '@peertube/peertube-models'
+import { SelectOptionsItem } from 'src/types/select-options-item.model'
+import { PeertubeCheckboxComponent } from '../../../shared/shared-forms/peertube-checkbox.component'
+import { SelectCustomValueComponent } from '../../../shared/shared-forms/select/select-custom-value.component'
+import { SelectOptionsComponent } from '../../../shared/shared-forms/select/select-options.component'
+import { PeerTubeTemplateDirective } from '../../../shared/shared-main/common/peertube-template.directive'
+import { AdminConfigService, FormResolutions, ResolutionOption } from '../shared/admin-config.service'
+import { AdminSaveBarComponent } from '../shared/admin-save-bar.component'
+
+type Form = {
+ live: FormGroup<{
+ enabled: FormControl
+ allowReplay: FormControl
+ latencySetting: FormGroup<{
+ enabled: FormControl
+ }>
+ maxInstanceLives: FormControl
+ maxUserLives: FormControl
+ maxDuration: FormControl
+
+ transcoding: FormGroup<{
+ enabled: FormControl
+
+ fps: FormGroup<{
+ max: FormControl
+ }>
+
+ resolutions: FormGroup
+ alwaysTranscodeOriginalResolution: FormControl
+
+ remoteRunners: FormGroup<{
+ enabled: FormControl
+ }>
+
+ threads: FormControl
+ profile: FormControl
+ }>
+ }>
+}
+
+@Component({
+ selector: 'my-admin-config-live',
+ templateUrl: './admin-config-live.component.html',
+ styleUrls: [ './admin-config-common.scss' ],
+ imports: [
+ CommonModule,
+ FormsModule,
+ ReactiveFormsModule,
+ PeertubeCheckboxComponent,
+ PeerTubeTemplateDirective,
+ SelectOptionsComponent,
+ RouterLink,
+ SelectCustomValueComponent,
+ AdminSaveBarComponent
+ ]
+})
+export class AdminConfigLiveComponent implements OnInit, CanComponentDeactivate {
+ private configService = inject(AdminConfigService)
+ private server = inject(ServerService)
+ private route = inject(ActivatedRoute)
+ private formReactiveService = inject(FormReactiveService)
+ private adminConfigService = inject(AdminConfigService)
+
+ form: FormGroup