diff --git a/test/api/unit/libs/highlightMentions.test.js b/test/api/unit/libs/highlightMentions.test.js index 30fb34c72c..266bfbaaa6 100644 --- a/test/api/unit/libs/highlightMentions.test.js +++ b/test/api/unit/libs/highlightMentions.test.js @@ -47,6 +47,12 @@ describe('highlightMentions', () => { expect(result[0]).to.equal('[@user-dash](/profile/444): message [@user_underscore](/profile/555)'); }); + it('highlights users with case-insensitive matching', async () => { + const text = '@USER: message @User2 @USER3'; + const result = await highlightMentions(text); + expect(result[0]).to.equal('[@USER](/profile/111): message [@User2](/profile/222) [@USER3](/profile/333)'); + }); + it('doesn\'t highlight nonexisting users', async () => { const text = '@nouser message'; const result = await highlightMentions(text); diff --git a/test/api/v3/integration/chat/POST-chat.test.js b/test/api/v3/integration/chat/POST-chat.test.js index ba4ac00ed0..f16cbea6f9 100644 --- a/test/api/v3/integration/chat/POST-chat.test.js +++ b/test/api/v3/integration/chat/POST-chat.test.js @@ -238,6 +238,18 @@ describe('POST /chat', () => { expect(groupMessages[0].id).to.exist; }); + it('creates a chat with case-insensitive mentions', async () => { + const originalUsername = member.auth.local.username; + const uppercaseUsername = originalUsername.toUpperCase(); + const messageWithMentions = `hi @${uppercaseUsername}`; + const newMessage = await user.post(`/groups/${groupWithChat._id}/chat`, { message: messageWithMentions }); + const groupMessages = await user.get(`/groups/${groupWithChat._id}/chat`); + + expect(newMessage.message.id).to.exist; + expect(newMessage.message.text).to.include(`[@${uppercaseUsername}](/profile/${member._id})`); + expect(groupMessages[0].id).to.exist; + }); + it('creates a chat with a max length of 3000 chars', async () => { const veryLongMessage = ` 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789. diff --git a/website/client/src/assets/images/gifts_bg.svg b/website/client/src/assets/images/gifts_bg.svg new file mode 100644 index 0000000000..3f77f4d3ee --- /dev/null +++ b/website/client/src/assets/images/gifts_bg.svg @@ -0,0 +1,9 @@ + diff --git a/website/client/src/assets/images/gifts_start.svg b/website/client/src/assets/images/gifts_start.svg new file mode 100644 index 0000000000..72cc108b69 --- /dev/null +++ b/website/client/src/assets/images/gifts_start.svg @@ -0,0 +1,37 @@ + diff --git a/website/client/src/assets/scss/button.scss b/website/client/src/assets/scss/button.scss index 2777f81bdf..1ee69d8d19 100644 --- a/website/client/src/assets/scss/button.scss +++ b/website/client/src/assets/scss/button.scss @@ -30,12 +30,23 @@ cursor: default; color: $gray-200; opacity: 1; - box-shadow: none; - background-color: $gray-700; + background-color: transparent; border: 2px solid transparent; - + box-shadow: + 0 1px 3px 0 rgba($black, 0.12), + 0 1px 2px 0 rgba($black, 0.24); + font-family: 'Roboto', sans-serif; + font-weight: 700; + font-size: 14px; + line-height: 24px; + padding: 4px 12px; + min-height: 32px; + max-height: 32px; + gap: 8px; + border-radius: 4px; + .svg { - color: $gray-300; + color: $gray-200; } } diff --git a/website/client/src/assets/svg/close-white.svg b/website/client/src/assets/svg/close-white.svg new file mode 100644 index 0000000000..15b3087598 --- /dev/null +++ b/website/client/src/assets/svg/close-white.svg @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/website/client/src/assets/svg/for-css/end_challenge_badge.svg b/website/client/src/assets/svg/for-css/end_challenge_badge.svg new file mode 100644 index 0000000000..e7beb8115a --- /dev/null +++ b/website/client/src/assets/svg/for-css/end_challenge_badge.svg @@ -0,0 +1,9 @@ + diff --git a/website/client/src/assets/svg/for-css/orange100_red100_yellow100_gems.svg b/website/client/src/assets/svg/for-css/orange100_red100_yellow100_gems.svg new file mode 100644 index 0000000000..1b9f48d5a5 --- /dev/null +++ b/website/client/src/assets/svg/for-css/orange100_red100_yellow100_gems.svg @@ -0,0 +1,29 @@ + diff --git a/website/client/src/assets/svg/for-css/purple200_green10_blue100_gems.svg b/website/client/src/assets/svg/for-css/purple200_green10_blue100_gems.svg new file mode 100644 index 0000000000..7c38566dc4 --- /dev/null +++ b/website/client/src/assets/svg/for-css/purple200_green10_blue100_gems.svg @@ -0,0 +1,29 @@ + diff --git a/website/client/src/components/achievements/onboardingComplete.vue b/website/client/src/components/achievements/onboardingComplete.vue index b7fb595191..6b8ccedaf4 100644 --- a/website/client/src/components/achievements/onboardingComplete.vue +++ b/website/client/src/components/achievements/onboardingComplete.vue @@ -117,7 +117,7 @@ export default { closeWithAction () { this.close(); setTimeout(() => { - this.$router.push({ name: 'achievements' }); + this.$router.push(`/profile/${this.$store.state.user.data._id}#achievements`); }, 200); }, }, diff --git a/website/client/src/components/challenges/challengeDetail.vue b/website/client/src/components/challenges/challengeDetail.vue index f6d146249f..38f78e6158 100644 --- a/website/client/src/components/challenges/challengeDetail.vue +++ b/website/client/src/components/challenges/challengeDetail.vue @@ -72,32 +72,40 @@