Commit Graph

110 Commits

Author SHA1 Message Date
Phillip Thelen
9d16ab7dba Sign in with Apple (#11793)
* add date check

* achievements modal polishing

* refresh private-messages page when you are already on it

* add countbadge knob to change the example

* fix lint

* typos

* typos

* typos

* add toggle for achievements categories

* typo

* fix test

* fix edit avatar modal cannot be closed

* WIP(settings): subscriber page improvements

* WIP(subscriptions): more design build-out

* fix(css): disabled button styles

* fix(css): better Amazon targeting

* fix hide tooltip + align header correctly

* disable perfect scroll

* load messages on refresh event

* fix header label + conversation actions not breaking layout on hover

* WIP(g1g1): notif

* WIP(g1g1): notif cont'd

* fix(test): snowball change

* fix(event): feature NYE card

* chore(sprites): compile

* fix(bgs): include TT required field

* add gifting banner to the max height calculation

* chore(event): enable winter customizations

* WIP(gifting): partial modal implementation

* feat(gifting): select giftee modal

* fix(gifting): notification order, modal dismiss

* Begin implementing sign in with apple

# Conflicts:
#	package-lock.json
#	website/common/script/constants.js
#	website/server/libs/auth/social.js
#	website/server/models/user/schema.js

* Add apple sign in button to website

* fix lint errors

* fix config json

* fix(modals): correct some repops

* fix(gifting): style updates

* fix(buy): modal style changes

* fix(modals): also clean out "prev"

* Attempt workaround for sign in with apple on android

* temporarily log everything as error

* refactor(modals): hide in dismiss event

* fix temporary test failure

* changes to sign in with apple

* fix: first batch of layout issues for private messages + auto sizing textarea

* fix(modals): new dismiss logic

* fix(modals): new dismiss no go??

* Only use email scope

* print debugging

* .

* ..

* ...

* username second line - open profile on face-avatar/conversation name - fix textarea height

* temporarily disable apple auth and just return data for debugging

* Hopefully this works

* .....

* WIP(subscription): unsubscribed state

* .

* ..

* MAYBE THIS ACTUALLY WORKS???

* Implement apple sign in

* fix some urls

* fix urls

* fix redirect and auth

* attempt to also request name

* fix lint error

* WIP(subscription): partial subscribed

* chore(sprites): compile

* Change approach so that it actually works

* fix config error

* fix lint errors

* Fix

* fix lint error

* lint error

* WIP(subscription): finish subscribed

* refresh on sync

* new "you dont have any messages" style + changed min textarea height

* new conversationItem style / layout

* reset message unread on reload

* chore(npm): update package-locks

* fix styles / textarea height

* feat(subscription): revised sub page RC

* list optOut / chatRevoked informations for each conversation + show why its disabled

* Improve apple redirect view

* Fix apple icon on group task registration page

* WIP(adventure): prereqs

* Block / Unblock - correct disabled states - $gray-200 instead of 300/400

* canReceive not checking chatRevoked

* fix: faceAvatar / userLink open the selected conversation user

* check if the target user is blocking the logged-in user

* fix(subs): style tweaks

* fix(profiles): short circuit contributor
Attempted fix for #11830

* chore(sprites): compile

* fix(content): missing potion data

* fix(content): missing string

* WIP(drops): new modal

* fix(subs): moar style tweaks

* check if blocks is undefined

* max-height instead of height

* fix "no messages" state + canReceive on a new conversation

* WIP(adventure): analytics fixes etc

* Improve apple signin handling

* fixed conversations width (280px on max 768 width page)

* feat(adventure): random egg+potion on 2nd task

* fix(lint): noworkies

* fix(modal): correctly construct classes

* fix(tests): expectations and escape

* Fix typo

* use base url from env variables

* fix lint

* call autosize after message is sent

* fix urls

* always verify token

* throw error when social auth could not retrieve id

* Store emails correctly for apple auth

* Retrieve name when authenticating through apple

* Fix lint errors

* fix all lint errors

* fix(content): missing strings

* Revert "always verify token"

This reverts commit 8ac40c76bf.

# Conflicts:
#	website/server/libs/auth/social.js

* Correctly load name

* remove extra changes

* remove extra logger call

* reset package and package-lock

* add back missing packages

* use name from apple

* add support for multiple apple public keys

* add some unit and integration tests

* add apple auth integration test

* tweak social signup buttons

* pixel pushing

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
Co-authored-by: negue <eugen.bolz@gmail.com>
Co-authored-by: Phillip Thelen <phillip@habitica.com>
2020-04-08 18:44:30 +02:00
Matteo Pagliazzi
28bc843779 Misc Webhooks Fixes (#12038)
* fix(webhooks): don t parse response as json

* upgrade got to version 10

* remove old header

* fix tests

* fix email auth

* add migration

* update email error

* split migration in two
2020-04-02 21:48:47 +02:00
Matteo Pagliazzi
e92ff9737a Automatically Logout Banned Users (#12037)
* wip

* logout banned users, fix and refactor language library and middleware

* req.locals -> res.locals

* fix tests

* redirect to login page
2020-04-02 21:46:01 +02:00
Matteo Pagliazzi
3fffe7aa5c Content API Cache improvements (#12020)
* content api improvements

* add content cache to build step

* add tests
2020-03-29 16:15:23 +02:00
Matteo Pagliazzi
9ab9b0f553 IP Blocking (#12015)
* start implementing an ip blocker

* fix comments and add to list of middlewares

* fix code, comment code and improve response

* wip tests

* fix order

* fixes and tests
2020-03-28 15:44:54 +01:00
Matteo Pagliazzi
2cd0ed5973 fix(logger): improve logging and make sure no data is lost 2020-03-24 20:29:31 +01:00
Matteo Pagliazzi
3458d89c1d fix(webhook tests): do not rely on toLocaleString when checking for two dates to be close 2020-03-24 12:28:15 +01:00
Matteo Pagliazzi
9dcce382a3 fix(webhook tests): more reliable date test 2020-03-23 17:17:27 +01:00
Matteo Pagliazzi
f8aa756d52 Disable Failing Webhooks (#11966)
* todo comment

* add failures field to webhooks and sanitize

* implement logic

* use update instead of save

* specify timeout and maximum number of retries

* add tests
2020-03-20 23:26:21 +01:00
Matteo Pagliazzi
039e7d40b8 fix(tests): do not rely on emails order when user joins group plan 2020-03-18 23:31:01 +01:00
Matteo Pagliazzi
db1bda1bcd tests(message model): add unit tests 2020-03-04 17:51:14 +01:00
Matteo Pagliazzi
8300464cfc Merge pull request #11887 from HabitRPG/stackdriver-winston
Logs improvements
2020-03-02 11:05:15 +01:00
Matteo Pagliazzi
90f88c42f6 remove console.log 2020-03-02 10:26:21 +01:00
Matteo Pagliazzi
c2a79e1d7c fix tests 2020-03-01 22:37:29 +01:00
Matteo Pagliazzi
c5208f0ef6 fix tags 2020-03-01 22:21:53 +01:00
Matteo Pagliazzi
979d0c519d add final tests for push devices and notifications 2020-03-01 22:10:11 +01:00
Matteo Pagliazzi
3f5ee32684 fix invalid push devices 2020-03-01 21:49:52 +01:00
Matteo Pagliazzi
6deee0ffc8 notifications tests 2020-03-01 21:29:57 +01:00
Matteo Pagliazzi
a11e4d0512 fix lint 2020-03-01 20:53:33 +01:00
Matteo Pagliazzi
118e3580d6 refactor notifications cleanup 2020-03-01 20:06:24 +01:00
Matteo Pagliazzi
15e6cef7c4 fix tests 2020-02-29 17:40:46 +01:00
Matteo Pagliazzi
6543a43854 wip test 2020-02-27 12:16:53 +01:00
Phillip Thelen
0648f5d412 Prevent server from cancelling still active subs (#11795)
* Prevent server from cancelling still active subs

* Allow subs to be cancelled before end date

* fix test

* fix test
2020-02-11 12:58:11 -06:00
Matteo Pagliazzi
ca69085e8c Merge pull request #11549 from Nikosmonaut/bugfix-11522_group_plan_tags
Fix can not remove group tag
2020-01-19 12:29:04 +01:00
Matteo Pagliazzi
fa9f962e45 Merge pull request #11707 from cvuorinen/11682-quest-invitation-webhook
Quest invitation webhook
2020-01-14 13:06:31 +01:00
Carl Vuorinen
e6edaca11d Add questInvited option to webhook model 2020-01-10 20:27:50 +02:00
Sabe Jones
fe9af263dd Merge branch 'release' into develop 2020-01-07 11:48:09 -06:00
Sabe Jones
f6ecc1cb84 chore(promo): end g1g1 2020-01-07 10:13:32 -06:00
nikosmonaut
8c6938022c Add test for leaving group
After leaving group the previous associated tag should no more be bound
to this group.
2019-12-30 15:22:11 +01:00
Yo
04a9c97393 Fix Typos (#11644)
* Fix Typos

* Fix More Typos
2019-12-23 17:52:55 +01:00
Sabe Jones
c36f01773f Merge branch 'release' into develop 2019-12-17 14:50:29 -06:00
Sabe Jones
ae26cc3244 fix(test): expect two PMs during sub promo 2019-12-17 14:22:43 -06:00
Sabe Jones
9fe28c6d51 fix(g1g1): send promo confirmation to self 2019-12-17 14:16:56 -06:00
Sabe Jones
34983f1221 feat(event): turn on G1G1 2019 2019-12-17 14:04:55 -06:00
Matteo Pagliazzi
8f5a0cfe79 Onboarding guide and initial achievements refactoring (#11536)
* add achievements to user

* add placeholder strings

* add to achievements to common script

* add onboarding achievements category

* add notifications

* more notifications

* award achievements

* wip notification panel

* add achievements icons and copy

* do not count onboarding tasks for the created task achievement

* add notes

* sprites, fixes and completion status and reward

* add onboarding panel

* add toggle

* fix toggle size

* fix tests

* fix typo

* add notification

* start adding modal

* fix remove button positionin, timeout, progress bar

* modal + fixes

* disable broken social links from level up modal

* change toggle icon color on hover

* add border bottom to onboarding guide panel

* add collapse animation

* expanded onboarding on first open

* onboarding: flip toggle colors

* onboarding: show progress bar all the time

* onboarding: fix panel closing on click

* onboarding modal: add close icon and fix padding

* wip: add migration for existing users

* fix titles in guide

* fix achievements copy

* do not award completed task achievement when direction is down

* start implementing new achievements

* start migrating client

* remove social links from achievements modals

* prevent skipping tutorial + fix achievement notification

* sync fixes

* start redesign achievement modal

* misc fixes to achievements, polish generic achievement modal and hatched pet modal

* add special badge for onboarding

* fix badge condition

* modals fixes

* hatched pet modal: add close icon

* fix badge typo

* fix justin button

* new scrolling behavior for dropdowns

* fix strings capitalization

* add common tests

* add api unit tests

* add date check

* achievements modal polishing

* typos

* add toggle for achievements categories

* typo

* fix test

* fix edit avatar modal cannot be closed

* finish migration and correct launch date

* fix migration

* migration fixes

* fix tests
2019-12-16 17:20:47 +01:00
Carl Vuorinen
cd90a281c2 Prevent duplicate challenge tasks (#11502)
* Implement atomic user challenges update

Prevents multiple concurrent requests from passing through
Fixes #11295

* Move user challenges update to separate method

* Rename challenge syncToUser to syncTasksToUser

Now that adding the challenge to user is separated, this methods main purpose is to sync the tasks

* Fix lint errors
2019-12-13 14:14:57 +01:00
Sabe Jones
1cd1d45410 fix(test): independent notif check 2019-12-04 19:37:26 +00:00
Sabe Jones
9a13594cca fix(test): independent notif check 2019-12-04 19:36:50 +00:00
Phillip Thelen
b108b047cd Improvements and fixes for push notifications (#11507)
* Strip markdown from push notifications

* Revert "Strip markdown from push notifications"

This reverts commit 4741e584c6.

* correctly set type for mention push notifications

* Add unformattedText field to chat messages

* fiix lint errors

* Add check that markdown formatting is stripped from messages

* Add check for markdown formatting in messages.
2019-11-29 18:46:26 +01:00
Sabe Jones
6395070eb6 Award mystery items at cron (#11519)
* feat(subscriber): award mystery items at cron

* fix(mystery): backfill skipped months

* fix(mystery): adjust subscriber text

* fix(mystery): correct moment logic
and remove irrelevant tests

* fix(mystery): build set one month in advance

* fix(mystery): don't add empty set to Time Travelers

* refactor(mystery): readability
2019-11-27 12:10:56 -06:00
Matteo Pagliazzi
3e12774e40 Merge branch 'develop' into client-monorepo 2019-10-18 20:26:12 +02:00
Matteo Pagliazzi
17b1365853 Improve @mention handling (#10872)
* move the update username route to v3 (#10836)

* Add API Call to retrieve auto-complete options for usernames

* Create links to users profile in chat messages

* Begin adding server-side autocomplete to web client

* Add Test to opt out of username being searchable

* Fix issue with username highlighting

* Correctly update message text when using autocomplete

* remove old autocomplete component

* Improve chat input design

* rewrite mongoose migration to avoid using recursion

* fixes

* select more fields

* use lean and .update

* fix(tests): correct expects

* fix(tests): linting & more expects
Also one more tweak for invite validation responsiveness

* chore(news): Bailey

* chore(i18n): update locales

* 4.70.0

* fix(chat): less intrusive highlight and better margins

* fix(chat): more width tweakage

* feat(content): Oddballs Bundle
Also includes one more tweak to @mention text highlighting

* chore(sprites): compile

* chore(i18n): update locales

* 4.71.0

* groupChatReceived webhook fix (#10802)

* Moved sendGroupChatReceivedWebhooks to group.sendChat function.

* Added test for new functionality.

* Set width on .custom-control-label (#10840)

Set `width: 100%` on the `.custom-control-label`.

Although `overflow-wrap: break-word` is set on the parent `.checklist-item` element, it doesn't seem to take effect unless a width is set on the label.

* Very large Guild member counts overflow the badge #10753 (#10812)

* Update superagent to the latest version 🚀 (#10848)

* fix(package): update superagent to version 4.0.0

* chore(package): update lockfile package-lock.json

* fix(chat): prevent duplicate messages, closes #10823

* Fix for #10814, prevent ParallelSave errors (#10852)

* fix(group leave): prevent ParallelSave errors while leaving a group with multiple group or challenge tasks

* fix typo

* move computed-props to methods - refactor mountItem to use the states inside (#10853)

* feat(content): Frost Hatching Potions

* chore(sprites): compile

* chore(i18n): update locales

* 4.72.0

* fix(stable): remove progress number from petItem

* add two slurs - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc

* more checks on the item.klass, also added the specialClass checks (#10859)

* feat(content): Turkey Day 2018

* chore(sprites): compile

* chore(i18n): update locales

* 4.73.0

* chore(i18n): update locales

* 4.73.1

* feat(footer): always show expanded footer (#10862)

* Fixes issue #10857 ("Tags have extra space at the bottom when they should be centered") (#10861)

* Fix for #10857 centered category tag text

* Fixes #10857 and #10856 display tag markdown.

* Attach client to chat messages (#10845)

* Attach client to chat messages

* Word

* Design tweaks

* Fix potential error

* chore(event): end Thanksgiving tweaks

* chore(i18n): update locales

* 4.73.2

* Improve chat input design

* Fix test errors

* Move tier icons import to index

* correctly name event variable

* Debounce autocomplete calls

* optimize mention highlighting

* fix failing tests

* Fix sending private messages

* Cache username autocomplete requests

* optimize autocomplete regex

* Fix lint error

* add optional parameters to limit autocompletion to specific group

* Fix non-profile urls not being usable.

* Correctly handle autocomplete for public and private guilds

* Add check to make sure users don’t search for parties/guilds they are not part of

* fix lint error

* limit autocomplete results to 5

* fix(mentioning): change default, adapt settings control to checkbox

* Improve auto completing

* improve username autocomplete

* Fix merge issue

* remove old code

* Send push notifications on mentions

* Improve handling for sending mention notifications

* Fix lint error

* Update schema.js

* Fix failing test

* Don't send push notification to users who aren't in the party

* Remove tributejs from dependencies
2019-10-18 17:05:13 +02:00
Phillip Thelen
360aaa9f0b Add more achievements to notifications list (#11332)
* Add more achievements to notifications list

* use addNotification

* Fix logic to not award stable achievements over and over

* Improve achievement display

* Fix setting notifications for party inviter

* Add tests that notifications are added correctly

* Fix tests
2019-10-18 17:04:33 +02:00
Matteo Pagliazzi
85fb5f33aa fix test lint 2019-10-08 20:45:38 +02:00
Matteo Pagliazzi
90c917f69e fix duplicates in code 2019-10-08 15:05:48 +02:00
Matteo Pagliazzi
16c8825b2b Hall Fixes (#11403)
* fix(hall): correctly casts owned gear and mounts

* typo
2019-10-06 17:08:11 +02:00
Matteo Pagliazzi
d19b3857ee fix unit tests 2019-10-03 17:24:17 +02:00
Phillip Thelen
77b188833e Merge branch 'develop' of https://github.com/HabitRPG/habitica into autocomplete-username
# Conflicts:
#	website/server/controllers/api-v3/chat.js
#	website/server/libs/pushNotifications.js
#	website/server/models/user/schema.js
2019-10-01 12:55:41 +02:00
Phillip Thelen
c4f44fce4c Add missing translations from transifex (#11367)
* Add missing translations from transifex

* update i18n tests

* fix lint error
2019-09-29 18:46:01 +02:00
Phillip Thelen
6523b6b342 Merge branch 'develop' of https://github.com/HabitRPG/habitica into autocomplete-username
# Conflicts:
#	package.json
#	website/client/components/chat/autoComplete.vue
#	website/client/components/chat/chatCard.vue
#	website/client/components/groups/chat.vue
#	website/server/controllers/api-v3/chat.js
#	website/server/controllers/api-v3/members.js
#	website/server/controllers/api-v4/members.js
2019-09-19 16:08:13 +02:00