aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2019-12-27 10:11:10 +0100
committerChocobozzz <chocobozzz@framasoft.org>2019-12-27 10:11:10 +0100
commitedf1a4e5204189f7c352c007232c2463158aa6d7 (patch)
tree57603f8edfa6b7862ff200f7a70ceb523d4b0d34 /client/src/app/shared
parent822c7e610d19e3320519a6ae5c90c01db971f03f (diff)
downloadPeerTube-edf1a4e5204189f7c352c007232c2463158aa6d7.tar.gz
PeerTube-edf1a4e5204189f7c352c007232c2463158aa6d7.tar.zst
PeerTube-edf1a4e5204189f7c352c007232c2463158aa6d7.zip
Add user moderation dropdown to comments
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/moderation/user-moderation-dropdown.component.html2
-rw-r--r--client/src/app/shared/moderation/user-moderation-dropdown.component.ts10
2 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/shared/moderation/user-moderation-dropdown.component.html b/client/src/app/shared/moderation/user-moderation-dropdown.component.html
index 7367a7e59..adb672322 100644
--- a/client/src/app/shared/moderation/user-moderation-dropdown.component.html
+++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.html
@@ -3,6 +3,6 @@
3 3
4 <my-action-dropdown 4 <my-action-dropdown
5 [actions]="userActions" [entry]="{ user: user, account: account }" 5 [actions]="userActions" [entry]="{ user: user, account: account }"
6 [buttonSize]="buttonSize" [placement]="placement" 6 [buttonSize]="buttonSize" [placement]="placement" [label]="label"
7 ></my-action-dropdown> 7 ></my-action-dropdown>
8</ng-container> \ No newline at end of file 8</ng-container> \ No newline at end of file
diff --git a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
index d82dc3d94..89f275a04 100644
--- a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts
@@ -21,6 +21,7 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
21 21
22 @Input() buttonSize: 'normal' | 'small' = 'normal' 22 @Input() buttonSize: 'normal' | 'small' = 'normal'
23 @Input() placement = 'left' 23 @Input() placement = 'left'
24 @Input() label: string
24 25
25 @Output() userChanged = new EventEmitter() 26 @Output() userChanged = new EventEmitter()
26 @Output() userDeleted = new EventEmitter() 27 @Output() userDeleted = new EventEmitter()
@@ -36,7 +37,6 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
36 private serverService: ServerService, 37 private serverService: ServerService,
37 private userService: UserService, 38 private userService: UserService,
38 private blocklistService: BlocklistService, 39 private blocklistService: BlocklistService,
39 private auth: AuthService,
40 private i18n: I18n 40 private i18n: I18n
41 ) { } 41 ) { }
42 42
@@ -243,20 +243,20 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
243 if (this.user && authUser.hasRight(UserRight.MANAGE_USERS) && authUser.canManage(this.user)) { 243 if (this.user && authUser.hasRight(UserRight.MANAGE_USERS) && authUser.canManage(this.user)) {
244 this.userActions.push([ 244 this.userActions.push([
245 { 245 {
246 label: this.i18n('Edit'), 246 label: this.i18n('Edit user'),
247 linkBuilder: ({ user }) => this.getRouterUserEditLink(user) 247 linkBuilder: ({ user }) => this.getRouterUserEditLink(user)
248 }, 248 },
249 { 249 {
250 label: this.i18n('Delete'), 250 label: this.i18n('Delete user'),
251 handler: ({ user }) => this.removeUser(user) 251 handler: ({ user }) => this.removeUser(user)
252 }, 252 },
253 { 253 {
254 label: this.i18n('Ban'), 254 label: this.i18n('Ban user'),
255 handler: ({ user }) => this.openBanUserModal(user), 255 handler: ({ user }) => this.openBanUserModal(user),
256 isDisplayed: ({ user }) => !user.blocked 256 isDisplayed: ({ user }) => !user.blocked
257 }, 257 },
258 { 258 {
259 label: this.i18n('Unban'), 259 label: this.i18n('Unban user'),
260 handler: ({ user }) => this.unbanUser(user), 260 handler: ({ user }) => this.unbanUser(user),
261 isDisplayed: ({ user }) => user.blocked 261 isDisplayed: ({ user }) => user.blocked
262 }, 262 },