aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-15 10:49:46 +0200
committerChocobozzz <me@florianbigard.com>2019-04-15 14:39:52 +0200
commit1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a (patch)
tree91a10310cdf924779527525d39f8eb7e09e4ba49 /client/src/app/shared/users
parent31b48aad478506d4214586f02792816efa968e4b (diff)
downloadPeerTube-1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a.tar.gz
PeerTube-1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a.tar.zst
PeerTube-1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a.zip
Add user adminFlags
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r--client/src/app/shared/users/user-notifications.component.html2
-rw-r--r--client/src/app/shared/users/user.model.ts11
2 files changed, 11 insertions, 2 deletions
diff --git a/client/src/app/shared/users/user-notifications.component.html b/client/src/app/shared/users/user-notifications.component.html
index d27f60158..d0d9d9f35 100644
--- a/client/src/app/shared/users/user-notifications.component.html
+++ b/client/src/app/shared/users/user-notifications.component.html
@@ -107,7 +107,7 @@
107 <my-global-icon iconName="users"></my-global-icon> 107 <my-global-icon iconName="users"></my-global-icon>
108 108
109 <div class="message"> 109 <div class="message">
110 Your instance has <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">a new follower</a> 110 Your instance has <a (click)="markAsRead(notification)" [routerLink]="notification.instanceFollowUrl">a new follower</a> ({{ notification.actorFollow.follower.host }})
111 <ng-container *ngIf="notification.actorFollow.state === 'pending'"> awaiting your approval</ng-container> 111 <ng-container *ngIf="notification.actorFollow.state === 'pending'"> awaiting your approval</ng-container>
112 </div> 112 </div>
113 </ng-container> 113 </ng-container>
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts
index c15f1de8c..e3ed2dfbd 100644
--- a/client/src/app/shared/users/user.model.ts
+++ b/client/src/app/shared/users/user.model.ts
@@ -2,15 +2,18 @@ import { hasUserRight, User as UserServerModel, UserNotificationSetting, UserRig
2import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type' 2import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type'
3import { Account } from '@app/shared/account/account.model' 3import { Account } from '@app/shared/account/account.model'
4import { Avatar } from '../../../../../shared/models/avatars/avatar.model' 4import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
5import { UserAdminFlag } from '@shared/models/users/user-flag.model'
5 6
6export class User implements UserServerModel { 7export class User implements UserServerModel {
7 id: number 8 id: number
8 username: string 9 username: string
9 email: string 10 email: string
10 emailVerified: boolean 11 emailVerified: boolean
11 role: UserRole
12 nsfwPolicy: NSFWPolicyType 12 nsfwPolicy: NSFWPolicyType
13 13
14 role: UserRole
15 roleLabel: string
16
14 webTorrentEnabled: boolean 17 webTorrentEnabled: boolean
15 autoPlayVideo: boolean 18 autoPlayVideo: boolean
16 videosHistoryEnabled: boolean 19 videosHistoryEnabled: boolean
@@ -21,6 +24,8 @@ export class User implements UserServerModel {
21 videoChannels: VideoChannel[] 24 videoChannels: VideoChannel[]
22 createdAt: Date 25 createdAt: Date
23 26
27 adminFlags?: UserAdminFlag
28
24 blocked: boolean 29 blocked: boolean
25 blockedReason?: string 30 blockedReason?: string
26 31
@@ -30,6 +35,7 @@ export class User implements UserServerModel {
30 this.id = hash.id 35 this.id = hash.id
31 this.username = hash.username 36 this.username = hash.username
32 this.email = hash.email 37 this.email = hash.email
38
33 this.role = hash.role 39 this.role = hash.role
34 40
35 this.videoChannels = hash.videoChannels 41 this.videoChannels = hash.videoChannels
@@ -40,6 +46,9 @@ export class User implements UserServerModel {
40 this.videosHistoryEnabled = hash.videosHistoryEnabled 46 this.videosHistoryEnabled = hash.videosHistoryEnabled
41 this.autoPlayVideo = hash.autoPlayVideo 47 this.autoPlayVideo = hash.autoPlayVideo
42 this.createdAt = hash.createdAt 48 this.createdAt = hash.createdAt
49
50 this.adminFlags = hash.adminFlags
51
43 this.blocked = hash.blocked 52 this.blocked = hash.blocked
44 this.blockedReason = hash.blockedReason 53 this.blockedReason = hash.blockedReason
45 54