-import { ServerService } from '../../../core'
-import { FormReactive } from '../../../shared'
-import { VideoResolution } from '../../../../../../shared/models/videos/video-resolution.enum'
-
-export abstract class UserEdit extends FormReactive {
- videoQuotaOptions = [
- { value: -1, label: 'Unlimited' },
- { value: 0, label: '0'},
- { value: 100 * 1024 * 1024, label: '100MB' },
- { value: 500 * 1024 * 1024, label: '500MB' },
- { value: 1024 * 1024 * 1024, label: '1GB' },
- { value: 5 * 1024 * 1024 * 1024, label: '5GB' },
- { value: 20 * 1024 * 1024 * 1024, label: '20GB' },
- { value: 50 * 1024 * 1024 * 1024, label: '50GB' }
- ]
+import { Directive, OnInit } from '@angular/core'
+import { ConfigService } from '@app/+admin/config/shared/config.service'
+import { AuthService, ScreenService, ServerService, User } from '@app/core'
+import { FormReactive } from '@app/shared/shared-forms'
+import { USER_ROLE_LABELS } from '@shared/core-utils/users'
+import { HTMLServerConfig, UserAdminFlag, UserRole, VideoResolution } from '@shared/models'
+import { SelectOptionsItem } from '../../../../types/select-options-item.model'
+
+@Directive()
+// eslint-disable-next-line @angular-eslint/directive-class-suffix
+export abstract class UserEdit extends FormReactive implements OnInit {
+ videoQuotaOptions: SelectOptionsItem[] = []
+ videoQuotaDailyOptions: SelectOptionsItem[] = []
+ username: string
+ user: User
+
+ roles: { value: string, label: string }[] = []
+
+ protected serverConfig: HTMLServerConfig