From 905f34c827993d20c13b8d3b578d8dc109b8cc5f Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Wed, 8 Jan 2020 14:09:25 +0100 Subject: [PATCH] Support use of initials, add tests, move component - if there is no user.avatar, we show a user's initials - up to 3 characters unless there is no name or the name is 'Anonymous'. This is to support users who on the old alpha were allowed to be anonymous (do we still want to support this?) - Add test cases for :point_up: - Refactor to not use any styleguide components and move UserAvatar to generic directory --- webapp/components/AvatarMenu/AvatarMenu.vue | 4 +- webapp/components/User/User.vue | 4 +- .../components/UserAvatar/UserAvatar.spec.js | 68 ------------- .../generic/UserAvatar/UserAvatar.spec.js | 98 +++++++++++++++++++ .../generic}/UserAvatar/UserAvatar.vue | 50 +++++++--- webapp/pages/profile/_id/_slug.vue | 10 +- webapp/pages/settings/blocked-users.vue | 4 +- 7 files changed, 141 insertions(+), 97 deletions(-) delete mode 100644 webapp/components/UserAvatar/UserAvatar.spec.js create mode 100644 webapp/components/_new/generic/UserAvatar/UserAvatar.spec.js rename webapp/components/{ => _new/generic}/UserAvatar/UserAvatar.vue (51%) diff --git a/webapp/components/AvatarMenu/AvatarMenu.vue b/webapp/components/AvatarMenu/AvatarMenu.vue index 364a51258..97b937a88 100644 --- a/webapp/components/AvatarMenu/AvatarMenu.vue +++ b/webapp/components/AvatarMenu/AvatarMenu.vue @@ -11,7 +11,7 @@ " @click.prevent="toggleMenu" > - + @@ -49,7 +49,7 @@