]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/users/user-edit/user-edit.ts
Support video quota on client
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / users / user-edit / user-edit.ts
index 76497c9b652894a36e74cfcadd579f27b9febe8b..2b47c685c905590773a2412e48241a66063b9df1 100644 (file)
@@ -1,11 +1,11 @@
 import { ServerService } from '../../../core'
 import { FormReactive } from '../../../shared'
-import { VideoResolution } from '../../../../../../shared/models/videos/video-resolution.enum'
+import { USER_ROLE_LABELS, VideoResolution } from '../../../../../../shared'
 
 export abstract class UserEdit extends FormReactive {
   videoQuotaOptions = [
     { value: -1, label: 'Unlimited' },
-    { value: 0, label: '0'},
+    { value: 0, label: '0' },
     { value: 100 * 1024 * 1024, label: '100MB' },
     { value: 500 * 1024 * 1024, label: '500MB' },
     { value: 1024 * 1024 * 1024, label: '1GB' },
@@ -14,6 +14,8 @@ export abstract class UserEdit extends FormReactive {
     { value: 50 * 1024 * 1024 * 1024, label: '50GB' }
   ]
 
+  roles = Object.keys(USER_ROLE_LABELS).map(key => ({ value: key, label: USER_ROLE_LABELS[key] }))
+
   protected abstract serverService: ServerService
   abstract isCreation (): boolean
   abstract getFormButtonTitle (): string