From 79bd2632d62f2f600d663815fcc00a01ca981aa1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Oct 2018 16:56:14 +0200 Subject: Add user moderation in the account page --- client/src/app/shared/account/account.model.ts | 3 + .../shared/buttons/action-dropdown.component.html | 2 +- .../shared/buttons/action-dropdown.component.scss | 6 ++ .../shared/buttons/action-dropdown.component.ts | 1 + client/src/app/shared/moderation/index.ts | 2 +- .../shared/moderation/user-ban-modal.component.ts | 3 +- .../user-moderation-dropdown.component.html | 6 +- .../user-moderation-dropdown.component.ts | 69 ++++++++++++---------- client/src/app/shared/users/user.service.ts | 6 +- 9 files changed, 59 insertions(+), 39 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts index 5058e372f..42f2cfeaf 100644 --- a/client/src/app/shared/account/account.model.ts +++ b/client/src/app/shared/account/account.model.ts @@ -6,11 +6,14 @@ export class Account extends Actor implements ServerAccount { description: string nameWithHost: string + userId?: number + constructor (hash: ServerAccount) { super(hash) this.displayName = hash.displayName this.description = hash.description + this.userId = hash.userId this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host) } } diff --git a/client/src/app/shared/buttons/action-dropdown.component.html b/client/src/app/shared/buttons/action-dropdown.component.html index 8b7241379..8110e2515 100644 --- a/client/src/app/shared/buttons/action-dropdown.component.html +++ b/client/src/app/shared/buttons/action-dropdown.component.html @@ -1,5 +1,5 @@