]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user.model.ts
Add ability to change email in client
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user.model.ts
index c15f1de8c5b24c1818abfcd9798bead76bf04d62..14d13959af129b7ac9716c8535e6ff580a7c601c 100644 (file)
@@ -2,15 +2,19 @@ import { hasUserRight, User as UserServerModel, UserNotificationSetting, UserRig
 import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type'
 import { Account } from '@app/shared/account/account.model'
 import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
+import { UserAdminFlag } from '@shared/models/users/user-flag.model'
 
 export class User implements UserServerModel {
   id: number
   username: string
   email: string
+  pendingEmail: string | null
   emailVerified: boolean
-  role: UserRole
   nsfwPolicy: NSFWPolicyType
 
+  role: UserRole
+  roleLabel: string
+
   webTorrentEnabled: boolean
   autoPlayVideo: boolean
   videosHistoryEnabled: boolean
@@ -21,6 +25,8 @@ export class User implements UserServerModel {
   videoChannels: VideoChannel[]
   createdAt: Date
 
+  adminFlags?: UserAdminFlag
+
   blocked: boolean
   blockedReason?: string
 
@@ -30,6 +36,7 @@ export class User implements UserServerModel {
     this.id = hash.id
     this.username = hash.username
     this.email = hash.email
+
     this.role = hash.role
 
     this.videoChannels = hash.videoChannels
@@ -40,6 +47,9 @@ export class User implements UserServerModel {
     this.videosHistoryEnabled = hash.videosHistoryEnabled
     this.autoPlayVideo = hash.autoPlayVideo
     this.createdAt = hash.createdAt
+
+    this.adminFlags = hash.adminFlags
+
     this.blocked = hash.blocked
     this.blockedReason = hash.blockedReason