Compare commits

...

1389 Commits

Author SHA1 Message Date
Sabe Jones
c64d4b0914 4.73.1 2018-11-23 20:20:56 +00:00
Sabe Jones
f94fd0d69d chore(i18n): update locales 2018-11-23 20:17:56 +00:00
Sabe Jones
2cd66436bc Merge branch 'release' into develop 2018-11-22 18:05:28 -06:00
Sabe Jones
81a17738b8 4.73.0 2018-11-22 21:09:31 +00:00
Sabe Jones
b6b953ec46 chore(i18n): update locales 2018-11-22 21:09:20 +00:00
Sabe Jones
ab34c83a9d chore(sprites): compile 2018-11-22 15:05:33 -06:00
Sabe Jones
9cea86f4e0 feat(content): Turkey Day 2018 2018-11-22 15:05:03 -06:00
Sabe Jones
1b7a705bf9 Merge branch 'paglias/migration-no-recursion' into release 2018-11-22 13:44:46 -06:00
negue
e2c5b9058b more checks on the item.klass, also added the specialClass checks (#10859) 2018-11-22 14:35:34 +01:00
Alys
a2b38ffb02 add two slurs - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-11-21 19:48:50 +10:00
Matteo Pagliazzi
6395870c00 fix(stable): remove progress number from petItem 2018-11-21 10:35:59 +01:00
Sabe Jones
9562ba432f Merge branch 'release' into develop 2018-11-20 21:02:17 +00:00
Sabe Jones
8a3a83de37 4.72.0 2018-11-20 21:01:41 +00:00
Sabe Jones
745edd731d chore(i18n): update locales 2018-11-20 20:59:23 +00:00
Sabe Jones
53b195931c chore(sprites): compile 2018-11-20 14:55:56 -06:00
Sabe Jones
37ae467fff feat(content): Frost Hatching Potions 2018-11-20 14:55:45 -06:00
negue
d7d7d64b45 move computed-props to methods - refactor mountItem to use the states inside (#10853) 2018-11-20 12:28:26 +01:00
Matteo Pagliazzi
e76bdbd62d 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
2018-11-18 20:48:16 +01:00
Matteo Pagliazzi
067e869141 fix(chat): prevent duplicate messages, closes #10823 2018-11-18 19:38:56 +01:00
greenkeeper[bot]
51224a69d9 Update superagent to the latest version 🚀 (#10848)
* fix(package): update superagent to version 4.0.0

* chore(package): update lockfile package-lock.json
2018-11-18 19:24:39 +01:00
Dimini
f56018d46a Very large Guild member counts overflow the badge #10753 (#10812) 2018-11-17 11:06:26 +01:00
Ian Oxley
b846185f8a 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.
2018-11-17 11:01:36 +01:00
Nathanael Farley
ff81e55839 groupChatReceived webhook fix (#10802)
* Moved sendGroupChatReceivedWebhooks to group.sendChat function.

* Added test for new functionality.
2018-11-17 10:48:41 +01:00
Sabe Jones
9a3cdb5deb 4.71.0 2018-11-15 22:03:32 +00:00
Sabe Jones
47ad7305f5 chore(i18n): update locales 2018-11-15 22:02:46 +00:00
Sabe Jones
d9b5bbe2a9 chore(sprites): compile 2018-11-15 15:58:15 -06:00
Sabe Jones
c2fe04367f feat(content): Oddballs Bundle
Also includes one more tweak to @mention text highlighting
2018-11-15 15:58:07 -06:00
Sabe Jones
abcc77b7d6 fix(chat): more width tweakage 2018-11-14 16:46:03 -06:00
Sabe Jones
07cbf45265 fix(chat): less intrusive highlight and better margins 2018-11-14 16:31:35 -06:00
Sabe Jones
c035435476 4.70.0 2018-11-14 14:39:39 +00:00
Sabe Jones
89fdd8a8bb chore(i18n): update locales 2018-11-14 14:39:23 +00:00
Sabe Jones
d406da4081 chore(news): Bailey 2018-11-14 08:30:34 -06:00
Sabe Jones
d74786ef85 Merge branch 'sabrecat/usernames-master' into develop 2018-11-14 08:21:49 -06:00
Sabe Jones
64a3d08ce3 fix(tests): linting & more expects
Also one more tweak for invite validation responsiveness
2018-11-14 07:43:08 -06:00
SabreCat
f635f178da fix(tests): correct expects 2018-11-14 13:07:44 +00:00
Matteo Pagliazzi
1a7461a8a2 move the update username route to v3 (#10836) 2018-11-14 10:40:27 +01:00
Sabe Jones
cc13c4f28e fix(invites): more responsive validation 2018-11-13 19:50:07 -06:00
SabreCat
239f78674b fix(usernames): address failing tests 2018-11-14 01:44:09 +00:00
Sabe Jones
d691dee2ca fix(usernames): filter @ on server side for username lookup 2018-11-13 15:34:50 -06:00
Sabe Jones
481bd6727d fix(usernames): exclude unverified users during query 2018-11-13 15:13:41 -06:00
Sabe Jones
d0fc1e0751 fix(invites): show errors inline 2018-11-13 15:10:35 -06:00
Sabe Jones
b07dbb7752 Merge branch 'develop' into sabrecat/usernames-master 2018-11-13 14:15:23 -06:00
Sabe Jones
34e7690c38 fix(usernames): various
Disappearing input fields
Text replacement in @mentions
UUID visibility in profiles
Purple dot for @mentioned usernames
TypeError preventing RYA
Group Plan member list error
2018-11-13 14:14:02 -06:00
negue
eca7382545 prevent buying market gear if class doesn't match (#10818)
* prevent buying market gear if class doesn't match

* add test
2018-11-12 21:32:54 +01:00
Matteo Pagliazzi
be95cd967a upgrade gulp-imagemin, closes #10817 2018-11-10 12:29:26 +01:00
Matteo Pagliazzi
ce03f837c7 use lean and .update 2018-11-09 13:10:55 +01:00
Matteo Pagliazzi
808885425f select more fields 2018-11-09 13:04:25 +01:00
Matteo Pagliazzi
39a35f44ef fixes 2018-11-09 13:01:19 +01:00
Matteo Pagliazzi
2b2e1d4b9a rewrite mongoose migration to avoid using recursion 2018-11-09 12:58:39 +01:00
Sabe Jones
869411c0e9 fix(migration): improve model-based script 2018-11-08 16:55:49 -06:00
Sabe Jones
7484ecf729 Merge branch 'develop' into sabrecat/usernames-master 2018-11-08 15:13:28 -06:00
Sabe Jones
3265440bc4 4.69.2 2018-11-08 18:47:54 +00:00
Sabe Jones
acf514e9cb chore(i18n): update locales 2018-11-08 18:47:32 +00:00
Sabe Jones
2789d44dbf chore(news): Bailey 2018-11-08 12:43:50 -06:00
Sabe Jones
b579f31e9e fix(emails): correct unsub link handling 2018-11-08 18:09:51 +00:00
Sabe Jones
5e781017ab fix(script): correct import path and template slug 2018-11-08 10:29:37 -06:00
Sabe Jones
b48f850eac fix(script): don't send to users who have already opted out of notifs 2018-11-08 10:14:54 -06:00
Sabe Jones
5d6b6ed29a feat(usernames): follow-up email and setting for email opt-out 2018-11-08 10:00:25 -06:00
negue
7fbc68511b fix: special are not "AllowedToFeed" (#10808)
*  fix: special are not "AllowedToFeed"

* fix lint
2018-11-08 11:11:04 +01:00
Matteo Pagliazzi
ee2858199b update(http-proxy-middleware): update to 0.19, closes #10650 2018-11-08 11:08:42 +01:00
Sabe Jones
b1dd79f75c fix(invites): bogus validation errors 2018-11-07 15:58:17 -06:00
Sabe Jones
1ac4dd8171 feat(usernames): invite by username 2018-11-07 15:00:22 -06:00
Sabe Jones
4f86abd6b2 Merge branch 'develop' into sabrecat/usernames-master 2018-11-07 08:39:57 -06:00
Sabe Jones
23b0688abb Merge branch 'develop' into sabrecat/usernames-master 2018-11-06 19:56:45 -06:00
Sabe Jones
38efe83cc7 fix(usernames): various
Partial fixage for autocomplete @ing
Don't add username to chat message if user is unverified
Fix flying pets
Fix console error about avatar intro
2018-11-06 19:55:06 -06:00
Sabe Jones
2dadd74097 Merge branch 'release' into develop 2018-11-06 16:53:35 -06:00
Sabe Jones
9f494360ef Merge branch 'release' into develop 2018-11-06 15:02:24 -06:00
Sabe Jones
4122bbdecf 4.69.1 2018-11-06 15:02:03 -06:00
Sabe Jones
256a3abc26 fix(event): de-Festivalize class change modal 2018-11-06 15:01:57 -06:00
Sabe Jones
b7f3c0f389 Merge branch 'release' into develop 2018-11-06 20:43:12 +00:00
Sabe Jones
dca00bf4b7 4.69.0 2018-11-06 20:42:50 +00:00
Sabe Jones
d31c8913d3 chore(i18n): update locales 2018-11-06 20:40:54 +00:00
Sabe Jones
d839d57299 chore(sprites): compile 2018-11-06 14:32:55 -06:00
Sabe Jones
ccc3b4d337 feat(content): Armoire and Backgrounds 2018/11 2018-11-06 14:31:50 -06:00
Matteo Pagliazzi
7195ac15b9 fix(group-plan-tasks): show checkmark when task completed 2018-11-05 15:04:45 +01:00
Sabe Jones
a5ef6a129e fix(auth): new users should start verified 2018-11-03 16:03:53 -05:00
Sabe Jones
38f5d63d29 fix(likes): accessibility tweaks 2018-11-03 13:16:32 -05:00
Sabe Jones
43194b71ce fix(usernames): RYA positioning and contrib tier in PMs 2018-11-03 12:50:59 -05:00
Matteo Pagliazzi
e4a347a3cb update gulp-nodemon 2018-11-03 14:08:46 +01:00
Sabe Jones
7eaf3e04ab fix(modals): button styling 2018-11-02 16:48:35 -05:00
Sabe Jones
b6b03751c4 fix(modals): maybe got it?!? 2018-11-02 16:27:08 -05:00
Sabe Jones
818d5e4eb6 fix(modals): better stack??? 2018-11-02 14:58:32 -05:00
Sabe Jones
f871c7cf63 fix(modal): various 2018-11-02 14:26:39 -05:00
Kirsty
e9eddec0c4 check pet is hatchable before highlighting (#10797) 2018-11-02 17:16:11 +01:00
Nathanael Farley
a48a6a292d If user's cron will happen later today, start the task yesterday. (#10783)
* If user's cron will happen later today, start the task yesterday.

* Added default dayStart to taskDefaults.

* Removed the need to call shouldDo twice to calculate nextDue.

* Revert "Removed the need to call shouldDo twice to calculate nextDue."

This reverts commit e1467f2fc33cfb11e6a4fc667460df6a48b69d45.

* Removed defaults from taskDefault arguments.

* Got user from $store in copyAsTodoModal.vue.

* Fixed tests for taskDefaults to include mock user.

* Fix shouldDo tests when run in GMT timezone.

* Added test to taskDefault; added utcOffset to taskDefault.

* Replaced utcOffset with zone.

* Removed erroneous import.
2018-11-02 16:58:01 +01:00
Matteo Pagliazzi
12aef475c8 update package-lock.json 2018-11-02 12:10:49 +01:00
Sabe Jones
112e4e1d76 Merge branch 'develop' into sabrecat/usernames-master 2018-11-01 21:51:33 -05:00
Sabe Jones
90eebbcd70 Merge branch 'release' into develop 2018-11-02 02:50:25 +00:00
Sabe Jones
1ad9ba4e71 4.68.1 2018-11-02 02:50:05 +00:00
Sabe Jones
c42b72f8a8 chore(i18n): update locales 2018-11-02 02:46:22 +00:00
Sabe Jones
830c8d3104 chore(event): end Habitoween/Fall Fest
Also announce November challenges
2018-11-01 21:44:00 -05:00
Sabe Jones
86ae5f3e44 fix(inbox): don't show likes in inbox
Also remove convo list contrib styling for now
2018-11-01 19:34:57 -05:00
Sabe Jones
3922415314 fix(inbox): more UN display fixes 2018-11-01 17:41:27 -05:00
Sabe Jones
6c71abfac8 fix(inbox): display correct UN for outbound user 2018-11-01 16:05:14 -05:00
Sabe Jones
6ab08a7d52 fix(usernames): don't supply username in public fields if unverified 2018-11-01 15:32:40 -05:00
Sabe Jones
dc46127fc7 refactor(auth): only import needed validator module 2018-11-01 15:22:20 -05:00
Sabe Jones
b54f031acd fix(chat): replace autocomplete at @ 2018-11-01 15:17:01 -05:00
Sabe Jones
eafa2f8cdd Merge branch 'release' into sabrecat/usernames-master 2018-11-01 14:51:28 -05:00
greenkeeper[bot]
fe45940d46 fix(package): update ora to version 3.0.0 (#10529) 2018-10-31 16:59:47 +01:00
Matteo Pagliazzi
7dac53867b fix(settings): remove kicked from group from list of push notifications, fixes #10796 2018-10-31 14:42:11 +01:00
Sabe Jones
6f64cb7d9b Merge branch 'release' into develop 2018-10-30 21:26:39 +00:00
Sabe Jones
7d989bcf50 4.68.0 2018-10-30 21:26:19 +00:00
Sabe Jones
7bd29c2dd7 chore(i18n): update locales 2018-10-30 21:24:55 +00:00
Sabe Jones
9e10490102 chore(sprites): compile 2018-10-30 16:21:51 -05:00
Sabe Jones
5792bc0000 feat(content): Habitoween 2018 2018-10-30 16:21:42 -05:00
Matteo Pagliazzi
06812878b5 Merge branch 'negue/stable_img_states' into develop 2018-10-30 16:37:04 +01:00
Matteo Pagliazzi
8714c7d162 fix lint 2018-10-30 16:36:30 +01:00
Matteo Pagliazzi
e66f4e7812 Merge branch 'develop' into negue/stable_img_states 2018-10-30 16:35:30 +01:00
negue
c73f565f65 refactor animal methods / vue methods 2018-10-29 20:46:16 +01:00
Kirsty
82e21df943 fix filter checkboxes in seasonal shop (#10792) 2018-10-29 16:04:42 +01:00
Sabe Jones
18ed148320 Merge branch 'release' into develop 2018-10-28 20:46:13 +00:00
Sabe Jones
a5fc909f0d 4.67.1 2018-10-28 20:45:38 +00:00
Sabe Jones
30a5192e19 chore(i18n): update locales 2018-10-28 20:45:27 +00:00
Matteo Pagliazzi
79c0499672 Mongoose: use $type as the typeKey (#10789)
* use $type as the typeKey in mongoose

* fix and add tests
2018-10-28 15:42:48 -05:00
Matteo Pagliazzi
dadb752087 Mongoose: use $type as the typeKey (#10789)
* use $type as the typeKey in mongoose

* fix and add tests
2018-10-28 15:23:41 +01:00
Matteo Pagliazzi
37b29d3449 fix(tests): increase timeout 2018-10-28 13:14:49 +01:00
Matteo Pagliazzi
bb2ed249b9 fix deprecation warning for sinon.js 2018-10-28 12:44:34 +01:00
Sabe Jones
bb90dde1b6 feat(usernames): verification step during Justin intro for social users 2018-10-27 12:37:22 -05:00
Sabe Jones
5299c8d406 fix(comments): validator for emails, remove prefixes, allow length 1 2018-10-26 16:25:15 -05:00
Sabe Jones
8b81e38538 fix(PR): more cleanup 2018-10-26 15:48:53 -05:00
Sabe Jones
8e05a1b489 Merge branch 'develop' into sabrecat/usernames-master 2018-10-26 15:45:55 -05:00
Sabe Jones
aafcbe60a3 fix(PR): remove unrelated changes 2018-10-26 15:42:41 -05:00
Matteo Pagliazzi
56d1b77215 Upgrade sinon (#10773)
* upgrade sinon

* sinon changes

* fix unit tests
2018-10-26 18:15:28 +02:00
Nathanael Farley
61da558a5d Added explanatory webhook text to UI. (#10782)
* Added explanatory webhook text to UI.

* Made new webhook API info translateable.
2018-10-26 16:46:36 +02:00
Sabe Jones
490531cc76 4.67.0 2018-10-25 21:36:13 +00:00
Sabe Jones
8cd4c502bc chore(i18n): update locales 2018-10-25 21:35:58 +00:00
Sabe Jones
d8cacb653e chore(sprites): compile 2018-10-25 16:31:13 -05:00
Sabe Jones
59436a8bf7 feat(content): Mystery Items Oct 2018 2018-10-25 16:31:00 -05:00
Sabe Jones
6fade19f27 4.66.2 2018-10-25 20:32:06 +00:00
Sabe Jones
15d028a281 chore(i18n): update locales 2018-10-25 20:31:20 +00:00
Sabe Jones
95b283676a Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-25 05:32:41 -05:00
Sabe Jones
6e7e81206a fix(profile): better username/UUID styling 2018-10-25 05:29:02 -05:00
Sabe Jones
af74cc7c64 Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-24 20:01:00 -05:00
Sabe Jones
a9e2a17077 fix(chat): no min height on autocomplete dropdown 2018-10-24 19:59:54 -05:00
Sabe Jones
92057dbe17 Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-24 19:41:21 -05:00
Sabe Jones
b4ab525be5 fix(chat): better @ searching, no chat card borders 2018-10-24 19:39:50 -05:00
Sabe Jones
d3c464d5ea Merge branch 'sabrecat/force-username-modal' into sabrecat/usernames-master 2018-10-24 18:40:43 -05:00
Sabe Jones
804fe1c6d5 fix(usernames): various
z-index modals above Resting banner
force reload after verify username
add missing e-mail validation on frontpage
let Yesterdaily modal float behind username modal
2018-10-24 18:39:54 -05:00
negue
3c5025a78e fix background empty / resetCallback - refactor pet methods/components 2018-10-24 20:43:15 +02:00
Sabe Jones
e028232527 Merge branch 'release' into develop 2018-10-24 18:35:55 +00:00
Sabe Jones
e3b270a62e 4.66.1 2018-10-24 18:35:34 +00:00
Sabe Jones
fceeacec3b chore(i18n): update locales 2018-10-24 18:35:27 +00:00
Matteo Pagliazzi
f93c67e57c fix(amazon gift): do not reset the gift amount when opening the amazon modal 2018-10-24 20:29:27 +02:00
Sabe Jones
192dc26fbe Merge branch 'release' into develop 2018-10-23 22:50:49 +00:00
Sabe Jones
1c1f270f64 4.66.0 2018-10-23 22:50:25 +00:00
Sabe Jones
483768f4a7 chore(i18n): update locales 2018-10-23 22:49:30 +00:00
SabreCat
65031cef3a chore(sprites): compile 2018-10-23 22:45:47 +00:00
Sabe Jones
2fc1f46359 Veteran Pet ladder award for users affected by username changes (#10765)
* feat(usernames): Veteran Pet ladder award for affected users

* feat(content): Vet Pet Bailey etc.
2018-10-23 17:38:30 -05:00
Matteo Pagliazzi
30fd530576 fix(tests): more timeouts fixes 2018-10-23 20:23:52 +02:00
Matteo Pagliazzi
f79999fde7 minor deps updates 2018-10-23 16:48:59 +02:00
Tressley Cahill
90d6e443ba Corrects the white bar above the header and updates the text styling (#10772) 2018-10-23 13:50:02 +02:00
Derek Kim
4ed1082558 fix for #10496: Newly subscribed accounts receive erroneous notification that they have Mystery Items (#10759)
* fix
Newly subscribed accounts receive erroneous notification that they have Mystery Items

* Added unit test for #10496

* Restored a previous unit test
2018-10-23 13:47:15 +02:00
Matteo Pagliazzi
00717eda76 fix(tests): increase timeout 2018-10-23 13:30:38 +02:00
Matteo Pagliazzi
d1b86e6c14 Remove code for Pusher (#10774)
* remove pusher

* fix linting
2018-10-23 13:25:52 +02:00
Matteo Pagliazzi
c813afba44 Upgrade mongoose (#10767)
* fix mongoose and upgrade

* fix more validations
2018-10-23 13:25:14 +02:00
Matteo Pagliazzi
d49db6d367 upgrade csv-stringify (#10776) 2018-10-23 13:22:22 +02:00
Matteo Pagliazzi
d6835aec56 upgrade method override (#10775) 2018-10-23 11:48:15 +02:00
Matteo Pagliazzi
960f7b5886 upgrade node-gcm (#10777) 2018-10-23 11:47:26 +02:00
Sabe Jones
cd9630332d Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-22 16:30:12 -05:00
Sabe Jones
ed21a37e5a feat(usernames): show in party header, profiles, inbox convo list 2018-10-22 16:29:47 -05:00
negue
16256ee190 fix issues 2018-10-22 21:22:26 +02:00
Matteo Pagliazzi
ff57e31f4f 4.65.7 2018-10-20 16:17:26 +02:00
Matteo Pagliazzi
6e21d154ae Do not throw an error when adding the same push device twice (#10770)
* do not throw an error when adding the same push device twice

* fix spelling

* fix linting
2018-10-20 14:52:02 +02:00
Sabe Jones
fdecc8ce16 Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-19 17:44:52 -05:00
Sabe Jones
3cc49f6637 fix(chat): match hyphen in @name regex 2018-10-19 17:44:18 -05:00
Sabe Jones
47f49f4256 Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-19 16:22:11 -05:00
Sabe Jones
4f4bb52360 fix(chat): padding adjustment and tooltip placement 2018-10-19 16:20:13 -05:00
Sabe Jones
3748b3046b Merge branch 'sabrecat/force-username-modal' into sabrecat/usernames-master 2018-10-19 16:04:23 -05:00
Sabe Jones
5cd0f56811 fix(usernames): let verify modal grow to content 2018-10-19 16:03:48 -05:00
Tressley Cahill
fe5beac91b Custom reward action background and font-color updates (#10769)
* fixes custom reward action background and font-color

* update to -10
2018-10-19 10:01:02 -05:00
Sabe Jones
52fd6a1451 4.65.6 2018-10-18 23:09:12 +00:00
Sabe Jones
ae445555e9 fix(groups): don't show add manager for non-groups and non-leaders 2018-10-18 18:08:30 -05:00
Sabe Jones
c4fc6671b4 4.65.5 2018-10-18 20:05:29 +00:00
Sabe Jones
e7a096158e chore(i18n): update locales 2018-10-18 20:05:15 +00:00
Sabe Jones
98473fcfaa chore(news): Bailey 2018-10-18 15:00:21 -05:00
Sabe Jones
e4300fc714 fix(registration): localize reg form placeholders 2018-10-18 14:48:46 -05:00
negue
456c5e57bc refactor petItem - pet image states 2018-10-18 19:58:14 +02:00
Matteo Pagliazzi
ffba435923 fix #10756: do not show push notification settings for email only notifications 2018-10-18 14:21:35 +02:00
Matteo Pagliazzi
1f44444a50 Fix subcriptions remaining time disappearing after cancelling (#10761)
* add hasCancelled method for group/user, prevent cancelling a subscription twice

* wip

* paypal: do not cancel a subscription twice

* make sure hasCancelled and hasNotCancelled return a boolean result
2018-10-18 12:14:07 +02:00
Sabe Jones
185b20995a Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-17 18:31:16 -05:00
Sabe Jones
fdf2e590ea fix(chat): better likes and display name font sizing 2018-10-17 18:28:58 -05:00
Sabe Jones
994123c387 chore(sprites): compile 2018-10-17 15:32:20 -05:00
Sabe Jones
273590716c Merge branch 'sabrecat/veteran-verified' into sabrecat/usernames-master 2018-10-17 15:29:44 -05:00
Sabe Jones
6818a094ee Merge branch 'sabrecat/username-display' into sabrecat/usernames-master 2018-10-17 15:29:35 -05:00
Sabe Jones
c99855cef4 Merge branch 'sabrecat/force-username-modal' into sabrecat/usernames-master 2018-10-17 15:29:23 -05:00
Sabe Jones
6845943ed0 feat(usernames): vet pet announcement 2018-10-17 15:27:54 -05:00
Sabe Jones
044fe17757 feat(usernames): Veteran Pet ladder award for affected users 2018-10-17 14:43:33 -05:00
Sabe Jones
ad0ede8d01 fix(model): don't break if auth.local undefined 2018-10-17 13:59:39 -05:00
Sabe Jones
23815e89e1 WIP(usernames): display in chat areas 2018-10-17 12:57:57 -05:00
Sabe Jones
061d990e39 Merge branch 'release' into develop 2018-10-15 20:20:55 +00:00
Sabe Jones
71f4e6bc08 4.65.4 2018-10-15 20:20:33 +00:00
Sabe Jones
659f160e22 chore(i18n): update locales 2018-10-15 20:20:25 +00:00
Trevor Ford
5f27bc5f90 Issue 10728: sort equipment by stat descending on Market page (#10734)
* sort equipment by stat descending in Market (issue #10728)

* fix sorting equipment by PER in Market (new issue?)

* move filter logic into method when sorting equipment in Market

* consolidate sorting in sortedGearItems() into one _orderBy call
2018-10-15 21:12:53 +02:00
negue
074837b274 check every armoire gear 'canOwn' method (#10760) 2018-10-15 20:11:28 +02:00
Sabe Jones
cfd19ac694 fix(usernames): various
Better modal positioning
Correct text colors for input field
Don't show "already taken" if username has other errors
2018-10-15 11:27:49 -05:00
SabreCat
0897ab5dc9 fix(settings): don't center align display name issues 2018-10-14 23:25:03 +00:00
Sabe Jones
5c6e8a7331 fix(usernames): add display name verification to site settings
also corrrect some validation logic in force-verify modal
2018-10-14 23:06:41 +00:00
Sabe Jones
c576c5261e fix(username): Add @ prepend 2018-10-14 12:21:52 -05:00
Sabe Jones
bbd98517ff fix(test): copypasta and string trouble 2018-10-13 21:36:14 -05:00
Sabe Jones
392b54aa7b fix(usernames): remove more ratzen fratzen dupe strings 2018-10-13 21:05:07 -05:00
Sabe Jones
60b26d4ec0 fix(test): string is miscapitalized :( 2018-10-13 20:56:09 -05:00
Matteo Pagliazzi
aa517e0ad6 Merge branch 'negue/modal-notifications' into develop 2018-10-13 21:18:30 +02:00
Matteo Pagliazzi
5ca489dee7 Merge branch 'develop' into negue/modal-notifications 2018-10-13 21:18:16 +02:00
Rene Cordier
fe39ef72ff Show accurate experience notifications (#10676)
* Show accurate experience notifications

Add unit tests for exp notifications

* use array to compute exp and lvl values for notification changes

* Add tests for user loosing xp cases
2018-10-13 20:24:23 +02:00
Carl Vuorinen
eee5f2f1df No matching Guilds/Challenges message (#10744)
* Display message on My Guilds page when filters dont' match anything

* Display message on Discover Guilds page when filters dont' match anything

* Display message on My Challenges page when filters dont' match anything

* Display message on Discover Challenges page when filters dont' match anything

* Don't show Load More button when there is nothing to load

* Fix Guild search

Previously was not possible to clear after searching
2018-10-13 20:19:03 +02:00
Sabe Jones
fd8572c28a Group Management Menu Fixes (#10704)
* fix(groups): more intelligent member actions

* fix(groups): further member action improvements

* fix(groups): don't show "Remove Manager" if user doesn't have authority

* fix(lint): bad if syntax

* fix(groups): unnecessary if on icon
2018-10-13 20:15:46 +02:00
Kirsty
f161987e1e check officialPinnedItems for gala gear in market (#10745) 2018-10-13 20:07:30 +02:00
aszlig
2304d970a5 api: Fix a few API documentation typos (#10749)
Just fixes a few syntactic errors and typos.

Signed-off-by: aszlig <aszlig@nix.build>
2018-10-13 20:03:40 +02:00
Sabe Jones
25ed05ab0a Analytics: clean up old A/B test code & add username verify flag (#10754)
* chore(analytics): clean up old A/B test code & add username verify

* fix(lint): more AB cleanup
2018-10-13 13:03:20 -05:00
Sabe Jones
fa1fef11d6 feat(usernames): modal to force verification 2018-10-13 12:53:16 -05:00
Sabe Jones
6f5b9ef119 fix(scripts): better error handling for script runner and GDPR 2018-10-12 15:27:31 +00:00
Sabe Jones
c64ea0a9a9 4.65.3 2018-10-11 21:05:46 +00:00
Sabe Jones
2e36b896d4 chore(i18n): update locales 2018-10-11 21:04:30 +00:00
Sabe Jones
6fe73d431e Merge branch 'develop' into release 2018-10-11 16:01:56 -05:00
Sabe Jones
998621cefe feat(content): fall avatar customization 2018-10-11 16:01:32 -05:00
Matteo Pagliazzi
67bb179c25 gifts: prevent users from sending the same gift twice by clicking many times on the Send button 2018-10-11 19:01:15 +02:00
Sabe Jones
c875861dab Merge branch 'release' into develop 2018-10-10 16:26:28 +00:00
Sabe Jones
418c18ddb2 4.65.2 2018-10-09 23:40:09 -05:00
Sabe Jones
0caab5c8d0 fix(news): missing footnote 2018-10-09 23:39:48 -05:00
Sabe Jones
218e65b04b Merge branch 'release' into develop 2018-10-09 21:33:49 -05:00
Sabe Jones
fcd7ba77a7 4.65.1 2018-10-09 21:32:58 -05:00
Sabe Jones
b0d177643c chore(sprites): compile 2018-10-09 21:32:38 -05:00
Sabe Jones
c0e0b10a95 Merge branch 'release' into develop 2018-10-10 01:20:18 +00:00
Sabe Jones
0bee2caf2e 4.65.0 2018-10-10 01:19:52 +00:00
Sabe Jones
e56d097b3a chore(i18n): update locales 2018-10-10 01:16:28 +00:00
Sabe Jones
8c63a9e31f feat(content): Alligator Pets and Spoopy Sporples 2018-10-09 20:12:12 -05:00
Sabe Jones
28ed9d8bcc fix(script): log, not warn, so all output goes to both stdout and tee 2018-10-09 20:27:52 +00:00
Matteo Pagliazzi
36ead77e0c Fixes group plan verify username (#10747)
Misc fixes
2018-10-09 20:07:50 +02:00
Robert Kojima
e7969987ec Guild textarea at list positioning (#10663)
* autocomplete dialog now has ternary operator to determine placement

* added min height to textbox

* fixed spacing according to travisCI

* heightToUse function now retrieves argument from props
2018-10-08 22:25:49 +02:00
titchimoto
97021e3422 Issue 10414 - Remove Member Option from View Party link. (#10639)
* Add remove member option from main task page

* Code refactor for remove member options

* code refactor to avoid loading party multiple times

* fix dispatch to ensure only pulling once from server
2018-10-08 22:22:09 +02:00
Carl Vuorinen
218d47d64a Don't show "no guilds" texts while loading (#10665)
* Don't show "no guilds" texts while loading

Unified styling of "no guilds" message with my challenges page
Fixes #10662

* Don't show "no challenges" texts while loading

Add loading indicator (similar to find challenges & my guilds pages)

* Change gray color

* Set challenge icon color
2018-10-08 22:18:11 +02:00
Rene Cordier
bdfc23717e Css font home page update (#10672)
* css font home page update

finish home page font change

* Small fixes on css font update on home page
2018-10-08 22:16:14 +02:00
Kirsty
464cd87736 Decrease mana when removing stat points from int (#10713)
* Decrease mana when removing stat points from int

* Revert "Decrease mana when removing stat points from int"

This reverts commit 5e25e13552.

* add mana when stat updates are saved

* don't allow users to deallocate saved stat points in the ui

* use flag to determine whether to add mana points

* add test for not adding mana points when flag is set

* Revert "add test for not adding mana points when flag is set"

This reverts commit 6e8ff36a79.

* Revert "use flag to determine whether to add mana points"

This reverts commit 274e2d0d33.

* Revert "add mana when stat updates are saved"

This reverts commit 422bd49191.

* move client side stat allocation to when save is pressed

* update displayed total stats during editing

* Fix lint errors
2018-10-08 22:11:26 +02:00
Kirsty
67a8eebb96 add errors for any param validation failures to the snackbar (#10724) 2018-10-08 21:54:05 +02:00
Kirsty
cfc0f6a3ac remove items with that have been lost from Class:None (#10735) 2018-10-08 21:38:16 +02:00
Matteo Pagliazzi
9f76db12bd update aws-sdk, in-app-purchase, fix #10733 and #10725 2018-10-08 10:55:41 +02:00
Sabe Jones
70192e4935 Scripts October 2018 (#10741)
* chore(scripts): BTS Challenge archive and username email jobbing

* refactor(migration): use batching and sendTxn

* fix(script): introduce delay for batching

* fix(migration): correct import, fix delay promise, slower batching

* fix(migration): add daterange

* WIP(script): deletion helper for GDPR

* fix(script): address code comments

* refactor(script): use for loop

* fix(script-runner): bad catch syntax

* fix(script-runner): oops I did it again

* fix(lint): name functions
2018-10-07 14:20:30 -05:00
Sabe Jones
5cd4ead9d1 Merge branch 'release' into develop 2018-10-06 14:36:10 +00:00
Sabe Jones
87cd000bb8 4.64.2 2018-10-06 14:35:48 +00:00
Sabe Jones
0de5d8273b chore(i18n): update locales 2018-10-06 14:35:39 +00:00
Sabe Jones
379898cc4d fix(sprites): add new spritesheet to app manifest 2018-10-06 09:33:35 -05:00
Sabe Jones
adeaa6c754 Merge branch 'release' into develop 2018-10-05 19:55:45 +00:00
Sabe Jones
539f0e33e2 4.64.1 2018-10-05 19:55:23 +00:00
Sabe Jones
405e053377 chore(i18n): update locales 2018-10-05 19:54:21 +00:00
Phillip Thelen
52fbb8f899 Verify username as valid if user is re-checking their current name (#10737)
* Verify username as valid if user is re-checking their current name

* Fix lint error and existingUser check.
2018-10-05 14:51:21 -05:00
Matteo Pagliazzi
c880596a77 Cleanup after inbox migration (#10487) 2018-10-05 19:34:42 +02:00
Matteo Pagliazzi
a35f04be46 migrations: move inbox migration to archive 2018-10-05 19:34:21 +02:00
Sabe Jones
8682cf1cf7 4.64.0 2018-10-04 23:16:50 +00:00
Sabe Jones
6e922cfb44 chore(i18n): update locales 2018-10-04 23:15:19 +00:00
Sabe Jones
cafabd93e1 fix(passport): use graph API v2.8 2018-10-04 18:09:58 -05:00
Sabe Jones
1001d48eb7 chore(sprites): compile 2018-10-04 18:09:01 -05:00
Sabe Jones
b5c4618d56 feat(content): Armoire and BGs 2018/10 2018-10-04 18:08:49 -05:00
Sabe Jones
92a4ba93d2 4.63.3 2018-10-03 20:57:22 +00:00
Sabe Jones
90d35d2f1f fix(auth): Don't try to check existing username on new reg 2018-10-03 15:56:09 -05:00
Sabe Jones
fead027cd2 4.63.2 2018-10-03 19:54:53 +00:00
Sabe Jones
5578426985 chore(i18n): update locales 2018-10-03 19:49:45 +00:00
Sabe Jones
1c39fae127 fix(auth): alert on successful addLocal 2018-10-03 14:30:35 -05:00
Sabe Jones
45a757b589 fix(auth): account for new username paradigm in add-local flow 2018-10-03 14:01:45 -05:00
Sabe Jones
8b610d771c fix(usernames): various
Reword invalid characters error
Correct typo in slur error
Remove extraneous Confirm button
Reset username field if empty on blur
Restore ability to add local auth to social login
2018-10-03 13:13:47 -05:00
Sabe Jones
bd81d27145 4.63.1 2018-10-03 02:33:32 +00:00
Sabe Jones
8eb430cbcb chore(i18n): update locales 2018-10-03 02:33:09 +00:00
Sabe Jones
f218133d25 chore(news): Bailey 2018-10-02 21:31:16 -05:00
Sabe Jones
5f440d9097 4.63.0 2018-10-02 23:12:11 +00:00
Sabe Jones
0294868747 chore(i18n): update locales 2018-10-02 23:11:49 +00:00
Sabe Jones
9c8d870d16 Merge branch 'develop' into release 2018-10-02 23:07:08 +00:00
Sabe Jones
a7acd863f3 fix(lint): comma spacing 2018-10-02 16:59:39 -05:00
Sabe Jones
f32ef0a6ba fix(lint): comma 2018-10-02 16:38:47 -05:00
Phillip Thelen
ebf3b4aa47 Username announcement (#10729)
* Change update username API call

The call no longer requires a password and also validates the username.

* Implement API call to verify username without setting it

* Improve coding style

* Apply username verification to registration

* Update error messages

* Validate display names.

* Fix API early Stat Point allocation (#10680)

* Refactor hasClass check to common so it can be used in shared & server-side code

* Check that user has selected class before allocating stat points

* chore(event): end Ember Hatching Potions

* chore(analytics): reenable navigation tracking

* update bcrypt

* Point achievement modal links to main site (#10709)

* Animal ears after death (#10691)

* Animal Ears purchasable with Gold if lost in Death

* remove ears from pinned items when set is bought

* standardise css and error handling for gems and coins

* revert accidental new line

* fix client tests

* Reduce margin-bottom of checklist-item from 10px to -3px. (#10684)

* chore(i18n): update locales

* 4.61.1

* feat(content): Subscriber Items and Magic Potions

* chore(sprites): compile

* chore(i18n): update locales

* 4.62.0

* Display notification for users to confirm their username

* fix typo

* WIP(usernames): Changes to address #10694

* WIP(usernames): Further changes for #10694

* fix(usernames): don't show spurious headings

* Change verify username notification to new version

* Improve feedback for invalid usernames

* Allow user to set their username again to confirm it

* Improve validation display for usernames

* Temporarily move display name validation outside of schema

* Improve rendering banner about sleeping in the inn

See #10695

* Display settings in one column

* Position inn banner when window is resized

* Update inn banner handling

* Fix banner offset on initial load

* Fix minor issues.

* Issue: 10660 - Fixed. Changed default to Please Enter A Value (#10718)

* Issue: 10660 - Fixed. Changed default to Please Enter A Value

* Issue: 10660 - Fixed/revision 2 Changed default to Enter A Value

* chore(news): Bailey announcements

* chore(i18n): update locales

* 4.62.1

* adjust wiki link for usernameInfo string

https://github.com/HabitRPG/habitica-private/issues/7#issuecomment-425405425

* raise coverage for tasks api calls (#10029)

* - updates a group task - approval is required
- updates a group task with checklist

* add expect to test the new checklist length

* - moves tasks to a specified position out of length

* remove unused line

* website getter tasks tests

* re-add sanitizeUserChallengeTask

* change config.json.example variable to be a string not a boolean

* fix tests - pick the text / up/down props too

* fix test - remove changes on text/up/down - revert sanitize condition - revert sanitization props

* Change update username API call

The call no longer requires a password and also validates the username.

* feat(content): Subscriber Items and Magic Potions

* Re-add register call

* Fix merge issue

* Fix issue with setting username

* Implement new alert style

* Display username confirmation status in settings

* Add disclaimer to change username field

* validate username in settings

* Allow specific fields to be focused when opening site settings

* Implement requested changes.

* Fix merge issue

* Fix failing tests

* verify username when users register with username and password

* Set ID for change username notification

* Disable submit button if username is invalid

* Improve username confirmation handling

* refactor(settings): address remaining code comments on auth form

* Revert "refactor(settings): address remaining code comments on auth form"

This reverts commit 9b6609ad64.

* Social user username (#10620)

* Refactored private functions to library

* Refactored social login code

* Added username to social registration

* Changed id library

* Added new local auth check

* Fixed export error. Fixed password check error

* fix(settings): password not available on client

* refactor(settings): more sensible placement of methods

* chore(migration): script to hand out procgen usernames

* fix(migration): don't give EVERYONE new names you doofus

* fix(migration): limit data retrieved, be extra careful about updates

* fix(migration): use missing field, not migration tag, for query

* fix(migration): unused var

* fix(usernames): only generate 20 characters

* fix(migration): set lowerCaseUsername
2018-10-02 16:17:06 -05:00
Matteo Pagliazzi
5a8366468b inbox: fix avatar display and order 2018-10-02 22:30:07 +02:00
Sabe Jones
df57518815 4.62.3 2018-10-02 14:24:31 +00:00
Sabe Jones
7d342b5115 chore(i18n): update locales 2018-10-02 14:24:17 +00:00
Sabe Jones
388de9a97d chore(news): Bailey 2018-10-02 09:19:55 -05:00
Sabe Jones
28c79d9d20 4.62.2 2018-10-01 19:19:24 +00:00
Sabe Jones
85cf322b30 chore(i18n): update locales 2018-10-01 19:18:33 +00:00
negue
362ca73c94 raise coverage for tasks api calls (#10029)
* - updates a group task - approval is required
- updates a group task with checklist

* add expect to test the new checklist length

* - moves tasks to a specified position out of length

* remove unused line

* website getter tasks tests

* re-add sanitizeUserChallengeTask

* change config.json.example variable to be a string not a boolean

* fix tests - pick the text / up/down props too

* fix test - remove changes on text/up/down - revert sanitize condition - revert sanitization props
2018-10-01 13:29:14 +02:00
negue
5632031f16 reload page if the user closes the modal or not clicking on the notification 2018-09-30 17:22:44 +02:00
Alys
90273362c4 adjust wiki link for usernameInfo string
https://github.com/HabitRPG/habitica-private/issues/7#issuecomment-425405425
2018-09-29 15:56:17 +10:00
Sabe Jones
7aadc10fab Merge branch 'release' into develop 2018-09-28 15:47:45 -05:00
Sabe Jones
bfd45596b5 4.62.1 2018-09-27 19:14:07 +00:00
Sabe Jones
2eed4d38ae chore(i18n): update locales 2018-09-27 19:13:07 +00:00
Sabe Jones
29bbe8534b chore(news): Bailey announcements 2018-09-27 14:03:16 -05:00
beatscribe
9e008890b2 Issue: 10660 - Fixed. Changed default to Please Enter A Value (#10718)
* Issue: 10660 - Fixed. Changed default to Please Enter A Value

* Issue: 10660 - Fixed/revision 2 Changed default to Enter A Value
2018-09-27 12:26:31 +02:00
Phillip Thelen
5505bf1e45 Merge pull request #10700 from phillipthelen/mobile-fixes
Fix website issues on mobile devices
2018-09-27 11:21:53 +02:00
Phillip Thelen
d40781ce07 Fix minor issues. 2018-09-27 10:34:56 +02:00
Phillip Thelen
d9719cdc05 Fix banner offset on initial load 2018-09-26 18:10:24 +02:00
Phillip Thelen
8cc6a96be0 Update inn banner handling 2018-09-26 15:59:57 +02:00
Sabe Jones
c5fb2d6506 Merge branch 'release' into develop 2018-09-25 21:54:32 +00:00
Sabe Jones
afc336461e 4.62.0 2018-09-25 21:54:08 +00:00
Sabe Jones
31376c8461 chore(i18n): update locales 2018-09-25 21:36:14 +00:00
Sabe Jones
3a849bac18 chore(sprites): compile 2018-09-25 16:30:59 -05:00
Sabe Jones
563f3e2012 feat(content): Subscriber Items and Magic Potions 2018-09-25 16:30:50 -05:00
Phillip Thelen
e24a024091 Position inn banner when window is resized 2018-09-25 15:29:55 +02:00
Sabe Jones
dc7d3816fd Merge branch 'release' into develop 2018-09-24 20:33:23 +00:00
Sabe Jones
a094e13352 4.61.1 2018-09-24 20:30:37 +00:00
Sabe Jones
83376a38de chore(i18n): update locales 2018-09-24 20:28:09 +00:00
lucubro
db9c13a05d Reduce margin-bottom of checklist-item from 10px to -3px. (#10684) 2018-09-24 17:46:15 +02:00
Matteo Pagliazzi
8c8aa78a1a Merge branch 'develop' of github.com:HabitRPG/habitica into develop 2018-09-24 17:45:45 +02:00
Matteo Pagliazzi
6e3f7c005a fix client tests 2018-09-24 17:42:50 +02:00
Kirsty
1395380dfe Animal ears after death (#10691)
* Animal Ears purchasable with Gold if lost in Death

* remove ears from pinned items when set is bought

* standardise css and error handling for gems and coins

* revert accidental new line
2018-09-24 17:36:26 +02:00
J.D. Sandifer
833ceb3bf3 Point achievement modal links to main site (#10709) 2018-09-24 17:33:47 +02:00
Matteo Pagliazzi
0522aa1551 update bcrypt 2018-09-24 17:11:34 +02:00
Sabe Jones
58a9e4a439 chore(analytics): reenable navigation tracking 2018-09-21 16:24:18 -05:00
Sabe Jones
84e2b2f45e chore(event): end Ember Hatching Potions 2018-09-21 16:24:07 -05:00
Carl Vuorinen
71c0939a15 Fix API early Stat Point allocation (#10680)
* Refactor hasClass check to common so it can be used in shared & server-side code

* Check that user has selected class before allocating stat points
2018-09-21 16:55:55 +02:00
Matteo Pagliazzi
26c8323e70 Move inbox to its own model (#10428)
* shared model for chat and inbox

* disable inbox schema

* inbox: use separate model

* remove old code that used group.chat

* add back chat field (not used) and remove old tests

* remove inbox exclusions when loading user

* add GET /api/v3/inbox/messages

* add comment

* implement DELETE /inbox/messages/:messageid in v4

* implement GET /inbox/messages in v4 and update tests

* implement DELETE /api/v4/inbox/clear

* fix url

* fix doc

* update /export/inbox.html

* update other data exports

* add back messages in user schema

* add user.toJSONWithInbox

* add compativility until migration is done

* more compatibility

* fix tojson called twice

* add compatibility methods

* fix common tests

* fix v4 integration tests

* v3 get user -> with inbox

* start to fix tests

* fix v3 integration tests

* wip

* wip, client use new route

* update tests for members/send-private-message

* tests for get user in v4

* add tests for DELETE /inbox/messages/:messageId

* add tests for DELETE /inbox/clear in v4

* update docs

* fix tests

* initial migration

* fix migration

* fix migration

* migration fixes

* migrate api.enterCouponCode

* migrate api.castSpell

* migrate reset, reroll, rebirth

* add routes to v4 version

* fix tests

* fixes

* api.updateUser

* remove .only

* get user -> userLib

* refactor inbox.vue to work with new data model

* fix return message when messaging yourself

* wip fix bug with new conversation

* wip

* fix remaining ui issues

* move api.registerLocal, fixes

* keep only v3 version of GET /inbox/messages
2018-09-21 15:12:20 +02:00
Sabe Jones
bb7d447003 Merge branch 'release' into develop 2018-09-20 21:24:30 +00:00
Sabe Jones
97ea510a34 4.61.0 2018-09-20 21:24:05 +00:00
Sabe Jones
99610b4916 chore(i18n): update locales 2018-09-20 21:23:48 +00:00
Sabe Jones
9a43b85492 chore(sprites): compile 2018-09-20 16:19:42 -05:00
Sabe Jones
ecbf39cee4 feat(event): Fall Festival 2018 2018-09-20 16:19:29 -05:00
Matteo Pagliazzi
4394772ee3 Revert "Small Updates (#10701)" (#10702)
This reverts commit dd7fa73961.
2018-09-20 22:36:46 +02:00
Matteo Pagliazzi
dd7fa73961 Small Updates (#10701)
* small updates

* fix client unit test

* fix uuid validation
2018-09-20 15:01:12 +02:00
Phillip Thelen
6ec23ce790 Display settings in one column 2018-09-19 18:42:35 +02:00
Phillip Thelen
b953519e2d Improve rendering banner about sleeping in the inn
See #10695
2018-09-19 16:38:40 +02:00
Sabe Jones
33a8072d23 Merge branch 'release' into develop 2018-09-18 23:11:09 +00:00
Sabe Jones
213316d807 4.60.5 2018-09-18 23:10:46 +00:00
Sabe Jones
44cd4d0708 chore(i18n): update locales 2018-09-18 23:10:30 +00:00
Sabe Jones
063b7a9af0 chore(news): Bailey 2018-09-18 18:08:27 -05:00
negue
c08b5a4f1e add pinUtils-mixin - fixes #10682 (#10683) 2018-09-16 12:54:05 +02:00
Alys
90117625d7 add swear words - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-09-15 14:45:39 +10:00
Sabe Jones
1b3dad749e 4.60.4 2018-09-13 22:21:10 +00:00
Sabe Jones
a622a3ebe3 chore(i18n): update locales 2018-09-13 22:21:02 +00:00
Sabe Jones
2c83c16644 fix(bcrypt): install fork compatible with Node 8 2018-09-12 12:23:20 -05:00
Sabe Jones
1034675184 Merge branch 'release' into develop 2018-09-11 20:44:08 +00:00
Sabe Jones
a420876697 4.60.3 2018-09-11 20:43:40 +00:00
Sabe Jones
dc265e26b3 chore(i18n): update locales 2018-09-11 20:43:05 +00:00
Sabe Jones
b5203dda61 chore(sprites): compile 2018-09-11 15:38:52 -05:00
Sabe Jones
80e92a8767 feat(content): Forest Friends Quest Bundle 2018-09-11 15:38:12 -05:00
Keith Holliday
1c51e62e43 Merged in develop 2018-09-10 09:42:51 -05:00
Matteo Pagliazzi
a265bfac9d fix typo when importing component 2018-09-09 14:46:47 +02:00
negue
92e4d5cd68 Refactor/market vue (#10601)
* extract inventoryDrawer from market

* show scrollbar only if needed

* extract featuredItemsHeader / pinUtils

* extract pageLayout

* extract layoutSection / filterDropdown - fix sortByNumber

* rollback sortByNumber order-fix

* move equipment lists out of the layout-section (for now)

* refactor sellModal

* extract checkbox

* extract equipment section

* extract category row

* revert scroll - remove sellModal item template

* fix(lint): commas and semis

* Created category item component (#10613)

* extract filter sidebar

* fix gemCount - fix raising the item count if the item wasn't previously owned

* fixes #10659

* remove unneeded method
2018-09-09 12:05:33 +02:00
lucubro
a18e9b3b18 Fix initial position item info when selecting one item after another (fixes #10077) (#10661)
* Update lastMouseMoveEvent even when dragging an egg or potion.

* Update lastMouseMoveEvent even when dragging a food item.
2018-09-09 11:59:50 +02:00
Forrest Hatfield
c1a6ba6242 Saved sort selection into local storage for later use - fixes #10432 (#10655)
* Saved sort selection into local storage for later use

* Updated code to use userLocalManager module
2018-09-09 11:58:02 +02:00
Rene Cordier
ed761a8b7b Fix new party member cannot join pending quest (#10648) 2018-09-09 11:56:51 +02:00
Carl Vuorinen
81d5971829 Correct Challenges tooltip in Guild view (#10667) 2018-09-09 11:55:30 +02:00
Alys
eb2d320d1f allow challenge leader/owner to view/join/modify challenge in private group they've left - fixes #9753 (#10606)
* rename hasAccess to canJoin for challenges

This is so the function won't be used accidentally for other
purposes, since hasAccess could be misinterpretted.

* add isLeader function for challenges

* allow challenge leader to join/modify/end challenge when they're not in the private group it's in

* delete duplicate test

* clarify title of existing tests

* add tests and adjust existing tests to reduce privileges of test users

* fix lint errors

* remove pointless isLeader check (it's checked in canJoin)
2018-09-09 11:53:59 +02:00
Matteo Pagliazzi
67538a368e Merge branch 'TheHollidayInn-mana-lvl-10' into develop 2018-09-09 11:52:45 +02:00
Matteo Pagliazzi
d55b95834d remove .only 2018-09-09 11:52:37 +02:00
Matteo Pagliazzi
9ff9cd3b35 Merge branch 'mana-lvl-10' of https://github.com/TheHollidayInn/habitrpg into TheHollidayInn-mana-lvl-10 2018-09-09 11:50:31 +02:00
Alys
b1f24de3c4 remove tests that are no longer needed because we won't be purging private messages (#10670)
Ref: this comment from paglias: https://github.com/HabitRPG/habitica/issues/7940#issuecomment-406489506
2018-09-09 11:24:52 +02:00
Sabe Jones
2ce2100f89 4.60.2 2018-09-06 19:39:46 +00:00
Sabe Jones
dbaae4183e chore(i18n): update locales 2018-09-06 19:30:35 +00:00
Keith Holliday
2009bb97cb Fixed class check 2018-09-05 14:10:59 -05:00
Sabe Jones
3fc9501bac Merge branch 'release' into develop 2018-09-04 17:29:40 -05:00
Sabe Jones
2c2ded2b70 4.60.1 2018-09-04 17:29:18 -05:00
Sabe Jones
d689010e38 fix(news): correct Bailey URL 2018-09-04 17:28:52 -05:00
Sabe Jones
e173b7784c 4.60.0 2018-09-04 21:30:00 +00:00
Sabe Jones
c3db59aae8 chore(i18n): update locales 2018-09-04 21:29:10 +00:00
Sabe Jones
44e063c035 chore(sprites): compile 2018-09-04 16:24:12 -05:00
Sabe Jones
4e2c08cfed feat(content): Armoire and Backgrounds 201809 2018-09-04 16:24:04 -05:00
negue
c845c337df unsubscribe events for a specific method (#10652) 2018-09-01 19:27:32 +02:00
Robert Kojima
418b57f9fb Press kit pointer cursor (#10640)
* cursor while hovering over press-kit faq now a pointer instead of text

* deleted extraneous spaces
2018-09-01 19:25:55 +02:00
Keith Holliday
9725da258e Added getter use 2018-09-01 09:37:47 -05:00
Keith Holliday
4191ea1968 Fixed invite group listener (#10630) 2018-09-01 09:30:44 -05:00
Sabe Jones
a9340ee60f 4.59.2 2018-08-31 16:02:35 -05:00
Sabe Jones
c8d874d28a Revert "Show accurate XP gain in notification on level up (#10590)"
This reverts commit 1f7dd421d4.
2018-08-31 16:02:14 -05:00
Sabe Jones
32a22f1545 Revert "Check user version before adding notifications (#10628)"
This reverts commit 0002148326.
2018-08-31 16:00:31 -05:00
Jacob Frericks
8ffe302a49 Update member API doc (fixes #[8087]) (#10610)
* Update member API doc

* Adding Body/Path/Query parameters to api doc
2018-08-30 14:55:04 -05:00
legitmaxwu
5c50a40f39 Added Contributor Titles to Names on Hover (fixes #10611) (#10624)
* Added Contributor Titles to Names on Hover

* Added Contributor Titles to Names on Hover

* added contributor title text on hover

* added contributor titles on hover in chat

* added contributor titles to text on hover

* Delete .project
2018-08-30 14:52:37 -05:00
Matteo Pagliazzi
84329e5fad New inbox client (#10644)
* new inbox client

* add tests for sendPrivateMessage returning the message

* update DELETE user message tests

* port v3 GET-inbox_messages

* use v4 delete message route

* sendPrivateMessage: return sent message

* fix
2018-08-30 14:50:03 -05:00
Phillip Thelen
64507a161e Add android FAQ answers to content call (#10649) 2018-08-30 14:49:36 -05:00
Lucas Heim
0f7fc27663 Creating default encryption test to improve coverage (#10651) 2018-08-30 14:48:56 -05:00
Sabe Jones
1545685a5b 4.59.1 2018-08-30 19:00:15 +00:00
Sabe Jones
410355c3f1 chore(i18n): update locales 2018-08-30 18:59:45 +00:00
Sabe Jones
ac27cabf6a chore(news): Bailey 2018-08-30 13:56:36 -05:00
Sabe Jones
972631e7ac Merge branch 'release' into develop 2018-08-29 20:26:39 +00:00
Sabe Jones
d27ed7c406 4.59.0 2018-08-29 20:25:50 +00:00
Sabe Jones
031783b1d7 chore(i18n): update locales 2018-08-29 20:25:24 +00:00
Sabe Jones
318aa7cbd9 chore(sprites): compile 2018-08-29 15:20:36 -05:00
Sabe Jones
f802a41f75 feat(content): Animal Tails 2018-08-29 15:20:09 -05:00
Alys
1d597039ca prevent Quest progress message in Party chat when user is Resting in the Inn (#10636)
* prevent quest progress message in party chat when user is resting in the inn

* improve comment

* update tests now that the test group includes a new member (sleeping quest participant)

* adjust a test to fix lint failure (and make the test better)

* fix order of element assignments in test array
2018-08-28 15:04:16 +02:00
negue
07bc374078 fix ultimate gear notification length - allow longer notifications but with a-like border-radius 2018-08-27 20:08:09 +02:00
Keith Holliday
8153674dc0 Added in class checks and notification tests 2018-08-26 17:41:55 -05:00
Keith Holliday
0002148326 Check user version before adding notifications (#10628) 2018-08-26 15:13:36 -05:00
Keith Holliday
d198e23de6 Fixed editing categories (#10627) 2018-08-25 11:15:47 -05:00
Keith Holliday
4f4e141806 Added prize back after deleting challenge (#10631) 2018-08-25 11:15:00 -05:00
Keith Holliday
05e8d6f032 Cleaned mp displaed in fixed value (#10626) 2018-08-25 11:14:41 -05:00
Matteo Pagliazzi
39847893d2 remove use mobile apps banner (#10634) 2018-08-25 15:02:44 +02:00
Keith Holliday
e4dbf09dda Prevented users with lvl less than 10 from seeing mana 2018-08-24 23:05:36 -05:00
Forrest Hatfield
eb99b709e0 Allow login buttons to expand vertically - fixes #9861 (#10622)
* Allow login buttons to expand vertically

* whitespace matching
2018-08-24 16:38:42 -05:00
Alex Figueroa
862b3453f8 Fix members modal showing stale data (#10619)
Resolves: #10544
2018-08-24 16:00:49 -05:00
Jacob Frericks
7f48853d32 Fixing misspelling and inconsistent punctuation in the api doc (#10617) 2018-08-24 15:48:51 -05:00
Rene Cordier
5c4f763bb1 Fix lostMasterclasser achievement issue (#10616) 2018-08-24 15:23:43 -05:00
Forrest Hatfield
bc9401b2f7 Added smartbanner code to suggest iphone/android apps for mobile users - fixes #9901 (#10604)
* Added smartbanner code to suggest iphone/android apps for mobile users

* Installed smartbanner.js as a module and imported css through app.vue

* Changed the logos to use the ones in the existing presskit directory and fixed the import line for the smartbanner component

* Changed smartbanner import to a src include for css and updated js import
2018-08-24 15:08:34 -05:00
negue
6fb9030b96 reload completed tasks after resync is finished - always reload completed tasks (#10614) 2018-08-24 15:04:59 -05:00
Sabe Jones
ba307af963 Correct timing on updating Group Plan member quantities (#10589)
* fix(groups): correct timing on updating member quantities

* fix(groups): don't run group cancellation check if we're in invite flow

* fix(groups): update leader when memberCount is 1

* fix(groups): move leader update back--unrelated to group plans fix
2018-08-24 14:57:05 -05:00
Sabe Jones
cf4b920a67 4.58.0 2018-08-23 20:13:15 +00:00
Sabe Jones
b0ff35a8f1 chore(i18n): update locales 2018-08-23 20:04:40 +00:00
Sabe Jones
85b4c7825e chore(sprites): compile 2018-08-23 14:57:28 -05:00
Sabe Jones
5b7ea8ec5c feat(content): Mystery Items Aug 2018 2018-08-23 14:57:11 -05:00
Sabe Jones
5cfd0c863e Merge branch 'release' into develop 2018-08-22 16:46:44 +00:00
Sabe Jones
10c6244c0c 4.57.4 2018-08-22 16:46:14 +00:00
Sabe Jones
20e65be8bf chore(i18n): update locales 2018-08-22 16:45:38 +00:00
Sabe Jones
8bac324ba7 fix(content): September end date for Ember Potions 2018-08-22 11:42:38 -05:00
Matteo Pagliazzi
2ee0288aaa fix stripe sub cancellation test 2018-08-22 14:36:20 +02:00
Sabe Jones
b7ef4c50b2 Merge branch 'release' into develop 2018-08-21 18:32:52 +00:00
Sabe Jones
52be9c750f 4.57.3 2018-08-21 18:32:30 +00:00
Sabe Jones
b0200026aa chore(i18n): update locales 2018-08-21 18:32:13 +00:00
Sabe Jones
e6c8b977c8 feat(content): enable Ember Potions 2018-08-21 13:29:52 -05:00
Sabe Jones
c78b5ecf7c Analytics: More / improved tracking (#10608)
* WIP(analytics): add / improve tracking

* fix(groups): revert attempt at tracking on group model

* fix(analytics): track questing based on user data

* each buy-operation now has a getItemType method - typo getItemKey - removed unneeded overrides
2018-08-20 14:13:22 -05:00
Sabe Jones
f27e9b02d8 Merge branch 'release' into develop 2018-08-20 14:16:36 +00:00
Sabe Jones
c06c19ca41 4.57.2 2018-08-20 14:16:01 +00:00
Sabe Jones
d5d894b8a9 chore(i18n): update locales 2018-08-20 14:15:23 +00:00
Sabe Jones
7bd4e6a5a9 Merge branch 'remove-auth-with-url' into release 2018-08-20 09:12:59 -05:00
Matteo Pagliazzi
f13eed5663 fix inbox modal header 2018-08-20 15:40:31 +02:00
Keith Holliday
a9a2fe6314 Fixed mp rounding (#10599)
* Fixed mp rounding

* Fixed toFixed rounding
2018-08-18 21:08:56 -05:00
Keith Holliday
d6514bce8b Fixed inbox id after add (#10609) 2018-08-18 21:08:32 -05:00
negue
c862bdb76a Merge branch 'develop' of https://github.com/HabitRPG/habitica into negue/modal-notifications
# Conflicts:
#	website/client/components/notifications.vue
2018-08-18 14:25:20 +02:00
negue
b596576c53 rollback death modal changes 2018-08-18 14:22:16 +02:00
Alys
603fc8c4dd combine cron's Resting in the Inn code with non-sleeping code - fixes #5232 etc (#10577)
* remove commented-out code for purging PMs - no longer needed

https://github.com/HabitRPG/habitica/issues/7940#issuecomment-406489506

* adjust comments

* move cron code when sleeping / resting back into main body of cron code

* rename tests to use consistent terminology for sleeping

* add tests for cron when user is sleeping

* move sleeping tests to same place as non-sleeping test

This matches how the code has sleeping and non-sleeping code mingled.

* replace a broken test with new tests

The deleted test wasn't working correctly. The check that the user's
health hadn't decreased would have worked even if the user wasn't
sleeping because the Daily had been marked completed.
The new tests test both no damage from incomplete Dailies and
that Dailies are reset.

* add tests for Perfect Day buff and rename existing tests for consistent terminology

* remove old test code
2018-08-18 12:47:07 +02:00
Sabe Jones
3c602351f9 Merge branch 'release' into develop 2018-08-18 03:32:39 +00:00
Sabe Jones
29ed33461c 4.57.1 2018-08-18 03:32:14 +00:00
Sabe Jones
fbc1044100 chore(i18n): update locales 2018-08-18 03:32:02 +00:00
Matteo Pagliazzi
35e02d2871 fix hall of heroes 2018-08-17 22:29:47 -05:00
Keith Holliday
6aa204c3f5 Fixed concurrency issues with push devices (#10598)
* Fixed concurrency issues with push devices

* Fixed push notificaiton response and model adding
2018-08-17 07:01:41 -05:00
Keith Holliday
eaaa5ad7f3 Added amoire food to user immediately (#10596)
* Added amoire food to user immediately

* Fixed user item set
2018-08-17 06:29:32 -05:00
Keith Holliday
54468ff499 Added existence check (#10595) 2018-08-17 06:20:45 -05:00
Brian Fenton
53405aa586 Handleless wheelchair options (#10572)
* removing duplicate keys

* adding chair assets and wiring them to customize screen

* adding customization data for new wheelchair types

* removing an unused locale key and moving the code style override closer to the affected area

* explicitly re-enabilng linting rule

* adding button-sized chair assets

* updating assets to new resolution

* moving chair keys into component data
2018-08-17 12:23:43 +02:00
Rene Cordier
7630c02e13 Fixing healing light not being castable when user full hp (#10603)
* Fixing healing light not being castable on server and client sides when user has already full health

Adding integration test for spell cast of healing light when full health

Adding test for heal cast if user has full health

* Fixing ESLint syntax in the spells test files
2018-08-17 12:06:58 +02:00
Isabelle Lavandero
ec444384f4 Add error notification for deleted user (#10600)
* snackbar notification for deleted user

* check for 404

* localize text
2018-08-17 12:02:43 +02:00
Isabelle Lavandero
cce9b33844 Filter dailies by due/not due in group plan and challenge page (#10582)
* sort by isDue works but only on refresh

* update isDue for new tasks

* apply correct filter to challenge page
2018-08-17 11:58:43 +02:00
Matteo Pagliazzi
b977d42402 fix hall of heroes 2018-08-17 11:52:15 +02:00
Matteo Pagliazzi
2672cbd790 fix stripe cance 2018-08-17 11:12:48 +02:00
Keith Holliday
f049d29d1b Added username invite 2018-08-16 17:40:53 -05:00
Keith Holliday
b7ca5be6ee Closed modal when removing challenge task (#10597) 2018-08-16 16:54:57 -05:00
Keith Holliday
5ae89761b0 Prevent tour from displaying twice (#10594)
* Prevent tour from displaying twice

* Removed forced and prevent overlay click
2018-08-16 16:53:37 -05:00
Sabe Jones
8b0101c74c 4.57.0 2018-08-16 19:45:53 +00:00
Sabe Jones
dbd295e35b chore(i18n): update locales 2018-08-16 19:45:45 +00:00
Sabe Jones
b5428f4ac9 Merge branch 'develop' into release 2018-08-16 14:41:09 -05:00
Sabe Jones
5b213b4f94 chore(sprites): compile 2018-08-16 14:40:27 -05:00
Sabe Jones
0142e332e8 feat(content): Kangaroo Pet Quest 2018-08-16 14:40:09 -05:00
Keith Holliday
b4f955333b Revert mute date (#10602)
* Revert mute date

* Removed extra moment
2018-08-16 11:28:03 -05:00
Matteo Pagliazzi
696121fb24 remove auth with url 2018-08-15 10:40:25 +02:00
Keith Holliday
2a7dfff88a Added mute end date (#10566)
* Added mute end date

* Added indefinite mute for users using slurs

* Fixed user reload. Added no longer muted message. Added format for date

* Fixed lint
2018-08-12 12:09:12 -05:00
Alys
2c921609c1 improve apidocs related to allocating Stat Points and user/unlock - fixes #10557 (#10592)
* correct curl parameter (-X for request method; -x for proxy information)

* fix typo in error message

* fix mistakes in apidocs for allocating Stat Points
2018-08-12 12:11:01 +02:00
Rene Cordier
1f7dd421d4 Show accurate XP gain in notification on level up (#10590) 2018-08-12 11:55:10 +02:00
Matteo Pagliazzi
45ca090105 Revert "update packege-lock.json"
This reverts commit 02b22170e2.
2018-08-11 12:40:23 +02:00
Matteo Pagliazzi
02b22170e2 update packege-lock.json 2018-08-11 10:29:09 +02:00
Sabe Jones
1134c7748b Make private message character limit obvious on client (#10579)
* fix(messages): make character limit obvious on client
Fixes #10549

* fix(messages): localize hardcoded button text
2018-08-10 08:46:46 -05:00
Keith Holliday
7019e32eed Reverted css loader (#10588) 2018-08-10 15:41:45 +02:00
Sabe Jones
485c528b45 Greenkeeper cleanup round 1 (#10585)
* fix(package): update csv-stringify to version 3.0.0

* chore(package): update lcov-result-merger to version 3.0.0

* chore(package): update karma-sinon-chai to version 2.0.0

* fix(package): update bcrypt to version 3.0.0

* fix(package): update validator to version 10.5.0

Closes #10320

* fix(package): update got to version 9.0.0

* chore(package): update karma to version 3.0.0

* Merge branch 'greenkeeper-css' into greenkeeper
2018-08-09 17:02:14 -05:00
Keith Holliday
f1c1ba8efa Minor responsive updates to the spell bar (#10580) 2018-08-09 15:24:44 -05:00
Sabe Jones
b0e4c2cb11 4.56.3 2018-08-09 19:07:50 +00:00
Sabe Jones
0e346f7050 chore(i18n): update locales 2018-08-09 19:07:37 +00:00
Sabe Jones
1eb1fe76a8 Merge branch 'release' into develop 2018-08-08 16:55:21 -05:00
Sabe Jones
72a0e05804 4.56.2 2018-08-08 21:07:15 +00:00
Sabe Jones
5f37b9727a chore(i18n): update locales 2018-08-08 21:06:54 +00:00
Sabe Jones
bf17b49046 chore(sprites): compile 2018-08-08 16:04:09 -05:00
Sabe Jones
36edf5265f chore(news): Bailey for BTS Challenge 2018-08-08 16:03:57 -05:00
Keith Holliday
6da243e034 Added context message to streak (#10565)
* Added context message to streak

* Updated text
2018-08-08 03:52:53 -05:00
Alys
b87ff03210 remove unused messageGroupNotFound string (has been replaced with groupNotFound) 2018-08-07 13:01:02 +10:00
Alys
9d994f8a77 allow notification screen text to be translated (#10576)
The `noNotifications` string was not being used so changing it for
this purpose makes sense. Non-English users will see meaningful
text even before the new text is translated.
2018-08-05 10:48:36 +02:00
Sabe Jones
75c3f7214b fix(members): Don't show "View Progress" if not a Challenge 2018-08-03 14:38:31 -05:00
Sabe Jones
f3f8fa3a42 feat(pets): Prebuild Kangaroo mount sprites 2018-08-03 14:19:11 -05:00
Sabe Jones
2e34dab9a6 4.56.1 2018-08-03 10:34:43 -05:00
Sabe Jones
0f9b274059 fix(news): Correct credit with apologies to @thefifthisa! 2018-08-03 10:34:29 -05:00
Matteo Pagliazzi
041bde0cba amazon: fix styling 2018-08-03 12:23:50 +02:00
Alys
8888e63005 limit chat message flagging ability for new players - fixes #10069 (#10567)
* remove duplicate module.exports statement

* remove commented-out footer in Slack slur notification

There's no need for anything to replace this footer.

* swap order of flag actions to put most critical first

This causes moderators to be notified before the flagged message's flagCount is incremented, because if something happens to prevent the flagGroupMessage Promise from resolving, we still want to mods to see the notification.

* limit chat message flagging ability for new players

Players who created accounts less than three days ago can flag posts
but that does not contribute to the posts' flagCount. This prevents
a troll from maliciously hiding innocent messages by creating new
accounts to flag them.

* add tests

* fix other tests
2018-08-03 12:04:01 +02:00
Isabelle Lavandero
7aa2fac14a Localize time for due dates and chat messages (#10555)
* localize time for pt_BR and zh

* add zh_TW to moment langs mapping
2018-08-03 11:57:43 +02:00
FergusonSean
4493e1d98c Fix path to detect when group is the tavern or the user's party and set paths appropriately (#10570)
* Fix path to detect when group is the tavern or the user's party and set path's appropriately

* Fix lint issues
2018-08-03 11:54:32 +02:00
Sabe Jones
fcbc2acda7 4.56.0 2018-08-02 18:46:57 +00:00
Sabe Jones
729ba36ed3 chore(i18n): update locales 2018-08-02 18:45:32 +00:00
Sabe Jones
896495cac5 Merge branch 'develop' into release 2018-08-02 18:41:36 +00:00
Sabe Jones
3f89dae8c9 chore(sprites): compile 2018-08-02 13:39:34 -05:00
Sabe Jones
4ec5df170c feat(content): Backgrounds, Armoire, minor sprite fixes 2018-08-02 13:38:51 -05:00
Matteo Pagliazzi
fdbcd99525 remove hatching modal every time the stable is loaded 2018-08-02 08:37:01 +02:00
Sabe Jones
99726bdc2f Merge branch 'release' into develop 2018-08-01 17:17:07 -05:00
Sabe Jones
b00d1a067e 4.55.1 2018-08-01 19:52:27 +00:00
Sabe Jones
0910ca7470 chore(i18n): update locales 2018-08-01 19:51:43 +00:00
Sabe Jones
24f5e7c19f chore(sprites): compile 2018-08-01 14:48:50 -05:00
Sabe Jones
4f34443b84 chore(event): end Summer Splash + Potions
Also Bailey news
2018-08-01 14:48:38 -05:00
Alys
714706f925 add quest participant list to collection quests (#10568) 2018-08-01 10:43:33 +02:00
Sabe Jones
0899dddb42 Merge branch 'release' into develop 2018-07-31 15:31:48 -05:00
Sabe Jones
f123fcd1b3 4.55.0 2018-07-31 19:16:31 +00:00
Sabe Jones
6ade7b08c8 chore(i18n): update locales 2018-07-31 19:13:36 +00:00
Sabe Jones
c88b9b80b5 feat(event): Habitica Naming Day
and Bailey announcements
2018-07-31 14:08:56 -05:00
Matteo Pagliazzi
33149e1afa fix conflict from previous PR 2018-07-31 09:47:17 +02:00
negue
c8becbccb5 prevent multiple notifications (#10524)
* WIP - prevent multiple notifications

* merge promises to one

* update test, iterate each user

* revert changes in `groups.js` - filter duplicate notifications in `convertNotificationsToSafeJson`
2018-07-30 16:11:56 +02:00
Matteo Pagliazzi
c9465cbfdd Merge branch 'thefifthisa-clickout' into develop 2018-07-30 16:10:01 +02:00
Isabelle Lavandero
965b7a3be7 Mana bar no longer shown on profile if user has opted out of class system (#10560)
* no more mana bar shown on profile if user has opted out of class system

* edit tests for preferences
2018-07-30 16:05:00 +02:00
Isabelle Lavandero
6b8784cf04 esc only closes tags popup if open (#10547) 2018-07-30 16:04:35 +02:00
Isabelle Lavandero
508d832d73 View participant list of active quest (#10531)
* participant list modal opens, nothing displayed yet

* display participants!

* only need to filter

* change button to link

* prevent scrolling back up when modal opens

* style link as h4

* move css
2018-07-30 16:04:04 +02:00
Dexx Mandele
734e4a963f Re-enable start quest button (#10532)
* Check for scroll during quest pre-selection

* Re-enable start quest btn after error

* Review: remove unused start quest method
2018-07-30 16:02:17 +02:00
Texas Toland
40495aaacb Fix drag scrolling tasks when character has abilities (#10552)
The default scroll sensitivity of the task columns is 30 px from the bottom of the screen. The collapsed spells drawer renders 32 px from the bottom of the screen intercepting most drag events. Increases the scroll sensitivity to double the height of the blocking element.

Also ignores the Yarn lockfile. `yarn --ignore-engines` builds successfully and tests pass with Node 10.6.0 and MongoDB 4.0.0.
2018-07-30 16:00:55 +02:00
Alex Figueroa
5566460541 Fix user receiving Joined Challenged achievement when creating a challenge (#10559)
* Fix joinedChallenge achievement being awarded when creating a challenge

* Modify test to check that achievement is not awarded for creating a challenge
2018-07-30 16:00:05 +02:00
Alex Figueroa
774a1d9a96 Fix advanced settings from always starting collapsed (#10561)
Previously the user's preference for whether the advanced settings starts opened or collapsed was ignored.
Resolves: #10556
2018-07-30 15:58:43 +02:00
Matteo Pagliazzi
60df912dcc Merge branch 'clickout' of https://github.com/thefifthisa/habitica into thefifthisa-clickout 2018-07-30 15:55:20 +02:00
Keith Holliday
7325bc0871 Separated out modal components (#10545)
* Seprated out modal components

* Removed extra css

* Fixed import case
2018-07-30 14:38:29 +08:00
Keith Holliday
2fc233e70f Removed duplicate code and added member modal event (#10542)
* Removed duplicate code and added member modal event

* Removed console

* Removed console log
2018-07-30 13:56:17 +08:00
negue
9fd26a88ea Update notification.vue
remove duplicate methods props
2018-07-29 21:55:24 +02:00
negue
76860fe3f8 Merge branch 'develop' of https://github.com/HabitRPG/habitica into negue/modal-notifications
# Conflicts:
#	website/client/components/notifications.vue
2018-07-29 20:21:51 +02:00
negue
b16e700de5 auto revive 2018-07-29 20:12:30 +02:00
Sabe Jones
9205ec10b3 chore(i18n): update locales 2018-07-26 19:05:35 +00:00
Sabe Jones
9aa4cce3b9 fix(strings): add missing Mystery Set name 2018-07-26 13:51:07 -05:00
Sabe Jones
42d823ab44 4.54.0 2018-07-26 18:20:56 +00:00
Sabe Jones
f19331cfcc chore(i18n): update locales 2018-07-26 18:20:18 +00:00
Sabe Jones
b7de7335ed Merge branch 'develop' into release 2018-07-26 18:15:33 +00:00
Sabe Jones
2e00ec5534 chore(news): Bailey 2018-07-26 13:12:15 -05:00
thefifthisa
f30d4b2cbf works for all outside clicks! 2018-07-24 19:07:59 -04:00
Sabe Jones
a3af39ed25 4.53.0 2018-07-24 20:05:16 +00:00
Sabe Jones
b57518732e chore(i18n): update locales 2018-07-24 20:04:40 +00:00
Sabe Jones
a6a6aac400 chore(sprites): compile 2018-07-24 15:00:09 -05:00
Sabe Jones
48a92e77be feat(content): July Subscriber Items and Summer Splash Orcas 2018-07-24 14:59:49 -05:00
thefifthisa
a31f1f19fc works inside modal too (mostly) 2018-07-23 20:45:50 -04:00
Matteo Pagliazzi
d2a39a5124 fix #10511 (#10551) 2018-07-23 19:47:32 +02:00
thefifthisa
9b69b640c3 close on click out works for background but not inside modal 2018-07-22 19:47:57 -04:00
Keith Holliday
7bead74b49 Removed extra options and fixed copy userID (#10538) 2018-07-21 08:11:29 -05:00
Keith Holliday
91e91788ce Change streak achievement snack to text type (#10534) 2018-07-21 08:11:09 -05:00
Keith Holliday
62c60ce520 Added copy to detail blocks wont work on mods (#10539)
* Added copy to detail blocks wont work on mods

* fix(wording): "moderator" clearer than "mod"
2018-07-21 08:10:54 -05:00
Keith Holliday
423eafbd4d Reset gift message (#10540) 2018-07-21 08:10:34 -05:00
Keith Holliday
004ab51c46 Allow for stat edits on mobile (#10535) 2018-07-21 08:09:57 -05:00
Keith Holliday
f464403623 Display exact date on hover (#10536) 2018-07-21 08:09:36 -05:00
Keith Holliday
0fc66bef4e Fixed guild badge color text (#10537) 2018-07-21 08:09:16 -05:00
Keith Holliday
71636cd25e fixed new message count alignment (#10541) 2018-07-21 08:08:56 -05:00
Keith Holliday
d5efb50d9b Update stat point title (#10543) 2018-07-21 08:08:36 -05:00
Keith Holliday
510e01effd Added user field limit to some routes (#10546)
* Added user field limit to some routes

* Added taskOrder and perferences

* Added contributor field
2018-07-20 23:24:33 -05:00
negue
b75e65f42d move modals to notifications (to open the modals) 2018-07-20 23:56:36 +02:00
Texas Toland
0e648d85a0 Fix #10477 (#10530) 2018-07-20 15:55:18 -05:00
negue
7b562c45cf Fix Modal Stack - reopening modals (#10493)
* use fallback target.id - only scroll modal content (not the page)

* fix lint

* debug information

* add snackbar onClick callback - use notification instead of modal for joined-challenge

* revert console.log / fix lint
2018-07-20 15:50:40 -05:00
negue
b7a46637d5 check genericPurchase rejections and show error (#10526) 2018-07-20 15:33:23 -05:00
Sabe Jones
284b2cc413 Group Tasks Shared Completion (#10515)
* WIP(groups): add shared completion prop
Also fix an issue where the Needs Approval toggle would not read/save 
correctly.

* fix(groups): save group options on task create
Also, correct count of assigned members when viewing user is among 
assignments

* fix(groups): display correct messages in two places

* fix(tasks): eliminate console error related to filtering
Also localize a group plans string

* WIP(groups): implement single completion for approval workflow

* WIP(groups): Add shared completion handling to no-approval-needed flow

* WIP(groups): cover approval flow case for all-assigned
Also save new field on initial task creation

* fix(tasks): use default sharedCompletion value when creating tasks

* WIP(tests): non-working draft test

* Added completed todo to group query

* WIP(group-tasks): fix bugs, add tests

* refactor(group-tasks): deleteMany op, add more tests

* refactor(group-tasks): move shared completion handling to lib

* WIP(group-tasks): broken refactor

* WIP(group-tasks): await all the things

* Turned complete master task to save

* WIP(group-tasks): show completed

* fix(filtering): don't try to filter if no list is passed

* refactor(group-tasks): load completed to-dos on demand, not at start

* fix(group-tasks): don't double up on repeat visits

* fix(group-tasks): include brief explanation in dropdown

* fix(group-tasks): improve wording some more
2018-07-20 12:29:44 -05:00
negue
8b69540e71 FIX: Challenge Creation without Group not found error (#10525)
* prevent loading the party, if the user isn't part of one

* check for the party id too
2018-07-19 22:48:17 -05:00
Keith Holliday
8d9a4e97a8 Fixed display points for the stat save button (#10522) 2018-07-19 22:03:43 -05:00
Sabe Jones
f31a82c8f2 4.52.2 2018-07-19 19:04:53 +00:00
Sabe Jones
8bc02e82ee chore(i18n): update locales 2018-07-19 19:04:38 +00:00
Sabe Jones
9040f9f04e 4.52.1 2018-07-19 14:01:16 -05:00
Sabe Jones
ff82c37d5f chore(news): Bailey 2018-07-19 14:00:53 -05:00
Sabe Jones
37364b0700 Merge branch 'develop' into release 2018-07-19 13:38:00 -05:00
Sabe Jones
11cfb3920a 4.52.0 2018-07-17 19:10:41 +00:00
Sabe Jones
f5468d3771 chore(i18n): update locales 2018-07-17 19:09:37 +00:00
Sabe Jones
99882d09ab chore(sprites): compile 2018-07-17 14:05:24 -05:00
Sabe Jones
7034d135d5 feat(content): Sea Serpent Pet Quest 2018-07-17 14:05:09 -05:00
Sabe Jones
034c0c9bb5 4.51.4 2018-07-16 21:12:50 +00:00
Sabe Jones
e0711655f0 chore(i18n): update locales 2018-07-16 21:12:33 +00:00
Sabe Jones
71e162eed5 chore(news): Bailey 2018-07-16 16:10:04 -05:00
Matteo Pagliazzi
8eac8732c5 fix(tasks): do not load completed todos if not necessary 2018-07-16 12:02:37 +02:00
Keith Holliday
896a1b74b6 Added new award flow to challenges (#10512) 2018-07-13 21:58:28 -05:00
Keith Holliday
3b36046a6a Removed member count code (#10518) 2018-07-13 06:06:33 -05:00
negue
07991817e7 check balanceRemoved for analytics call (#10506) 2018-07-13 10:51:49 +02:00
negue
47b75156fa reset flag comment (#10507) 2018-07-13 10:50:17 +02:00
Sabe Jones
c630486fef fix(errors): handle non-array-style errors again 2018-07-12 16:47:59 -05:00
negue
0a070316b5 fix xml export (#10505)
* add /export webpack-proxy - fix xml export

* fix lint / add xmlMode
2018-07-12 15:49:22 -05:00
negue
f6b34e85df Max 3000 Character Limit on Chat-Messages (#10494)
* limit chat length to 3000

* add test
2018-07-12 15:40:04 -05:00
Isabelle Lavandero
2946f0df15 Update signup error messages (#10483)
* prints first error message only

* update signup error messages, missing password not working (wip)

* remove alerts, show notEmpty, first error only per param, update unit test

* move changes to client side
2018-07-12 15:27:02 -05:00
Vinicius
614d9a920a Change track-habits.png to the correct pictures available on Zeplin. (#10514) 2018-07-12 15:13:56 -05:00
aszlig
454524fb5b member-details: Only add 1px margin when condensed (#10504)
As reported in #10502, adding a 1 pixel right margin to *all* nodes with
the member-stats class will affect the display when you click on the
avatar as well, which will then break the layout because of that
additional margin.

Instead of adding the margin to .member-stats in general, let's just add
it to the condensed version so that it really just addresses the
flickering on Chrome/Chromium as reported in #10379.

I've tested whether the flickering still happens via a small
xdotool-loop (just to make sure I don't get too shaky with the mouse):

for i in $(seq 500 508); do xdotool mousemove "$i" 250; sleep 5; done

The flickering doesn't happen anymore and the layout in the party
members overview and the stats overview when you click on the avatar is
no longer distorted.

Signed-off-by: aszlig <aszlig@nix.build>
Fixes: #10502
2018-07-12 15:12:40 -05:00
Vinicius
abc0777412 Add word-break: break-word to .sortable-tasks class to prevent links and words to get out of the task box (#10495) 2018-07-12 15:10:23 -05:00
James Robinson
6972eb8f8f Prevent login error text overflow (#10450) 2018-07-12 15:08:13 -05:00
Brian Fenton
535ee2b2a7 Adding hand cursor to FAQ headings, and ability to address answers via URL hash (#10260)
* Turning H2s into anchors to add hand cursor and to create addressable page fragments
adding ref to target individual entries
adding scroll handler to make sure expanded result is in view.

* combining click handler directives as per CR

* changing question display to always render, then hide via CSS, vs only render when state changes.

* updating pug template to include heading in each URL fragment

* simplifying logic & moving to vue-bootstrap accordion since multiple open panels is not required

* adding pointer cursor to FAQ headings

* moving initial hash checking to data prop instead of mounted so it does not trigger oddities on on hash change (re-mount)

* using new pug HTML for bootstrap collapse

* removing extraneous markup

* updating styling to match existing page

* removing fancier than necessary markup, and attendant styles

* using more standard event property
2018-07-12 15:07:49 -05:00
Jim Pollaro
c9755bee7c Logout Changes #9915 (#10022)
* Added session check before route changes, but express isn't finding route

* Added a logout component. Changed route to logout on server. Typing 'logout' in URL will logout of Vue + Express

* Removed commented text from previous version

* Updated logout function to comply with formatting and eliminate unused blocks

* Added package-lock.json back

* package-lock.json

* recreated package-lock file

* fix(auth): allow logout from direct visit to /logout path

* fix(merge): clean up more misc changes

* fix(merge): remove extra file
2018-07-12 15:07:08 -05:00
Sabe Jones
f810fff6fc 4.51.3 2018-07-12 19:10:02 +00:00
Sabe Jones
5bbe59c52d chore(i18n): update locales 2018-07-12 19:09:42 +00:00
Sabe Jones
3f52401384 chore(news): Bailey 2018-07-12 14:05:40 -05:00
Matteo Pagliazzi
e7944b3d98 iOS push notifications, use node-apn (#10517)
* fixing typos in comments. yes, I am that kind of nerd

* replacing push-notify with node-apn in deps and in pushNotifications.js

* updating calling code and tests to use node-apn

* updating APN configs to new format

* migrating team ID and key ID to config.json

* update code to use env variables and add correct topic
2018-07-12 12:56:15 +02:00
Sabe Jones
08e925e3da Merge branch 'release' into develop 2018-07-10 17:26:37 +00:00
Sabe Jones
16c9e42ad8 4.51.2 2018-07-10 17:24:18 +00:00
Sabe Jones
0e1d00c95f chore(i18n): update locales 2018-07-10 17:23:40 +00:00
Sabe Jones
166f4683ca feat(content): enable Splashy Skins 2018-07-10 12:18:41 -05:00
Keith Holliday
1fcc0d8d3a Ensured redirect is using base (#10497) 2018-07-09 10:08:19 -05:00
Matteo Pagliazzi
8a4c4e10f1 remove sensitive info from logs 2018-07-08 10:43:28 +02:00
Maurício El Uri
18ed0fe446 Fixed the unnecessary whitespace to the right of landing page (#10435) (#10490) 2018-07-06 15:57:36 -05:00
Vinicius
1f9ebeb629 Set .resting-banner z-index to 1300, set #progress .bar z-index to 1600 (#10492) 2018-07-06 15:55:44 -05:00
Sabe Jones
b9d83122d1 fix(tasks): eliminate console error related to filtering
Also localize a group plans string
2018-07-06 15:43:27 -05:00
Sabe Jones
d1f7e64156 fix(groups): display correct messages in two places 2018-07-06 13:21:28 -05:00
Sabe Jones
0f8e7416f8 fix(groups): save group options on task create
Also, correct count of assigned members when viewing user is among 
assignments
2018-07-06 10:30:09 -05:00
Sabe Jones
1c8b0f92df Small Group Plan fixes (#10499)
* fix(groups): better margins, don't close whole modal on close assigned members list

* fix(groups): proper sticky toggle switch
2018-07-05 16:37:06 -05:00
Sabe Jones
75e5b20f93 4.51.1 2018-07-05 15:14:05 +00:00
Sabe Jones
f9db432794 chore(i18n): update locales 2018-07-05 15:12:59 +00:00
Sabe Jones
6cec7cbba2 Merge branch 'release' into develop 2018-07-03 17:39:27 +00:00
Sabe Jones
f76d097313 4.51.0 2018-07-03 17:38:44 +00:00
Sabe Jones
59af471438 chore(i18n): update locales 2018-07-03 17:38:00 +00:00
Sabe Jones
d0da303b7d chore(sprites): fix shop icon canvases, compile 2018-07-03 12:33:20 -05:00
Sabe Jones
596383e7a8 feat(content): Armoire and Backgrounds July 2018 2018-07-03 12:26:20 -05:00
Matteo Pagliazzi
accba7fc13 fix bug in task approval notification 2018-07-03 11:23:44 +02:00
Sabe Jones
dfc54f1600 Merge branch 'release' into develop 2018-07-02 19:58:23 +00:00
Sabe Jones
b76ab58e3e 4.50.6 2018-07-02 19:58:00 +00:00
Sabe Jones
6f093a94c4 chore(i18n): update locales 2018-07-02 19:57:39 +00:00
Sabe Jones
a9a9e7a4ab chore(sprites): compile 2018-07-02 14:51:59 -05:00
Sabe Jones
b2058ec23d chore(news): Bailey challenge announcements 2018-07-02 14:51:40 -05:00
Keith Holliday
2461f53cf5 4.50.5 2018-07-01 18:25:23 -05:00
Keith Holliday
73fc288f3b 4.50.4 2018-07-01 18:25:20 -05:00
Keith Holliday
ea78b6feb9 Changed docker file names (#10489) 2018-07-01 18:23:40 -05:00
Keith Holliday
7c141614ed Api login party invites (#10486)
* Fixed incorrect variable

* Fixed redirect params
2018-06-30 22:06:18 -05:00
Alys
c072935e80 document the dueDate parameter for API task functions - partial fix for #8087 2018-06-30 15:55:27 +10:00
Alys
54e49ca3b9 adjust README file for recent changes in wiki Blacksmith pages
Also replace non-ascii quotes with ascii ones (nicer for
command-line reading).
2018-06-30 15:05:05 +10:00
Sabe Jones
b16a245d61 Merge branch 'release' into develop 2018-06-29 19:06:20 +00:00
Sabe Jones
0a8109e496 4.50.3 2018-06-29 19:05:53 +00:00
Sabe Jones
cdfcc6419f chore(i18n): update locales 2018-06-29 19:03:36 +00:00
Matteo Pagliazzi
9c25c2452f fixes #10485 2018-06-29 20:29:14 +02:00
Matteo Pagliazzi
573f2e4732 fix preening when history entries are null 2018-06-29 20:03:45 +02:00
Keith Holliday
81ffcf9c1b Added login path for Spritely (#10484) 2018-06-29 11:35:22 -05:00
Sabe Jones
d8925a8811 Merge branch 'release' into develop 2018-06-29 00:22:18 +00:00
Sabe Jones
217c16988b 4.50.2 2018-06-29 00:21:56 +00:00
Sabe Jones
de7f953b67 chore(i18n): update locales 2018-06-29 00:20:37 +00:00
SabreCat
8ee2a02e73 chore(news): Bailey 2018-06-29 00:18:13 +00:00
negue
d9b573b430 AbstractGemItemOperation - BuyQuestWithGemOperation (#10476) 2018-06-28 12:37:21 +02:00
Keith Holliday
cbcf5a03e1 Ensured leader doesn't change with group plans (#10480) 2018-06-28 11:57:24 +02:00
Matteo Pagliazzi
487523f64b client: disable broken test 2018-06-28 11:04:35 +02:00
Matteo Pagliazzi
74cfc2cf52 add ability to specify pool size for mongodb (#10481) 2018-06-28 11:02:26 +02:00
Sabe Jones
2d489e870f Merge branch 'release' into develop 2018-06-27 18:34:06 +00:00
Sabe Jones
6659d4fa52 4.50.1 2018-06-27 18:33:43 +00:00
Sabe Jones
5471af74fa chore(i18n): update locales 2018-06-27 18:33:34 +00:00
Sabe Jones
6eb484605a fix(messages): clarify opt-in/out wording and leave label static (#10470) 2018-06-27 19:13:13 +02:00
Sabe Jones
8969b755a6 fix(analytics): remove spurious click tracking (#10469) 2018-06-27 19:12:51 +02:00
Sabe Jones
0062e5b1f1 fix(time-travelers): don't timeshift background without Hourglass (#10468) 2018-06-27 19:12:36 +02:00
Sabe Jones
50b98d8d92 fix(deletion): show feedback for social accounts (#10467) 2018-06-27 19:12:18 +02:00
Isabelle Lavandero
7ddf4b1f7b Remove "add multiple" tip once a task has been added (fixes #10440) (#10459)
* remove tip once a task has been added

* blur quickadd on enter but not on shift

* blur quickadd after tasks are created
2018-06-27 19:08:45 +02:00
Dexx Mandele
c91da86b89 Remember equipment drawer tab (#10458)
* Remember equipment drawer tab

* Split local setting value constants
2018-06-27 19:08:21 +02:00
Jerell Mendoza
d549fea4ed 10282: Added code for blocking party and guild invitations from block… (#10454)
* 10282: Added code for blocking party and guild invitations from blocked players, added tests

* 10282: fixed test label

* Update POST-groups_invite.test.js

removed `it.only` which was used for testing
2018-06-27 19:07:57 +02:00
Patricia Beier
a362914f93 added ctrl+enter to private messages #10413 (#10436)
* added ctrl+enter to private messages #10413

* Fixes #10413
2018-06-27 19:07:41 +02:00
Hayden Betts
61001d0e9a WIP Fix flicker when user mouses over the very leftmost edge of party member avatar (#10407)
* added 1px margin-right to .member-stats

* added unit test for flicker prevention style

* remove .only() from unit test

* rewrote margin test using computed style
2018-06-27 19:07:21 +02:00
Matteo Pagliazzi
fb95d001ab hotfix for bailey not scrolling (might reintroduce a double scrollbar), fixes #10461 2018-06-27 18:59:28 +02:00
Sabe Jones
bd5c4a08e2 Merge branch 'release' into develop 2018-06-26 20:45:37 +00:00
Sabe Jones
34fb90455c 4.50.0 2018-06-26 20:44:53 +00:00
Sabe Jones
d038d9f9bb chore(i18n): update locales 2018-06-26 20:35:38 +00:00
SabreCat
420d7df4f5 chore(sprites): compile 2018-06-26 20:24:04 +00:00
SabreCat
3ee8072a6c feat(content): Summer Splash Potions and Seafoam 2018-06-26 20:19:16 +00:00
Matteo Pagliazzi
50ebdd1ece tasks hsitory migration: prevent it from running twice 2018-06-25 23:14:35 +02:00
Sabe Jones
4a80dcae2e 4.49.1 2018-06-25 20:27:08 +00:00
Sabe Jones
bc03c1d18a fix(sprites): correct armor and weapon sprites 2018-06-25 20:26:26 +00:00
Sabe Jones
e5d834b40a 4.49.0 2018-06-25 19:39:39 +00:00
Sabe Jones
7f847d322f chore(i18n): update locales 2018-06-25 19:37:38 +00:00
Phillip Thelen
ed27ac15c8 Fix documentation about rejecting group invitation (#10466) 2018-06-23 11:24:33 +02:00
Sabe Jones
88188e56d9 Merge branch 'release' into develop 2018-06-22 19:03:33 +00:00
Sabe Jones
7170cf05d0 4.48.1 2018-06-22 19:02:55 +00:00
Sabe Jones
22a8d5e94c chore(i18n): update locales 2018-06-22 19:02:25 +00:00
SabreCat
f37e5cde57 chore(news): Blog Bailey 2018-06-22 18:58:47 +00:00
Matteo Pagliazzi
592cfef6c6 Client: use api v4 (#10457)
* client: use api v4

* fix tests
2018-06-21 21:25:27 +02:00
Matteo Pagliazzi
c1bd7f5dc5 Habits: store one history entry per day (#10442)
* initial refactor

* add scoredUp and scoredDown values for habits history entries, one entry per habit per day

* fix lint and add initial migration

* update old test

* remove scoreNotes

* dry run for migration

* migration fixes

* update migration and remove old test

* fix

* add challenges migration (read only)

* fix challenges migration

* handle custom day start

* update tasks in migration

* scoring: support cds

* add new test
2018-06-21 21:25:19 +02:00
Sabe Jones
8437b916c4 4.48.0 2018-06-21 18:50:38 +00:00
Sabe Jones
52e53aa466 chore(i18n): update locales 2018-06-21 18:49:55 +00:00
SabreCat
4471186e09 chore(sprites): maintenance 2018-06-21 18:44:37 +00:00
SabreCat
6a2a844e04 feat(content): Mystery Items June 2018 2018-06-21 18:44:18 +00:00
Sabe Jones
122d147f07 Merge branch 'release' into develop 2018-06-19 23:33:19 +00:00
Sabe Jones
912f00a652 4.47.0 2018-06-19 23:32:57 +00:00
Sabe Jones
627d4330c8 chore(i18n): update locales 2018-06-19 23:31:53 +00:00
SabreCat
c7f6794dda chore(sprites): compile 2018-06-19 23:25:41 +00:00
SabreCat
00cb50a781 feat(event): Summer Splash 2018
Also gets rid of those Fairy Potions, FOR REAL this time, and fixes a couple of minor Market layout issues
2018-06-19 23:24:40 +00:00
Matteo Pagliazzi
8be9964483 API v4 (WIP) (#10453)
API v4
2018-06-18 14:40:25 +02:00
Sabe Jones
7ea6c911cb Better group plan member counts (#10449)
* fix(group-plans): improved member count accuracy

* fix(migration): don't leave server running after completion

* fix(migration): don't update Stripe for non-Stripe methods
Also fixes a linting issue.

* fix(lint): no comma dangle here

* fix(async): put async token in relevant spot

* fix(lint): still more linting

* fix(async): better handling for async and promises
Also adds additional logging where discrepancies are found.

* feat(migration): provide CSV output

* fix(promises): better pause/resume

* fix(migration): don't update already canceled subs

* fix(groups): also address quantity/memberCount discrepancies

* fix(migration): also log quantity issues

* fix(migration): equation was reversed

* refactor(migration): condense logic, add error catch

* fix(migration): fix root cause of failed quantity update??

* fix(lint): gratuitous parens

* fix(test): expect group to be updated db-side

* fix(migration): actually update quantities?

* fix(groups): roll back unneeded Stripe lib change, refactor migration
2018-06-15 14:49:18 -05:00
Isabelle Lavandero
97a069642d Add timestamp to moderator Slack messages (fixes #10441) (#10443)
* add timestamp to moderator Slack messages

* fix test errors

* import moment, condense formatting

* add timestamp to author_name variable

* update test to include timestamp, fix footer matching

* change ISODate to Date

* update test to include timestamp
2018-06-15 11:01:10 +02:00
Dexx Mandele
26e9827d39 Open correct group modal from header (#10430)
* Remove outdated server readme

* Open correct group modal from header

* Update party button after joining party

* Review: fix invite members not working without reload

* Remove invite-modal from group page to prevent duplicates

* Pass correct group to invite modal
2018-06-15 11:00:10 +02:00
Brian Fenton
88c625fe80 removing the 24px top margin on .modal-dialog .title (#10377)
* removing the 24px top margin on .modal-dialog .title so boss HP and difficulty line up

* stop overloading title so much and use a properly-scoped style

* removing unnecessary temp vars

* using SCSS color vars as per CR

* using relative font size measurements instead of absolute pixels, and adding popover override CSS to not break quest shop & invite notifications

* removing redundant font declarations
2018-06-15 10:58:28 +02:00
Travis
4044432fad Fixes asynchronous cron bug that allows cron to run twice for a user within seconds. (#10142)
* Fixes asynchronous cron bug that allows cron to run twice for a user within seconds of eachother.

fixes #8991

* Fixing tests.

* Updating assignment to keep user and res.locals.user in sync.
2018-06-14 13:47:44 -05:00
Sabe Jones
6a767ed70b 4.46.2 2018-06-14 17:08:55 +00:00
Sabe Jones
2c2ca4a9c8 chore(i18n): update locales 2018-06-14 17:06:55 +00:00
Sabe Jones
380ad8c9e5 Merge branch 'develop' into release 2018-06-14 17:04:50 +00:00
Sabe Jones
f53400f950 Report: Subscriber Task Histories (#10439)
* WIP(report): subscriber task histories

* fix(report): old object ref, return promise, pause/resume

* fix(report): handle 0 Habits 0 Dailies
Also add data for master total of history entries
2018-06-14 05:37:29 -05:00
Sabe Jones
53c719acbd 4.46.1 2018-06-12 22:13:15 +00:00
Sabe Jones
948a5d80c8 fix(news): broken link 2018-06-12 22:13:01 +00:00
Sabe Jones
e1f141ee91 Merge branch 'release' into develop 2018-06-12 20:25:32 +00:00
Sabe Jones
7a5a278dbb 4.46.0 2018-06-12 20:25:07 +00:00
Sabe Jones
08ab4d5900 chore(i18n): update locales 2018-06-12 20:24:24 +00:00
SabreCat
b8d5844d0f chore(sprites): compile 2018-06-12 20:19:39 +00:00
SabreCat
39b81aa685 feat(content): Aquatic Amigos quest bundle 2018-06-12 20:19:14 +00:00
Dominic Lee
44f196080c Match tavern sidebar UI to party and guild page changes (#10400)
* Match tavern sidebar UI to party and guild page changes

* Remove extra space at the top of guild's sidebar
2018-06-11 12:00:19 +02:00
Patricia Beier
65bfd74c93 more place for the donate button - for languages with more letters (#10417) 2018-06-11 11:59:16 +02:00
Michael Chenevey
5e60a05cac related to 10419 (#10438)
Added a 'habitica:update-challenge' call to mirror the 'clone-challenge' call. This properly sets the 'cloning' flag and makes things more consistent.
This fixes the a bug related to #10419 described in the #10419 thread
2018-06-11 11:58:18 +02:00
Yun Ha Seo
59af4a2d3b Modal width responsiveness (partial fix for #10267) (#10354)
* added responsive scss to allow modals to respond to changing window size

* Remove unecessary space

* moved scss around

* remove unnecessary space

* Adjust left and right panels to be more responsive + moved css for buyQuestModal into its respective vue file (startQuestModal css wasn't working in its vue file... I can't figure out why)

* removed important to get rid of extra scrollbar

* moved css all to one file
2018-06-11 11:57:11 +02:00
Sabe Jones
8d273fac5e 4.45.1 2018-06-07 22:31:35 +00:00
Sabe Jones
b58032d5fb chore(i18n): update locales 2018-06-07 22:27:49 +00:00
SabreCat
db4123610f fix(migration): connect string 2018-06-07 11:34:50 +00:00
SabreCat
e4c1d96b59 Merge branch 'release' into develop 2018-06-05 20:20:56 +00:00
Sabe Jones
fe1f0bf087 4.45.0 2018-06-05 19:17:44 +00:00
Sabe Jones
ccd0bec28c chore(i18n): update locales 2018-06-05 19:16:56 +00:00
SabreCat
eebf38b5ae chore(sprites): compile 2018-06-05 19:11:40 +00:00
SabreCat
30cd738635 feat(content): Armoire and BGs 2018-06 2018-06-05 19:10:54 +00:00
Matteo Pagliazzi
920b07ff12 Merge branch 'release' into develop 2018-06-04 14:19:24 +02:00
Matteo Pagliazzi
a7db15d768 fixes #10423 (#10426) 2018-06-04 14:18:23 +02:00
Matteo Pagliazzi
93768e70c5 fixes #10423 (#10425) 2018-06-04 14:16:30 +02:00
aszlig
3e29b958e3 tests/cron: Fix tests that involve mocked time (#10418)
* Revert commenting out some cron subscription tests

This reverts commit 47c488967c.

We're going to properly fix these tests, so let's start by reverting the
commit that temporarily disabled these tests in the first place.

Signed-off-by: aszlig <aszlig@nix.build>

* tests/cron: Fix restoring clock on test failure

Ah, the joys of global state... >:-(

Whenever some test failed which has mocked the time using
useFakeTimers(), other test that are run after that test would fail (or
even time out) as well, which is a bit confusing to debug.

Some of the tests even had a cleanup routine in afterEach() but most of
them didn't, so I rearranged them in a way so that we have a clock
variable for *all* of the subtests, which initially is null and then a
cleanup handler (also for *all* of the subtest) calls clock.restore() if
the value isn't null.

In order to avoid calling clock.restore() twice, I have removed all the
clock.restore() calls at the end of the tests setting the clock to a
specific value.

Signed-off-by: aszlig <aszlig@nix.build>

* tests/cron: Fix test for 3-month gift subscription

So this is the actual culprit of the test failures that emerge during
the first two days of a month:

The test group "for a 3-month gift subscription (non-recurring)" creates
a User object available for every test case, which has a subscription
for 3 months beginning at the current time/date.

During each test case the fake timer is set to the second day of the
month to be tested. For the first and second month it's unproblematic
because the subscription is still active, no matter whether the
dateTerminated is set to the first day or the last day of a month.

However, the third month is problematic here, because whenever the
subscription lasts until the first day of the third month it has already
ended after the second day and thus the test fails because the actual
implementation of cron sets plan.consecutive.count to zero (which is
what it's supposed to do).

In order to fix this, I've set dateTerminated for the User object to the
15th of the current month so the subscription lasts long enough to not
trigger the test failure (and also make time zones irrelevant, because
right now there is no TZ offset which is more than half of a month,
especially not while running the test suite).

Signed-off-by: aszlig <aszlig@nix.build>
2018-06-02 13:05:41 +02:00
Sabe Jones
ce1bcdeee0 Merge branch 'release' into develop 2018-06-01 19:41:40 +00:00
Sabe Jones
971145a72a 4.44.3 2018-06-01 19:41:11 +00:00
Sabe Jones
36595e0138 chore(i18n): update locales 2018-06-01 19:40:42 +00:00
SabreCat
a1de566c34 fix(gems): use Promise array when gifting 2018-06-01 19:07:17 +00:00
SabreCat
2b8415fad0 chore(news): Bailey announcements
Also removes Cuddle Buddies Bundle from featured items
2018-06-01 18:55:43 +00:00
Matteo Pagliazzi
2afbc23f6f Merge branch 'release' into develop 2018-06-01 15:58:32 +02:00
Matteo Pagliazzi
a35c1954af Remove parallel calls to save (#10416)
* remove parallel saves from the code

* fix more unit tests

* do not save users when sending message in buyGift (saved later)

* fix test

* reinstall

* fix tests

* fix tests
2018-06-01 15:56:01 +02:00
Alys
47c488967c temporarily comment-out cron subscription tests that fail in the first days of a month 2018-06-01 20:50:00 +10:00
Matteo Pagliazzi
ee4a05d7ec update packages 2018-06-01 11:53:56 +02:00
Sergey
308cd49e9c IE 11 task wrapping issue (#9754) (#10409)
- Added Flex property to force right behaviour
2018-06-01 10:12:47 +02:00
Andrew Gaffney
48e51a03d4 Added correct CSS classes to help menu dropdown items. (#10412) 2018-06-01 10:05:16 +02:00
James Robinson
96f7a192d7 fix landing page contribute and social media buttons misalignment in IE (#10408) 2018-06-01 10:01:35 +02:00
Sabe Jones
1e786412ba 4.44.2 2018-06-01 01:32:28 +00:00
SabreCat
1739b83609 chore(news): Bailey 2018-06-01 01:31:35 +00:00
Sabe Jones
3606b58a1d 4.44.1 2018-05-31 20:04:47 +00:00
Sabe Jones
202db599ae chore(i18n): update locales 2018-05-31 20:03:06 +00:00
Sabe Jones
3aca0343e8 Merge branch 'release' into develop 2018-05-29 22:54:31 +00:00
Sabe Jones
97b99c0550 fix(tests): correct for new content, fix lint 2018-05-29 22:54:00 +00:00
Sabe Jones
0e63f68ed6 Merge branch 'release' into develop 2018-05-29 22:24:41 +00:00
Sabe Jones
fa142e929f 4.44.0 2018-05-29 22:17:33 +00:00
Sabe Jones
c4867f1e8e chore(i18n): update locales 2018-05-29 22:16:30 +00:00
SabreCat
5f58fe66de chore(sprites): compile + add news 2018-05-29 22:11:02 +00:00
SabreCat
a0e2d6a05e feat(customize): earrings and headbands 2018-05-29 21:02:42 +00:00
Matteo Pagliazzi
b67522e92b fix(contact form): add it back, fixes #10401 2018-05-29 19:28:28 +02:00
Matteo Pagliazzi
0e3496395c fix(challenges): fix display issues, fixes #10397 2018-05-29 19:25:43 +02:00
Matteo Pagliazzi
6e7b9f1f93 fix(due date): update value correctly, fixes #10405 2018-05-28 13:54:13 +02:00
Matteo Pagliazzi
e6cf7564b8 fix(i18n): pass path to wrongItemPath string, fixes #10403 2018-05-28 13:40:49 +02:00
Matteo Pagliazzi
bf424573a4 Members: user .lean() to improve performances (#10399)
* perf(members): use lean where possible

* fix unit tests

* fix unit tests and update calls to old function

* simplify code and add tests
2018-05-28 13:38:59 +02:00
Brian Fenton
ac90a40be5 Api quest restrictions - no purchase/start without fulfilling eligibility requirements (#10387)
* removing duplicate translation key

* fixing typos

* extracting quest prerequisite check. adding check for previous quest completion, if required

* fixing (undoing) static change, adding tests

* more typos

* correcting test failures

* honoring quest prerequisites in quest invite API call. updating format of il8n string replacement arg

* no longer using apiError, use translate method instead (msg key was not defined)

* adding @apiError to docblock as requested in issue

* removing checks on quest invite method. small window of opportunity/low risk
2018-05-27 16:41:56 +02:00
Matteo Pagliazzi
821f84dbe8 fix(facebook): include email 2018-05-25 18:54:50 +02:00
Matteo Pagliazzi
8fb67e7944 only store necessary data for social login (continuation of 10352) (#10395)
* feat(gdpr) only store necessary data for social login

* feat(gdpr) also store email for social users

* fix(social auth): store emails array instead of single email

* fix(emails): do not get name from old facebook info

* add migration to remove extra data from social profiles

* update migration description

* fix tests

* fix typo in migration file
2018-05-25 18:16:30 +02:00
Matteo Pagliazzi
e81e458e9b Merge branch 'pengfluf-PM_opt-in-out' into develop 2018-05-25 12:44:53 +02:00
Matteo Pagliazzi
aec23d32f3 Merge branch 'PM_opt-in-out' of https://github.com/pengfluf/habitica into pengfluf-PM_opt-in-out 2018-05-25 12:44:44 +02:00
aszlig
4f2d066d66 client: Fix display of class bonus for other users (#10376)
Whenever one is hovering an item from another user, the bonuses of these
items are shown for the own user. So for example if you're a mage and
view a Royal Magus Robe of another mage, the class bonus is 6.

However if you're a warrior, the class bonus displays as 0 because the
attributes grid is always using the stats for the own user even if
viewing equipment of a different user.

I've fixed this by moving the user object to the properties in
attributesGrid and passing the current user from every other Vue file
that's using attributesGrid.

Not sure whether this is the right approach, as I'm no expert in Vue.js
but some testing with the client now shows the correct values.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-25 12:38:02 +02:00
Matteo Pagliazzi
eaf0c62e16 fix(errors): snackbars for 502 and notification not found errors should have timeout (#10394) 2018-05-25 12:30:43 +02:00
Matteo Pagliazzi
fc62db147f fix(emails): make sure quest invitations are sent to users that signed up with google, fixes #10389 (#10393) 2018-05-25 12:13:02 +02:00
Keith Holliday
6c9ff3e8ed Ensure leader is set (#10390) 2018-05-25 12:04:07 +02:00
Matteo Pagliazzi
6ef45a7fd2 Fix 9248: challenge creator should not automatically join their own challenge (#10383)
* fix(challenges): creator should not join challenge automatically

* change behavior on the client side as well

* update tests and fix membercount

* update tests

* fix tests
2018-05-25 12:03:39 +02:00
Sabe Jones
557212b549 4.43.1 2018-05-24 18:55:14 +00:00
Sabe Jones
f8bd116e54 chore(npm): update package lock 2018-05-24 18:54:59 +00:00
Sabe Jones
9194e8226d 4.43.0 2018-05-24 18:34:13 +00:00
Sabe Jones
e0140f67be chore(i18n): update locales 2018-05-24 18:33:40 +00:00
SabreCat
1e2fc14db9 Merge branch 'develop' into release 2018-05-24 18:26:21 +00:00
SabreCat
30082a3929 chore(sprites): compile 2018-05-24 18:25:56 +00:00
SabreCat
42d7744d12 feat(content): May Subscriber Items 2018-05-24 18:25:36 +00:00
Matteo Pagliazzi
2cbc41d02f fix(challenges); update category labels when filtering, fixes #10382 2018-05-21 20:58:01 +02:00
Alys
01ce7712e3 change "Advanced Options" to "Advanced Settings" in Settings screen to match change in wording on tasks page 2018-05-21 20:20:06 +10:00
Keith Holliday
c52e4a07d4 Removed redirect uri (#10380)
* Removed redirect uri

* Fixed lint
2018-05-20 13:02:37 -05:00
Matteo Pagliazzi
5212ac6394 fix(tests): do not use arrow function when using this 2018-05-19 21:10:36 +02:00
Matteo Pagliazzi
7b5d6b508d fix(tests): longer timeout for invites 2018-05-19 20:45:56 +02:00
Matteo Pagliazzi
c5a497ef91 fix(settings): when changing language, reload page entirely, fixes #9904 2018-05-19 20:22:30 +02:00
Matteo Pagliazzi
54bee67e03 fix(settings): language can be changed in firefox, fixes #9514 2018-05-19 20:17:48 +02:00
Matteo Pagliazzi
86ec68bedb Merge branch 'develop' of github.com:HabitRPG/habitica into develop 2018-05-19 20:03:36 +02:00
Matteo Pagliazzi
8223563e76 fix(audio): rename todo audio files with wrong casing, fixes #10294 2018-05-19 20:03:19 +02:00
Keith Holliday
37ab257f5b Added responsive fixes to home page (#10381) 2018-05-19 11:43:19 -05:00
Keith Holliday
04d7ff13de Refactored stripe checkout (#10345)
* Refactored stripe checkout

* Fixed dependency injection cache
2018-05-19 10:31:26 -05:00
Sabe Jones
25d07ac0ce fix(snackbars): don't timeout server error snacks (#10372)
Fixes #10031 and #9249.
2018-05-18 14:41:15 -05:00
SabreCat
724e1240a3 fix(content): update potion end date 2018-05-18 18:40:04 +00:00
Sabe Jones
026e1a5bca Merge branch 'release' into develop 2018-05-18 17:15:16 +00:00
Sabe Jones
6443918440 4.42.6 2018-05-18 17:14:39 +00:00
Matteo Pagliazzi
ac973ee753 fix(tests): do not error when test chat messages miss the timestamp attribute 2018-05-18 18:04:32 +02:00
Matteo Pagliazzi
c39b9dc320 fix(challenges): format summary with markdown and do not split words, fixes #10371 2018-05-18 17:33:38 +02:00
Matteo Pagliazzi
2132a3a242 fix(menu): correct padding 2018-05-18 17:30:15 +02:00
Dexx Mandele
ba52a90d93 Make nav drop-down cleaner/scrollable (#10138)
* Make nav drop-down cleaner/scrollable

* Stop overriding bootstrap navbar

* Move user menu to top bar in mobile

* Restructure/style first drop-down item

* Add ALL the pretty colors

* Apply menu drop-down re-structure to all menu drop-downs

* Replace curly brace lost during rebase
2018-05-18 17:11:25 +02:00
Brian Fenton
daa4994382 Change reward popunder (#10358)
* making add multiple tip reflect the task type

* removing duplicated key
2018-05-18 17:11:04 +02:00
Mateus Etto
12034161b7 Remove Ethereal Surge notification (#10368) 2018-05-18 17:09:00 +02:00
Ian Oxley
8438cf0578 Fix drawer text overlapping at smaller screen resolutions (#10360)
* Replace divs with semantic markup

Replace `<div>` tags with `<nav>`, `<aside>`, and a list for the nav items.

* Use grid layout

Replace flexbox with CSS grid layout. The right-hand side item is now in its own
grid cell, so the text wraps inside its cell at smaller screen widths.

Undo `<nav>` tag.

* Sort CSS

Sort the remaining CSS property declarations.

* Fix right alignment issue in Safari

Remove `justify-self: end` to fix the right alignment issue in Safari.

* Fix vertical alignment in Edge

Add `align-self: center` but only for MS Edge.

Also removed `position: relative` on the wrapper element for the tabs.
As the help item isn't using absolute positioning anymore we don't need
to set relative positioning on the parent element.
2018-05-18 17:07:42 +02:00
jerellmendoodoo
614848d60b added try catch, added snackbar notification for errors returned (#10370)
* added try catch, added snackbar notification for errors returned

* moved lines into try block
2018-05-18 17:04:18 +02:00
aszlig
79087b27d3 redirects: Fix parsing BASE_URL with port number (#10350)
The parsing in the redirects module was simply determining the base host
via trimming off everything up to //, so a BASE_URL like
"http://localhost:3000" will result in the host name "localhost:3000",
which isn't a valid host name.

So the problem here is that BASE_URL_HOST is used for determining
whether the client should be redirected and it's comparing the hostname
of the request object with BASE_URL_HOST.

For example if we have the aforementioned BASE_URL, we get to the
following comparison:

req.hostname !== BASE_URL_HOST

Which expands to:

"localhost" !== "localhost:3000"

So in order to get rid of the port number, we now use url.parse() to get
the right host name.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-18 17:02:36 +02:00
aszlig
5167f847d0 tests: Increase timeouts instead of disabling them (#10367)
Some tests were disabled in ba799c67f9 and
10567d81e2, because they tend to
frequently time out after 8 seconds.

Instead of disabling the tests (which IMHO is bad, because tests are
there for a reason), we're now increasing the timeout to 30 seconds just
for these tests.

As requested by @paglias, I've marked the timeout functions with a @TODO
comment, so that the slow tests or the functionality they're testing are
eventually refactored.

I also needed to change the arrow notation for the test cases to use the
function keyword, because otherwise we don't have this.timeout()
available.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @paglias
2018-05-18 17:02:20 +02:00
aszlig
d3a0348ac7 Avoid using media element with empty src attribute (#10364)
Whenever the client starts up, the following is emitted in the Firefox
console:

Invalid URI. Load of media resource  failed.
All candidate resources failed to load. Media load paused.

This happens because the <source/> tags are preinitialized with a src
attribute of "".

So what we're doing instead is initialize the <audio/> element without
any children and add the children as soon as the first audio file needs
to be played. This also has the advantage that we can determine at
runtime whether the browser supports Ogg/Vorbis or whether we should
fall back to MPEG layer 3 so only one source element is needed.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-18 17:01:27 +02:00
negue
de9883c3ac extract chat (#10362)
* extract chatTextarea from group/tavern - extract staffList array

* fix lint / rewrite condition

* clean up - part 1

* rename chatTextarea to chat

* refactor timestamp check
2018-05-18 17:01:05 +02:00
negue
3d39718048 Purchase API Refactoring: Spells [Gold] (#10305)
* convert buySpell operation

* remove purchaseWithSpell - change purchaseType 'special' to 'spells' - fix lint

* fix tests

* rollback 'spells' to 'special'
2018-05-18 17:00:39 +02:00
Matteo Pagliazzi
a0c51ee4ca fix(loading bar): always above other elements 2018-05-18 13:42:44 +02:00
Sabe Jones
b2edd1d932 4.42.5 2018-05-17 20:58:16 +00:00
Sabe Jones
6b5f46c5e1 chore(i18n): update locales 2018-05-17 20:57:57 +00:00
Alys
ad191c2c5c change apidoc to explain that the equip route also unequips 2018-05-16 20:45:35 +10:00
Sabe Jones
4a55d36831 Merge branch 'release' into develop 2018-05-15 21:11:54 +00:00
Sabe Jones
959adb05cf 4.42.4 2018-05-15 21:11:35 +00:00
Sabe Jones
d114b858fd chore(i18n): update locales 2018-05-15 21:06:11 +00:00
SabreCat
ae9db7aee3 feat(content): enable Fairy Potions 2018-05-15 21:00:49 +00:00
Matteo Pagliazzi
10567d81e2 fix(tests): remove tests that timeout 2018-05-15 18:03:00 +02:00
Matteo Pagliazzi
ba799c67f9 fix(tests): remove tests that timeout 2018-05-15 17:42:27 +02:00
Matteo Pagliazzi
37b890f282 fix(market): fixes #10316 2018-05-15 17:21:15 +02:00
Matteo Pagliazzi
196e5f5b95 upgrade deps 2018-05-15 17:00:17 +02:00
Matteo Pagliazzi
6db412f7e6 fix tags checkbox in bootstrap 4.1.1 2018-05-15 16:55:35 +02:00
Keith Holliday
fa60c9a232 Reset stats after allocation (#10363) 2018-05-14 22:18:23 -05:00
Matteo Pagliazzi
2c3d268a63 Merge branch 'develop' of github.com:HabitRPG/habitica into develop 2018-05-13 16:30:47 +02:00
Matteo Pagliazzi
d4a80a8561 Merge branch 'marvinrabe-fix-challenge-layout' into develop 2018-05-13 16:30:28 +02:00
Matteo Pagliazzi
388492e1e7 fix conflicts and remove extra dependency 2018-05-13 16:30:17 +02:00
aszlig
8cd695c397 locales/groups: Don't wrap task text in code block (#10349)
So far if a task contained Markdown, a system message like this would
have been posted to the group chat:

foo has claimed "Some [link](http://example.org/)"

Also, if the Markdown contained backticked code fragments, the whole
text would be displayed in red except the code part.

The reason for this is because the system message is already in Markdown
and a backticked task text would result in the following Markdown:

`foo has claimed "Foo `bar`"`

Here there are two code blocks, one with `foo has claimed "Foo ` and
another which only has `"`.

This is fixed by simply changing the userIsClamingTask translation
string to not wrap the task text inside a code block, as per @Alys
suggestion.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-13 16:14:17 +02:00
Brian Fenton
355f0fedfb disabling checking off a subtask if not assigned to a user (#10357) 2018-05-13 16:12:26 +02:00
Doğu Deniz Uğur
38d78de4b3 New method added to displaying locked quest popover message in shop (#10346)
isBuyingDependentOnPrevious () method checks if item.key of quest is in a list of quests whose unlock condition is not dependent on the completition of previous quest.
2018-05-13 16:07:20 +02:00
pengfluf
6c64a1cd8c Beard and mustache facial hairs now can be bought as a full set for 5 gems (#10338)
* Purchasing All Facial Hairs Fixed

* Notifications z-index fixed

* Notifications z-index fixed x2

* Z-indexes fixed, facial hairs buying corrected

* isPurchaseAllNeeded refactored

* isPurchaseAllNeeded is more generic now

* Linting Passed
2018-05-13 16:04:43 +02:00
Matteo Pagliazzi
128ec5a1b1 Update pull request template to mention issue number instead of url 2018-05-13 15:42:44 +02:00
siege918
d4d668f640 Prevent accidental submission of Tavern/Guild posts after pasting (#10226)
* Temporarily disable ctrl-enter to send Guild messages after paste

Disable Ctrl-Enter after pasting, because some users are experiencing issues with accidentally sending their messages after pasting.

* Code style fixes for "Temporarily disable ctrl-enter to send Guild messages after paste"

* Fix issues with variable location

* Fix variables for accidental chat submission features

Moving vatiables for the chat submit timeout to their own variable so they won't be overwritten

* Fix code formatting issues with accidental chat submission code

* Remove leading space from variables to fix lint issues
2018-05-11 15:18:41 -05:00
Marvin Rabe
41ccd58f8e Fixed tavern chat button. (#10342) 2018-05-11 15:15:50 -05:00
Sabe Jones
a33299a341 4.42.3 2018-05-11 20:12:54 +00:00
Sabe Jones
9129e22433 fix(event): disable seasonal potions 2018-05-11 20:12:41 +00:00
Sabe Jones
86d1bdaff1 4.42.2 2018-05-11 01:38:33 +00:00
SabreCat
206ed1f155 fix(tags): downgrade Bootstrap to restore tag checkboxes 2018-05-11 01:34:31 +00:00
Sabe Jones
eb66e9ec2e 4.42.1 2018-05-10 18:52:17 +00:00
Sabe Jones
8db99be017 chore(i18n): update locales 2018-05-10 18:51:37 +00:00
SabreCat
c62386e2e5 chore(news): Bailey 2018-05-10 18:42:44 +00:00
Matteo Pagliazzi
042ac6ac73 Fix notifications in user pre save hook (#10348) 2018-05-09 19:19:08 +02:00
Matteo Pagliazzi
a8655d923a Fix level up webhook (#10347)
* use user._tmp for level up webhook

* use post save hook to send webhook
2018-05-09 19:04:29 +02:00
Sabe Jones
bbbd1f9f73 Merge branch 'release' into develop 2018-05-08 18:41:13 +00:00
Sabe Jones
8fee5a9ba0 4.42.0 2018-05-08 18:40:48 +00:00
Sabe Jones
8df2b1e8c2 chore(i18n): update locales 2018-05-08 18:38:43 +00:00
SabreCat
24cceb1c91 feat(content): Cuddle Bundle 2018-05-08 18:28:33 +00:00
Keith Holliday
21eac3cc94 Fixed stat allocation issues (#10344) 2018-05-08 08:54:50 -05:00
Keith Holliday
e9ce968f88 4.41.8 2018-05-07 16:34:54 -05:00
Keith Holliday
8c283fdbe0 Removed hook updates (#10341)
* Removed hook updates

* Fixed lint error
2018-05-07 16:30:34 -05:00
Sabe Jones
69a782a1db Party header sort WIP (#10330)
* WIP(groups): improved sorting WIP

* WIP(groups): split sort option and direction

* WIP(party): header sort cont'd

* feat(party): header sorting
2018-05-07 16:19:00 -05:00
Keith Holliday
ccaf629228 4.41.7 2018-05-07 12:50:13 -05:00
Keith Holliday
147f2bb28e 4.41.6 2018-05-07 12:48:48 -05:00
Keith Holliday
54a4bba228 Removed update stats notification (#10339)
* Removed update stats notification

* Removed level up hook
2018-05-07 12:45:36 -05:00
Marvin Rabe
6ee21dcfa9 Added category tags tests. 2018-05-07 18:29:05 +02:00
Marvin Rabe
68353fb874 Added sidebar section test. 2018-05-07 18:21:32 +02:00
Marvin Rabe
68526c07ae Added missing comma. 2018-05-07 16:43:07 +02:00
Marvin Rabe
5f319ca4f6 My Challenges should include all Owned Challenges (#9286) 2018-05-07 16:23:49 +02:00
Marvin Rabe
0d84643961 Joined and Owned Challenges should still appear in Discover, but annotated with status (#9956) 2018-05-07 16:04:40 +02:00
Alys
8470f16f4f allow subscribers to buy their final monthly gem (#10331) 2018-05-07 15:20:28 +02:00
Marvin Rabe
1896a8fab0 Challenge task numbers get created from computed array. 2018-05-07 14:18:05 +02:00
Marvin Rabe
891b5566a9 Created reusable category tags component. 2018-05-07 13:56:54 +02:00
Marvin Rabe
c83499545c Added Tavern case 2018-05-07 13:35:53 +02:00
Marvin Rabe
4c837acf88 Use computed attribute for boss health bar width. 2018-05-07 13:30:33 +02:00
Marvin Rabe
11b223a81e Challenge item shadow and border radius matches guild item style. 2018-05-07 13:25:52 +02:00
Marvin Rabe
17001743e1 Changed last prop to :last-of-type 2018-05-07 13:24:48 +02:00
Keith Holliday
ac451bdb9b Removed spell queue (#10337) 2018-05-06 17:53:49 -05:00
Keith Holliday
6af50c9f2f Payment refactor (#10325)
* Rarranged payment index functions

* Moved gem function

* Increased buy gems test coverage

* Reduced length of functions. Reduced cognitive complexity
2018-05-06 15:12:00 -05:00
Marvin Rabe
5231cb03a8 Fixed columns when translation is too long. (#10315) 2018-05-04 16:10:02 -05:00
Marvin Rabe
f8739b6f37 Fixed learn more in user dropdown. (#10314) 2018-05-04 16:09:38 -05:00
Corey Gray
e31f62a818 Add responsive margins to pets and mounts. (#10311)
* Add responsive margins to pets and mounts.

* Move all margins to margin-right to make left edges flush.
2018-05-04 16:06:58 -05:00
pengfluf
d5d06c1d2d Header stuck naming fixed (#10309) 2018-05-04 16:05:38 -05:00
pengfluf
4fa2ef045d 10256 - The placeholder and the message row are fixed (#10307) 2018-05-04 16:04:06 -05:00
Matteo Pagliazzi
570a8bf0d5 do not load inbox in tasks routes (#10302) 2018-05-04 16:00:57 -05:00
Matteo Pagliazzi
b7dfe41e15 do not load inbox in some user routes (#10301) 2018-05-04 16:00:40 -05:00
negue
c26696a9eb moving developer-only strings to api/common messages (#10258)
* move translatable string to apiMessages

* use apiMessages instead of res.t for groupIdRequired / keepOrRemove

* move pageMustBeNumber to apiMessages

* change apimessages

* move missingKeyParam to apiMessages

* move more strings to apiMessages

* fix lint

* revert lodash imports to fix tests

* fix webhook test

* fix test

* rollback key change of `keepOrRemove`

* remove unneeded `req.language` param

*  extract more messages from i18n

* add missing `missingTypeParam` message

* Split api- and commonMessages

* fix test

* fix sanity

* merge messages to an object, rename commonMessage to errorMessage

* apiMessages -> apiError, commonMessages -> errorMessage, extract messages to separate objects

* fix test

* module.exports
2018-05-04 16:00:19 -05:00
Matteo Pagliazzi
f226b5da07 Revert #10324 and #10323 (#10329) 2018-05-04 20:57:18 +02:00
Keith Holliday
63cf5b6be7 4.41.5 2018-05-04 10:03:32 -05:00
Matteo Pagliazzi
f3a947339c fix quest completion modal: send only one request (#10327) 2018-05-04 17:00:11 +02:00
Keith Holliday
1bb8acad5d 4.41.4 2018-05-04 08:19:37 -05:00
Keith Holliday
8e04d6e284 Removed update stats notification (#10324) 2018-05-04 08:17:22 -05:00
Sabe Jones
f7415df6ba 4.41.3 2018-05-03 20:45:21 +00:00
Matteo Pagliazzi
f85e1c2dc4 Hotfix for webhooks bus in models/group (#10323)
* remove new webhooks code from group model

* disable chat webhooks as well
2018-05-03 22:40:42 +02:00
Sabe Jones
33628a0a6a 4.41.2 2018-05-03 18:02:49 +00:00
Keith Holliday
5e6541faa6 Logged users out if they were logged in with facebook (#10322) 2018-05-03 13:00:50 -05:00
Sabe Jones
c1ed02d383 4.41.1 2018-05-03 17:44:38 +00:00
Sabe Jones
3793e92b80 chore(i18n): update locales 2018-05-03 17:41:59 +00:00
Matteo Pagliazzi
e3ce1c5322 possible fix for facebook auth bug 2018-05-03 18:06:01 +02:00
Alys
84b16f28c2 remove statement about deletion feedback being anonymous 2018-05-03 21:31:06 +10:00
user
9c702505a9 Locales Changing, PM Disabled Caption Added 2018-05-02 19:08:43 +03:00
Sabe Jones
27c73e028a Merge branch 'release' into develop 2018-05-01 21:32:29 +00:00
Sabe Jones
d125b8d2f8 4.41.0 2018-05-01 21:32:06 +00:00
Sabe Jones
451e08ce1c chore(i18n): update locales 2018-05-01 21:31:34 +00:00
SabreCat
16b5b8b8c7 chore(sprites): compile 2018-05-01 21:25:58 +00:00
SabreCat
30a717148e chore(event): end Spring Fling 2018-05-01 21:25:45 +00:00
SabreCat
bcf9670dbe feat(content): Armoire and backgrounds May 2018 2018-05-01 20:55:16 +00:00
Marvin Rabe
129fccf646 Guild category tags and challenge category tags have now the same styling. 2018-05-01 21:36:23 +02:00
Marvin Rabe
9d755c5d5f Merge branch 'fix-german-translations' into fix-challenge-layout 2018-05-01 20:17:29 +02:00
Marvin Rabe
05c43d1f9d Use sidebar section component in tavern. 2018-05-01 20:13:46 +02:00
Marvin Rabe
45df73e4be Fixed challenges on 'Tavern' 2018-05-01 19:53:31 +02:00
Marvin Rabe
eaa00598d0 Improvements to Challenge Layout (#9619) 2018-05-01 19:47:04 +02:00
Marvin Rabe
88b14592c5 Make Challenge Owner's Name Clickable (#9283) 2018-05-01 17:23:02 +02:00
Marvin Rabe
85136675e9 Fixed group sidebar. 2018-05-01 16:13:16 +02:00
Marvin Rabe
4e4181a394 Improved challenge layout. 2018-05-01 16:10:57 +02:00
Marvin Rabe
f93822b0b3 Several hard coded strings fixed. 2018-05-01 14:34:58 +02:00
Matteo Pagliazzi
a864e69042 make unhandled promise rejections easier to find among logs 2018-05-01 12:09:30 +02:00
Matteo Pagliazzi
2ccd9eaa1e uprade deps 2018-05-01 12:01:47 +02:00
Alys
5faf00d489 replace loading screen tip about buff arrow
The buff arrow no longer appears on your avatar.
2018-05-01 18:32:44 +10:00
Alys
f211610f5d add swear word - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-05-01 15:29:01 +10:00
Alys
332f285ea2 exempt The Rhyme Commando guild from the swearword blocker
This allows people to quote passes from literature containing words
that would otherwise be banned as religious oaths.
2018-05-01 13:31:56 +10:00
Sabe Jones
006159cc9c Merge branch 'release' into develop 2018-04-30 20:46:03 +00:00
Sabe Jones
3722452b51 4.40.1 2018-04-30 20:45:38 +00:00
Sabe Jones
d6b5d275da chore(i18n): update locales 2018-04-30 20:45:27 +00:00
SabreCat
72073386ec chore(news): Bailey 2018-04-30 20:41:31 +00:00
Matteo Pagliazzi
d34ec62901 Remove inbox from more routes (#10303)
* remove inbox from some auth routes

* remove inbox from quests routes

* remove inbox from groups routes
2018-04-30 20:36:31 +02:00
Matteo Pagliazzi
ca73b9af41 remove stackimpact 2018-04-30 19:07:46 +02:00
Matteo Pagliazzi
8b9bf88fa0 Remove inbox from more routes (#10300)
* remove inbox from user/stats routes

* remove inbox from news routes

* change signature for authWithHeaders

* do not load inbox in coupons routes

* do not load inbox in challenge routes

* do not load inbox in some members routes

* do not load inbox in chat routes
2018-04-30 17:36:41 +02:00
user
9133250a42 Useless CSS rule for the caption has deleted 2018-04-30 16:12:53 +03:00
user
e60177f14a Sending messages is allowed; PM related texts moved 2018-04-30 00:58:08 +03:00
Matteo Pagliazzi
5f0ef2d8f0 Webhooks v2 (and other fixes) (#10265)
* begin implementing global webhooks

* add checklist item scored webhook

* add pet hatched and mount raised webhooks (no tests)

* fix typo

* add lvl up webhooks, remove corrupt notifications and reorganize pre-save hook

* fix typo

* add some tests, globalActivity webhook

* fix bug in global activiy webhook and add more tests

* add tests and fix typo for petHatched and mountRaised webhooks

* fix errors and add tests for level up webhook

* wip: add default data to all webhooks, change signature for WebhookSender.send (missing tests)

* remove unused code

* fix unit tests

* fix chat webhooks

* remove console

* fix lint

* add and fix webhook tests

* add questStarted webhook and questActivity type

* add unit tests

* add finial tests and features
2018-04-29 20:07:14 +02:00
user
770285f10d Toggle-switch aligned with Messages Title 2018-04-29 19:08:09 +03:00
user
495dd2736c Locale Small Update 2018-04-29 17:03:51 +03:00
user
4467da980c POST request toggling opt deleted, changed to PUT /user 2018-04-29 16:48:10 +03:00
user
082539b982 Toggle-switch changed to the local one; 'en' locale edited 2018-04-29 16:31:23 +03:00
user
ef7719f91d PM opt-in opt-out intert internationalization 2018-04-29 04:32:33 +03:00
user
f98efd4eb9 PM opt-in opt-out is ready to use 2018-04-29 04:05:31 +03:00
user
4a0856c919 Client: opt-in / opt-out functionalitonality is ready 2018-04-29 03:07:03 +03:00
user
2adc5c13e4 Server: /toggle-private-messages-opt 2018-04-28 23:44:17 +03:00
Shadi Moustafa
cf274310a8 Changed Member List number in Guilds (#10268)
* Updated README.md

Added Team Name and Collaborators

* Updated README.md

* Changed Member List number in Guilds

Changed Member List number in Guilds

* remove habitica2.bat

* Updated README.md
2018-04-28 17:43:59 +02:00
Philip Karpiak
a2ee73a2e2 Use consistent elements in footer links (fix add-on/forum link colors) (#10208)
* Fix html element rendering of some footer links

* Unscope footer.expanded + children styles

Fixes link color cascading
2018-04-28 17:43:40 +02:00
Brian Fenton
c6c9503e22 Hiding popunder if challenge data is incomplete (#10284)
* removing file that only contained a reference to a missing folder

* fixing typo

* using full dates to avoid moment warning in tests

* more typos

* sending an empty string to vue bootstrap tooltip (disabling it) if no challenge short name is set
2018-04-28 17:38:38 +02:00
Asher Dale
403ac1ab7e Remove experience notification when leveling up (#10285) 2018-04-28 17:37:58 +02:00
Brian Fenton
63598f497b pinning mongodb container to recommended, supported version (#10270) 2018-04-28 17:37:19 +02:00
Asher Dale
9fcc953b18 Fix API challenges export CSV bug (Fixes #8350) (#10266)
* Fix challenges export CSV error by checking that users still belong to challenge

* Add test for challenge csv export fix

* Update fix for challenge export CSV bug

* Update tests for challenge export CSV to be more complete

* Refactor a test: change some 'let' variables to 'const'
2018-04-28 17:36:12 +02:00
Christos Maris
17408d01a9 Fix markdown (#10263)
The README.md file in the website/client/ directory had a flaw.
2018-04-28 17:35:14 +02:00
Tyler Nychka
ae786f28a2 Fix locked class-specific gear after death fixes #10025 (#10212)
* Fix locked class-specific gear after death fixes #10025

* Update to allow items next in tier but not owned

* Updated logic

* Added tests
2018-04-28 17:34:08 +02:00
Matteo Pagliazzi
1effa16b5b load memwatch-next only if installed 2018-04-27 20:52:33 +02:00
Matteo Pagliazzi
6b7333927a make memwatch-next optional, fixes #10291 2018-04-27 19:48:04 +02:00
Matteo Pagliazzi
31b439129d update deps 2018-04-27 19:38:42 +02:00
greenkeeper[bot]
2de85b937f fix(package): update bcrypt to version 2.0.0 (#10233) 2018-04-27 19:30:09 +02:00
negue
4f963e99dc Purchase API Refactoring: Gems [Gold] (#10271)
* remove `keyRequired` - change to `missingKeyParam` - i18n-string

* extract & convert buyGemsOperation

* fix lint
2018-04-27 19:29:26 +02:00
Keith Holliday
58ce3a9a42 Added bulk allocation (#10283) 2018-04-27 11:07:41 -05:00
Alys
e45d0c9b80 add website/raw_sprites/** to list of files ignored by nodemon (#10274) 2018-04-26 10:46:49 +02:00
Alys
84a20ef4f4 increase user count on home page from 2.5 to 3 million (#10257)
Uses a variable for the number instead of hard-coding it in the locales files.

Removes some old, unused locales strongs and an associated variable
from when we had a million users.
2018-04-25 10:48:04 -05:00
Alys
59a22805b9 changed message shown to muted users (after discussion with mods)
Adjusted apidocs comment to match.
Corrected the error type for that comment.
2018-04-25 20:40:21 +10:00
Alys
95865f5ec8 add a missing quote mark to the end of the Golden Knight's speech 2018-04-25 19:38:29 +10:00
Alys
79903d242f edit apidocs comment: CreateChallenge takes the parameter group not groupId 2018-04-25 16:23:07 +10:00
Sabe Jones
90959c18cd Merge branch 'release' into develop 2018-04-24 18:46:20 +00:00
Sabe Jones
8b2019c292 4.40.0 2018-04-24 18:45:51 +00:00
Sabe Jones
9ab70ca276 chore(i18n): update locales 2018-04-24 18:44:30 +00:00
SabreCat
d51aa25470 chore(sprites): compile 2018-04-24 18:38:56 +00:00
SabreCat
0b2c1e6d2e fix(pixels): Better alignment for Squirrel mounts
Also (1) updates an artist credit to a new usename, and (2) corrects a typo in migration comments
2018-04-24 18:37:33 +00:00
SabreCat
58ee6e9703 feat(content): Subscriber Mystery Items 2018/04 2018-04-24 18:36:19 +00:00
Keith Holliday
0044778497 4.39.2 2018-04-24 08:16:35 -05:00
Matteo Pagliazzi
46d6590fec chat: use _id instead of id when finding doc (#10278) 2018-04-24 15:10:20 +02:00
Keith Holliday
b10f056a73 4.39.1 2018-04-23 21:04:03 -05:00
Keith Holliday
eeb890466a Converted date to timestamp (#10276)
* Converted date to timestamp

* Added existence check

* Updated test to include timestamp
2018-04-23 21:03:24 -05:00
Keith Holliday
8d25a5d140 Added bulk spell queue (#10241)
* Added bulk spell queue

* Removed extra comment

* Moved queue to store
2018-04-23 20:30:55 -05:00
Sabe Jones
3b35a0a203 4.39.0 2018-04-23 17:21:12 +00:00
Sabe Jones
d787ad43d3 chore(i18n): update locales 2018-04-23 17:20:54 +00:00
Keith Holliday
7d7fe6047c Move Chat to Model (#9703)
* Began moving group chat to separate model

* Fixed lint issue

* Updated delete chat with new model

* Updated flag chat to support model

* Updated like chat to use model

* Fixed duplicate code and chat messages

* Added note about concat chat

* Updated clear flags to user new model

* Updated more chat checks when loading get group

* Fixed spell test and back save

* Moved get chat to json method

* Updated flagging with new chat model

* Added missing await

* Fixed chat user styles. Fixed spell group test

* Added new model to quest chat and group plan chat

* Removed extra timestamps. Added limit check for group plans

* Updated tests

* Synced id fields

* Fixed id creation

* Add meta and fixed tests

* Fixed group quest accept test

* Updated puppeteer

* Added migration

* Export vars

* Updated comments
2018-04-23 12:17:16 -05:00
Sabe Jones
0ec1a91774 4.38.0 2018-04-19 19:29:33 +00:00
Sabe Jones
adf3281bef chore(i18n): update locales 2018-04-19 19:28:43 +00:00
SabreCat
ea86b35833 chore(news): Bailey 2018-04-19 19:25:45 +00:00
Alys
ade14edcd7 add partial documentation for dueDate parameter in /api/v3/tasks/user and related code 2018-04-18 23:22:11 +10:00
Sabe Jones
3a1888739a Merge branch 'release' into develop 2018-04-17 20:07:12 +00:00
Sabe Jones
3b54ce4949 4.37.2 2018-04-17 20:06:46 +00:00
Sabe Jones
4a8aaf7389 chore(i18n): update locales 2018-04-17 19:55:10 +00:00
SabreCat
45eec47b7f chore(news): Bailey
Also disable some costly analytics
2018-04-17 19:52:36 +00:00
Keith Holliday
4b9af8aa86 Added analytics to front. Fixed group plan tracking (#10262) 2018-04-17 12:43:52 -05:00
SabreCat
631bbcb786 Merge branch 'fix-hippocrite' into develop 2018-04-17 01:37:20 +00:00
Matteo Pagliazzi
76a10d6cf9 start removing inbox from some routes (#10259) 2018-04-16 18:43:09 +02:00
Keith Holliday
a1c9ebd661 Prevent dropdown from closing when clicking search (#10252) 2018-04-15 19:18:40 -05:00
SabreCat
9f06d78db6 Revert "moving developer-only strings to api messages (#10188)"
This reverts commit a42cb0e3ab. Testing hypothesis that this was causing Staging to break.
2018-04-15 17:09:15 +00:00
Alys
ac98aa9271 replace Lemoness's email address with admin in sample config file
This is for consistency with the production server and to ensure
that contributors' screenshots in PRs match what will be seen
in production.
2018-04-15 13:34:42 +10:00
negue
455f7ac59b round priority on update too (#10186)
* round priority on update too

* move the fix to Task sanitizeTransform

* refactor the task.priority parsing
2018-04-14 16:16:25 +02:00
negue
a42cb0e3ab moving developer-only strings to api messages (#10188)
* move translatable string to apiMessages

* use apiMessages instead of res.t for groupIdRequired / keepOrRemove

* move pageMustBeNumber to apiMessages

* change apimessages

* move missingKeyParam to apiMessages

* move more strings to apiMessages

* fix lint

* revert lodash imports to fix tests

* fix webhook test

* fix test

* rollback key change of `keepOrRemove`

* remove unneeded `req.language` param

*  extract more messages from i18n

* add missing `missingTypeParam` message
2018-04-14 16:13:13 +02:00
Alys
d05d2fb9d7 removed a slur that has legit uses - TRIGGER / CONTENT WARNING: slurs, swearwords, assault, etc 2018-04-14 21:51:06 +10:00
negue
6c4c5b4697 always check for the quantity not (#10251) 2018-04-13 21:04:08 +02:00
Keith Holliday
5da87640e4 Apple pay tests (#10248)
* Added more tests for verifyGemPurchase

* Added more tests for subscribe

* Added user is subscribed check

* Reverted gulp task

* Added existence check
2018-04-13 12:41:41 -05:00
Kip Raske
fa044ffb44 Feature/sortable reward area (#9930)
* Client POC

We need to wrap each draggable region it its own div or else the
"draggable" element will conflict with each other. This screws up the
styling but that is totally fixable

* Ah that ref was being used after all, changing back

* Scaffold out a new callback for when we drag these things

Next is going to be the hard part: I need to save the sort order for
these to the database. I don't even know if there is a schema but hey
this is the best place to start

* Firefox caching is the problem: don't actually need the wrapper div

So I guess I should try this in chrome and see how it works then come
back to firefox and figure out what the heck is going on

* Scaffolding out our API call to save the sort order

The endpoint doesn't exist yet so we will need to add that

* Ok we are now calling our API endpoint to reorder these things

Of course it doesn't exist yet so you get a 404 when you try, but that
is ok

* Defining api endpoint, a work in progress

In particular I really had ought to use _id for these too, it appears
that the primary way we detect order doesn't even use "key" at all.

* Switching to using the pinned item UUID

This has much better results, but of course the server and client logic
don't match now. Will have to keep working on my splice to make sure
that they are the same

* I thought this would fix our server/client mismatch but it is not it

Something is really wrong with my logic somewhere, maybe I need to
update the db step?

* Moving this logic to the "user" rather than "tasks" and key off path

Path is unique and is less finiky than dealing with string comparisons
with ids. Unfortunately everything is still not working... I suppose
user.update() doesn't care about the position?

* This client code caused quite a lot of problems if you dragged fast

We don't really need it it seems, so off it goes

* Updating markup and CSS so it actually looks good.

Everything is working horray!!

I did just notice the following bug: the popover text sometimes makes it
very annoying to drag because you can't drop over it@

* Cleaning up my comments in the API section user.js

I had a lot of TODOS that are mostly done now

* Fixing a spacing code standards thing

* Turns out we never use type, so we should remove this from the API call

* Adding pinnedItemsOrder into the user schema

And disabling my call in the frontend before I do any more damage

* Halfway to using pinnedItemsOrder

This isn't working yet but it is not going to break it horribly like it
was before.

* Hooking up inAppRewards to always produce sorted information

It is suspicially working right now even though I have not added the
seasonal stuff logic yet...

* Updating the comments in user.js in movedPinnedItem

It turns out that my bandaid fix to just get the ball rolling perfectly
does what I need it to do when we have a length discrepancy. So we are
getting much closer to the final product, just need lots of testing

* Cleaning up code standards kinds of things

* Yay, this fixes the popover issue

I hope this is the right "vue" way to do things, because I tried a bunch
of other things that definately were not the right way to do it. And
this appears to work too

* ** Partial Work ** Starting tests on api call for draggable items

Doesn't work, doesn't compile so don't include in PR!

* Test failing still...

This is worth a save. The api call grabs the seasonal items too, so we
can't get away from using the common functions and calls here to get the
actual list of items

* Okay have the first test passing

Need to clean up my linter problems though

* Planning out the next two tests and fixing my format problems

* 2nd Test case written, this time with the "more" odd case

* Making sure that we didn't mess with pinned items

* Huh... this test doesn't give me the expected result

Drat, I guess I found a bug

* Throw an error when we put garbage in our api call.

Well, before we got user.pinnedItemsOrder filled with a bunch of "null"
entries which is not ideal. it still worked, but isn't this confusing
enough already?

* Cleaning up the multitude of linting problems thanks gulp :)

* Writing tests for inAppRewards.js, but something is wrong

* Fixing my linting errors in inAppRewards tests

These tests still do not run though, so they may fail and I would not
know

* Applying Negue's fixes to inAppRewards.js test

It never occured to me that we shouldn't try to reach the database while
in the common tests. Well, we shouldn't do that, we should use the
common.helpers instead. Thanks!
2018-04-13 15:22:06 +02:00
Tyler Nychka
5449652bd2 pinned items fixes #10012 (#10216)
* Don't unpin non-gear items

Assumes that multiple of bundles, quests, eggs, potions can be bought

* Added tests

* Changed type checking and made variables global

* Lint fix
2018-04-13 15:19:44 +02:00
Philip Karpiak
c12ae9ea25 Fix #10202 - Send DELETE request when detaching social auth (#10207) 2018-04-13 15:16:49 +02:00
greenkeeper[bot]
734a300b92 fix(package): update sass-loader to version 7.0.0 (#10250) 2018-04-13 15:15:08 +02:00
negue
1109ae308d convert buyQuest (gold) to the purchase refactoring / check quantity to be a number (#10244) 2018-04-13 15:14:51 +02:00
negue
8f1d241e83 if a pet is still hatchable show the hatchable - icon instead of the "you already own the mount"-icon (#10243) 2018-04-13 15:13:42 +02:00
Matteo Pagliazzi
acbca4d1dc upgrade deps 2018-04-12 21:55:24 +02:00
Matteo Pagliazzi
1ea9be8aa2 Preparatory Work for Smaller user doc (WIP) (#10245)
* protect all paths in user.pre(save using this.isDirectSelected to see if a field is available

* fix linting

* authWithHeaders: specify user fields to exclude instead of the ones to include, add comments, doc and improve test

* add more options to unit helper generateReq and add tests for excluding fields in authWithHeaders
2018-04-12 21:17:47 +02:00
Sabe Jones
ace02893e5 4.37.1 2018-04-12 18:38:18 +00:00
Sabe Jones
1c3e043fac chore(i18n): update locales 2018-04-12 18:37:36 +00:00
Matteo Pagliazzi
71c9e7a685 Tasks Modal: add setter for repeatsOn (#10247)
* fix for 10236, add setter to repeatsOn

* remove console.log
2018-04-12 13:30:56 -05:00
Sabe Jones
fa945c7689 Merge branch 'release' into develop 2018-04-11 01:38:10 +00:00
Sabe Jones
c54ce96033 4.37.0 2018-04-11 01:37:46 +00:00
Sabe Jones
85c4e93763 chore(i18n): update locales 2018-04-11 01:37:27 +00:00
SabreCat
25e5e78373 chore(sprites): compile 2018-04-11 01:33:15 +00:00
SabreCat
06181d0a1a feat(content): Squirrel Pet Quest 2018-04-11 01:32:49 +00:00
Matteo Pagliazzi
d5a8259fdb fix members modals (#10240) 2018-04-10 13:27:06 +02:00
Isaac Lim
9db7141853 Added meta image for social media sharing (#10193)
* Add meta image for social media sharing

* Meta Image in Images

* Update index.html
2018-04-09 08:34:12 +02:00
Brian Fenton
ec2a1927a0 adding name attribute to radio inputs so browser inforces selecting a single item from the named set (#10236) 2018-04-09 08:31:33 +02:00
Matteo Pagliazzi
1c1b0f00ad reorganize payments files (#10235) 2018-04-08 16:27:03 +02:00
Alys
fb4d3e44d3 improve code and tests for banned words and slurs (#10211)
* remove removePunctuationFromString function from test code

It's not needed now that the test banned words don't contain underscores.

* prevent tests accidentally throwing messageGroupChatSpam

This commit makes the user for most tests have contributor tiers so
that the user can't trigger the messageGroupChatSpam error message
(for posting messages too quickly).

This is useful when some of the tests fail due to broken code
because that makes more messages be posted than expected. If the user
doesn't have tiers, the messageGroupChatSpam error message would be
triggered, which gives misleading information about the test failure.

* add tests for banned swear and slur words posted in mixed case

* allow banned word error message to show bad words in the same case the user typed them

* stop using randomly-chosen real banned words in tests

The test modified in this commit had been using real banned words,
which meant that those words were being displayed to the contributors
when the test failed.

NB the 'check all banned words are matched' test also uses the real
banned words but the test failure messages don't show the words.

* improve translatability of bannedWordUsed error message
2018-04-08 15:31:37 +02:00
Alys
37fd062cf9 increase Hourglasses and gemCapExtra promptly when multi-month subscription renews - fixes #4819 (#10147)
* allow Hourglasses and gemCapExtra to increase promptly after a multi-month subscription has renewed

* fix existing Hourglass and Gem Cap tests that were wrong

The scenario originally used for these two tests was a six-month recurring
subscription (you can tell that from the starting offset having a non-zero value).
For recurring subscriptions, we do NOT want to increase the consecutive month
benefits as soon as the sixth month starts because the user has already been
given a full six months' benefits in advance and they might cancel the
subscription before it renews later in the sixth month.
Therefore we want to give the extra benefits at the beginning of the seventh
month (ideally we'd give them mid-month in the sixth month when the renewal
happens but we don't have support for tracking renewal dates).
So, the two changed tests were actually not correct for the case
where the offset started as non-zero.

These tests are correct for one-month recurring subscriptions (when the offset
is never set to anything above zero). The user isn't meant to get any consecutive
month benefits until a multiple of 3 months has been reached.

* add tests for one-month recurring subscription before 3x months are reached

* add tests for 3-, 6-, and 12-month recurring subscriptions

The 3-month tests are the most thorough, stepping through the
expected start and end values of consecutive data for a 7-month
range.

The 6-month tests are a bit less thorough since the same code is
used for all multi-month periods.
The discount Google subscription code is used to ensure we keep
support for it.

The 12-month tests are less thorough still, since again the same
code is used.

I'm about to try some more tests with `useFakeTimers`, which should
be a better way to test the code since they won't rely on me having
set the initial values correctly for each test. :) But I wanted to
work through these cases manually first to ensure my understanding
of how the values should change does actually match the code.

* add tests for 1-, 3-, 6-, and 12-month recurring subscriptions using clock changes to simulate passing months

Also fixed the clock call in an unrelated test because it was forming
the date incorrectly (`unix()` can't be used to create a date).

Also changed email@email.email to email@example.com because
email@email.email is potentially a real email address.

* add tests for 3-month gift subscriptions - no extra consecutive benefits given

* add tests for consecutive benefits for 6-month recurring subscription that has incorrect consecutive month data because it started before issue #4819 was fixed

* fix lint errors

* remove outdated subscription tests
2018-04-08 15:26:25 +02:00
Matteo Pagliazzi
485c3c5c46 disable failing test 2018-04-08 14:58:51 +02:00
negue
5007393f24 enable hair style edit during intro (#10227) 2018-04-08 14:52:26 +02:00
Alys
e111ac730c enable translated pet names in hatching success message (#10231) 2018-04-08 14:50:36 +02:00
Philip Karpiak
e7c78eabce Wrap creator icon + text in @click event (#10221)
Perviously only clicking the icon would activate tabs in the creator, which was confusing
2018-04-06 12:56:33 -05:00
Philip Karpiak
5da7699548 Add tooltip to character buff icon (#10156)
* Add tooltip to character buff icon

* Add tooltips for task streak, challenge and broken challenge

* Add tooltips for task menu and due date

* Challenge icon tooltip displays the challenge short name
2018-04-06 12:53:39 -05:00
Keith Holliday
f42955a0ba Added initial account banned modal (#9868)
* Added initial account banned modal

* Fixed check for non logged in user
2018-04-06 08:33:38 -05:00
Sabe Jones
4d67df4da6 4.36.0 2018-04-05 21:09:10 +00:00
Sabe Jones
ab7459f4f3 chore(i18n): update locales 2018-04-05 21:08:53 +00:00
SabreCat
469db7c0e2 Merge branch 'develop' into release 2018-04-05 21:04:11 +00:00
SabreCat
952e813b30 feat(event): avatar customizations 2018-04-05 21:03:57 +00:00
Matteo Pagliazzi
f04d05fee1 fix likes appearing immediately in chat 2018-04-05 20:54:20 +02:00
SabreCat
6d9aa43c07 fix(purchasing): typo "substract" 2018-04-03 20:30:54 +00:00
Sabe Jones
f527221079 Merge branch 'release' into develop 2018-04-03 18:49:37 +00:00
Sabe Jones
d9b852e1ea 4.35.1 2018-04-03 18:49:14 +00:00
Sabe Jones
a1207c1d8d chore(i18n): update locales 2018-04-03 18:48:56 +00:00
SabreCat
f4fb90013d feat(event): enable Shiny Seeds
Plus Bailey news and fix for bulk purchasing transformation items
2018-04-03 18:42:24 +00:00
negue
73a7c0eebc antidote display and functionality (#10199)
* update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

* clean up / refactor

* prevent unpin of all items which don't have a pinType

* remove the double boolean casting / fix lint
2018-04-03 17:35:56 +00:00
SabreCat
1819398f41 Revert "feat(event): April Foolery 2018"
This reverts commit f7b9ca124d.
2018-04-03 17:19:14 +00:00
Keith Holliday
ab14312368 Group plan landing page (#10222)
* Updated task page styles

* Added initial page styles

* Added login and payments

* Updated more styles

* Added white header

* Added group plan overview modal

* Updated copy

* Fixed location

* Style updates

* Added analytics

* More style updates

* Added locales

* Removed duplicate key
2018-04-03 11:26:08 -05:00
Sabe Jones
690d3e3fd2 Merge branch 'release' into develop 2018-04-03 00:55:28 +00:00
Sabe Jones
36f9a4918f 4.35.0 2018-04-03 00:55:06 +00:00
Sabe Jones
a4b5e27614 chore(i18n): update locales 2018-04-03 00:45:59 +00:00
SabreCat
0abfe86296 chore(sprites): compile 2018-04-03 00:41:49 +00:00
SabreCat
e11c777325 feat(content): Armoire and Backgrounds 4/18 2018-04-03 00:41:22 +00:00
Keith Holliday
63a04f36c9 Added guilds to allowed banned words 2018-04-02 17:36:57 -05:00
Keith Holliday
e58af6e3ea Replaced siena with admin 2018-04-02 17:35:26 -05:00
Keith Holliday
6ba28b5757 Added fix for chat revoke creation test (#10218) 2018-04-02 19:11:30 +02:00
Keith Holliday
ed607d2bae Fixed challenge count check (#10215) 2018-04-01 16:54:32 -05:00
Keith Holliday
1f7fc594e5 Added supression support for pet/mount modals and added mount modal (#9882)
* Added supression support for pet/mount modals and added mount modal

* Moved create animal

* Fixed raise pet logic

* Added suppresion for stable hatch modal

* Fixed click paw and added growl

* Fixed confirm. Fixed mount name

* Suppresed confirmation
2018-04-01 14:43:18 -05:00
Alys
45d0a4fac2 add a second test swear word and slur - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-04-01 19:58:23 +10:00
Sabe Jones
e50bc189aa Merge branch 'release' into develop 2018-04-01 03:55:40 +00:00
Sabe Jones
95f8867bf8 4.34.2 2018-04-01 03:01:04 +00:00
SabreCat
4968b291f7 chore(news): Bailey 2018-04-01 02:59:54 +00:00
SabreCat
f7b9ca124d feat(event): April Foolery 2018 2018-04-01 02:55:04 +00:00
Philip Karpiak
4623bcd877 Force menu links to have white color on :hover (#10200)
This is mostly to fix the contact form link under the Help menu inheriting the wrong color on hover due to missing href attribute
2018-03-31 13:48:41 +02:00
Alys
4a368a1128 supply the correct type and path for featured Magic Hatching Potions - fixes #10135 (#10204) 2018-03-31 13:46:51 +02:00
Alys
bec8cb01e0 prevents a user who has had their chat privileges revoked from creating a public guild (#10205) 2018-03-31 13:46:14 +02:00
negue
f3c041a561 antidote display and functionality (#10199)
* update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

* clean up / refactor

* prevent unpin of all items which don't have a pinType

* remove the double boolean casting / fix lint
2018-03-31 13:39:26 +02:00
Mateus Etto
c21726ec61 No Ethereal Surge on Mages (#10121)
* problem location identified (breaks code)

* problem identification notes

* Add class checking to ES (does not yet notify user)

* Add error message

* Add .gitattributes

Attempting to fix line ending disaster

* package stuff

so I can see what's broken

* add reminder and hopefully fix gitattributes

* Fix lint errors

* Redo surge fail notifs

* exterminate rogue comment, fix gitattributes

* Remove unused import 

As per @paglias' request.

* fix(lint): remove extraneous expression

* Delete .gitattributes

* Fix skill key surge -> mpheal

* Show notification only when there are mages in party

* Fix notification being too big and appearing outside the notification div

* Remove unused code

* Only show the notification on parties with 2 or more mages

The caster is a mage, so certainly at least 1 mage will be counted.

* Automated test: mpheal does not heal other mages

* Fix lint error

* Fix typo in test description

* Increase performance of test

* Using target instead of requestion partyMembers again

* Rename variable 'party' to 'partyMembers'

* Update strings in English

* spell -> Skill
2018-03-31 13:34:39 +02:00
Alys
df69208caa prevent a user with no chat privileges from inviting any player to a guild or party (#10194)
This is because they could use private group chat messages to bypass
the restriction on talking to other players.
2018-03-31 13:29:08 +02:00
negue
08d07cdd67 split profile and profileStats (#10185) 2018-03-31 13:22:17 +02:00
Philip Karpiak
a309e48183 Remove Like action from inbox chat messages (#10181)
There is no API endpoint for this action and seems rather useless for private messages anyway
2018-03-31 13:20:41 +02:00
Clay Smith
70c539cc81 (fixes #9978) Remove Leader dropdown from groupFormModal (#10176) 2018-03-31 13:17:10 +02:00
negue
11f136ac89 Purchase API Refactoring: Armoire (#10153)
* convert armoire

* fix armoire tests

* fix lint
2018-03-31 13:10:37 +02:00
negue
567d5f74ba Purchase API Refactoring: Health Potion (#10152)
* convert buyHealthPotion

* fix health potion tests

* fix lint
2018-03-31 13:09:16 +02:00
Alys
338781f57b improves rounding for boss hp and player pending damage - partial fix for #8368 (#9749)
* improves rounding for boss hp and player pending damage

* use floor filter function for user's pending damage for party page and tavern boss
2018-03-31 12:57:37 +02:00
Matteo Pagliazzi
bd07f3cd38 disable test failing on travis 2018-03-31 12:20:11 +02:00
Alys
0b735abd44 remove underscores from test swear words and slurs - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc
This is because real words don't contain them and the test words should mimic real words.
2018-03-31 18:06:04 +10:00
Alys
a88cdaf1fc Revert "Move notification snackbars when resting bar is shown (#10177)" (#10203)
This reverts commit 64e86bad91
because the console was showing errors like this:

[Vue warn]: Error in render: "TypeError: this.user is null"
found in
---> <App> at website/client/app.vue
       <Root>
2018-03-31 15:15:13 +10:00
Neel Mehta
7cae5f1a37 fix featured quests label under butterfly (#10197) 2018-03-30 15:39:33 -05:00
Neel Mehta
e453330535 Make modal overlay transparent, not solid purple (#10191) 2018-03-30 15:38:22 -05:00
Philip Karpiak
b1e5fcdeaf Focus title input of task modal when shown (#10182) 2018-03-30 15:35:59 -05:00
Philip Karpiak
10e0848a5c Use margin offsets for group plan header (#10180)
So there are no whitespaces around the header
2018-03-30 15:34:46 -05:00
Philip Karpiak
64e86bad91 Move notification snackbars when resting bar is shown (#10177)
Allows top-most notification to still be shown
2018-03-30 15:34:06 -05:00
Gabriel Siedler
21cf5d2321 fixes #10173 - Task page search bar only searches task titles, not No… (#10175)
* fixes #10173 - Task page search bar only searches task titles, not Notes (#10173)

* Fixing unit test: Test expect task to have note, but it has notes.
2018-03-30 15:30:15 -05:00
Matteo Pagliazzi
a6106a801b try fix for test 2018-03-30 19:31:35 +02:00
Matteo Pagliazzi
769405ff34 google subs: make sure the subs can be cancelled if they return a 410 from google (#10201) 2018-03-30 19:24:51 +02:00
Sabe Jones
a0803796b2 Merge branch 'release' into develop 2018-03-30 17:03:39 +00:00
Sabe Jones
cb418882f3 4.34.1 2018-03-30 17:03:13 +00:00
Sabe Jones
b17a09ac17 chore(i18n): update locales 2018-03-30 16:58:55 +00:00
Sabe Jones
88bb4f6a72 Revert "Revert "Adding the ability for admins to revoke/reinstate chat privileges and block/unblock users from the profile page. (#10082)""
This reverts commit fed2d3fb19.
2018-03-30 16:57:21 +00:00
SabreCat
ae0c440846 chore(news): Bailey 2018-03-30 16:55:51 +00:00
Keith Holliday
2f69f4039e Made challenge paging optional 2018-03-30 11:34:00 -05:00
Matteo Pagliazzi
10370ea1dc fix wording on admin tools 2018-03-30 18:27:20 +02:00
Sabe Jones
0d65e5219e 4.34.0 2018-03-30 01:20:25 +00:00
Sabe Jones
fed2d3fb19 Revert "Adding the ability for admins to revoke/reinstate chat privileges and block/unblock users from the profile page. (#10082)"
This reverts commit e4b13eecd1.
2018-03-30 01:20:18 +00:00
Sabe Jones
6ec50ed0c1 chore(i18n): update locales 2018-03-30 01:18:27 +00:00
SabreCat
6f1a551d76 chore(news): Bailey 2018-03-30 01:12:38 +00:00
SabreCat
bed97f0610 feat(community): update Community Guidelines 2018-03-30 00:26:07 +00:00
Sabe Jones
f86f98f4a6 Merge branch 'release' into develop 2018-03-28 21:33:04 +00:00
Sabe Jones
0e442a0076 4.33.2 2018-03-28 21:32:03 +00:00
Sabe Jones
89f047b15b chore(i18n): update locales 2018-03-28 21:30:38 +00:00
Travis Husman
e64bc2e39a Fixing issue with pull request when task is changed to monthly but that start date isn't updated. 2018-03-28 21:00:17 +00:00
SabreCat
3b3fcbdfce fix(sound): correct element nesting 2018-03-28 20:47:31 +00:00
Neel Mehta
558dd2e4bf fix hippo-crite scroll image size 2018-03-27 23:04:34 -04:00
SabreCat
7914a959b3 fix(test): add flags to expected public fields 2018-03-27 21:50:55 +00:00
SabreCat
8a27524fa0 fix(members): include classSelected flag in public fields 2018-03-27 21:21:11 +00:00
Matteo Pagliazzi
a64fed97ac try to fix failing tests 2018-03-27 15:54:00 +02:00
Keith Holliday
e937d1722e Contact form links (#10187)
* Added links to contact form

* Fixed encoding link. Added link to tavern. Updated copy

* Converted link to cookie link

* Updated domain format

* Updated links

* Added apikey to cookie
2018-03-26 14:02:32 -05:00
greenkeeper[bot]
f537e8142f chore(package): update eslint-plugin-mocha to version 5.0.0 (#10174) 2018-03-24 18:34:32 +01:00
Travis
e4b13eecd1 Adding the ability for admins to revoke/reinstate chat privileges and block/unblock users from the profile page. (#10082)
* Adding the ability for admins to revoke/reinstate chat privileges and block/unblock users from the profile page.

fixes #10073

* Updating fix to dynamically load user blocked and chat revoked state for admins.

* Fixing pr according to comments.
2018-03-24 11:18:52 -05:00
Travis
b5872a9577 Give MasterClasser Acheivement on completion of any of the series quests, not just the final. (#10086)
* Adding check to give master classer acheivement on any master classer series quest completion

fixes #9461

* Fixing concat bug by assigning the variable after concatenation.

* Fixing retry query.
2018-03-24 11:18:33 -05:00
Travis
48fa78bef2 Quest completion modal acknowledge on close (#10089)
* Change quest completion modal to only close on user acknowledge of clicking ok or 'x'
and update 'x' to acknowledge the quest completion.

* Removing check on header-close.

* Removing unused variable.
2018-03-24 11:18:13 -05:00
Travis
781256c917 fix: fix quest shop to not use string addition when buying quests (#10120)
* fix: fix quest shop to not use string addition when buying quests

fixes #10115

* Fixing quest purchase quantity interpretted as a string on the server side.

* Adjusting pull-request according to comments.

* Updating according to PR comments.
2018-03-24 11:17:23 -05:00
Mark Kuba
dcd680c293 Fix/mana bar unselected class - fix: #10026 (#10126)
* Update getClass() for users who have not yet selected a class

* Added tests for members.getClass()

* fix linter errors

* Update test

* Update import in test to point to correct module

* use hasClass() getter where appropriate

* Fix linter error
2018-03-24 11:15:40 -05:00
Philip Karpiak
ec6f53bb1b Wrap attribute cell value text (#10161)
When they become floating point or have more than 3 charcters they wrap to the next line. This change prevents that.
2018-03-24 11:12:26 -05:00
jack
9834afee4a fixes #9880 - uneven sizes and spacing in the action buttons of the user modal. (#10163) 2018-03-24 11:09:56 -05:00
Dexx Mandele
9b279563ea Prettify background overview (#10078)
* Bring buy bg set button in line with title

* Make background sets pretty

* Add checkbox to filter backgrounds

* Review: replace background filter checkbox with toggle

* Remove dashed line from toggle-switch label

* Test: add comma to make es-lint happy

* Move toggle tooltip into toggle-switch template

* Make toggle-switch label optional

* Review: Remove toggle-switch margin
2018-03-24 11:07:37 -05:00
Sabe Jones
347fe69667 Merge branch 'release' into develop 2018-03-24 02:51:25 +00:00
Sabe Jones
552cf70abd 4.33.1 2018-03-24 02:51:01 +00:00
Sabe Jones
01c8ef9382 chore(i18n): update locales 2018-03-24 02:48:23 +00:00
Keith Holliday
298a6a743c Added paging (#10150)
* Added paging

* Escaped regex

* Fixed challenge side effect tests
2018-03-23 14:13:08 -05:00
Matteo Pagliazzi
fa17ab7c17 avoid errors when trying to call createTasks with no tasks (#10170) 2018-03-23 17:15:50 +01:00
Matteo Pagliazzi
0f339d8d3e Docker: yarn is not necessary anymore 2018-03-23 16:20:00 +01:00
Keith Holliday
99852fcd89 Stringified mem report (#10167)
* Stringified mem report

* Passed info
2018-03-23 10:19:24 -05:00
Matteo Pagliazzi
ca3d044aa1 upgrade deps 2018-03-23 16:01:51 +01:00
greenkeeper[bot]
b338e65dc9 chore(package): update karma-webpack to version 3.0.0 (#10151) 2018-03-23 16:00:18 +01:00
greenkeeper[bot]
1475c93962 chore(package): update eslint-friendly-formatter to version 4.0.0 (#10168) 2018-03-23 15:58:40 +01:00
Sabe Jones
ddec458364 4.33.0 2018-03-22 19:58:55 +00:00
Sabe Jones
bfe74a8dcb chore(i18n): update locales 2018-03-22 19:57:57 +00:00
SabreCat
13d9da404d chore(sprites): compile 2018-03-22 19:51:21 +00:00
SabreCat
85e0af0c0e feat(content): Mystery Items 2018/03 2018-03-22 19:50:47 +00:00
SabreCat
a2e5548b1c Merge branch 'develop' into release 2018-03-22 18:53:40 +00:00
negue
36dabad2c9 fix seasonal shop (#10164) 2018-03-22 13:50:58 -05:00
Keith Holliday
25b9e6f330 Added memwatch for memory leak detection (#10166) 2018-03-22 12:44:45 -05:00
Keith Holliday
d0a786554c Removed balance check test (#10159)
* Removed balance check test

* Removed balance check in common

* Removed gem logic and added achievement to tests
2018-03-21 11:53:47 -05:00
Alys
de79e0e3c3 add swear word - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-03-21 19:19:13 +10:00
Sabe Jones
0e74d25ede Merge branch 'release' into develop 2018-03-20 23:12:23 +00:00
Sabe Jones
bde8b76da7 4.32.1 2018-03-20 23:11:49 +00:00
Sabe Jones
4235be4b43 chore(i18n): update locales 2018-03-20 23:11:37 +00:00
Sabe Jones
3af7f89d10 Merge branch 'release' into develop 2018-03-20 22:57:52 +00:00
Sabe Jones
396362d27e 4.32.0 2018-03-20 22:57:28 +00:00
SabreCat
972efb1878 fix(seasonal-shop): remove quest
it was breaking the API. Wut? Just use canBuy logic and Quest Shop for now
2018-03-20 22:49:54 +00:00
SabreCat
6c18d19d95 fix(test): extra curly 2018-03-20 21:56:55 +00:00
SabreCat
9b8bdb90d8 chore(sprites): compile 2018-03-20 21:31:04 +00:00
SabreCat
a84ea8b1b7 feat(event): Spring Fling 2018 2018-03-20 21:30:43 +00:00
Matteo Pagliazzi
480a839bc5 update package-lock 2018-03-18 16:36:36 +01:00
greenkeeper[bot]
df9c54fe20 chore(package): update http-proxy-middleware to version 0.18.0 (#10131) 2018-03-18 16:33:33 +01:00
greenkeeper[bot]
8dbab1a976 chore(package): update sinon-chai to version 3.0.0 (#10096) 2018-03-18 16:33:19 +01:00
greenkeeper[bot]
df6088bc6d fix(package): update url-loader to version 1.0.0 (#10088) 2018-03-18 16:31:03 +01:00
greenkeeper[bot]
f0ff3a4eb6 fix(package): update html-webpack-plugin to version 3.0.0 (#10070) 2018-03-18 16:29:25 +01:00
greenkeeper[bot]
786e4419da chore(package): update eslint-loader to version 2.0.0 (#10056) 2018-03-18 16:28:20 +01:00
Chris Wang
fff4ea3ad3 Added popover stats to costume equipment on profile stats - fixes #9280 (#10136)
* Added popover stats to costume equipment on the stats page of a profile (#9280)

* Changed popover position to bottom for equip and costume items.

* Fixed indent on line 160

* Changed escaped double quotes to single quotes for readability
2018-03-18 16:24:41 +01:00
kartik adur
e18e89bc10 Task page - task filters v2 (#10053)
* update column.vue, getters/task.js, getters/user.js and add unittests and helpers

* add vue-test-utils pkg + unit test for column.vue

* add unit test column.vue

* update unit tests

* fix linting errors
2018-03-18 16:23:58 +01:00
Matteo Pagliazzi
68ea28305d fix linting issues 2018-03-17 22:36:17 +01:00
Travis
242b3508a1 Update Staff list in the tavern to make staff names clickable to pull up staff profiles. (#10107)
* Update Staff list in the tavern to make staff names clickable to pull up staff profiles.

fixes #9290

* Addressing PR comments.
2018-03-17 22:29:52 +01:00
Travis
8c316d939f Updated get challenges api to return challenges sorted by which challenges include the habitica_official category (#10079)
and removed sorting on the official flag of the challenges object.

fixes #9955
2018-03-17 22:26:24 +01:00
Travis
45eb19e992 Update the API to prevent the user from leaving a group if they are the only member and have a quest active. (#10091)
* Update the API to prevent the user from leaving a group if they are the only member and have a quest active.

fixes #10068

* fixing api doc
2018-03-17 22:26:07 +01:00
Travis
3ad0ffcaec Escaping regex characters from user input before searching for groups. (#10092)
fixes #9953
2018-03-17 22:25:50 +01:00
Travis
fef8929dd9 Fixes start date updating the repeat on day for dailies repeated monthly (#10095)
fixes # 9200
2018-03-17 22:25:34 +01:00
Travis
911f894750 Fixing edit profile page so blurb can be editted after reload. (#10097)
fixes #10032
2018-03-17 22:25:17 +01:00
Travis
d4e2f5ac9e fix: Fixing xml data export 500 error. (#10114)
* fix: Fixing xml data export 500 error.

fixes #10100

* Removing outdated comment.

* Making xml data export test pass consistently.
2018-03-17 22:24:40 +01:00
Mahendran Nadesan
e43749bed1 Stats over 3 digits overlap (fixes #10033) (#10133)
* Formatted stats

* small changes

* Fixed issues as per comments
2018-03-17 22:23:55 +01:00
Sarah Boo
8be29e27d0 Hide "Delete Completed" To-Dos button on Challenge or Group Task Board - fixes #9935 (#10128)
* only show delete to-dos for user's task page

* remove stray spaces
2018-03-17 22:22:12 +01:00
Mark Kuba
301668fe22 fix: you are already in group message - fixes #10119 (#10122)
* add youAreAlreadyInGroup message

* add test for youAreAlreadyInGroup message

* update youAreAlreadyInGroup message
2018-03-17 22:21:16 +01:00
Gene Vityugov
767f3ebe12 Add space in profile modal to make it consistent with other text (#10103) 2018-03-17 22:19:58 +01:00
EthanEFung
25e6f8e26e Add Completion Text to Older Quests #10066 (#10081) 2018-03-17 22:18:54 +01:00
Dmitry Torba
1c6608d071 fix flower avatar in chat #10015 (#10040) 2018-03-17 22:17:47 +01:00
Toivo Mattila
d2b160438c Added margin to buttons on Settings-page (#10034)
* Added margin to buttons on Settings-page

* Added bottom margin for 'Enable Class System' button
2018-03-17 22:16:55 +01:00
Александр
37d70f089c Removes video from presskit.zip (#10013)
* presskit without video

* Boss/ update pics

* Logo/ change broken pics

* updated broken files

* Delete Level Up.PNG

* Add files via upload

* update outdated icons

* update party

* upload updated presskit
2018-03-17 22:15:40 +01:00
Julius Jung
04b4912d59 Fix password reset when querying for emails with upcase characters (fixes #9059) (#9707)
* downcase updating an email to be consistent with creating

* add tests to ensure downcase of email for create/update

* create migration to downcase existing User objects

* delete 'only'

* change gmail to example

* add trailing comma from lint error

* search for emails with at least one capital letter

* fix query in order to search for any email with at least one capital letter

* batch process effected users with at least one capital in email

* update script for batch process effected users
2018-03-17 22:13:54 +01:00
Zack Sunderland
b9a6d9ceec Allow Un-subscribed Users to Claim Mystery Items (#9270)
Remove restriction on mystery/special inventory items that prevents
non-subscribed users from seeing the items. Organize the imports on the
page.

Resolves: Issue #9228
2018-03-17 22:13:31 +01:00
negue
2a97915477 Purchase API Refactoring: Market Gear (#10010)
* convert buyGear to buyMarketGearOperation + tests

* move NotImplementedError
2018-03-17 21:56:19 +01:00
Alys
29a9deaeb8 prevent lint indent warning on multi-line reduce function (#10145) 2018-03-17 21:13:55 +01:00
negue
0fcc1f2080 correct position of pets in the profile overview - fixes #10104 (#10144) 2018-03-17 21:13:35 +01:00
negue
9287098e70 fix #10116 (#10143) 2018-03-17 21:13:12 +01:00
negue
1812f63812 raise coverage for user api calls (#10099)
* user integration tests

* fix lint
2018-03-17 21:12:53 +01:00
negue
3d4107db3e checkout of the Inn - banner (#9835)
* show resting banner

* resume damage

* replace colors by variables

* remove indentation
2018-03-17 21:12:25 +01:00
Sabe Jones
67e750a81c 4.31.1 2018-03-15 21:19:44 +00:00
Keith Holliday
7fe62a731b Fixed gem amount on master key (#10140)
* Fixed gem amount on master key

* fix(news): update Bailey text
2018-03-15 16:19:11 -05:00
Sabe Jones
3c224fe353 Merge branch 'release' into develop 2018-03-15 19:10:56 +00:00
Sabe Jones
bb6f465ac8 4.31.0 2018-03-15 19:10:37 +00:00
Sabe Jones
a2a79e4607 chore(i18n): update locales 2018-03-15 19:07:38 +00:00
SabreCat
5125cc5f59 chore(news): Bailey 2018-03-15 19:04:00 +00:00
Matteo Pagliazzi
cb42a31c43 Node 8 (WIP) (#9946)
* start upgrade to node 8

* upgrade travis

* improve travis

* Remove bluebird, babel (except for modules) from server (WIP) (#9947)

* remove bluebird, babel from server (except for modules)

* fixes

* fix path

* fix path

* fix export

* fix export

* fix test

* fix tests

* remove plugin for transform-object-rest-spread since it is supported in node8

* babel: correct syntax rest spread

* remove bluebird

* update migrations archive readme

* fix package-lock.json

* fix typo

* add package-loc
2018-03-15 19:59:36 +01:00
Alys
b1b1e512f5 adjust word order in mod slack flag message (#10137) 2018-03-15 19:27:59 +01:00
Alys
5ba09c45df adjust comments and word lists in slurs and banned words. TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-03-15 20:53:48 +10:00
Matteo Pagliazzi
70dec611e3 Make Kafka dep optional (#10129)
* Made kafka optional

* make kafka optional
2018-03-14 18:21:39 +01:00
Keith Holliday
2195464772 Flag comment (#9991)
* Added initial chat flag comment form

* Added user comment to slack message

* Updated copy and styles

* Fixed comma

* Updated admin messaging
2018-03-14 07:41:13 -05:00
Sabe Jones
b662f8bdff Merge branch 'release' into develop 2018-03-13 21:00:00 +00:00
Sabe Jones
0e6d6336c6 4.30.0 2018-03-13 20:59:13 +00:00
Sabe Jones
d8078adacd chore(i18n): update locales 2018-03-13 20:58:43 +00:00
SabreCat
a88800df78 chore(sprites): compile 2018-03-13 20:54:54 +00:00
SabreCat
42e0095bbd feat(content): spring Hatching Potions 2018-03-13 20:54:27 +00:00
Sabe Jones
ee1aa653f0 fix(groups): Guild badge fencepost errors 2018-03-12 14:43:39 -05:00
SabreCat
8d1b1ff794 chore(npm): update package lock 2018-03-09 21:22:25 +00:00
SabreCat
70500d7c98 Merge branch 'release' into develop 2018-03-09 21:18:56 +00:00
Travis
35849ebdd7 Fixing items sort by number in the market. (#10108)
fixes #10093
2018-03-09 15:17:26 -06:00
Matteo Pagliazzi
1332fd68b0 Mongoose 5 (#9870)
* mongoose 5: remove unused autoinc, remove promise option (it uses native promises now)

* remove mongodb package

* remove mongoskin

* migrate migration away from mongoskin

* fix mongoose hooks

* fix _updateUserWithRetries

* try without next

* remove init

* update sinon

* fix some integration tests

* fix remaining tests

* fix error message

* fix error message

* fix error message

* another fix

* fix mongoose options

* remove greenkeeper exception
2018-03-09 15:13:58 -06:00
Travis
f9a47b1420 Update user pinned items on purchases. (#10085)
fixes #10049
2018-03-09 15:11:42 -06:00
Sabe Jones
090c571f3e 4.29.8 2018-03-09 21:04:14 +00:00
Dexx Mandele
07b3824c4c Stop market background from covering sign (#10067) 2018-03-09 14:59:45 -06:00
Sabe Jones
1bf3736198 chore(i18n): update locales 2018-03-09 20:58:12 +00:00
Travis
92fa6805eb fix: Quest collected items displayed multiple times. (#10111)
fixes #10065
2018-03-09 14:56:59 -06:00
SabreCat
d5efa7b2b0 fix(event): clean up more Valentine's content 2018-03-09 20:45:12 +00:00
Dexx Mandele
f64b34318f Set warrior as default for the choose class pop-up (#10084) 2018-03-09 14:40:53 -06:00
Sabe Jones
5e13a9c503 4.29.7 2018-03-09 03:31:53 +00:00
Sabe Jones
b27aec855c chore(event): end Cupid Potions 2018-03-09 03:31:39 +00:00
Sabe Jones
fe61c0f29e Merge branch 'release' into develop 2018-03-08 21:43:35 +00:00
Sabe Jones
2db3ac7bd3 4.29.6 2018-03-08 21:42:52 +00:00
SabreCat
201ec0e865 fix(world-boss): add achievement badge, correct mount positioning 2018-03-08 21:37:17 +00:00
Sabe Jones
a0253cf289 chore(i18n): update locales 2018-03-08 19:41:22 +00:00
SabreCat
5256569bac fix(world-boss): remove notification 2018-03-08 19:37:27 +00:00
Sabe Jones
5f0b957dc2 fix(logging): only start Stackimpact in prod (#10112) 2018-03-08 13:12:45 -06:00
Sabe Jones
16524d4464 4.29.5 2018-03-08 18:39:00 +00:00
SabreCat
63a11c6c28 chore(event): end Valentines/Dysheartener 2018-03-08 18:37:32 +00:00
Sabe Jones
37650ca674 Merge branch 'release' into develop 2018-03-08 00:30:37 +00:00
Sabe Jones
b5dfa54052 4.29.4 2018-03-08 00:30:20 +00:00
SabreCat
2e7deffb69 fix(user): no more birthday 2018-03-08 00:29:00 +00:00
Sabe Jones
b4dab2e13c Merge branch 'release' into develop 2018-03-07 22:53:09 +00:00
Sabe Jones
535c41dba8 4.29.3 2018-03-07 22:52:45 +00:00
Sabe Jones
7357fb0528 chore(i18n): update locales 2018-03-07 22:49:33 +00:00
Keith Holliday
49e67fa87c Added stackimpact (#10109) 2018-03-07 16:46:50 -06:00
Sabe Jones
b4ca425562 4.29.2 2018-03-06 22:03:34 +00:00
Sabe Jones
deba726afa chore(i18n): update locales 2018-03-06 22:00:31 +00:00
SabreCat
2abf0f4900 feat(content): Hug a Bug Quest Bundle 2018-03-06 21:56:01 +00:00
Sabe Jones
b827b17481 Don't include seasonal class gear in classless category (#10047)
* fix(market): don't include seasonal class gear in classless category

* refactor(shops): use standard indexOf check
2018-03-06 11:03:49 -06:00
Sabe Jones
27ef187e66 Merge branch 'release' into develop 2018-03-05 20:59:17 +00:00
Sabe Jones
0c3b4bba51 4.29.1 2018-03-05 20:58:50 +00:00
Sabe Jones
09948ba319 chore(i18n): update locales 2018-03-05 20:58:16 +00:00
SabreCat
da50d2f495 feat(world-boss): third Rage Strike support 2018-03-05 20:46:22 +00:00
Keith Holliday
9c9b67aa9d Keys kennel fixes (#9848)
* Show keys to pets immediately

* Ensured keys to pets dissapear after use

* Added resdirect to stable after purchase

* Added mount check and updated keys to mounts and to both

* Added api calls

* Added check for beastmaster progress

* Added mount check for release mounts. Added pets and mount check to release both

* Added actions

* Added catch to common tests

* Added beast count and reload

* Removed extra console log
2018-03-02 15:30:11 -06:00
Keith Holliday
7cff331800 Removed uri for client side oauth (#10058)
* Removed uri for client side oauth

* Fixed lint
2018-03-02 14:07:15 -07:00
Keith Holliday
e7bc505b88 Modal popup fixes (#10080)
* Added validation for modal stack

* Lint fixes
2018-03-02 12:43:22 -07:00
Sabe Jones
716393cf91 4.29.0 2018-03-01 23:31:00 +00:00
Sabe Jones
fe102aedd3 chore(i18n): update locales 2018-03-01 23:29:59 +00:00
SabreCat
cf7fc8d578 Merge branch 'develop' into release 2018-03-01 23:23:57 +00:00
SabreCat
b39a5be2d1 chore(sprites): compile 2018-03-01 23:23:36 +00:00
SabreCat
45a1ad501e feat(content): Backgrounds and Armoire 2018/03 2018-03-01 23:23:00 +00:00
Keith Holliday
2959f0afab Removed modify inventory because the Content is causing Garbage Collection issues (#10075) 2018-03-01 08:24:46 -07:00
Sabe Jones
77f8c45e08 fix(world-boss): remove deprecated "recent" field 2018-02-28 15:53:32 +00:00
Sabe Jones
bd2fea6e81 Merge branch 'release' into develop 2018-02-28 15:40:28 +00:00
Sabe Jones
cb7f85037f 4.28.2 2018-02-28 15:39:45 +00:00
Sabe Jones
a9db5310cc chore(i18n): update locales 2018-02-28 15:38:07 +00:00
SabreCat
49af418a29 chore(news): Bailey 2018-02-28 15:33:45 +00:00
Keith Holliday
dee81ee6c9 Reversed order to put newest on top (#10059) 2018-02-28 08:17:54 -07:00
Alys
5265e6d321 add swear words - TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-02-28 19:45:07 +10:00
Matteo Pagliazzi
5e5d73816b fixes #10057 (#10063) 2018-02-27 22:24:31 +01:00
Matteo Pagliazzi
3e723ec4de fixes #9952 (#10062) 2018-02-27 22:02:12 +01:00
Sabe Jones
892ba3b741 Merge branch 'release' into develop 2018-02-27 20:55:34 +00:00
Sabe Jones
48e556fa54 4.28.1 2018-02-27 20:55:11 +00:00
Sabe Jones
f687c6f987 chore(i18n): update locales 2018-02-27 20:54:40 +00:00
negue
0b4eafeb28 prevent selling negative items (#10061) 2018-02-27 14:51:10 -06:00
SabreCat
cedfc005f8 feat(world-boss): Market Strike support 2018-02-27 20:04:37 +00:00
Keith Holliday
be71c5f844 Added kafka queue and initial messages for delete account (#10036)
* Added kafka queue and initial messages for delete account

* Checked for env vars
2018-02-27 09:57:37 -07:00
Keith Holliday
7dcd550209 Updated membercount checks (#10006)
* Updated membercount checks

* Added get member count method

* Updated tests to correctly add users
2018-02-26 13:03:04 -07:00
Keith Holliday
6118336a5d Marked new stuff complete when clicking later (#10043)
* Marked new stuff complete when clicking later

* Moved flag set to action
2018-02-26 12:07:54 -07:00
Alys
01dab33b96 adjust loading screen tip to refer to Tags button by its correct name (not Filters) 2018-02-26 19:40:19 +10:00
Keith Holliday
84dc2f8e3c Fixed sorting and model creation for inboxes (#10039) 2018-02-25 08:04:55 -07:00
greenkeeper[bot]
b1bd243892 docs(readme): add Greenkeeper badge (#10050) 2018-02-24 12:46:42 +01:00
Matteo Pagliazzi
67961be575 greenkeeper: exclude mongoose 2018-02-24 12:05:13 +01:00
Gergely Imreh
4b17f62241 task types: add new error messages for invalid task types (#9983)
* `/task/user` `GET` endpoint takes plurals of task types as allowed
  parameters, plus  another custom `completedTodos` type
* `/tasks/group/:groupId` and `/tasks/challenge/:challengeId`
  `GET` endpoints task plurals of task types as allowed parameters
2018-02-23 14:38:18 -06:00
Keith Holliday
b850ea9dbf Bulk spell casting (#10007)
* Reorganized spell code

* Added quantity field

* Fixed parameter passing
2018-02-23 11:30:15 -07:00
README Bot
94e615e53e Add CodeTriage badge to habitrpg/habitica (#10028)
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/habitrpg/habitica/badges/users.svg)](https://www.codetriage.com/habitrpg/habitica)

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly 11 months ago, [chufty](https://github.com/chufty) added this project to CodeTriage in order to start contributing. Since then, 29 people have subscribed to help this repo.

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2018-02-23 15:47:09 +01:00
Matteo Pagliazzi
3a1e56cc8e Upgrade server deps (#10017)
* remove unused apn lib and upgrade moment-recur

* upgrade validator

* upgrade got

* request -> got

* fix validation

* fix tests

* upgrade nodemailer

* fix unit tests

* fix webhook tests, upgrade express-validator (using legacy api)

* upgrade js2xmlparser

* update misc packages

* fix linting

* update packages
2018-02-23 15:21:00 +01:00
Sabe Jones
cea47e5280 4.28.0 2018-02-22 23:06:53 +00:00
Sabe Jones
9ccb60799e chore(i18n): update locales 2018-02-22 23:04:56 +00:00
SabreCat
f86a77608b chore(sprites): compile & cleanup 2018-02-22 22:57:34 +00:00
SabreCat
8b8cee40a7 feat(content): mystery items Feb 2018 2018-02-22 22:56:33 +00:00
SabreCat
9487811d31 fix(world-boss): Tavern layout tweaks 2018-02-22 21:31:57 +00:00
Matteo Pagliazzi
d5e4be85e9 Revert "Task page : task filters (#9898)"
This reverts commit 9919faeed8.
2018-02-22 12:28:24 +01:00
Keith Holliday
deaf7fee81 Added world boss notification (#10030)
* Added world boss notification

* Updated styles
2018-02-21 14:58:56 -06:00
Sabe Jones
72dc7c01c3 Merge branch 'release' into develop 2018-02-21 17:47:56 +00:00
Sabe Jones
00c830372a 4.27.4 2018-02-21 17:47:28 +00:00
Sabe Jones
199ca03b23 chore(i18n): update locales 2018-02-21 17:45:03 +00:00
SabreCat
84dc1ab546 chore(news): Bailey 2018-02-21 17:35:33 +00:00
Sabe Jones
91df5d1565 4.27.3 2018-02-20 21:41:52 +00:00
Sabe Jones
d0a05ad745 fix(lint): disable-line typo 2018-02-20 21:41:33 +00:00
Sabe Jones
c991a3e20f fix(lint): disable-line typo 2018-02-20 21:41:11 +00:00
Sabe Jones
93cfd59ea1 chore(i18n): update locales 2018-02-20 21:32:43 +00:00
Sabe Jones
695f53758a Merge branch 'release' into develop 2018-02-20 21:16:43 +00:00
Sabe Jones
416c24d1e2 fix(auth): initialize Hello for social
fixes #9460
2018-02-20 21:15:36 +00:00
SabreCat
b0974fc4fc feat(rage-strike): Seasonal Shop modal 2018-02-20 20:05:32 +00:00
negue
8fabadfc67 fix genericPurchase test (#10024) 2018-02-19 20:17:41 +01:00
Matteo Pagliazzi
f2e5fdddf1 tests: fix client unit tests 2018-02-19 19:38:20 +01:00
kartik adur
9919faeed8 Task page : task filters (#9898)
* add tasklist getter

* add unit test + refactor for getters

* add task order sorting + update unit tests

* remove direct access to store.state.tasks

* add tag and search filter back to column.vue + unit tests

* add unit test for task order setting function

* add task filters to helper file + modify taskColumn state access to getter

* update column to get values at runtime. TODO set active filter at runtime

* add TaskColumn init state + daily-due-default

* add check for task type daily before set/reset dailyDueView

* remove unused sortBy import in column.vue

* remove unused sortBy

* pr review requested updates

* pr review clean up updates
2018-02-19 19:03:38 +01:00
Josh Sears
f592103754 Partial Fix for #8735 ("Failed party invitations do not indicate which invitations failed") (#9939)
* Updated from origin and added invite error fixes

* Update test for capitalization issue

* New error display

Changed app.vue to display error message using error.response.data.message
2018-02-19 19:00:42 +01:00
kartik adur
80e4f5e745 Replace PhantomJS with ChromeHeadless for unit test support (#9972)
* change PhantomJS to ChromeHeadless + travis support

* pr requested updates

* update api-v3 integration beforAll/afterAll
2018-02-19 18:56:48 +01:00
Mike Tung
119f21ddce New PR for margins in stable - fixes #9651 (#9982)
* made style change for pet item class to have more margins.

* made style change for pet item class to have more margins.

* files got added

* encapsulated the items as stated in #9903

* #9903 moved the css to stable -> petitem.vue for better encapsulation.

* saving pngs

* update on files

* updated files as requested in PR!

* Revert "saving pngs"

This reverts commit a38ea664e1.

* made css changes just to pet slot

* #9982 removed redundant css

* #9982 applied scss to mount slots as well.

* #9982 refactored scss to be in one place.

* #9982 changed selector
2018-02-19 18:55:16 +01:00
Mateus Etto
311a898938 Fix attributes box size being too small on Japanese (#9984) 2018-02-19 18:52:07 +01:00
Ignacio Alvarez
1c1b050e2c If message uuid is set as system append as user 'system message' #9985 (#9988) 2018-02-19 18:51:43 +01:00
Keith Holliday
faa068f690 Challenge small refactor (#9964)
* Removed challenge group duplication

* Removed duplication of joined challenge

* Moved helpers to challenge library

* Passed group to function

* Fixed group response
2018-02-19 08:15:43 -07:00
Matteo Pagliazzi
b619496f8e fix linting 2018-02-17 18:41:49 +01:00
Matteo Pagliazzi
80fe58bc6f Upgrade client deps (#9990)
* upgrade axios

* upgrade axios-progress-bar

* upgrade bootstrap-vue

* fix issues
2018-02-17 18:15:43 +01:00
Matteo Pagliazzi
c3c9dd5d35 Merge branch 'upgrade-client-build' into develop 2018-02-17 18:15:02 +01:00
Matteo Pagliazzi
464613a56a Merge branch 'develop' into upgrade-client-build 2018-02-17 18:14:48 +01:00
Matteo Pagliazzi
74ba55c20b Upgrade tests tools and lint migrations and scripts (part 2) (#9998)
* upgrade gulp-babel

* upgrade babel-eslint

* upgrade eslint-friendly-formatter

* start upgrading chai

* start to upgrade eslint

* restore skipped tests

* start to upgrqde monk

* fix linting and remove unused file

* fix mocha notifications, and common tests

* fix unit tests

* start to fix initrgration tests

* more integration tests fixes

* upgrade monk to latest version

* lint /scripts

* migrations: start moving to /archive unused migrations and run eslint with --fix

* lint migrations

* fix more integration tests

* fix test
2018-02-17 18:11:24 +01:00
SabreCat
ee087e5eee refactor(rage-strike): consts 2018-02-16 21:36:10 +00:00
SabreCat
95179be346 feat(world-boss): Rage Strike support 2018-02-16 21:18:51 +00:00
negue
b0ae0ef4da HOTFIX: purchase marketGear (#9992)
* fix purchase marketGear

* test marketGear purchase in the client
2018-02-16 17:56:05 +01:00
Matteo Pagliazzi
dad4f864ff fixes #10001 (#10002) 2018-02-16 17:55:45 +01:00
Keith Holliday
f7ffc173b1 Prevented of closing bailey without clicking bottom buttons (#9993) 2018-02-16 09:21:59 -07:00
Keith Holliday
ac6a5ae8d2 Registered new funtion as translation (#10005) 2018-02-15 21:25:44 -07:00
Sabe Jones
70fbc83664 Merge branch 'release' into develop 2018-02-16 03:08:22 +00:00
Sabe Jones
c3e41cc5e1 4.27.2 2018-02-16 03:07:52 +00:00
Sabe Jones
cae0120beb chore(i18n): update locales 2018-02-16 03:01:42 +00:00
SabreCat
10b978da4e fix(spoilers): don't reveal quest boss rewards 2018-02-16 02:56:08 +00:00
SabreCat
5987145b86 fix(phobia): show censored art as needed 2018-02-14 22:35:14 +00:00
Sabe Jones
791d711298 Merge branch 'release' into develop 2018-02-14 21:09:30 +00:00
Sabe Jones
ff65c4da78 4.27.1 2018-02-14 20:55:12 +00:00
Sabe Jones
163d56afe9 chore(i18n): update locales 2018-02-14 20:54:50 +00:00
SabreCat
2f46d1bc65 chore(sprites): compile 2018-02-14 20:48:48 +00:00
SabreCat
6ccb841b32 chore(news): Bailey text 2018-02-14 20:47:47 +00:00
Sabe Jones
cdcee8d169 World boss client (#9999)
* WIP(world-boss): client components partial

* WIP(world-boss): more client additions

* WIP(world-boss): some beautification

* WIP(world-boss): more Tavern beauty

* fix(world-boss): gradient adjustment

* fix(style): various WB tweaks

* fix(world-boss): better resolution Rage Strike

* fix(world-boss): alignment fixes

* Added world boss modal

* feat(world-boss): add info button

* fix(world-boss): move SVG and tweak padding
2018-02-14 13:43:10 -06:00
Matteo Pagliazzi
16a227109e upgrade to webpack 3 and extract-text-webpack-plugin 2018-02-14 12:14:11 +01:00
Matteo Pagliazzi
8611bd97ae upgrade webpack-dev-middleware 2018-02-14 12:06:30 +01:00
Matteo Pagliazzi
2f3e6b82cf fix svgo options 2018-02-14 12:05:53 +01:00
Matteo Pagliazzi
adcd9a53c4 upgrade babel-loader 2018-02-14 11:58:12 +01:00
Matteo Pagliazzi
4a7eb768dc ugrade vue-loader 2018-02-14 11:57:47 +01:00
Matteo Pagliazzi
d544a5be6f upgrade svgo-loader 2018-02-14 11:54:36 +01:00
Matteo Pagliazzi
269dac1fe8 upgrade postcss-easy-import 2018-02-14 11:51:01 +01:00
Matteo Pagliazzi
bd90ffa6f8 upgrade svg-inline-loader 2018-02-14 11:49:41 +01:00
Matteo Pagliazzi
7c5d35cf77 upgrade url-loader 2018-02-14 11:48:05 +01:00
Matteo Pagliazzi
0049647c08 upgrade autoprefixer 2018-02-14 11:47:29 +01:00
Sabe Jones
7684f9b26a Merge branch 'release' into develop 2018-02-14 02:31:17 +00:00
Sabe Jones
fd5ab32c43 4.27.0 2018-02-14 02:30:55 +00:00
Sabe Jones
e0933dc0a1 chore(i18n): update locales 2018-02-14 02:29:58 +00:00
Sabe Jones
d69e7e66ee World Boss 2018 (Server) (#9995)
* feat(world-boss): barebones API

* fix(world): use Express respond for better JSON

* fix(api): respond with code 200

* feat(content): canonical Dysheartener desc and Rage

* fix(world-boss): enable progress

* WIP(test): world state API

* WIP(test): refactor world boss setup

* WIP(test): better expectations

* fix(test): more expect polishing

* feat(event): server side World Boss

* fix(strings): accidental deletion

* fix(content): include encouragement after Rage

* refactor(world-boss): address comments
2018-02-13 19:21:39 -06:00
Matteo Pagliazzi
fa06628361 add new locales 2018-02-13 12:41:47 +01:00
Matteo Pagliazzi
7f1067e1ab chore(i18n): update locales 2018-02-13 12:40:05 +01:00
Matteo Pagliazzi
db6644a572 chore(i18n): update locales 2018-02-13 12:35:05 +01:00
Sabe Jones
1e23395c8c Merge branch 'release' into develop 2018-02-12 22:08:03 +00:00
Sabe Jones
b7b8faedd6 4.26.3 2018-02-12 22:07:52 +00:00
Sabe Jones
7da0b641dd chore(i18n): update locales 2018-02-12 22:07:00 +00:00
SabreCat
82ff241e39 chore(sprites): compile 2018-02-12 21:58:54 +00:00
SabreCat
cf4aaf1618 feat(event): enable Valentines 2018-02-12 21:56:29 +00:00
Keith Holliday
6a67cbba65 Refactored spell code to functions (#9908)
* Refactored spell code to functions

* Fixed party member returns
2018-02-12 09:17:15 -07:00
Keith Holliday
037280601a Refactored group chat flagging (#9907) 2018-02-11 08:35:24 -07:00
Keith Holliday
2687fe1ac9 Added message when there will be no notification for group (#9856)
* Added message when there will be no notification for group

* Added constant and removed extra locale

* Added back message
2018-02-11 08:34:57 -07:00
Sabe Jones
31eeb13598 4.26.2 2018-02-10 11:56:30 +00:00
Sabe Jones
818c201afe chore(i18n): update locales 2018-02-10 11:46:36 +00:00
negue
54153ec299 Refactor Purchase API - Part 1 (#9714)
* move to shops/purchase

* move files to /buy/ instead of /purchase/

* refactor buy.js - add more itemtypes

* revert moving special purchases to buy

* only use buyOp from api-routes

* fix buying potion client-side

* undo import buy instead of purchase

* enable potion bulk purchase - use buyGear as fallback (as before)

* move quantity purchase inside buyHealthPotion

* move quantity purchase inside buyQuest

* move quantity purchase inside buySpecialSpell + add analytics

* remove unused quantity variable - set req.type on specialKeys

* fix `buyKnownKeys` on buy api

* test buy-special-spell if not enough gold

* more buy ops coverage

* fix lint

* buyMysterySet: test for window.confirm, buyQuest: check for Masterclassers unlock

* fix test & lint

* re-create package-lock.json to travis build ?

* use global.window instead of method argument

* add back canOwn checks

* remove buyMysterySet confirm request
2018-02-10 11:14:40 +01:00
Matteo Pagliazzi
7abfd1d510 chore: docker: use correct gulp cli, tests: try to reduce timeouts 2018-02-10 11:14:01 +01:00
Sabe Jones
b4cbcb172b Merge branch 'release' into develop 2018-02-10 05:36:49 +00:00
Sabe Jones
f78bcc20c9 chore(i18n): update locales 2018-02-10 05:18:40 +00:00
negue
6506f1d44d fix user avatar transformation - change number of buffs owned when you use them - fixes #9795 (#9824)
* refresh not working - show avatar transformation

*  call store-action from mixin, use mixin from app.vue, add user-target in spells-mixin,

* fix avatar tranformation on user - clean up

* move default message

* fix purchase of cards

* fix casting
2018-02-09 17:04:08 -06:00
negue
6cb1ec4ec5 fix draging-info margin - resize draging icon - resize hatching modal (remove unneeded space) (#9775) 2018-02-09 16:48:48 -06:00
negue
723b4f3451 Attributes UI Refactoring (#9887)
* include class bonus in sorting

* wip - show more information in the attributes grid

* attributes tooltip + dialog redesign

* fix stat calculation

* fix spacings

* show class in equip-gear-modal

* fix buy-modal attributes-grid, clean up css

* show attributes popover in profile-stats overview

* add class / purchase type colors to colors.scss - replace colors by variable - clean up

* translate strings
2018-02-09 16:47:38 -06:00
James Hwang
6c677be9d2 Styles inputs in group modal to be consistent with rest of app #9897 (#9924)
* Styles input in group modal to be consistent with rest of app #9897

* Changed checkbox id to accurately describe the element
2018-02-09 16:44:56 -06:00
Александр
f49c99ee06 replaced an outdated link //habitrpg.wikia.com (#9954)
* replaced an outdated link //habitrpg.wikia.com

Since http://habitica.wikia.com is the official link. Also, there are still incorrect paths in the footer menu, such as "Go to Social > Challenges" and others, when 'Challenges' is already on the menu bar.

* fix  Party to Guilds _mistake

Here is a simple mistake, because of what does not pass the verification
2018-02-09 16:19:02 -06:00
Alexey Pyltsyn
846feb1902 Make images responsive on features page (#9931) 2018-02-09 16:15:03 -06:00
Sabe Jones
da22858ac0 Triumph Theme by anastasiagaskamp (#9323)
* feat(audio): Triumph Theme

* fix(audio): trim silence
2018-02-09 15:57:34 -06:00
SabreCat
dafb6df18b feat(analytics): track account delete/reset 2018-02-09 21:36:14 +00:00
Keith Holliday
9017eea0c4 4.26.1 2018-02-09 10:05:12 -06:00
Keith Holliday
92abb19f9c Docker update (#9976)
* Updated docker prod

* Added new gulp cli
2018-02-09 08:59:49 -07:00
Keith Holliday
3bee0446b8 Loaded profile when not cached (#9977) 2018-02-09 08:57:55 -07:00
Matteo Pagliazzi
1ed58c452c Upgrade amplitude stripe amazon-payments cwait (#9962)
* upgrade amplitude stripe amazon-payments cwait

* correctly import cwait
2018-02-09 13:47:52 +01:00
Matteo Pagliazzi
f947d3562b Remove user wrapping (#9960)
* remove user wrapping, fixes #9146

* update tests

* fix tests
2018-02-09 13:46:55 +01:00
Matteo Pagliazzi
8e24b0578e upgrade express, passport, ncong and csv-stringify, remove csv package that is only used in super old migrations (#9965) 2018-02-09 13:46:39 +01:00
Matteo Pagliazzi
f87d6e3b31 groups: always fetch basic fields (#9975) 2018-02-09 13:46:17 +01:00
Sabe Jones
e1e5a6cc34 4.26.0 2018-02-09 00:58:23 +00:00
Sabe Jones
9eb70ee9ba Merge branch 'develop' into release 2018-02-09 00:58:13 +00:00
Sabe Jones
7485300ee9 chore(i18n): update locales 2018-02-09 00:43:01 +00:00
SabreCat
762c202154 feat(content): enable Cupid Potions 2018-02-09 00:35:51 +00:00
Matteo Pagliazzi
7613e50917 remove mongoskin and mongodb packages 2018-02-08 19:10:01 +01:00
Matteo Pagliazzi
4c77434bf0 Upgrade karma and related deps (#9974)
* upgrade karma and karma babel

* upgrade karma-chai

* upgrade karma-coverage

* upgrade karma-mocha

* upgrade karma-mocha-reporter

* upgrade karma-sinon-chai

* upgrade karma-spec-reporter
2018-02-08 19:02:19 +01:00
Matteo Pagliazzi
1ab26a200e Upgrade tests packages (#9973)
* upgrade mochat to v5

* upgrade cross-spawn

* upgrade chalk

* try to fix mongoose

* upgrade shelljs

* upgrade expect.js

* upgrade coveralls

* upgrade cross-env

* upgrade lcov-result-merger

* upgrade image-size
2018-02-08 19:00:49 +01:00
Matteo Pagliazzi
b738824f76 fix indentation in app.vue 2018-02-07 18:47:14 +01:00
Sabe Jones
694c440b55 Merge branch 'release' into develop 2018-02-07 02:16:48 +00:00
Sabe Jones
667bb28fe3 4.25.0 2018-02-07 02:16:24 +00:00
Sabe Jones
8993337ad7 chore(i18n): update locales 2018-02-07 02:15:58 +00:00
SabreCat
a251a5d089 chore(sprites): compile 2018-02-07 02:04:37 +00:00
SabreCat
dcdeec6256 feat(content): Badger Pet Quest 2018-02-07 02:03:30 +00:00
SabreCat
9fd0df9f2f fix(food): add missing text functions to Bare Bones Cake 2018-02-06 20:34:33 +00:00
Matteo Pagliazzi
1061fb0c31 remove async (only used for old migrations) (#9961) 2018-02-06 18:13:13 +01:00
Keith Holliday
c14fdd3fed Fixed attribute binding. Removed member url (#9963) 2018-02-06 09:53:43 -07:00
Alys
e219ad6bdf adjust slurs / banned words. TRIGGER / CONTENT WARNING: assault, slurs, swearwords, etc 2018-02-06 08:40:31 +10:00
Alys
42d7fd0861 fix typo in equipment description (Armorie) 2018-02-06 08:37:39 +10:00
Nathan Sollenberger
7ade91a8b8 Updates notification text for armoire items in shops:genericPurchase. (#9240)
Adjusts column widths for 'drop' type notifications to prevent .text from overlapping .icon-item.
Adds new 'flavorMessage' property to Snackbar notifications, which overrides standard computed message.
Vertically center XP gain icon/amount.
Fixes unrelated typo in i18n key name.
2018-02-05 19:43:30 +01:00
Feywood
7c6dd6a6bd (in)definite articles for food items. Partial fix for https://github.com/HabitRPG/habitica/issues/3571 (#9658)
* testing additional event trigger for sendMessage

* moved keyup event to newmessage

* added keyup event to tavern vue too

* all food items now have version with definite and indefinite article. foodText also adapted in messages json

* modified api.food, and feed, armoire and drop mechanism

* drops now ok, removed dropArticle, corrected feed test

* test correction

* api doc modification for task completion
2018-02-05 19:43:12 +01:00
Jon Lim
9a00779698 Adding support for loading more members for Groups (#9740)
* Adding support for loading more members for Groups

Addresses issue #9720

Member modal component was only loading the maximum limit for queries
made to _getMembersForItem in /members, except with Challenges, which
was able to display a "Load More" button to retrieve another set of
users from the Challenge.

Made a few changes to how the GET request was being made when querying
for more members, added an easier way to know whether or not to display
the Load More button, and extracted some of the actions that were
too tightly coupled with the membersModal.vue.

* Fixes for failing lint tests

* Removing unnecessary async/await usage

* Fixing party view in header section

* Resolving missed conflict

* Adding necessary data for View Party in index header for web client to load party members
2018-02-05 19:42:54 +01:00
Lula Villalobos
a61d911c48 Feature - Store Exact Completion Date For Dailies (#9813)
* dailies history date added in scoreTask instead of cron

* fix lint issues

* changes based on feedback. Undo cron code deletion and deleted iteration on scoreTask

* fix lint issues

* add task history entry in cron for dailies that weren't completed

* add history entry after value is fully evaluated
2018-02-05 19:42:20 +01:00
Alexey Pyltsyn
fbacb56700 Fixed footer to bottom of page (#9860) 2018-02-05 19:42:01 +01:00
Alexey Pyltsyn
185717e6c3 Fixed a task tag tooltip position (#9910) 2018-02-05 19:41:46 +01:00
Mason Hahn
505dd4969d add contributor info for inbox tier styling (#9911) 2018-02-05 19:41:28 +01:00
Feywood
944e4fe399 collection items shown in quest progress (#9945) 2018-02-05 19:41:11 +01:00
Keith Holliday
804dd087f8 Updated notes on armoire when purchasing (#9891) 2018-02-05 10:27:10 -07:00
Keith Holliday
cb1136aadc Added markdown to tag edit fields/popup (#9867) 2018-02-05 09:54:42 -07:00
Keith Holliday
0f4b8f5f30 Added summary field tests (#9883)
* Added summary field tests

* Fixed typo
2018-02-05 09:52:44 -07:00
Keith Holliday
2d612b655d Added copy as todo (#9884) 2018-02-05 09:43:00 -07:00
negue
46877fb20c Purchase Card: fixes (#9803)
* prevent re-showing buy-modal after buying a card / fix class-badge in member-selection

* show notifications on card purchase

* move string to generic.json

* translation param "profileName"
2018-02-05 09:39:42 -07:00
Keith Holliday
38cded2083 4.24.6 2018-02-04 23:03:51 -06:00
Matteo Pagliazzi
65074df668 fix build task 2018-02-04 19:30:30 +01:00
Matteo Pagliazzi
b0ab09c352 Upgrade gulp (and gulp deps) (#9950)
* upgrade gulp to v4

* fix imagemin

* fixes
2018-02-04 18:18:10 +01:00
Matteo Pagliazzi
3a60e8de66 Merge branch 'develop' of github.com:HabitRPG/habitrpg into develop 2018-02-04 15:54:35 +01:00
Matteo Pagliazzi
886a96dac9 Merge branch 'release' into develop 2018-02-04 15:53:40 +01:00
Matteo Pagliazzi
20556e2af4 refactor casting spells on the client side (#9949) 2018-02-04 15:51:17 +01:00
Matteo Pagliazzi
3e849ec9a8 Revert "refactor casting spells on the client side (#9921)" (#9948)
This reverts commit 03946e6a87.
2018-02-04 15:50:36 +01:00
Matteo Pagliazzi
03946e6a87 refactor casting spells on the client side (#9921) 2018-02-04 14:47:34 +01:00
Matteo Pagliazzi
fdcc69fe4a Merge branch 'upgrade-universal-analytics' into develop 2018-02-04 14:45:31 +01:00
Matteo Pagliazzi
322b6a5e44 Merge branch 'develop' into upgrade-universal-analytics 2018-02-04 14:45:20 +01:00
Matteo Pagliazzi
2243a2f3dc upgrade winston-loggly-bulk (#9942) 2018-02-04 14:40:33 +01:00
Matteo Pagliazzi
59c848add5 upgrade request (#9941) 2018-02-04 14:39:54 +01:00
Matteo Pagliazzi
2d6a1fe709 remove jade, upgrade pug (#9940) 2018-02-04 14:39:46 +01:00
Matteo Pagliazzi
fac0338437 Merge branch 'release' into develop 2018-02-04 14:39:30 +01:00
Matteo Pagliazzi
e46f30894c fix test timeout 2018-02-04 14:39:16 +01:00
Matteo Pagliazzi
553dc116c5 Merge branch 'release' into develop 2018-02-04 14:21:35 +01:00
Matteo Pagliazzi
2029cd884c notifications: fix tests 2018-02-04 14:20:12 +01:00
Matteo Pagliazzi
ab89941ed5 notifications: fix tests 2018-02-04 14:04:41 +01:00
Matteo Pagliazzi
5dc0f5bb9b Merge branch 'release' into develop 2018-02-04 13:41:53 +01:00
Matteo Pagliazzi
d46a7ba985 notifications: fix typos and add extra check 2018-02-04 13:40:49 +01:00
Matteo Pagliazzi
86b3228a59 Merge branch 'release' into develop 2018-02-04 13:28:34 +01:00
Matteo Pagliazzi
4efbbd7bac notifications: fixes 2018-02-04 13:28:05 +01:00
Matteo Pagliazzi
d39e8a3587 upgrade universal-analytics 2018-02-03 22:40:40 +01:00
Matteo Pagliazzi
8bd3ef6f24 fix mongoose options 2018-02-03 22:17:10 +01:00
Matteo Pagliazzi
6d0917964b fix mongoose options 2018-02-03 22:15:40 +01:00
Sabe Jones
d463e2373e Merge branch 'release' into develop 2018-02-02 20:51:24 +00:00
Sabe Jones
2af99d7c65 4.24.5 2018-02-02 19:53:57 +00:00
Keith Holliday
4e01b14874 Removed required fields from user notifications (#9929) 2018-02-02 12:31:52 -07:00
Keith Holliday
944781c2f8 Added p parameter to group party query (#9857) 2018-02-02 11:24:41 -07:00
Keith Holliday
027eed1b25 Reset market on gear purchase (#9855) 2018-02-02 11:22:25 -07:00
Keith Holliday
803f63d991 Added two handed message to weapons (#9839)
* Added two handed message to weapons

* Added two handed message to content api

* Fixed static notes text. Added support for RTL
2018-02-02 11:21:53 -07:00
Keith Holliday
78ad1cd8b0 Added cache for user styles on chat (#9679)
* Added cache for user styles on chat

* Added loading on new message and other minor checks

* Added null checks

* Updated chat tests

* Added costume preference to chat

* Removed single profile cacheing for new chat messages

* Remove owned gear from cache

* Updated stats to only use buffs
2018-02-02 11:18:25 -07:00
Sabe Jones
a3ddd0746c 4.24.4 2018-02-02 16:55:55 +00:00
SabreCat
94845ec629 fix(event): remove seasonal pinned items 2018-02-02 16:54:25 +00:00
Sabe Jones
7e63856e64 4.24.3 2018-02-02 16:44:09 +00:00
Matteo Pagliazzi
3727d69d51 Merge branch 'release' into develop 2018-02-02 16:38:27 +01:00
Matteo Pagliazzi
1fbdb7dbd0 Mongoose 4.x (#9928)
* update mongoose to ^4.x

* another fix
2018-02-02 16:37:36 +01:00
Matteo Pagliazzi
b430b6ccb6 Revert "Mongoose 4.13 (#9926)" (#9927)
This reverts commit 7859f20a40.
2018-02-02 16:36:54 +01:00
Matteo Pagliazzi
7859f20a40 Mongoose 4.13 (#9926)
* update mongoose to ^4.x

* another fix
2018-02-02 16:35:05 +01:00
Matteo Pagliazzi
389d6f18b4 travis split unit and integration tests (#9925) 2018-02-02 15:07:39 +01:00
Sabe Jones
fd1d1da509 Revert "fix(test): update for event"
This reverts commit ede28ac33a.
2018-02-02 12:09:45 +00:00
Matteo Pagliazzi
014b367f56 do not use lodash to find notification 2018-02-02 12:24:43 +01:00
Matteo Pagliazzi
4580b33e43 fix progress bar hidden behind the menu 2018-02-02 09:57:39 +01:00
Sabe Jones
48bcc1e968 4.24.2 2018-02-02 03:35:00 +00:00
Sabe Jones
35368eb6ad chore(i18n): update locales 2018-02-02 03:33:27 +00:00
Sabe Jones
9b337983ed fix(strings): Capital Party, comrade 2018-02-02 03:27:19 +00:00
Sabe Jones
cd4951d204 fix(notifs): brevity 2018-02-02 03:19:13 +00:00
Sabe Jones
bd83d6f5aa 4.24.1 2018-02-02 01:51:08 +00:00
Sabe Jones
9c241a6159 fix(classes): remove winter preview
Also adds a new index to the Mongo doc and fixes a typo in that file.
2018-02-02 01:49:33 +00:00
Sabe Jones
7a6baeadbd 4.24.0 2018-02-02 00:48:36 +00:00
Sabe Jones
5495acea96 chore(i18n): update locales 2018-02-02 00:46:45 +00:00
SabreCat
a3aa2cc175 chore(sprites): compile 2018-02-02 00:33:04 +00:00
SabreCat
8b0d02a16b feat(content): backgrounds and Armoire Feb 2018
Also ends Winter Wonderland event
2018-02-02 00:31:38 +00:00
SabreCat
c3c0eb974a Merge branch 'develop' into release 2018-02-02 00:29:58 +00:00
Keith Holliday
56539100e3 Fixed zindex for progress bar (#9922) 2018-02-01 18:12:34 -06:00
SabreCat
b706db43e4 Merge branch 'release' into develop 2018-02-01 21:09:57 +00:00
Keith Holliday
3e0a7c70ed Event off fixes (#9918)
* Added removes for all events

* Moved to beforeDestroy
2018-02-01 10:14:21 -07:00
Sabe Jones
6a5bd1b0a5 Merge branch 'release' into develop 2018-01-31 22:23:15 +00:00
Sabe Jones
7f8a9be766 4.23.2 2018-01-31 22:20:51 +00:00
Sabe Jones
dbdf679e4a chore(i18n): update locales 2018-01-31 22:20:39 +00:00
SabreCat
eb28dfadf9 chore(news): Last Chance Bailey
Also fixes a linting issue with birthday fun.
2018-01-31 22:10:50 +00:00
SabreCat
ede28ac33a fix(test): update for event 2018-01-31 22:00:54 +00:00
Matteo Pagliazzi
33b249d078 Notifications v2 and Bailey API (#9716)
* Added initial bailey api

* wip

* implement new panel header

* Fixed lint

* add ability to mark notification as seen

* add notification count, remove top badge from user and add ability to mark multiple notifications as seen

* add support dismissall and mark all as read

* do not dismiss actionable notif

* mark as seen when menu is opened instead of closed

* implement ordering, list of actionable notifications

* add groups messages and fix badges count

* add notifications for received cards

* send card received notification to target not sender

* rename notificaion field

* fix integration tests

* mark cards notifications as read and update tests

* add mystery items notifications

* add unallocated stats points notifications

* fix linting

* simplify code

* refactoring and fixes

* fix dropdown opening

* start splitting notifications into their own component

* add notifications for inbox messages

* fix unit tests

* fix default buttons styles

* add initial bailey support

* add title and tests to new stuff notification

* add notification if a group task needs more work

* add tests and fixes for marking a task as needing more work

* make sure user._v is updated

* remove console.log

* notification: hover status and margins

* start styling notifications, add separate files and basic functionalities

* fix tests

* start adding mystery items notification

* wip card notification

* fix cards text

* initial implementation inbox messages

* initial implementation group messages

* disable inbox notifications until mobile is ready

* wip group chat messages

* finish mystery and card notifications

* add bailey notification and fix a lot of stuff

* start adding guilds and parties invitations

* misc invitation fixes

* fix lint issues

* remove old code and add key to notifications

* fix tests

* remove unused code

* add link for public guilds invite

* starts to implement needs work notification design and feature

* fixes to needs work, add group task approved notification

* finish needs work feature

* lots of fixes

* implement quest notification

* bailey fixes and static page

* routing fixes

* fixes #      this.$store.dispatch(guilds:join, {groupId: group.id, type: party});

* read notifications on click

* chat notifications

* fix tests for chat notifications

* fix chat notification test

* fix tests

* fix tests (again)

* try awaiting

* remove only

* more sleep

* add bailey tests

* fix icons alignment

* fix issue with multiple points notifications

* remove merge code

* fix rejecting guild invitation

* make remove area bigger

* fix error with notifications and add migration

* fix migration

* fix typos

* add cleanup migration too

* notifications empty state, new counter color, fix marking messages as seen in guilds

* fixes

* add image and install correct packages

* fix mongoose version

* update bailey

* typo

* make sure chat is marked as read after other requests
2018-01-31 11:55:39 +01:00
Matteo Pagliazzi
a85282763f Upgrade sinonjs (and related libs) (#9914)
* update sinon

* remove errors

* fix unit tests
2018-01-31 10:56:32 +01:00
Sabe Jones
ba9d7b3b5e 4.23.1 2018-01-31 00:53:27 +00:00
Sabe Jones
3b794c017a fix(event): update birthday vars and hooks 2018-01-31 00:41:06 +00:00
SabreCat
47dbe4561f fix(test): update for event 2018-01-30 22:22:02 +00:00
Sabe Jones
97135a1ac3 Merge branch 'release' into develop 2018-01-30 21:38:56 +00:00
Matteo Pagliazzi
9488ec2eb0 Merge branch 'release' into develop 2018-01-30 18:56:25 +01:00
Keith Holliday
4fe6c8db64 Clone challenges api (#9684)
* Added clone api

* Added new clone UI

* Fixed challenge clone

* Fixed lint and added mongo toObject

* Removed clone field, fixed type, fixed challenge task query

* Auto selected group

* Accounted for group balance when creating challenge

* Added check for if user is leader of guild

* Added leader existence check

* Added fix for leader and prizecost equal to
2018-01-30 08:23:20 -07:00
Keith Holliday
ccf8e0b320 Removed gitattributes 2018-01-29 21:34:18 -06:00
Matteo Pagliazzi
1dc558ddba prevent ex-participants appearing in challenge export file - Fix #9844 (#9846)
* possible fix for 9844

* fix typo in challengeModal file

* remove lines for empty users
2018-01-29 16:23:40 -06:00
Alexey Pyltsyn
ae27ae0090 Improved Party page UI (#9892) 2018-01-29 15:44:22 -06:00
Alys
47c2a3a21a prevent "Zero-day streak" giving a 21-day streak achievement + tests - fixes #2578 (#9688)
* prevent "Zero-day streak" giving a 21-day streak achievement - fixes #2578

* add tests for streak achievements

* remove .only from set of tests

* refactor(test): fix linting
2018-01-29 15:43:59 -06:00
Cassidy Pignatello
5d4e1362bb updates Orb of Rebirth description to more accurately list its effects (#9894) 2018-01-29 15:32:21 -06:00
James Hwang
25cecf298f Fixed formatting of modal strings to correctly display message #9818 (#9862) 2018-01-29 15:30:05 -06:00
Alexey Pyltsyn
2de3b63e87 Fixed a community guidelines layout (#9893)
* Fixed a community guidelines layout

* Refactoring: add community guidelines component
2018-01-29 15:18:20 -06:00
John Zhou
7abb8a81a7 Do not show visual buffs on choose class avatars (#9812) 2018-01-29 15:16:49 -06:00
Daniel Reeves
3eb3891899 Update copyright year 2017->2018 (#9889) 2018-01-29 15:14:00 -06:00
Alexey Pyltsyn
4b0ad422f1 Use translatable strings in footer (#9866) 2018-01-29 15:11:30 -06:00
Alexey Pyltsyn
3c603e3bb1 Fixed horizontal scrollbar (#9853) 2018-01-29 15:07:59 -06:00
Nicole Massaro
4ee788f541 Hide stats points allocation on locked or disabled class system (#9826) (#9851) 2018-01-29 15:05:06 -06:00
Sabe Jones
99ab9726b4 Allow user to buy numbered special gear (#9823)
* fix(buy): allow user to buy numbered special gear

* fix(buy): correct content constant
2018-01-29 15:02:55 -06:00
Maru de Vera
23dd402e79 Unpin Regained Items from Enchanted Armoire (#9766) 2018-01-29 15:00:19 -06:00
Irina Brennen
6bd90807f3 Fixing issue with hair bangs, styles and colors not getting the option.active class (#9759) 2018-01-29 14:57:35 -06:00
Alys
563a5845f0 refund gems when deleting a "Public Challenge" (Tavern challenge) (#9752) 2018-01-29 14:56:46 -06:00
Brad Lugo
2e580baf27 Update the docker compose process (#9724)
Since the client side code and server side code run independently, the
docker compose process needed to be updated to reflect this change.
This fix included updating the docker-compose files' versions.
2018-01-29 14:56:08 -06:00
Clement134
44ded25f6d Add .gitattributes file fixes #9717 (#9722)
* chore(gitattributes): add .gitattributes file

*  chore(gitattributes): specify file type for each extension

* fix(presskit): use LF line endings
2018-01-29 14:53:14 -06:00
Alys
70da5940a7 clarify that "Leave" refers to guild/party; fix pluralisation in keep/remove challenge tasks (#9706)
* change "Keep/Remove It" to "Keep/Remove Them" when asking about all challenge tasks while leaving a challenge

* change "Leave" button on groups to "Leave Guild" or "Leave Party"

This is because the button is underneath the challenges so this
clarifies that it is referring to the group, not a challenge.

* change "Keep/Remove Them" to "Keep/Remove Tasks"
2018-01-29 14:52:28 -06:00
Cai Lu
12aa8a78c1 Track sleeping in the inn with analytics (fixes #9561) (#9685)
* Sleep status is tracked by analytics when toggled.

* Modify test: test that analytics is called with 'sleep' event and data passed includes the user's new sleep status
2018-01-29 14:48:24 -06:00
Keith Holliday
94619737e8 Adjusted zindex of navbar to be above snackbars and modals (#9873) 2018-01-29 08:25:07 -07:00
Alys
ccc9e6611c adjust terminology in delete To-Dos message; move similar messages together 2018-01-28 12:29:24 +10:00
2827 changed files with 135618 additions and 85824 deletions

View File

@@ -1,10 +1,6 @@
{
"presets": ["es2015"],
"plugins": [
"transform-object-rest-spread",
["transform-async-to-module-method", {
"module": "bluebird",
"method": "coroutine"
}]
"transform-es2015-modules-commonjs",
"syntax-object-rest-spread",
]
}

View File

@@ -10,12 +10,5 @@ apidoc_build/
content_cache/
node_modules/
# Not linted
website/client-old/
test/client-old/spec/**/*
# Temporarilly disabled. These should be removed when the linting errors are fixed TODO
migrations/*
scripts/*
website/common/browserify.js
Gruntfile.js
# Old migrations, disabled
migrations/archive/*

View File

@@ -1,7 +1,7 @@
[//]: # (Note: See http://habitica.wikia.com/wiki/Using_Your_Local_Install_to_Modify_Habitica%27s_Website_and_API for more info)
[//]: # (Put Issue # or URL here, if applicable. This will automatically close the issue if your PR is merged in)
Fixes put_issue_url_here
[//]: # (Put Issue # here, if applicable. This will automatically close the issue if your PR is merged in)
Fixes put_#_and_issue_numer_here
### Changes
[//]: # (Describe the changes that were made in detail here. Include pictures if necessary)

1
.gitignore vendored
View File

@@ -39,6 +39,7 @@ dist-client
test/client/unit/coverage
test/client/e2e/reports
test/client-old/spec/mocks/translations.js
yarn.lock
# Elastic Beanstalk Files
.elasticbeanstalk/*

View File

@@ -4,6 +4,7 @@ node_modules/**
.bower-registry/**
website/client-old/**
website/client/**
website/client/store/**
website/views/**
website/build/**
dist/**
@@ -16,3 +17,4 @@ CHANGELOG.md
newrelic_agent.log
*.swp
*.swx
website/raw_sprites/**

2
.nvmrc
View File

@@ -1 +1 @@
6
8

View File

@@ -1,13 +1,13 @@
language: node_js
node_js:
- '6'
- '8'
services:
- mongodb
cache:
directories:
- 'node_modules'
before_install:
- npm install -g npm@5
addons:
chrome: stable
before_script:
- npm run test:build
- cp config.json.example config.json
@@ -20,8 +20,11 @@ env:
- DISABLE_REQUEST_LOGGING=true
matrix:
- TEST="lint"
- TEST="test:api-v3" REQUIRES_SERVER=true COVERAGE=true
- TEST="test:api:unit" REQUIRES_SERVER=true COVERAGE=true
- TEST="test:api-v3:integration" REQUIRES_SERVER=true COVERAGE=true
- TEST="test:api-v4:integration" REQUIRES_SERVER=true COVERAGE=true
- TEST="test:sanity"
- TEST="test:content" COVERAGE=true
- TEST="test:common" COVERAGE=true
- TEST="client:unit" COVERAGE=true
- TEST="apidoc"

View File

@@ -1,21 +1,29 @@
FROM node:boron
# Upgrade NPM to v5 (Yarn is needed because of this bug https://github.com/npm/npm/issues/16807)
# The used solution is suggested here https://github.com/npm/npm/issues/16807#issuecomment-313591975
RUN yarn global add npm@5
# Install global packages
RUN npm install -g gulp mocha
# Clone Habitica repo and install dependencies
RUN mkdir -p /usr/src/habitrpg
WORKDIR /usr/src/habitrpg
RUN git clone https://github.com/HabitRPG/habitica.git /usr/src/habitrpg
RUN cp config.json.example config.json
RUN npm install
# Create Build dir
RUN mkdir -p ./website/build
# Start Habitica
EXPOSE 3000
CMD ["npm", "start"]
FROM node:8
ENV ADMIN_EMAIL admin@habitica.com
ENV AMAZON_PAYMENTS_CLIENT_ID amzn1.application-oa2-client.68ed9e6904ef438fbc1bf86bf494056e
ENV AMAZON_PAYMENTS_SELLER_ID AMQ3SB4SG5E91
ENV AMPLITUDE_KEY e8d4c24b3d6ef3ee73eeba715023dd43
ENV BASE_URL https://habitica.com
ENV FACEBOOK_KEY 128307497299777
ENV GA_ID UA-33510635-1
ENV GOOGLE_CLIENT_ID 1035232791481-32vtplgnjnd1aufv3mcu1lthf31795fq.apps.googleusercontent.com
ENV NODE_ENV production
ENV STRIPE_PUB_KEY pk_85fQ0yMECHNfHTSsZoxZXlPSwSNfA
# Install global packages
RUN npm install -g gulp-cli mocha
# Clone Habitica repo and install dependencies
RUN mkdir -p /usr/src/habitrpg
WORKDIR /usr/src/habitrpg
RUN git clone --branch release https://github.com/HabitRPG/habitica.git /usr/src/habitrpg
RUN npm install
RUN gulp build:prod --force
# Create Build dir
RUN mkdir -p ./website/build
# Start Habitica
EXPOSE 3000
CMD ["node", "./website/transpiled-babel/index.js"]

18
Dockerfile-Dev Normal file
View File

@@ -0,0 +1,18 @@
FROM node:8
# Install global packages
RUN npm install -g gulp-cli mocha
# Clone Habitica repo and install dependencies
RUN mkdir -p /usr/src/habitrpg
WORKDIR /usr/src/habitrpg
RUN git clone https://github.com/HabitRPG/habitica.git /usr/src/habitrpg
RUN cp config.json.example config.json
RUN npm install
# Create Build dir
RUN mkdir -p ./website/build
# Start Habitica
EXPOSE 3000
CMD ["npm", "start"]

View File

@@ -1,32 +0,0 @@
FROM node:boron
ENV ADMIN_EMAIL admin@habitica.com
ENV AMAZON_PAYMENTS_CLIENT_ID amzn1.application-oa2-client.68ed9e6904ef438fbc1bf86bf494056e
ENV AMAZON_PAYMENTS_SELLER_ID AMQ3SB4SG5E91
ENV AMPLITUDE_KEY e8d4c24b3d6ef3ee73eeba715023dd43
ENV BASE_URL https://habitica.com
ENV FACEBOOK_KEY 128307497299777
ENV GA_ID UA-33510635-1
ENV GOOGLE_CLIENT_ID 1035232791481-32vtplgnjnd1aufv3mcu1lthf31795fq.apps.googleusercontent.com
ENV NODE_ENV production
ENV STRIPE_PUB_KEY pk_85fQ0yMECHNfHTSsZoxZXlPSwSNfA
# Upgrade NPM to v5 (Yarn is needed because of this bug https://github.com/npm/npm/issues/16807)
# The used solution is suggested here https://github.com/npm/npm/issues/16807#issuecomment-313591975
RUN yarn global add npm@5
# Install global packages
RUN npm install -g gulp mocha
# Clone Habitica repo and install dependencies
RUN mkdir -p /usr/src/habitrpg
WORKDIR /usr/src/habitrpg
RUN git clone --branch v4.20.3 https://github.com/HabitRPG/habitica.git /usr/src/habitrpg
RUN npm install
RUN gulp build:prod --force
# Create Build dir
RUN mkdir -p ./website/build
# Start Habitica
EXPOSE 3000
CMD ["node", "./website/transpiled-babel/index.js"]

View File

@@ -1,6 +1,8 @@
Habitica [![Build Status](https://travis-ci.org/HabitRPG/habitica.svg?branch=develop)](https://travis-ci.org/HabitRPG/habitica) [![Code Climate](https://codeclimate.com/github/HabitRPG/habitrpg.svg)](https://codeclimate.com/github/HabitRPG/habitrpg) [![Coverage Status](https://coveralls.io/repos/github/HabitRPG/habitica/badge.svg?branch=develop)](https://coveralls.io/github/HabitRPG/habitica?branch=develop) [![Bountysource](https://api.bountysource.com/badge/tracker?tracker_id=68393)](https://www.bountysource.com/trackers/68393-habitrpg?utm_source=68393&utm_medium=shield&utm_campaign=TRACKER_BADGE)
Habitica [![Build Status](https://travis-ci.org/HabitRPG/habitica.svg?branch=develop)](https://travis-ci.org/HabitRPG/habitica) [![Code Climate](https://codeclimate.com/github/HabitRPG/habitrpg.svg)](https://codeclimate.com/github/HabitRPG/habitrpg) [![Coverage Status](https://coveralls.io/repos/github/HabitRPG/habitica/badge.svg?branch=develop)](https://coveralls.io/github/HabitRPG/habitica?branch=develop) [![Bountysource](https://api.bountysource.com/badge/tracker?tracker_id=68393)](https://www.bountysource.com/trackers/68393-habitrpg?utm_source=68393&utm_medium=shield&utm_campaign=TRACKER_BADGE) [![Open Source Helpers](https://www.codetriage.com/habitrpg/habitica/badges/users.svg)](https://www.codetriage.com/habitrpg/habitica)
===============
[![Greenkeeper badge](https://badges.greenkeeper.io/HabitRPG/habitica.svg)](https://greenkeeper.io/)
[Habitica](https://habitica.com) is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor.
We need more programmers! Your assistance will be greatly appreciated.
@@ -8,4 +10,3 @@ We need more programmers! Your assistance will be greatly appreciated.
For an introduction to the technologies used and how the software is organized, refer to [Guidance for Blacksmiths](http://habitica.wikia.com/wiki/Guidance_for_Blacksmiths).
To set up a local install of Habitica for development and testing on various platforms, see [Setting up Habitica Locally](http://habitica.wikia.com/wiki/Setting_up_Habitica_Locally).

View File

@@ -17,7 +17,7 @@
"NODE_DB_URI":"mongodb://localhost/habitrpg",
"TEST_DB_URI":"mongodb://localhost/habitrpg_test",
"NODE_ENV":"development",
"ENABLE_CONSOLE_LOGS_IN_TEST": false,
"ENABLE_CONSOLE_LOGS_IN_TEST": "false",
"CRON_SAFE_MODE":"false",
"CRON_SEMI_SAFE_MODE":"false",
"MAINTENANCE_MODE": "false",
@@ -39,6 +39,7 @@
"NEW_RELIC_API_KEY":"NEW_RELIC_API_KEY",
"GA_ID": "GA_ID",
"AMPLITUDE_KEY": "AMPLITUDE_KEY",
"AMPLITUDE_SECRET": "AMPLITUDE_SECRET",
"AMAZON_PAYMENTS": {
"SELLER_ID": "SELLER_ID",
"CLIENT_ID": "CLIENT_ID",
@@ -78,6 +79,9 @@
"PUSH_CONFIGS": {
"GCM_SERVER_API_KEY": "",
"APN_ENABLED": "false",
"APN_KEY_ID": "xxxxxxxxxx",
"APN_KEY": "xxxxxxxxxx",
"APN_TEAM_ID": "aaabbbcccd",
"FCM_SERVER_API_KEY": ""
},
"SITE_HTTP_AUTH": {
@@ -85,12 +89,6 @@
"USERNAME": "admin",
"PASSWORD": "password"
},
"PUSHER": {
"ENABLED": "false",
"APP_ID": "appId",
"KEY": "key",
"SECRET": "secret"
},
"SLACK": {
"FLAGGING_URL": "https://hooks.slack.com/services/id/id/id",
"FLAGGING_FOOTER_LINK": "https://habitrpg.github.io/flag-o-rama/",
@@ -98,12 +96,20 @@
},
"ITUNES_SHARED_SECRET": "aaaabbbbccccddddeeeeffff00001111",
"EMAILS" : {
"COMMUNITY_MANAGER_EMAIL" : "leslie@habitica.com",
"COMMUNITY_MANAGER_EMAIL" : "admin@habitica.com",
"TECH_ASSISTANCE_EMAIL" : "admin@habitica.com",
"PRESS_ENQUIRY_EMAIL" : "leslie@habitica.com"
"PRESS_ENQUIRY_EMAIL" : "admin@habitica.com"
},
"LOGGLY" : {
"TOKEN" : "example-token",
"SUBDOMAIN" : "exmaple-subdomain"
}
},
"KAFKA": {
"GROUP_ID": "",
"CLOUDKARAFKA_BROKERS": "",
"CLOUDKARAFKA_USERNAME": "",
"CLOUDKARAFKA_PASSWORD": "",
"CLOUDKARAFKA_TOPIC_PREFIX": ""
},
"MIGRATION_CONNECT_STRING": "mongodb://localhost:27017/habitrpg?auto_reconnect=true"
}

View File

@@ -0,0 +1,100 @@
import max from 'lodash/max';
import mean from 'lodash/mean';
import monk from 'monk';
import round from 'lodash/round';
import sum from 'lodash/sum';
/*
* Output data on subscribers' task histories, formatted for CSV.
* User ID,Count of Dailies,Count of Habits,Total History Size,Max History Size,Mean History Size,Median History Size
*/
const connectionString = 'mongodb://localhost:27017/habitrpg?auto_reconnect=true'; // FOR TEST DATABASE
let dbUsers = monk(connectionString).get('users', { castIds: false });
let dbTasks = monk(connectionString).get('tasks', { castIds: false });
function usersReport () {
let allHistoryLengths = [];
console.info('User ID,Count of Dailies,Count of Habits,Total History Size,Max History Size,Mean History Size,Median History Size');
dbUsers.find(
{
$and:
[
{'purchased.plan.planId': {$ne:null}},
{'purchased.plan.planId': {$ne:''}},
],
$or:
[
{'purchased.plan.dateTerminated': null},
{'purchased.plan.dateTerminated': ''},
{'purchased.plan.dateTerminated': {$gt:new Date()}},
],
},
{
fields: {_id: 1},
}
).each((user, {close, pause, resume}) => {
let historyLengths = [];
let habitCount = 0;
let dailyCount = 0;
pause();
return dbTasks.find(
{
userId: user._id,
$or:
[
{type: 'habit'},
{type: 'daily'},
],
},
{
fields: {
type: 1,
history: 1,
},
}
).each((task) => {
if (task.type === 'habit') {
habitCount++;
}
if (task.type === 'daily') {
dailyCount++;
}
if (task.history.length > 0) {
allHistoryLengths.push(task.history.length);
historyLengths.push(task.history.length);
}
}).then(() => {
const totalHistory = sum(historyLengths);
const maxHistory = historyLengths.length > 0 ? max(historyLengths) : 0;
const meanHistory = historyLengths.length > 0 ? round(mean(historyLengths)) : 0;
const medianHistory = historyLengths.length > 0 ? median(historyLengths) : 0;
console.info(`${user._id},${dailyCount},${habitCount},${totalHistory},${maxHistory},${meanHistory},${medianHistory}`);
resume();
});
}).then(() => {
console.info(`Total Subscriber History Entries: ${sum(allHistoryLengths)}`);
console.info(`Largest History Size: ${max(allHistoryLengths)}`);
console.info(`Mean History Size: ${round(mean(allHistoryLengths))}`);
console.info(`Median History Size: ${median(allHistoryLengths)}`);
return process.exit(0);
});
}
function median(values) { // https://gist.github.com/caseyjustus/1166258
values.sort( function(a,b) {return a - b;} );
var half = Math.floor(values.length/2);
if (values.length % 2) {
return values[half];
}
else {
return (values[half-1] + values[half]) / 2.0;
}
}
module.exports = usersReport;

View File

@@ -0,0 +1,48 @@
import monk from 'monk';
import nconf from 'nconf';
/*
* Output data on users who completed all the To-Do tasks in the 2018 Back-to-School Challenge.
* User ID,Profile Name
*/
const CONNECTION_STRING = nconf.get('MIGRATION_CONNECT_STRING');
const CHALLENGE_ID = '0acb1d56-1660-41a4-af80-9259f080b62b';
let dbUsers = monk(CONNECTION_STRING).get('users', { castIds: false });
let dbTasks = monk(CONNECTION_STRING).get('tasks', { castIds: false });
function usersReport() {
console.info('User ID,Profile Name');
let userCount = 0;
dbUsers.find(
{challenges: CHALLENGE_ID},
{fields:
{_id: 1, 'profile.name': 1}
},
).each((user, {close, pause, resume}) => {
pause();
userCount++;
let completedTodos = 0;
return dbTasks.find(
{
userId: user._id,
'challenge.id': CHALLENGE_ID,
type: 'todo',
},
{fields: {completed: 1}}
).each((task) => {
if (task.completed) completedTodos++;
}).then(() => {
if (completedTodos >= 7) {
console.info(`${user._id},${user.profile.name}`);
}
resume();
});
}).then(() => {
console.info(`${userCount} users reviewed`);
return process.exit(0);
});
}
module.exports = usersReport;

View File

@@ -1,3 +1,14 @@
web:
volumes:
- '.:/usr/src/habitrpg'
version: "3"
services:
client:
environment:
- NODE_ENV=development
volumes:
- '.:/usr/src/habitrpg'
server:
environment:
- NODE_ENV=development
volumes:
- '.:/usr/src/habitrpg'

View File

@@ -1,13 +1,36 @@
web:
build: .
ports:
- "3000:3000"
links:
- mongo
environment:
- NODE_DB_URI=mongodb://mongo/habitrpg
version: "3"
services:
mongo:
image: mongo
ports:
- "27017:27017"
client:
build: .
networks:
- habitica
environment:
- BASE_URL=http://server:3000
ports:
- "8080:8080"
command: ["npm", "run", "client:dev"]
depends_on:
- server
server:
build: .
ports:
- "3000:3000"
networks:
- habitica
environment:
- NODE_DB_URI=mongodb://mongo/habitrpg
depends_on:
- mongo
mongo:
image: mongo:3.4
ports:
- "27017:27017"
networks:
- habitica
networks:
habitica:
driver: bridge

View File

@@ -8,7 +8,7 @@ gulp.task('apidoc:clean', (done) => {
clean(APIDOC_DEST_PATH, done);
});
gulp.task('apidoc', ['apidoc:clean'], (done) => {
gulp.task('apidoc', gulp.series('apidoc:clean', (done) => {
let result = apidoc.createDoc({
src: APIDOC_SRC_PATH,
dest: APIDOC_DEST_PATH,
@@ -19,8 +19,8 @@ gulp.task('apidoc', ['apidoc:clean'], (done) => {
} else {
done();
}
});
}));
gulp.task('apidoc:watch', ['apidoc'], () => {
return gulp.watch(`${APIDOC_SRC_PATH}/**/*.js`, ['apidoc']);
});
gulp.task('apidoc:watch', gulp.series('apidoc', (done) => {
return gulp.watch(`${APIDOC_SRC_PATH}/**/*.js`, gulp.series('apidoc', done));
}));

View File

@@ -2,12 +2,6 @@ import gulp from 'gulp';
import babel from 'gulp-babel';
import webpackProductionBuild from '../webpack/build';
gulp.task('build', () => {
if (process.env.NODE_ENV === 'production') { // eslint-disable-line no-process-env
gulp.start('build:prod');
}
});
gulp.task('build:src', () => {
return gulp.src('website/server/**/*.js')
.pipe(babel())
@@ -20,18 +14,30 @@ gulp.task('build:common', () => {
.pipe(gulp.dest('website/common/transpiled-babel/'));
});
gulp.task('build:server', ['build:src', 'build:common']);
gulp.task('build:server', gulp.series('build:src', 'build:common', done => done()));
// Client Production Build
gulp.task('build:client', (done) => {
webpackProductionBuild((err, output) => {
if (err) return done(err);
console.log(output); // eslint-disable-line no-console
done();
});
});
gulp.task('build:prod', [
gulp.task('build:prod', gulp.series(
'build:server',
'build:client',
'apidoc',
]);
done => done()
));
let buildArgs = [];
if (process.env.NODE_ENV === 'production') { // eslint-disable-line no-process-env
buildArgs.push('build:prod');
}
gulp.task('build', gulp.series(buildArgs, (done) => {
done();
}));

View File

@@ -1,5 +1,4 @@
import mongoose from 'mongoose';
import autoinc from 'mongoose-id-autoinc';
import logger from '../website/server/libs/logger';
import nconf from 'nconf';
import repl from 'repl';
@@ -25,23 +24,22 @@ let improveRepl = (context) => {
const isProd = nconf.get('NODE_ENV') === 'production';
const mongooseOptions = !isProd ? {} : {
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
keepAlive: 1,
connectTimeoutMS: 30000,
};
autoinc.init(
mongoose.connect(
nconf.get('NODE_DB_URI'),
mongooseOptions,
(err) => {
if (err) throw err;
logger.info('Connected with Mongoose');
}
)
mongoose.connect(
nconf.get('NODE_DB_URI'),
mongooseOptions,
(err) => {
if (err) throw err;
logger.info('Connected with Mongoose');
}
);
};
gulp.task('console', () => {
gulp.task('console', (done) => {
improveRepl(repl.start({
prompt: 'Habitica > ',
}).context);
done();
});

View File

@@ -7,6 +7,7 @@ import mergeStream from 'merge-stream';
import {basename} from 'path';
import {sync} from 'glob';
import {each} from 'lodash';
import vinylBuffer from 'vinyl-buffer';
// https://github.com/Ensighten/grunt-spritesmith/issues/67#issuecomment-34786248
const MAX_SPRITESHEET_SIZE = 1024 * 1024 * 3;
@@ -104,6 +105,7 @@ function createSpritesStream (name, src) {
}));
let imgStream = spriteData.img
.pipe(vinylBuffer())
.pipe(imagemin())
.pipe(gulp.dest(IMG_DIST_PATH));
@@ -117,8 +119,6 @@ function createSpritesStream (name, src) {
return stream;
}
gulp.task('sprites:compile', ['sprites:clean', 'sprites:main', 'sprites:largeSprites', 'sprites:checkCompiledDimensions']);
gulp.task('sprites:main', () => {
let mainSrc = sync('website/raw_sprites/spritesmith/**/*.png');
return createSpritesStream('main', mainSrc);
@@ -133,7 +133,7 @@ gulp.task('sprites:clean', (done) => {
clean(`${IMG_DIST_PATH}spritesmith*,${CSS_DIST_PATH}spritesmith*}`, done);
});
gulp.task('sprites:checkCompiledDimensions', ['sprites:main', 'sprites:largeSprites'], () => {
gulp.task('sprites:checkCompiledDimensions', gulp.series('sprites:main', 'sprites:largeSprites', (done) => {
console.log('Verifiying that images do not exceed max dimensions'); // eslint-disable-line no-console
let numberOfSheetsThatAreTooBig = 0;
@@ -159,4 +159,7 @@ gulp.task('sprites:checkCompiledDimensions', ['sprites:main', 'sprites:largeSpri
} else {
console.log('All images are within the correct dimensions'); // eslint-disable-line no-console
}
});
done();
}));
gulp.task('sprites:compile', gulp.series('sprites:clean', 'sprites:main', 'sprites:largeSprites', 'sprites:checkCompiledDimensions', done => done()));

View File

@@ -3,7 +3,7 @@ import nodemon from 'gulp-nodemon';
let pkg = require('../package.json');
gulp.task('nodemon', () => {
gulp.task('nodemon', (done) => {
nodemon({
script: pkg.main,
ignore: [
@@ -12,4 +12,5 @@ gulp.task('nodemon', () => {
'common/dist/script/content/*',
],
});
done();
});

View File

@@ -4,7 +4,6 @@ import {
import mongoose from 'mongoose';
import { exec } from 'child_process';
import gulp from 'gulp';
import runSequence from 'run-sequence';
import os from 'os';
import nconf from 'nconf';
@@ -39,23 +38,23 @@ let testBin = (string, additionalEnvVariables = '') => {
}
};
gulp.task('test:nodemon', () => {
gulp.task('test:nodemon', gulp.series(function setupNodemon (done) {
process.env.PORT = TEST_SERVER_PORT; // eslint-disable-line no-process-env
process.env.NODE_DB_URI = TEST_DB_URI; // eslint-disable-line no-process-env
runSequence('nodemon');
});
done();
}, 'nodemon'));
gulp.task('test:prepare:mongo', (cb) => {
mongoose.connect(TEST_DB_URI, (err) => {
if (err) return cb(`Unable to connect to mongo database. Are you sure it's running? \n\n${err}`);
mongoose.connection.db.dropDatabase();
mongoose.connection.close();
cb();
mongoose.connection.dropDatabase((err2) => {
if (err2) return cb(err2);
mongoose.connection.close(cb);
});
});
});
gulp.task('test:prepare:server', ['test:prepare:mongo'], () => {
gulp.task('test:prepare:server', gulp.series('test:prepare:mongo', (done) => {
if (!server) {
server = exec(testBin('node ./website/server/index.js', `NODE_DB_URI=${TEST_DB_URI} PORT=${TEST_SERVER_PORT}`), (error, stdout, stderr) => {
if (error) {
@@ -64,16 +63,18 @@ gulp.task('test:prepare:server', ['test:prepare:mongo'], () => {
if (stderr) {
console.error(stderr); // eslint-disable-line no-console
}
done();
});
}
});
}));
gulp.task('test:prepare:build', ['build']);
gulp.task('test:prepare:build', gulp.series('build', done => done()));
gulp.task('test:prepare', [
gulp.task('test:prepare', gulp.series(
'test:prepare:build',
'test:prepare:mongo',
]);
done => done()
));
gulp.task('test:sanity', (cb) => {
let runner = exec(
@@ -88,7 +89,7 @@ gulp.task('test:sanity', (cb) => {
pipe(runner);
});
gulp.task('test:common', ['test:prepare:build'], (cb) => {
gulp.task('test:common', gulp.series('test:prepare:build', (cb) => {
let runner = exec(
testBin(COMMON_TEST_COMMAND),
(err) => {
@@ -99,17 +100,17 @@ gulp.task('test:common', ['test:prepare:build'], (cb) => {
}
);
pipe(runner);
});
}));
gulp.task('test:common:clean', (cb) => {
pipe(exec(testBin(COMMON_TEST_COMMAND), () => cb()));
});
gulp.task('test:common:watch', ['test:common:clean'], () => {
gulp.watch(['common/script/**/*', 'test/common/**/*'], ['test:common:clean']);
});
gulp.task('test:common:watch', gulp.series('test:common:clean', () => {
return gulp.watch(['common/script/**/*', 'test/common/**/*'], gulp.series('test:common:clean', done => done()));
}));
gulp.task('test:common:safe', ['test:prepare:build'], (cb) => {
gulp.task('test:common:safe', gulp.series('test:prepare:build', (cb) => {
let runner = exec(
testBin(COMMON_TEST_COMMAND),
(err, stdout) => { // eslint-disable-line handle-callback-err
@@ -123,9 +124,9 @@ gulp.task('test:common:safe', ['test:prepare:build'], (cb) => {
}
);
pipe(runner);
});
}));
gulp.task('test:content', ['test:prepare:build'], (cb) => {
gulp.task('test:content', gulp.series('test:prepare:build', (cb) => {
let runner = exec(
testBin(CONTENT_TEST_COMMAND),
CONTENT_OPTIONS,
@@ -137,17 +138,17 @@ gulp.task('test:content', ['test:prepare:build'], (cb) => {
}
);
pipe(runner);
});
}));
gulp.task('test:content:clean', (cb) => {
pipe(exec(testBin(CONTENT_TEST_COMMAND), CONTENT_OPTIONS, () => cb()));
});
gulp.task('test:content:watch', ['test:content:clean'], () => {
gulp.watch(['common/script/content/**', 'test/**'], ['test:content:clean']);
});
gulp.task('test:content:watch', gulp.series('test:content:clean', () => {
return gulp.watch(['common/script/content/**', 'test/**'], gulp.series('test:content:clean', done => done()));
}));
gulp.task('test:content:safe', ['test:prepare:build'], (cb) => {
gulp.task('test:content:safe', gulp.series('test:prepare:build', (cb) => {
let runner = exec(
testBin(CONTENT_TEST_COMMAND),
CONTENT_OPTIONS,
@@ -162,11 +163,11 @@ gulp.task('test:content:safe', ['test:prepare:build'], (cb) => {
}
);
pipe(runner);
});
}));
gulp.task('test:api-v3:unit', (done) => {
gulp.task('test:api:unit', (done) => {
let runner = exec(
testBin('node_modules/.bin/istanbul cover --dir coverage/api-v3-unit --report lcovonly node_modules/mocha/bin/_mocha -- test/api/v3/unit --recursive --require ./test/helpers/start-server'),
testBin('node_modules/.bin/istanbul cover --dir coverage/api-unit node_modules/mocha/bin/_mocha -- test/api/unit --recursive --require ./test/helpers/start-server'),
(err) => {
if (err) {
process.exit(1);
@@ -178,8 +179,8 @@ gulp.task('test:api-v3:unit', (done) => {
pipe(runner);
});
gulp.task('test:api-v3:unit:watch', () => {
gulp.watch(['website/server/libs/*', 'test/api/v3/unit/**/*', 'website/server/controllers/**/*'], ['test:api-v3:unit']);
gulp.task('test:api:unit:watch', () => {
return gulp.watch(['website/server/libs/*', 'test/api/v3/unit/**/*', 'website/server/controllers/**/*'], gulp.series('test:api:unit', done => done()));
});
gulp.task('test:api-v3:integration', (done) => {
@@ -198,8 +199,10 @@ gulp.task('test:api-v3:integration', (done) => {
});
gulp.task('test:api-v3:integration:watch', () => {
gulp.watch(['website/server/controllers/api-v3/**/*', 'common/script/ops/*', 'website/server/libs/*.js',
'test/api/v3/integration/**/*'], ['test:api-v3:integration']);
return gulp.watch([
'website/server/controllers/api-v3/**/*', 'common/script/ops/*', 'website/server/libs/*.js',
'test/api/v3/integration/**/*',
], gulp.series('test:api-v3:integration', done => done()));
});
gulp.task('test:api-v3:integration:separate-server', (done) => {
@@ -212,21 +215,43 @@ gulp.task('test:api-v3:integration:separate-server', (done) => {
pipe(runner);
});
gulp.task('test', (done) => {
runSequence(
'test:sanity',
'test:content',
'test:common',
'test:api-v3:unit',
'test:api-v3:integration',
done
gulp.task('test:api-v4:integration', (done) => {
let runner = exec(
testBin('node_modules/.bin/istanbul cover --dir coverage/api-v4-integration --report lcovonly node_modules/mocha/bin/_mocha -- test/api/v4 --recursive --require ./test/helpers/start-server'),
{maxBuffer: 500 * 1024},
(err) => {
if (err) {
process.exit(1);
}
done();
}
);
pipe(runner);
});
gulp.task('test:api-v3', (done) => {
runSequence(
'test:api-v3:unit',
'test:api-v3:integration',
done
gulp.task('test:api-v4:integration:separate-server', (done) => {
let runner = exec(
testBin('mocha test/api/v4 --recursive --require ./test/helpers/start-server', 'LOAD_SERVER=0'),
{maxBuffer: 500 * 1024},
(err) => done(err)
);
pipe(runner);
});
gulp.task('test', gulp.series(
'test:sanity',
'test:content',
'test:common',
'test:api:unit',
'test:api-v3:integration',
'test:api-v4:integration',
done => done()
));
gulp.task('test:api-v3', gulp.series(
'test:api:unit',
'test:api-v3:integration',
done => done()
));

View File

@@ -93,9 +93,7 @@ const malformedStringExceptions = {
feedPet: true,
};
gulp.task('transifex', ['transifex:missingFiles', 'transifex:missingStrings', 'transifex:malformedStrings']);
gulp.task('transifex:missingFiles', () => {
gulp.task('transifex:missingFiles', (done) => {
let missingStrings = [];
eachTranslationFile(ALL_LANGUAGES, (error) => {
@@ -109,9 +107,10 @@ gulp.task('transifex:missingFiles', () => {
let formattedMessage = formatMessageForPosting(message, missingStrings);
postToSlack(formattedMessage, SLACK_CONFIG);
}
done();
});
gulp.task('transifex:missingStrings', () => {
gulp.task('transifex:missingStrings', (done) => {
let missingStrings = [];
eachTranslationString(ALL_LANGUAGES, (language, filename, key, englishString, translationString) => {
@@ -126,9 +125,10 @@ gulp.task('transifex:missingStrings', () => {
let formattedMessage = formatMessageForPosting(message, missingStrings);
postToSlack(formattedMessage, SLACK_CONFIG);
}
done();
});
gulp.task('transifex:malformedStrings', () => {
gulp.task('transifex:malformedStrings', (done) => {
let jsonFiles = stripOutNonJsonFiles(fs.readdirSync(ENGLISH_LOCALE));
let interpolationRegex = /<%= [a-zA-Z]* %>/g;
let stringsToLookFor = getStringsWith(jsonFiles, interpolationRegex);
@@ -170,4 +170,11 @@ gulp.task('transifex:malformedStrings', () => {
let formattedMessage = formatMessageForPosting(message, stringsWithIncorrectNumberOfInterpolations);
postToSlack(formattedMessage, SLACK_CONFIG);
}
done();
});
gulp.task(
'transifex',
gulp.series('transifex:missingFiles', 'transifex:missingStrings', 'transifex:malformedStrings'),
(done) => done()
);

View File

@@ -2,7 +2,6 @@ import { exec } from 'child_process';
import psTree from 'ps-tree';
import nconf from 'nconf';
import net from 'net';
import Bluebird from 'bluebird';
import { post } from 'superagent';
import { sync as glob } from 'glob';
import Mocha from 'mocha';
@@ -45,7 +44,7 @@ export function kill (proc) {
* before failing.
*/
export function awaitPort (port, max = 60) {
return new Bluebird((rej, res) => {
return new Promise((rej, res) => {
let socket;
let timeout;
let interval;

View File

@@ -8,10 +8,12 @@
require('babel-register');
const gulp = require('gulp');
if (process.env.NODE_ENV === 'production') { // eslint-disable-line no-process-env
require('./gulp/gulp-apidoc'); // eslint-disable-line global-require
require('./gulp/gulp-build'); // eslint-disable-line global-require
} else {
require('glob').sync('./gulp/gulp-*').forEach(require); // eslint-disable-line global-require
require('gulp').task('default', ['test']); // eslint-disable-line global-require
require('gulp').task('default', gulp.series('test')); // eslint-disable-line global-require
}

7
migrations/.eslintrc Normal file
View File

@@ -0,0 +1,7 @@
{
"root": false,
"rules": {
"no-console": 0,
"no-use-before-define": ["error", { "functions": false }]
}
}

View File

@@ -1,5 +0,0 @@
db.users.update(
{ lastCron: { $exists: false} },
{ $set: { lastCron: +new Date } },
{ multi: true }
);

View File

@@ -1,15 +0,0 @@
db.users.find({ completedIds: { $exists: true } }).forEach(function(user) {
var newTodoIds = user.todoIds;
user.completedIds.forEach(function(value) {
if (newTodoIds.indexOf(value) === -1) {
newTodoIds.push(value)
}
});
db.users.update(
{ _id: user._id },
{
$set: { todoIds: newTodoIds },
$unset: { completedIds: 1 }
}
);
});

View File

@@ -1,5 +0,0 @@
db.users.update(
{preferences:{$exists:false}},
{$set:{preferences:{gender: 'm', armorSet: 'v1'}}},
{multi:true}
)

View File

@@ -1,102 +0,0 @@
// %mongo server:27017/dbname underscore.js my_commands.js
// %mongo server:27017/dbname underscore.js --shell
//db.users.find({'auth.facebook.email': 'tylerrenelle@gmail.com'}).forEach(function(user){
db.users.find().forEach(function(user){
if (!user._id) {
print("User has null _id");
return; // need to figure out how to delete these buggers if they don't have an id to delete from
}
if (!!user.idLists) {
print("User " + user._id + " has already been migrated")
return
}
if (user._id.indexOf("$") === 0) {
print("User id starts with $ (" + user._id + ")")
return;
}
// even though we're clobbering user later, sometimes these are undefined and crash the script
// this saves us some ternaries
user.stats = user.stats || {};
user.items = user.items || {};
user.preferences = user.preferences || {};
user.notifications = user.notifications || {};
user.flags = user.flags || {};
user.habitIds = user.habitIds || [];
user.dailyIds = user.dailyIds || [];
user.todoIds = user.todoIds || [];
user.rewardIds = user.rewardIds|| [];
_.each(user.tasks, function(task, key){
if (!task.type) {
delete user.tasks[key];
// idList will take care of itself on page-load
return
}
if (key == '$spec') {
print("$spec was found: " + user._id);
return
}
if (key.indexOf("$_") === 0) {
var newKey = key.replace("$_", ''),
index = user[task.type + "Ids"].indexOf(key)
user[task.type + "Ids"][index] = newKey;
task.id = newKey
user.tasks[newKey] = task
// TODO make sure this is ok, that we're not deleting the original
// Otherwise use lodash.cloneDeep
delete user.tasks[key]
}
});
// New user schema has public and private paths, so we can setup proper access control with racer
// Note 'public' and 'private' are reserved words
var newUser = {
auth: user.auth, // we need this top-level due to derby-auth
apiToken: user.preferences.api_token || null, // set on update, we need derby.uuid()
preferences: {
armorSet: user.preferences.armorSet || 'v1',
gender: user.preferences.gender || 'm'
},
balance: user.balance || 2,
lastCron: user.lastCron || +new Date,
history: user.history || [],
stats: {
gp: user.stats.money || 0,
hp: user.stats.hp || 50,
exp: user.stats.exp || 0,
lvl: user.stats.lvl || 1
},
items: {
armor: user.items.armor || 0,
weapon: user.items.weapon || 0
},
tasks: user.tasks || {},
idLists: {
habit: user.habitIds || [],
daily: user.dailyIds || [],
todo: user.todoIds || [],
reward: user.rewardIds || []
},
flags: {
partyEnabled: false,
itemsEnabled: user.items.itemsEnabled || false,
kickstarter: user.notifications.kickstarter || 'show',
ads: user.flags.ads || null // null because it's set on registration
},
party: {
current: null,
invitation: null
}
};
try {
db.users.update({_id:user._id}, newUser);
} catch(e) {
print(e);
}
})

View File

@@ -1,19 +0,0 @@
// move idList back to root-level, is what's causing the sort bug - see https://github.com/codeparty/racer/pull/73
// We could just delete user.idLists, since it's re-created on refresh. However, users's first refresh will scare them
// since everything will dissappear - second refresh will bring everything back.
db.users.find().forEach(function(user){
if (!user.idLists) return;
db.users.update(
{_id:user._id},
{
$set:{
'habitIds':user.idLists.habit,
'dailyIds':user.idLists.daily,
'todoIds':user.idLists.todo,
'rewardIds':user.idLists.reward
}
//$unset:{idLists:true} // run this after the code has been pushed
}
)
})

View File

@@ -1,20 +0,0 @@
db.users.update(
{items:{$exists:0}},
{$set:{items:{weapon: 0, armor: 0, head: 0, shield: 0 }}},
{multi:true}
);
db.users.find().forEach(function(user){
var updates = {
// I'm not racist, these were just the defaults before ;)
'preferences.skin': 'white',
'preferences.hair': 'blond',
'items.head': user.items.armor,
'items.shield': user.items.armor,
}
db.users.update({_id:user._id}, {$set:updates});
})

View File

@@ -1,39 +0,0 @@
// mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130307_normalize_algo_values.js
/**
* Make sure people aren't overflowing their exp with the new system
*/
db.users.find().forEach(function(user){
function oldTnl(level) {
return (Math.pow(level,2)*10)+(level*10)+80
}
function newTnl(level) {
var value = 0;
if (level >= 100) {
value = 0
} else {
value = Math.round(((Math.pow(level,2)*0.25)+(10 * level) + 139.75)/10)*10; // round to nearest 10
}
return value
}
var newTnl = newTnl(user.stats.lvl);
if (user.stats.exp > newTnl) {
var percent = user.stats.exp / oldTnl(user.stats.lvl);
percent = (percent>1) ? 1 : percent;
user.stats.exp = newTnl * percent;
try {
db.users.update(
{_id:user._id},
{$set: {'stats.exp': user.stats.exp}},
{multi:true}
);
} catch(e) {
print(e);
}
}
})

View File

@@ -1,47 +0,0 @@
// mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130307_normalize_algo_values.js
/**
* Users were experiencing a lot of extreme Exp multiplication (https://github.com/lefnire/habitrpg/issues/594).
* This sets things straight, and in preparation for another algorithm overhaul
*/
db.users.find().forEach(function(user){
if (user.stats.exp >= 3580) {
user.stats.exp = 0;
}
if (user.stats.lvl > 100) {
user.stats.lvl = 100;
}
_.each(user.tasks, function(task, key){
// remove corrupt tasks
if (!task) {
delete user.tasks[key];
return;
}
// Fix busted values
if (task.value > 21.27) {
task.value = 21.27;
}
else if (task.value < -47.27) {
task.value = -47.27;
}
});
try {
db.users.update(
{_id:user._id},
{$set:
{
'stats.lvl': user.stats.lvl,
'stats.exp': user.stats.exp,
'tasks' : user.tasks
}
},
{multi:true}
);
} catch(e) {
print(e);
}
})

View File

@@ -1,28 +0,0 @@
/**
* Remove duff histories for dailies
*/
// mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130307_remove_duff_histories.js
db.users.find().forEach(function(user){
_.each(user.tasks, function(task, key){
if (task.type === "daily") {
// remove busted history entries
task.history = _.filter(task.history, function(h){return !!h.value})
}
});
try {
db.users.update(
{_id:user._id},
{$set:
{
'tasks' : user.tasks
}
},
{multi:true}
);
} catch(e) {
print(e);
}
})

View File

@@ -1,98 +0,0 @@
/**
* Migrate old pets to new system
*/
// mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130326_migrate_pets.js
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mapping = {
bearcub: {name:'BearCub', modifier: 'Base'},
cactus: {name:'Cactus', modifier:'Base'},
dragon: {name:'Dragon', modifier:'Base'},
flyingpig: {name:'FlyingPig', modifier:'Base'},
fox: {name:'Fox', modifier:'Base'},
lioncub: {name:'LionCub', modifier:'Base'},
pandacub: {name:'PandaCub', modifier:'Base'},
tigercub: {name:'TigerCub', modifier:'Base'},
wolfBorder: {name:'Wolf', modifier:'Base'},
wolfDesert: {name:'Wolf', modifier:'Desert'},
wolfGolden: {name:'Wolf', modifier:'Golden'},
wolfRed: {name:'Wolf', modifier:'Red'},
wolfShade: {name:'Wolf', modifier:'Shade'},
wolfSkeleton: {name:'Wolf', modifier:'Skeleton'},
wolfVeteran: {name:'Wolf', modifier:'Veteran'},
wolfWhite: {name:'Wolf', modifier:'White'},
wolfZombie: {name:'Wolf', modifier:'Zombie'}
}
/**
== Old Style ==
pet: Object
icon: "Pet-Wolf-White.png"
index: 14
name: "wolfWhite"
text: "White Wolf"
value: 3
pets: Object
bearcub: true
cactus: true
== New Style ==
currentPet: Object
modifier: "Red"
name: "Wolf"
notes: "Find some Hatching Powder to sprinkle on this egg, and one day it will hatch into a loyal pet."
str: "Wolf-Red"
text: "Wolf"
value: 3
pets: Array
0: "PandaCub-Base"
1: "Wolf-Base"
*/
db.users.find().forEach(function(user){
if (!user.items || (!user.items.pets && !user.items.pet)) return;
// migrate items.pet to items.currentPet
if (!!user.items.pet) {
var mapped = mapping[user.items.pet.name];
delete user.items.pet;
user.items.currentPet = {
modifier: mapped.modifier,
name: mapped.name,
str: mapped.name + "-" + mapped.modifier,
text: '' // FIXME?
}
}
// migrate items.pets
if (!!user.items.pets) {
var newPets = [];
_.each(user.items.pets, function(val, key){
if (_.isNumber(key)) {
newPets.push(val)
//FIXME why is this happening? seems the user gets migrated already...
//throw "Error: User appears already migrated, this shouldn't be happening!"
} else {
newPets.push(mapping[key].name + "-" + mapping[key].modifier);
}
});
user.items.pets = newPets;
}
try {
db.users.update(
{_id:user._id},
{$set:
{ 'items' : user.items }
}
);
} catch(e) {
print(e);
}
})

View File

@@ -1,110 +0,0 @@
/**
* Applies backer tokens & items (this file will be updated periodically
*/
// mongo habitrpg ./node_modules/underscore/underscore.js migrations/20130327_apply_tokens.js
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mapping = [
{
tier: 1,
tokens: 0,
users: []
},
{
tier: 5,
tokens: 20,
users: []
},
{
tier: 10,
tokens: 50,
users: []
},
{
tier: 15,
tokens: 100,
users: []
},
{
tier: 30,
tokens: 150,
users: []
},
{
tier: 45,
tokens: 170,
users: []
},
{
tier: 60,
tokens: 200,
users: []
},
{
tier: 70,
tokens: 240,
users: []
},
{
tier: 80,
tokens: 240,
users: []
},
{
tier: 90,
tokens: 280,
users: []
},
{
tier: 300,
tokens: 500,
users: []
},
{
tier: 800,
tokens: 500,
users: []
}
];
db.users.find().forEach(function(user){
if (!user._id) return;
var possibleUserIds = [user._id];
if (!!user.local) {
if (!!user.local.username) possibleUserIds.push(user.local.username);
if (!!user.local.email) possibleUserIds.push(user.local.email);
}
_.each(mapping, function(tier){
var userInTier = !_.isEmpty(_.intersection(tier.users, possibleUserIds));
if (userInTier) {
var tokenInc = 0,
backer = user.backer || {};
if (!backer.tokensApplied) {
tokenInc = tier.tokens;
backer.tokensApplied = true;
}
backer.tier = tier.tier;
try {
db.users.update(
{_id:user._id},
{
$set: { backer: backer, 'flags.ads': 'hide' },
$inc: { balance: (tokenInc/4) }
}
);
} catch(e) {
print(e);
}
}
})
})

View File

@@ -1,22 +0,0 @@
/**
* For users who already have max gear, they earned the achievement
*/
// mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130503_max_gear_achievement.js
db.users.find().forEach(function(user){
var items = user.items;
if (!items) { return; }
if ( parseInt(items.armor) == 5 &&
parseInt(items.head) == 5 &&
parseInt(items.shield) == 5 &&
parseInt(items.weapon) == 6) {
try {
db.users.update(
{_id:user._id},
{$set: {'achievements.ultimateGear':true}}
);
} catch(e) {
print(e);
}
}
})

View File

@@ -1 +0,0 @@
db.users.update({'backer.tier':{$gte:80}}, {$push:{'items.pets':'Wolf-Cerberus'}}, {multi:true});

View File

@@ -1,31 +0,0 @@
//mongo habitrpg ./node_modules/lodash/lodash.js migrations/20130602_survey_rewards.js
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var members = []
members = _.uniq(members);
var query = {
_id: {$exists:1},
$or:[
{_id: {$in: members}},
//{'profile.name': {$in: members}},
{'auth.facebook.name': {$in: members}},
{'auth.local.username': {$in: members}},
{'auth.local.email': {$in: members}}
]
};
print(db.users.count(query));
db.users.update(query,
{
$set: { 'achievements.helpedHabit': true },
$inc: { balance: 2.5 }
},
{multi:true}
)

View File

@@ -1,9 +0,0 @@
//mongo habitrpg migrations/20130612_survey_rewards_individual.js
var query = {_id: ""};
db.users.update(query,
{
$set: { 'achievements.helpedHabit': true },
$inc: { balance: 2.5 }
})

View File

@@ -1,4 +0,0 @@
db.users.ensureIndex( { _id: 1, apiToken: 1 }, {background: true} )
db.groups.ensureIndex( { members: 1 }, {background: true} )
db.groups.ensureIndex( { type: 1 }, {background: true} )
db.groups.ensureIndex( { type: 1, privacy: 1 }, {background: true} )

View File

@@ -1,16 +0,0 @@
//mongo habitrpg ./node_modules/lodash/lodash.js migrations/20130908_cleanup_corrupt_tags.js
// Racer was notorious for adding duplicates, randomly deleting documents, etc. Once we pull the plug on old.habit,
// run this migration to cleanup all the corruption
db.users.find().forEach(function(user){
user.tags = _.filter(user.tags, (function(t) {
return !!t ? t.id : false;
}));
try {
db.users.update({_id:user._id}, {$set:{tags:user.tags}});
} catch(e) {
print(e);
}
})

View File

@@ -1,5 +0,0 @@
db.users.find().forEach(function(user){
if (!user.purchased) user.purchased = {hair: {}, skin: {}};
user.purchased.ads = user.flags && !!user.flags.ads;
db.users.update({_id:user._id}, {$set:{'purchased': user.purchased, 'flags.newStuff': true}, $unset: {'flags.ads':1}});
});

View File

@@ -1,12 +0,0 @@
// node .migrations/20131022_restore_ads.js
var mongo = require('mongoskin');
var _ = require('lodash');
var dbBackup = mongo.db('localhost:27017/habitrpg?auto_reconnect');
var dbLive = mongo.db('localhost:27017/habitrpg2?auto_reconnect');
var count = 89474;
dbBackup.collection('users').findEach({$or: [{'flags.ads':'show'}, {'flags.ads': null}]}, {batchSize:10}, function(err, item) {
if (err) return console.error({err:err});
if (!item || !item._id) return console.error('blank user');
dbLive.collection('users').update({_id:item._id}, {$set:{'purchased.ads':false}, $unset: {'flags.ads': 1}});
if (--count <= 0) console.log("DONE!");
});

View File

@@ -1,25 +0,0 @@
// mongo habitrpg ./node_modules/lodash/lodash.js ./migrations/20131028_task_subdocs_tags_invites.js
db.challenges.find().forEach(function(chal){
_.each(chal.habits.concat(chal.dailys).concat(chal.todos).concat(chal.rewards), function(task){
task.id = task.id || task._id;
})
try {
db.challenges.update({_id:chal._id}, chal);
db.groups.update({_id:chal.group}, {$addToSet:{challenges:chal._id}})
} catch(e) {
print(e);
}
});
db.users.find().forEach(function(user){
_.each(user.habits.concat(user.dailys).concat(user.todos).concat(user.rewards), function(task){
task.id = task.id || task._id;
})
try {
db.users.update({_id:user._id}, user);
} catch(e) {
print(e);
}
});

View File

@@ -1,7 +0,0 @@
db.users.find({},{todos:1}).forEach(function(user){
_.each(user.todos, function(task){
if (moment(task.date).toDate() == 'Invalid Date')
task.date = moment().format('MM/DD/YYYY');
})
db.users.update({_id:user._id}, {$set:{todos: user.todos}});
});

View File

@@ -1,21 +0,0 @@
function deleteId(h){
delete h._id;
}
db.users.find({},{habits:1,dailys:1,history:1}).forEach(function(user){
if (user.history) {
_.each(['todos','exp'], function(type){
if (user.history[type]) {
_.each(user.history.exp, deleteId);
}
})
} else {
user.history = {exp:[],todos:[]};
}
_.each(['habits', 'dailys'], function(type){
_.each(user[type].history, deleteId);
});
db.users.update({_id:user._id}, {$set:{history: user.history, habits: user.habits, dailys: user.dailys}});
});

View File

@@ -1,4 +0,0 @@
// Increase everyone's gems per their contribution level
db.users.find({'contributor.level':{$gt:0}},{contributor:1, balance:1}).forEach(function(user){
db.users.update({_id:user._id}, {$inc: {balance: (user.contributor.level * .5)} });
});

View File

@@ -1,15 +0,0 @@
// This migration has already been run in the past. It's vital to fix these users presently, but we need to find
// out why task values are ever getting in as NaN. My guess is API PUT /tasks/:tid routes
db.users.find({},{habits:1,dailys:1,todos:1,rewards:1}).forEach(function(user){
_.each(['habits','dailys','todos','rewards'], function(type){
_.each(user[type], function(task){
task.value = +task.value;
if (_.isNaN(task.value)) {
task.value = 0;
print(user._id);
}
})
})
db.users.update({_id:user._id}, {$set:{habits: user.habits, dailys: user.dailys, todos: user.todos, rewards: user.rewards}});
});

View File

@@ -1,14 +0,0 @@
// Migrate all users websites to the profile blurb field
db.users.find({'profile.websites':{$exists: true}}).forEach(function(user){
db.users.update({_id: user._id}, {
$set: {"profile.blurb": user.profile.blurb + '\n * ' + user.profile.websites.join('\n * ')},
$unset: {'profile.websites': 1}
})
})
db.groups.find({'websites.0':{$exists: true}}).forEach(function(group){
db.groups.update({_id: group._id}, {
$set: {"description": group.description + '\n * ' + group.websites.join('\n * ')},
$unset: {websites: 1}
})
})

View File

@@ -1,10 +0,0 @@
//Add defaults to show gears in all users
db.users.update(
{},
{$set:{
'preferences.showWeapon': true,
'preferences.showShield': true,
'preferences.showArmor': true,
}},
{multi:true}
)

View File

@@ -1,18 +0,0 @@
// TODO figure out why this is happening in the first place
db.users.find({},{habits:1, dailys:1, todos:1, rewards:1}).forEach(function(user){
_.each(user.habits, function(task){
task.type = 'habit';
})
_.each(user.dailys, function(task){
task.type = 'daily';
})
_.each(user.todos, function(task){
task.type = 'todo';
})
_.each(user.rewards, function(task){
task.type = 'reward';
})
db.users.update({_id:user._id}, {$set:{habits: user.habits, dailys: user.dailys, todos: user.todos, rewards: user.rewards}});
});

View File

@@ -1,12 +0,0 @@
// once and for all!
db.users.find({'items.pets':{$exists:1}},{'items.pets':1}).forEach(function(user){
_.reduce(user.items.pets, function(m,v,k){
if (!k.indexOf('undefined')) m.push(k);
return m;
}, []).forEach(function(key){
delete user.items.pets[key];
})
db.users.update({_id:user._id}, { $set:{'items.pets':user.items.pets} });
});

View File

@@ -1,13 +0,0 @@
// Cleanup broken tags
// -------------------------
db.users.find().forEach(function(user){
var tasks = user.habits.concat(user.dailys).concat(user.todos).concat(user.rewards);
_.each(tasks, function(task){
_.each(task.tags, function(value, key){ //value is true, key is tag.id
if (!_.find(user.tags,{id:key})) delete task.tags[key];
});
});
db.users.update({_id:user._id}, user);
});

View File

@@ -1,8 +0,0 @@
//Add default to randomize party members list
db.users.update(
{},
{$set:{
'party.order': 'random',
}},
{multi:true}
)

View File

@@ -1,5 +0,0 @@
db.users.find({'preferences.dayStart':{$exists:1}},{'preferences.dayStart':1}).forEach(function(user){
var dayStart = +user.preferences.dayStart;
dayStart = (_.isNaN(dayStart) || dayStart < 0 || dayStart > 24) ? 0 : dayStart;
db.users.update({_id:user._id}, {$set:{'preferences.dayStart':dayStart}});
});

View File

@@ -1 +0,0 @@
db.users.update({},{$set:{'items.pets.Turkey-Base':5, 'flags.newStuff':true}}, {multi:true});

View File

@@ -1,38 +0,0 @@
// node .migrations/20131127_restore_dayStart.js
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mongo = require('mongoskin');
var _ = require('lodash');
var backupUsers = mongo.db('localhost:27017/habitrpg_old?auto_reconnect').collection('users');
var liveUsers = mongo.db('localhost:27017/habitrpg_new?auto_reconnect').collection('users');
var query = {'preferences.dayStart':{$exists:1,$ne:0}};
var select = {'preferences.dayStart': 1};
backupUsers.count(query, function(err, count){
if (err) return console.error(err);
backupUsers.findEach(query, select, {batchSize:20}, function(err, before){
if (err) return console.error(err);
if (!before) { count--; return console.log('!before'); }
liveUsers.findById(before._id, function(err, after){
if (err) return console.error(err);
if (!after) { count--; return console.log(before._id + ' deleted?'); }
var dayStart = +before.preferences.dayStart;
if (after.preferences.dayStart == 0 && dayStart != 0){
dayStart = (_.isNaN(dayStart) || dayStart < 0 || dayStart > 24) ? 0 : dayStart;
} else {
dayStart = after.preferences.dayStart;
}
liveUsers.update({_id:after._id}, {$inc:{_v:1}, $set:{'preferences.dayStart':dayStart}});
if (--count <= 0) console.log("DONE!");
})
});
});

View File

@@ -1,51 +0,0 @@
// node .migrations/20131221_restore_NaN_history.js
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
/**
* After the classes migration, users lost some history entries
*/
var mongo = require('mongoskin');
var _ = require('lodash');
var backupUsers = mongo.db('localhost:27017/habitrpg_old?auto_reconnect').collection('users');
var liveUsers = mongo.db('localhost:27017/habitrpg?auto_reconnect').collection('users');
function filterNaNs(h) {
return h && _.isNumber(+h.value) && !_.isNaN(+h.value);
}
var fields = {history:1,habits:1,dailys:1,migration:1};
var count = 0;
liveUsers.findEach({migration: {$ne:'20131221_restore_NaN_history'}}, fields, {batchSize:500}, function(err, after){
if (!after) err = '!after';
if (err) {count++;return console.error(err);}
backupUsers.findById(after._id, fields, function(err, before){
if (err) {count++;return console.error(err);}
_.each(['todos','exp'],function(type){
if (!_.isEmpty(after.history[type]))
after.history[type] = _.filter(after.history[type], filterNaNs);
if (before && !_.isEmpty(before.history[type]))
after.history[type] = before.history[type].concat(after.history[type]);
})
_.each(['habits','dailys'], function(type){
_.each(after[type], function(t){
t.history = _.filter(t.history, filterNaNs);
var found = before && _.find(before[type],{id:t.id});
if (found && found.history) t.history = found.history.concat(t.history);
})
})
liveUsers.update({_id:after._id}, {$set:{history:after.history, dailys:after.dailys, habits:after.habits, migration:'20131221_restore_NaN_history'}, $inc:{_v:1}});
//if (--count <= 0) console.log("DONE! " + after._id);
if (++count%1000 == 0) console.log(count);
if (after._id == '9') console.log('lefnire processed');
})
});

View File

@@ -1,38 +0,0 @@
// node .migrations/20131225_restore_streaks.js
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
/**
* After the classes migration, users lost some history entries
*/
var mongo = require('mongoskin');
var _ = require('lodash');
var backupUsers = mongo.db('localhost:27017/habitrpg_old?auto_reconnect').collection('users');
var liveUsers = mongo.db('lefnire:mAdn3s5s@charlotte.mongohq.com:10015/habitrpg_large?auto_reconnect').collection('users');
var fields = {dailys:1,migration:1};
var count = 0;
liveUsers.findEach({migration: {$ne:'20131225_restore_streaks'}}, fields, {batchSize:250}, function(err, after){
if (!after) err = '!after';
if (err) {count++;return console.error(err);}
backupUsers.findById(after._id, fields, function(err, before){
if (!before) err = '!before';
if (err) {count++;return console.error(err);}
_.each(before.dailys,function(d){
var found = _.find(after.dailys,{id: d.id});
if (found && !found.streak) found.streak = d.streak;
})
liveUsers.update({_id:after._id}, {$set:{dailys:after.dailys, migration:'20131225_restore_streaks'}, $inc:{_v:1}});
//if (--count <= 0) console.log("DONE! " + after._id);
if (++count%1000 == 0) console.log(count);
if (after._id == '9') console.log('lefnire processed');
})
});

View File

@@ -1,8 +0,0 @@
db.users.find({},{todos:1,dailys:1,rewards:1,habits:1}).forEach(function(user){
_.each(user.habits.concat(user.dailys).concat(user.todos).concat(user.rewards), function(t){
t.dateCreated = t.created || new Date;
delete t.created;
if (t.type == 'todo' && t.completed) t.dateCompleted = new Date;
})
db.users.update({_id:user._id}, {$set:{habits:user.habits,dailys:user.dailys,todos:user.todos,rewards:user.rewards}});
});

View File

@@ -1 +0,0 @@
db.users.update({},{$set:{'achievements.habitBirthday':true}},{multi:1})

View File

@@ -1,12 +0,0 @@
db.users.update({},{$set:{
'items.food.Cake_Skeleton':1,
'items.food.Cake_Base':1,
'items.food.Cake_CottonCandyBlue':1,
'items.food.Cake_CottonCandyPink':1,
'items.food.Cake_Shade':1,
'items.food.Cake_White':1,
'items.food.Cake_Golden':1,
'items.food.Cake_Zombie':1,
'items.food.Cake_Desert':1,
'items.food.Cake_Red':1
}},{multi:1})

View File

@@ -1,3 +0,0 @@
db.challenges.find({},{members:1}).forEach(function(chal){
db.challenges.update({_id:chal._id}, {$set:{memberCount:chal.members.length}});
});

View File

@@ -1,14 +0,0 @@
db.users.update(
{
'purchased.plan.dateCreated':{$gte:new Date('2014-02-22'),$lt:new Date('2014-02-29')},
'items.gear.owned.armor_mystery_201402':null,
'items.gear.owned.head_mystery_201402': null,
'items.gear.owned.back_mystery_201402': null,
'purchased.plan.mysteryItems':{$nin:['armor_mystery_201402','head_mystery_201402','back_mystery_201402']}
},
//{_id:1,'purchased.plan':1,'items.gear.owned':1}
{$push: {'purchased.plan.mysteryItems':{$each:['armor_mystery_201402','head_mystery_201402','back_mystery_201402']}}},
{multi:true}
)/*.forEach(function(user){
printjson(user);
});*/

View File

@@ -1 +0,0 @@
db.users.update({'backer.tier':{$gt:69}},{$set:{'items.mounts.LionCub-Ethereal':true}},{multi:1})

View File

@@ -1,11 +0,0 @@
//mongo habitrpg node_modules/lodash/lodash.js ./migrations/20140712_wiped_quest_membership.js
db.groups.find({type:'party','quest.key':{$ne:null},'quest.active':true},{quest:1}).forEach(function(group){
var activeMembers = _.reduce(group.quest.members, function(m,v,k){
if (v===true) m.push(k); return m;
},[]);
db.users.update(
{_id:{$in: activeMembers}},
{$set:{'party.quest.key':group.quest.key,'party.quest.completed':null}},
{multi:true}
);
});

View File

@@ -1,13 +0,0 @@
var _ = require('lodash');
db.users.find({}).forEach(function(user){
var newNewMessages = {};
_.each(user.newMessages, function(val, key){
if(key != "undefined"){
newNewMessages[key] = val;
};
});
db.users.update({_id: user._id}, {$set: {'newMessages': newNewMessages}});
});

View File

@@ -1,81 +0,0 @@
// node .migrations/20140829_change_headAccessory_to_eyewear.js
var migrationName = '20140829_change_headAccessory_to_eyewear';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
/**
* https://github.com/HabitRPG/habitrpg/issues/3645
*/
var mongo = require('mongoskin');
var _ = require('lodash');
var liveUsers = mongo.db('localhost:27017/habitrpg2?auto_reconnect').collection('users');
var fields = {'migration':1,
'items.gear.costume.headAccessory':1,
'items.gear.equipped.headAccessory':1,
'items.gear.owned.headAccessory_special_wondercon_black':1,
'items.gear.owned.headAccessory_special_wondercon_red':1,
'items.gear.owned.headAccessory_special_summerRogue':1,
'items.gear.owned.headAccessory_special_summerWarrior':1
};
var progressCount = 1000;
var count = 0;
liveUsers.findEach({ $and: [
{ migration: {$ne:migrationName} },
{ $or: [
{'items.gear.owned.headAccessory_special_summerRogue': {'$exists':true}},
{'items.gear.owned.headAccessory_special_summerWarrior':{'$exists':true}},
{'items.gear.owned.headAccessory_special_wondercon_red':{'$exists':true}},
{'items.gear.owned.headAccessory_special_wondercon_black':{'$exists':true}}
]}
]}, fields, {batchSize:250}, function(err, user){
count++;
if (!user) err = '!user';
if (err) {return console.error(err);}
var set = {'migration': migrationName};
var unset = {};
var oldToNew = {
'headAccessory_special_summerRogue': 'eyewear_special_summerRogue',
'headAccessory_special_summerWarrior': 'eyewear_special_summerWarrior',
'headAccessory_special_wondercon_red': 'eyewear_special_wondercon_red',
'headAccessory_special_wondercon_black':'eyewear_special_wondercon_black'
};
// items.gear.costume, items.gear.equipped:
_.each(['costume','equipped'],function(type){
_.each(oldToNew,function(newName,oldName){
if (user.items.gear[type].headAccessory === oldName) {
unset['items.gear.'+type+'.headAccessory'] = "";
set['items.gear.'+type+'.eyewear'] = newName;
}
});
});
// items.gear.owned:
_.each(oldToNew,function(newName,oldName){
if (oldName in user.items.gear.owned) {
unset['items.gear.owned.'+oldName] = "";
set['items.gear.owned.'+newName] = user.items.gear.owned[oldName];
}
});
//console.log(JSON.stringify(user, null, " "));
//console.log("set: " + JSON.stringify(set, null, " "));
//console.log("unset: " + JSON.stringify(unset, null, " "));
liveUsers.update({_id:user._id}, {$set:set, $unset:unset, $inc:{_v:1}});
if (count%progressCount == 0) console.log(count + ' ' + user._id);
if (user._id == '9') console.log('lefnire processed');
if (user._id == authorUuid) console.log(authorName + ' processed');
});

View File

@@ -1,131 +0,0 @@
// IMPORTANT:
//
// run like this to capture all output:
//
// node 20140831_increase_gems_for_previous_contributions.js > 20140831_increase_gems_for_previous_contributions_output.txt
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var migrationName = '20140831_increase_gems_for_previous_contributions';
/**
* https://github.com/HabitRPG/habitrpg/issues/3933
* Increase Number of Gems for Contributors
* author: Alys (d904bd62-da08-416b-a816-ba797c9ee265)
*
* Increase everyone's gems per their contribution level.
* Originally they were given 2 gems per tier.
* Now they are given 3 gems per tier for tiers 1,2,3
* and 4 gems per tier for tiers 4,5,6,7
* So that means an EXTRA 1 for tier 1,
* 2 for tier 2,
* 3 for tier 3,
* 5 for tier 4,
* 7 for tier 5,
* 9 for tier 6,
* 11 for tier 7,
* 11 for tier 8 (moderators = tier 7 + admin privileges),
* none for tier 9 (staff)
*/
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db('localhost:27017/habitrpg?auto_reconnect').collection('users');
var query = {
'contributor.level': {$gt: 0, $lt: 9},
'migration': {$ne: migrationName}
};
var fields = {
'migration':1,
'contributor.level':1,
'balance':1
};
var userResults = {}; // each key is a UUID, each value is a string
// describing what changed for that user
console.warn('Updating users...');
var progressCount = 50;
var count = 0;
dbUsers.findEach(query, fields, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All users found. Fetching final balances...');
return fetchFinalBalances();
}
count++;
var set = {'migration': migrationName};
var tier = user.contributor.level;
var extraGems = tier; // tiers 1,2,3
if (tier > 3) { extraGems = 3 + (tier - 3) * 2; }
if (tier == 8) { extraGems = 11; }
var extraBalance = extraGems / 4;
set['balance'] = user.balance + extraBalance;
// Capture current state of user:
userResults[user._id] =
user._id + ' ' + ':\n' +
' contrib tier : ' + tier + '\n' +
' balance before : ' + user.balance + '\n' +
' balance (gems) added : ' + extraBalance + ' (' +
extraGems + ')' + '\n' +
' expected balance after: ' + (user.balance + extraBalance) + '\n';
// Update user:
dbUsers.update({_id:user._id}, {$set:set, $inc:{_v:1}});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
});
function fetchFinalBalances() {
var query = {_id: {$in: Object.keys(userResults)}};
var fields = {
'balance':1,
};
var count1 = 0;
dbUsers.findEach(query, fields, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All final balances found.');
return displayData();
}
count1++;
userResults[user._id] = userResults[user._id] +
user._id + ' ' + ':\n' +
' actual balance after : ' + user.balance + '\n';
if (count1%progressCount == 0) console.warn(count1 + ' ' + user._id);
});
}
function displayData() {
_.each(userResults, function(text, uuid) {
console.log(text); // text contains uuid
});
console.log('\n' + count +
' users processed (should be roughly 335 according to the Hall)\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,79 +0,0 @@
var migrationName = '20140914_upgrade_admin_contrib_tiers';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/**
* https://github.com/HabitRPG/habitrpg/issues/3801
* Convert Tier 8 contributors to Tier 9 (staff) (all current Tier 8s are admins).
* Convert Tier 7 contributors with admin flag to Tier 8 (moderators).
*/
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db('localhost:27017/habitrpg?auto_reconnect').collection('users');
var query =
{ 'contributor.level':{$gte:7}, 'contributor.admin':true, 'migration': {$ne: migrationName} };
var fields = {'migration':1,
'contributor.admin':1,
'contributor.level':1,
'auth.local.username':1,
'profile.name':1,
};
var userResults = {}; // each key is a UUID, each value is a username;
// contains only the users changed
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
var set = {'migration': migrationName};
var inc = {'contributor.level':1, _v:1};
userResults[user._id] = user.profile.name;
dbUsers.update({_id:user._id}, {$set:set, $inc:inc});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
if (user._id == '9' ) console.warn('lefnire' + ' processed');
});
function displayData() {
console.log('users modified:');
_.each(userResults, function(name, uuid) {
console.log(name);
});
console.warn('\n' + count +
' users processed (should be 11 according to the Hall)\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,18 +0,0 @@
db.users.update(
{},
{
$inc: {
'items.food.Candy_Base':1,
'items.food.Candy_CottonCandyBlue':1,
'items.food.Candy_CottonCandyPink':1,
'items.food.Candy_Desert':1,
'items.food.Candy_Golden':1,
'items.food.Candy_Red':1,
'items.food.Candy_Shade':1,
'items.food.Candy_Skeleton':1,
'items.food.Candy_White':1,
'items.food.Candy_Zombie':1
}
},
{multi:1}
);

View File

@@ -1 +0,0 @@
db.users.update({_id:'9'},{$set:{'items.pets.JackOLantern-Base':5, 'flags.newStuff':true}}, {multi:true});

View File

@@ -1,11 +0,0 @@
db.users.update(
{'items.pets.Turkey-Base':{$ne:null}},
{$set:{'items.mounts.Turkey-Base':true}},
{multi:1}
)
db.users.update(
{'items.pets.Turkey-Base':null},
{$set:{'items.pets.Turkey-Base':5}},
{multi:1}
)

View File

@@ -1,4 +0,0 @@
db.users.update({'purchased.plan.consecutive.count':NaN}, {$set:{'purchased.plan.consecutive.count':0}}, {multi:1});
db.users.update({'purchased.plan.consecutive.offset':NaN}, {$set:{'purchased.plan.consecutive.offset':0}}, {multi:1});
db.users.update({'purchased.plan.consecutive.gemCapExtra':NaN}, {$set:{'purchased.plan.consecutive.gemCapExtra':0}}, {multi:1});
db.users.update({'purchased.plan.consecutive.trinkets':NaN}, {$set:{'purchased.plan.consecutive.trinkets':0}}, {multi:1});

View File

@@ -1,11 +0,0 @@
db.users.update(
{'items.gear.owned.head_special_nye':{$ne:null}},
{$set:{'items.gear.owned.head_special_nye2014':false}},
{multi:1}
)
db.users.update(
{'items.gear.owned.head_special_nye':null},
{$set:{'items.gear.owned.head_special_nye':false}},
{multi:1}
)

View File

@@ -1,8 +0,0 @@
db.users.update(
{'purchased.plan.customerId':{$ne:null}, 'purchased.plan.dateUpdated':null},
{
$set: {'purchased.plan.dateUpdated': new Date('12/01/2014')},
$unset: {'purchased.plan.datedUpdated':''}
},
{multi:true}
);

View File

@@ -1,88 +0,0 @@
var migrationName = '20150124_mountmaster_fix.js';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/**
* https://github.com/HabitRPG/habitrpg/pull/4374#issuecomment-71038795
* Convert false to null for mounts that used to be owned.
*/
var dbserver = 'localhost:27017' // CHANGE THIS FOR PRODUCTION DATABASE
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/habitrpg?auto_reconnect').collection('users');
var query = {
'items.mounts':{$exists:true}
};
var fields = {
'items.mounts':1
};
var animals = [ "Wolf-Base", "Wolf-White", "Wolf-Desert", "Wolf-Red", "Wolf-Shade", "Wolf-Skeleton", "Wolf-Zombie", "Wolf-CottonCandyPink", "Wolf-CottonCandyBlue", "Wolf-Golden", "TigerCub-Base", "TigerCub-White", "TigerCub-Desert", "TigerCub-Red", "TigerCub-Shade", "TigerCub-Skeleton", "TigerCub-Zombie", "TigerCub-CottonCandyPink", "TigerCub-CottonCandyBlue", "TigerCub-Golden", "PandaCub-Base", "PandaCub-White", "PandaCub-Desert", "PandaCub-Red", "PandaCub-Shade", "PandaCub-Skeleton", "PandaCub-Zombie", "PandaCub-CottonCandyPink", "PandaCub-CottonCandyBlue", "PandaCub-Golden", "LionCub-Base", "LionCub-White", "LionCub-Desert", "LionCub-Red", "LionCub-Shade", "LionCub-Skeleton", "LionCub-Zombie", "LionCub-CottonCandyPink", "LionCub-CottonCandyBlue", "LionCub-Golden", "Fox-Base", "Fox-White", "Fox-Desert", "Fox-Red", "Fox-Shade", "Fox-Skeleton", "Fox-Zombie", "Fox-CottonCandyPink", "Fox-CottonCandyBlue", "Fox-Golden", "FlyingPig-Base", "FlyingPig-White", "FlyingPig-Desert", "FlyingPig-Red", "FlyingPig-Shade", "FlyingPig-Skeleton", "FlyingPig-Zombie", "FlyingPig-CottonCandyPink", "FlyingPig-CottonCandyBlue", "FlyingPig-Golden", "Dragon-Base", "Dragon-White", "Dragon-Desert", "Dragon-Red", "Dragon-Shade", "Dragon-Skeleton", "Dragon-Zombie", "Dragon-CottonCandyPink", "Dragon-CottonCandyBlue", "Dragon-Golden", "Cactus-Base", "Cactus-White", "Cactus-Desert", "Cactus-Red", "Cactus-Shade", "Cactus-Skeleton", "Cactus-Zombie", "Cactus-CottonCandyPink", "Cactus-CottonCandyBlue", "Cactus-Golden", "BearCub-Base", "BearCub-White", "BearCub-Desert", "BearCub-Red", "BearCub-Shade", "BearCub-Skeleton", "BearCub-Zombie", "BearCub-CottonCandyPink", "BearCub-CottonCandyBlue", "BearCub-Golden" ]; // all Gen1 mounts
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
var mounts = user.items.mounts;
var changed = false;
for(var a in animals) {
if(mounts[animals[a]] == false) {
mounts[animals[a]] = null;
changed = true;
}
}
if (changed) {
dbUsers.update(
{ _id: user._id},
{
$set: { "migration": migrationName,
"items.mounts" : mounts
}
}
);
}
// var set = {'migration': migrationName};
// var inc = {'xyz':1, _v:1};
// dbUsers.update({_id:user._id}, {$set:set, $inc:inc});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
if (user._id == '9' ) console.warn('lefnire' + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,36 +0,0 @@
db.users.update(
{'items.gear.owned.armor_special_birthday':{$ne:null}},
{$set:{'items.gear.owned.armor_special_birthday2015':false}},
{multi:1}
)
db.users.update(
{'items.gear.owned.armor_special_birthday':null},
{$set:{'items.gear.owned.armor_special_birthday':false}},
{multi:1}
)
db.users.update({},{$inc:{
'items.food.Cake_Skeleton':1,
'items.food.Cake_Base':1,
'items.food.Cake_CottonCandyBlue':1,
'items.food.Cake_CottonCandyPink':1,
'items.food.Cake_Shade':1,
'items.food.Cake_White':1,
'items.food.Cake_Golden':1,
'items.food.Cake_Zombie':1,
'items.food.Cake_Desert':1,
'items.food.Cake_Red':1
}},{multi:1})
db.users.update(
{'achievements.habitBirthday':true},
{$set:{'achievements.habitBirthdays':1}},
{multi:1}
)
db.users.update(
{},
{$inc:{'achievements.habitBirthdays':1}},
{multi:1}
)

View File

@@ -1,78 +0,0 @@
var migrationName = '20150131_birthday_goodies_fix__one_birthday__1';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/*
* remove new birthday robes and second achievement from people who shouldn't have them
*/
var dbserver = 'localhost:27017' // CHANGE THIS FOR PRODUCTION DATABASE
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/habitrpg?auto_reconnect').collection('users');
// 'auth.timestamps.created':{$gt:new Date('2014-02-01')},
var query = {
'achievements.habitBirthdays':1,
'auth.timestamps.loggedin':{$gt:new Date('2014-12-20')}
};
// '_id': 'c03e41bd-501f-438c-9553-a7afdf52a08c',
// 'achievements.habitBirthday':{$exists:false},
// 'items.gear.owned.armor_special_birthday2015':1
var fields = {
// 'auth.timestamps.created':1,
// 'achievements.habitBirthday':1,
// 'achievements.habitBirthdays':1,
'items.gear.owned.armor_special_birthday2015':1,
// 'items.gear.owned.armor_special':1
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
var unset = {'items.gear.owned.armor_special_birthday2015': 1};
// var set = {'migration':migrationName, 'achievements.habitBirthdays':1 };
// var inc = {'xyz':1, _v:1};
dbUsers.update({_id:user._id}, {$unset:unset}); // , $inc:inc});
// dbUsers.update({_id:user._id}, {$unset:unset, $set:set});
// console.warn(user.auth.timestamps.created);
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
if (user._id == '9' ) console.warn('lefnire' + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,112 +0,0 @@
var migrationName = '20150201_convert_creation_date_from_string_to_object__no_date_recent_signup';
//// var migrationName = '20150201_convert_creation_date_from_string_to_object';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/*
* For users that have no value for auth.timestamps.created, assign them
* a recent value.
*
* NOTE:
* Before this script was used as described above, it was first used to
* find all users that have a auth.timestamps.created field that is a string
* rather than a date object and set it to be a date object. The code used
* for this has been commented out with four slashes: ////
*
* https://github.com/HabitRPG/habitrpg/issues/4601#issuecomment-72339846
*/
var dbserver = 'localhost:27017' // CHANGE THIS FOR PRODUCTION DATABASE
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var mongo = require('mongoskin');
var _ = require('lodash');
var moment = require('moment');
var dbUsers = mongo.db(dbserver + '/habitrpg?auto_reconnect').collection('users');
var uuidArrayRecent=[ // recent users with no creation dates
'1a0d4b75-73ed-4937-974d-d504d6398884',
'1c7ebe27-1250-4f95-ba10-965580adbfd7',
'5f972121-4a6d-411c-95e9-7093d3e89b66',
'ae85818a-e336-4ccd-945e-c15cef975102',
'ba273976-d9fc-466c-975f-38559d34a824',
];
var query = {
'_id':{$in: uuidArrayRecent}
//// 'auth':{$exists:true},
//// 'auth.timestamps':{$exists:true},
//// 'auth.timestamps.created':{$not: {$lt:new Date('2018-01-01')}}
};
var fields = {
'_id':1,
'auth.timestamps.created':1
};
// 'achievements.habitBirthdays':1
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
//// var oldDate = user.auth.timestamps.created;
//// var newDate = moment(oldDate).toDate();
var oldDate = 'none';
var newDate = moment('2015-01-11').toDate();
console.warn(user._id + ' == ' + oldDate + ' == ' + newDate);
//// var set = { 'migration': migrationName,
//// 'auth.timestamps.created': newDate,
//// 'achievements.habitBirthdays': 2,
//// 'items.gear.owned.head_special_nye':true,
//// 'items.gear.owned.head_special_nye2014':true,
//// 'items.gear.owned.armor_special_birthday':true,
//// 'items.gear.owned.armor_special_birthday2015':true,
//// };
var set = { 'migration': migrationName,
'auth.timestamps.created': newDate,
'achievements.habitBirthdays': 1,
'items.gear.owned.armor_special_birthday':true,
};
// var unset = {'items.gear.owned.armor_special_birthday2015': 1};
// var inc = {'xyz':1, _v:1};
dbUsers.update({_id:user._id}, {$set:set});
// dbUsers.update({_id:user._id}, {$unset:unset, $set:set, $inc:inc});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
if (user._id == '9' ) console.warn('lefnire' + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,7 +0,0 @@
db.users.update({
'flags.recaptureEmailsPhase': {
$gt: 0
}
},{$inc:{
'flags.recaptureEmailsPhase':1
}},{multi:1})

View File

@@ -1,10 +0,0 @@
db.users.update({},{$set:{
'flags.tour.intro':-2,
//'flags.tour.classes':-2,
'flags.tour.stats':-2,
'flags.tour.tavern':-2,
'flags.tour.party':-2,
'flags.tour.guilds':-2,
'flags.tour.challenges':-2,
'flags.tour.market':-2
}},{multi:1})

View File

@@ -1,64 +0,0 @@
var migrationName = '20150224_force_resting_in_inn';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/*
* force all active players to rest in the inn due to massive server fail
*/
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var dbserver = 'localhost:27017' // CHANGE THIS FOR PRODUCTION DATABASE
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/habitrpg?auto_reconnect').collection('users');
var query = {
'auth.timestamps.loggedin':{$gt:new Date('2015-02-22')}
};
var fields = {
'preferences.sleep':1,
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
var set = {'migration':migrationName, 'preferences.sleep':1 };
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
if (user._id == '9' ) console.warn('lefnire' + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,5 +0,0 @@
db.users.update(
{'achievements.helpedHabit':true},
{$set:{'achievements.habitSurveys':1}},
{multi:1}
)

View File

@@ -1,138 +0,0 @@
// var migrationName = '20150604_ultimateGearSets';
// var authorName = 'Sabe'; // in case script author needs to know when their ...
// var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
var migrationName = '20150620_ultimateGearSets';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/*
* grant the new ultimateGearSets achievement for existing users' collected equipment
*
*
* Changed by Alys on 20150620 to assign false values to
* 'achievements.ultimateGearSets' when true values are not appropriate,
* because of https://github.com/HabitRPG/habitrpg/issues/5427
*
* Minimal changes were made so the code isn't as efficient or clean
* as it could be, but it's (hopefully) one-use-only and minimal changes
* means minimal new testing.
*/
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
// We've now upgraded to lodash v4 but the code used in this migration has not been
// adapted to work with it. Before this migration is used again any lodash method should
// be checked for compatibility against the v4 changelog and changed if necessary.
// https://github.com/lodash/lodash/wiki/Changelog#v400
var dbserver = 'localhost:27017' // FOR TEST DATABASE
// var dbserver = 'username:password@ds031379-a0.mongolab.com:31379' // FOR PRODUCTION DATABASE
var dbname = 'habitrpg';
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/' + dbname + '?auto_reconnect').collection('users');
var fields = {
'achievements.ultimateGearSets':1,
'items.gear.owned':1
};
// Changes 20150620: All users have to be processed now (non-achievers need
// false values).
var query = {
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
var achievements = {};
var changeUser = false;
// Changes 20150620: 'changeUser' now indicates that the user must have the
// Enchanted Armoire unlocked.
if ( (typeof user.items.gear.owned.weapon_wizard_6 !== 'undefined')
&& (typeof user.items.gear.owned.armor_wizard_5 !== 'undefined')
&& (typeof user.items.gear.owned.head_wizard_5 !== 'undefined')
) {
achievements['wizard'] = true;
changeUser = true;
}
else {
// Changes 20150620: false added for all classes (here and below)
achievements['wizard'] = false;
}
if ( (typeof user.items.gear.owned.weapon_warrior_6 !== 'undefined')
&& (typeof user.items.gear.owned.armor_warrior_5 !== 'undefined')
&& (typeof user.items.gear.owned.head_warrior_5 !== 'undefined')
&& (typeof user.items.gear.owned.shield_warrior_5 !== 'undefined')
) {
achievements['warrior'] = true;
changeUser = true;
}
else {
achievements['warrior'] = false;
}
if ( (typeof user.items.gear.owned.weapon_healer_6 !== 'undefined')
&& (typeof user.items.gear.owned.armor_healer_5 !== 'undefined')
&& (typeof user.items.gear.owned.head_healer_5 !== 'undefined')
&& (typeof user.items.gear.owned.shield_healer_5 !== 'undefined')
) {
achievements['healer'] = true;
changeUser = true;
}
else {
achievements['healer'] = false;
}
if ( (typeof user.items.gear.owned.weapon_rogue_6 !== 'undefined')
&& (typeof user.items.gear.owned.armor_rogue_5 !== 'undefined')
&& (typeof user.items.gear.owned.head_rogue_5 !== 'undefined')
&& (typeof user.items.gear.owned.shield_rogue_6 !== 'undefined')
) {
achievements['rogue'] = true;
changeUser = true;
}
else {
achievements['rogue'] = false;
}
// Changes 20150620: $set is now run for all users.
var set = {'migration':migrationName, 'achievements.ultimateGearSets':achievements};
if (changeUser) { // user has at least one Ultimate Gear achievement
set['flags.armoireEnabled'] = true;
}
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
if (user._id == '9' ) console.warn('lefnire' + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,5 +0,0 @@
db.users.update(
{},
{$set:{'items.mounts.Gryphon-RoyalPurple':true}},
{multi:true}
);

View File

@@ -1,5 +0,0 @@
db.users.update(
{'items.pets.Wolf-Veteran':{$ne:null}},
{$set:{'items.pets.Tiger-Veteran':5}},
{multi:true}
);

View File

@@ -1,7 +0,0 @@
// Run after the Veteran Tiger script, not before!
db.users.update(
{'items.pets.Wolf-Veteran':{$exists:false}},
{$set:{'items.pets.Wolf-Veteran':5}},
{multi:true}
);

View File

@@ -1,79 +0,0 @@
/*
* Make sure leaders are existing users
*/
var mongo = require('mongoskin');
var async = require('async');
var dbserver = 'url';
var dbname = 'dbname';
var countGroups = 0;
var countUsers = 0;
var db = mongo.db(dbserver + '/' + dbname + '?auto_reconnect');
var dbUsers = db.collection('users');
var dbGroups = db.collection('groups');
console.log('Begins work on db');
function findGroups(gt){
var query = {};
if(gt) query._id = {$gt: gt};
console.log(query)
dbGroups.find(query, {
fields: {_id: 1, members: 1, leader: 1},
limit: 10000,
sort: {
_id: 1
}
}).toArray(function(err, groups){
if(err) throw err;
var lastGroup = null;
if(groups.length === 10000){
lastGroup = groups[groups.length - 1];
}
async.eachLimit(groups, 30, function(group, cb1){
countGroups++;
console.log('Group: ', countGroups, group._id);
var members = group.members;
dbUsers.findOne({_id: group.leader}, {fields: {_id: 1}}, function(err, user){
if(err) return cb1(err);
// If leader has deleted account
if(!user && (group._id !== 'habitrpg') && members && members[0]) {
dbGroups.update({
_id: group._id
}, {
$set: {
// Set first user as new leader
leader: members[0]
}
}, {
multi: false
}, function(err, res){
if(err) return cb1(err);
console.log('Updated: ', res);
return cb1();
});
}else{
return cb1();
}
});
}, function(err){
if(err) throw err;
if(lastGroup && lastGroup._id){
findGroups(lastGroup._id);
}
});
});
};
findGroups();

View File

@@ -1,87 +0,0 @@
/*
* Remove deleted accounts from groups
*/
var mongo = require('mongoskin');
var async = require('async');
var dbserver = 'url';
var dbname = 'dbname';
var countGroups = 0;
var countUsers = 0;
var db = mongo.db(dbserver + '/' + dbname + '?auto_reconnect');
var dbUsers = db.collection('users');
var dbGroups = db.collection('groups');
console.log('Begins work on db');
function findGroups(gt){
var query = {};
if(gt) query._id = {$gt: gt};
console.log(query)
dbGroups.find(query, {
fields: {_id: 1, members: 1},
limit: 10000,
sort: {
_id: 1
}
}).toArray(function(err, groups){
if(err) throw err;
var lastGroup = null;
if(groups.length === 10000){
lastGroup = groups[groups.length - 1];
}
async.eachLimit(groups, 3, function(group, cb1){
countGroups++;
console.log('Group: ', countGroups, group._id);
var members = group.members;
// Remove users who deleted their account
async.eachLimit(members, 15, function(member, cb2){
dbUsers.findOne({_id: member}, {fields: {_id: 1}}, function(err, user){
if(err) return cb2(err);
if(!user){
countUsers++;
console.log('User removed n. ', countUsers, 'user id ', member, 'group id ', group._id);
dbGroups.update({
_id: group._id
}, {
$pull: {members: member},
$inc: {memberCount: -1}
}, {
multi: false
}, function(err, res){
if(err) return cb2(err);
console.log('Updated: ', res);
return cb2();
});
}else{
cb2();
}
});
}, function(err){
if(err) return cb1(err);
cb1();
});
}, function(err){
if(err) throw err;
if(lastGroup && lastGroup._id){
findGroups(lastGroup._id);
}
});
});
};
findGroups();

View File

@@ -1,21 +0,0 @@
/*
* Remove empty private groups
*/
var mongo = require('mongoskin');
var dbserver = 'url';
var dbname = 'name';
var db = mongo.db(dbserver + '/' + dbname + '?auto_reconnect');
var dbGroups = db.collection('groups');
console.log('Begins work on db');
dbGroups.findEach({
memberCount: 0,
}, {_id: 1}, function(err, res){
if(err) throw err;
console.log(res);
});

View File

@@ -1,43 +0,0 @@
/*
* Sync groups with Firebase
*/
var mongo = require('mongoskin');
var Firebase = require('Firebase');
var dbserver = 'mongodb://url';
var dbname = 'db';
var db = mongo.db(dbserver + '/' + dbname + '?auto_reconnect');
var dbGroups = db.collection('groups');
var countGroups = 0;
var firebaseRef = new Firebase('https://' + 'firebase-app' + '.firebaseio.com');
// TODO handle sync errors with firebase?
firebaseRef.authWithCustomToken('firebase-secret', function(err, authData){
if(err) throw new Error('Impossible to authenticate Firebase');
console.log('Firebase connected, begins work on db');
dbGroups.findEach({}, {_id: 1, members: 1}, {batchSize: 100}, function(err, group){
if(err) throw err;
if(group._id !== 'habitrpg') return;
countGroups++;
console.log('Group: ', countGroups);
firebaseRef.child('rooms/' + group._id)
.set({
name: group.name
});
group.members.forEach(function(member){
firebaseRef.child('members/' + group._id + '/' + userId)
.set(true);
firebaseRef.child('users/' + member + '/rooms/' + group._id)
.set(true);
});
});
});

View File

@@ -1,67 +0,0 @@
var migrationName = '20151013_jackolanterns.js';
var authorName = 'Sabe'; // in case script author needs to know when their ...
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
/*
* Award Jack-O'-Lantern mounts to users who already have the pet version, award pet if they don't
*/
var dbserver = 'localhost:27017'; // FOR TEST DATABASE
// var dbserver = 'username:password@ds031379-a0.mongolab.com:31379'; // FOR PRODUCTION DATABASE
var dbname = 'habitrpg';
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/' + dbname + '?auto_reconnect').collection('users');
// specify a query to limit the affected users (empty for all users):
var query = {
};
// specify fields we are interested in to limit retrieved data (empty if we're not reading data):
var fields = {
'items.pets.JackOLantern-Base':1
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
// specify user data to change:
var set = {};
if (user.items.pets['JackOLantern-Base']) {
set = {'migration':migrationName, 'items.mounts.JackOLantern-Base':true};
} else {
set = {'migration':migrationName, 'items.pets.JackOLantern-Base':5};
}
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,63 +0,0 @@
/*
* Migrate email to lowerCase version and add auth.local.lowerCaseUsername email
*/
var mongo = require('mongoskin');
var async = require('async');
var dbserver = 'url';
var dbname = 'dbname';
var countUsers = 0;
var db = mongo.db(dbserver + '/' + dbname + '?auto_reconnect');
var dbUsers = db.collection('users');
console.log('Begins work on db');
function findUsers(gt){
var query = {};
if(gt) query._id = {$gt: gt};
console.log(query)
dbUsers.find(query, {
fields: {_id: 1, auth: 1},
limit: 10000,
sort: {
_id: 1
}
}).toArray(function(err, users){
if(err) throw err;
var lastUser = null;
if(users.length === 10000){
lastUser = users[users.length - 1];
}
async.eachLimit(users, 20, function(user, cb){
countUsers++;
console.log('User: ', countUsers, user._id);
var update = {
$set: {}
};
if(user.auth && user.auth.local) {
if(user.auth.local.username) update['$set']['auth.local.lowerCaseUsername'] = user.auth.local.username.toLowerCase();
if(user.auth.local.email) update['$set']['auth.local.email'] = user.auth.local.email.toLowerCase();
}
dbUsers.update({
_id: user._id
}, update, cb);
}, function(err){
if(err) throw err;
if(lastUser && lastUser._id){
findUsers(lastUser._id);
}
});
});
};
findUsers();

View File

@@ -1,63 +0,0 @@
var migrationName = '20151105_tutorial_flags_v1';
var authorName = 'Alys'; // in case script author needs to know when their ...
var authorUuid = 'd904bd62-da08-416b-a816-ba797c9ee265'; //... own data is done
/*
* set flags.tutorial.ios and flags.tutorial.main flags to true in preparation
* for the release of a new iOS tutorial
*
*/
// var dbserver = 'localhost:27017' // FOR TEST DATABASE
var dbserver = 'alys:@ds031379-a0.mongolab.com:31379' // FOR PRODUCTION DATABASE
var dbname = 'habitrpg';
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/' + dbname + '?auto_reconnect').collection('users');
var fields = {
};
var query = {
'auth.timestamps.loggedin':{$gt:new Date('2015-10-20')}
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
// var set = {'migration':migrationName, 'flags.tutorial.ios':true, 'flags.tutorial.main':true };
var set = {'migration':migrationName, 'flags.tutorial.ios':{} };
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,102 +0,0 @@
var migrationName = '20151116_costume_contest.js';
var authorName = 'Sabe'; // in case script author needs to know when their ...
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
/*
* Award Costume Contest achievement to 2015 winners
*/
var dbserver = 'localhost:27017'; // FOR TEST DATABASE
// var dbserver = 'username:password@ds031379-a0.mongolab.com:31379'; // FOR PRODUCTION DATABASE
var dbname = 'habitrpg';
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/' + dbname + '?auto_reconnect').collection('users');
// specify a query to limit the affected users (empty for all users):
var query = {
_id: {
$in: [
'e411dab3-a4ca-414d-bdbd-b6940b3bdeb3',
'35ced5cc-c33a-45c8-93dc-16000ee66fde',
'ab3f0549-7247-4fd5-975b-efcff98c79c3',
'b1261fd2-eb25-46b4-97a9-ae7a0dc8a131',
'1f27893f-3808-4724-9725-f46dab93faca',
'216a0c23-6afd-4a5e-b434-d386a10862a2',
'2d6ef231-50b4-4a22-90e7-45eb97147a2c',
'98b8cf4f-89bd-4b0a-988d-02629a217232',
'c5183dfa-c741-43ce-935e-c6d89b41a030',
'262a7afb-6b57-4d81-88e0-80d2e9f6cbdc',
'33991e0a-de55-4986-ac81-af78491a84de',
'7adf6ada-3c05-4054-b5df-fa7d49d3b9eb',
'235a1cbd-48c5-41b1-afb4-59d2f8645c57',
'b7617a61-188b-4332-bf4d-32268fa77f2b',
'672c1ce0-9f47-44f0-a3f3-8cc3c6c5a9cb',
'd0a3217a-7b92-48d6-b39a-b1b1be96702e',
'5ef910dc-1d22-47d9-aa38-a60132c60679',
'370a44c8-e94a-4a2c-91f2-33166926db1f',
'1b0b3ef3-28bd-4046-a49b-e1c83e281baf',
'75b93321-66b9-49bd-9076-052499c1d2bf',
'd97516e4-81d0-4f60-bf03-95f7330925ab',
'3e13cc79-de38-420d-822e-9e9da309ce6b',
'0e471dc1-ecb0-4388-a891-b873a237d2cf',
'ca3da398-4f73-4304-b838-af3669ed4cbb',
'44cdf105-8bda-4197-9d1a-1bcb83b4dc84',
'5419830c-b837-4573-ae82-4718ab95b7f1',
'ac6fbe37-b0dc-40d8-ba14-77dde66fbfa8',
'8789ba18-a498-46b9-b367-3b929a0acb94',
'52fce1a9-9b0a-4e26-95dc-adc12f52e752',
'21bf71ac-399c-470b-abe0-cc49a03b6a8b',
'f1618ce2-552e-4f23-bc76-e73d63ebedd0',
'4cc0c749-d943-4090-b529-42bc665b7244',
'e259682e-cb5c-4d94-b472-ceedc66d7484',
'fa197a4b-e065-4551-803a-c8a5b9970f9d'
]
}
};
// specify fields we are interested in to limit retrieved data (empty if we're not reading data):
var fields = {
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
// specify user data to change:
var set = {'migration':migrationName};
var inc = {'achievements.costumeContests':1};
dbUsers.update({_id:user._id}, {$set:set});
dbUsers.update({_id:user._id}, {$inc:inc});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,64 +0,0 @@
var migrationName = '20151116_costume_contest_to_number.js';
var authorName = 'Sabe'; // in case script author needs to know when their ...
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
/*
* Change Costume Contest achievement from Boolean to Number, so people can win repeatedly
*/
var dbserver = 'localhost:27017'; // FOR TEST DATABASE
// var dbserver = 'username:password@ds031379-a0.mongolab.com:31379'; // FOR PRODUCTION DATABASE
var dbname = 'habitrpg';
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/' + dbname + '?auto_reconnect').collection('users');
// specify a query to limit the affected users (empty for all users):
var query = {
'achievements.costumeContest':true
};
// specify fields we are interested in to limit retrieved data (empty if we're not reading data):
var fields = {
'achievements.costumeContest':1
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
// specify user data to change:
var set = {'achievements.costumeContests':1};
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

View File

@@ -1,71 +0,0 @@
var migrationName = '20151125_turkey_ladder.js';
var authorName = 'Sabe'; // in case script author needs to know when their ...
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
/*
* Award Gilded Turkey pet to Turkey mount owners, Turkey Mount if they only have Turkey Pet,
* and Turkey Pet otherwise
*/
var dbserver = 'localhost:27017'; // FOR TEST DATABASE
// var dbserver = 'username:password@ds031379-a0.mongolab.com:31379'; // FOR PRODUCTION DATABASE
var dbname = 'habitrpg';
var mongo = require('mongoskin');
var _ = require('lodash');
var dbUsers = mongo.db(dbserver + '/' + dbname + '?auto_reconnect').collection('users');
// specify a query to limit the affected users (empty for all users):
var query = {
};
// specify fields we are interested in to limit retrieved data (empty if we're not reading data):
var fields = {
'items.pets.Turkey-Base': 1,
'items.mounts.Turkey-Base': 1
};
console.warn('Updating users...');
var progressCount = 1000;
var count = 0;
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
if (err) { return exiting(1, 'ERROR! ' + err); }
if (!user) {
console.warn('All appropriate users found and modified.');
return displayData();
}
count++;
// specify user data to change:
var set = {};
if (user.items.mounts['Turkey-Base']) {
set = {'migration':migrationName, 'items.pets.Turkey-Gilded':5};
} else if (user.items.pets['Turkey-Base']) {
set = {'migration':migrationName, 'items.mounts.Turkey-Base':true};
} else {
set = {'migration':migrationName, 'items.pets.Turkey-Base':5};
}
dbUsers.update({_id:user._id}, {$set:set});
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
if (user._id == authorUuid) console.warn(authorName + ' processed');
});
function displayData() {
console.warn('\n' + count + ' users processed\n');
return exiting(0);
}
function exiting(code, msg) {
code = code || 0; // 0 = success
if (code && !msg) { msg = 'ERROR!'; }
if (msg) {
if (code) { console.error(msg); }
else { console.log( msg); }
}
process.exit(code);
}

Some files were not shown because too many files have changed in this diff Show More