From ed56ad1193bb5bb0a81fb843a11eb90d3fed9861 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 26 Apr 2018 10:03:40 +0200 Subject: [PATCH] Add ability to update the user display name/description --- client/src/app/menu/menu.component.html | 6 +- .../my-account-details/index.ts | 1 - .../my-account-profile/index.ts | 1 + .../my-account-profile.component.html | 24 +++++++ .../my-account-profile.component.scss | 23 +++++++ .../my-account-profile.component.ts | 65 +++++++++++++++++++ .../my-account-settings.component.html | 9 ++- .../my-account-video-settings/index.ts | 1 + .../my-account-video-settings.component.html} | 0 .../my-account-video-settings.component.scss} | 0 .../my-account-video-settings.component.ts} | 10 +-- .../app/my-account/my-account.component.html | 2 +- .../src/app/my-account/my-account.module.ts | 6 +- .../app/shared/forms/form-validators/user.ts | 24 +++++++ client/src/app/shared/users/user.service.ts | 4 +- server/controllers/api/users.ts | 1 + server/helpers/custom-validators/users.ts | 5 ++ server/initializers/constants.ts | 3 +- server/middlewares/validators/users.ts | 3 +- .../tests/api/users/users-multiple-servers.ts | 20 +++++- server/tests/api/users/users.ts | 23 +++++++ server/tests/utils/users/users.ts | 2 + shared/models/users/user-update-me.model.ts | 1 + 23 files changed, 215 insertions(+), 19 deletions(-) delete mode 100644 client/src/app/my-account/my-account-settings/my-account-details/index.ts create mode 100644 client/src/app/my-account/my-account-settings/my-account-profile/index.ts create mode 100644 client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.html create mode 100644 client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.scss create mode 100644 client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.ts create mode 100644 client/src/app/my-account/my-account-settings/my-account-video-settings/index.ts rename client/src/app/my-account/my-account-settings/{my-account-details/my-account-details.component.html => my-account-video-settings/my-account-video-settings.component.html} (100%) rename client/src/app/my-account/my-account-settings/{my-account-details/my-account-details.component.scss => my-account-video-settings/my-account-video-settings.component.scss} (100%) rename client/src/app/my-account/my-account-settings/{my-account-details/my-account-details.component.ts => my-account-video-settings/my-account-video-settings.component.ts} (81%) diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html index 6e8189371..d1488ec3c 100644 --- a/client/src/app/menu/menu.component.html +++ b/client/src/app/menu/menu.component.html @@ -5,7 +5,7 @@
- {{ user.username }} + {{ user.account?.displayName }}
{{ user.email }}
@@ -14,8 +14,8 @@