mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
commit39427a75dbAuthor: Matteo Pagliazzi <matteopagliazzi@gmail.com> Date: Wed Jun 17 17:33:30 2020 +0200 To-Dos -> To Do's (#12290) * To-Dos -> To Do's * To-Do -> To Do commitd7854f3809Author: jacobguinther <jacobgguinther@gmail.com> Date: Tue Jun 16 13:31:32 2020 -0600 Remove party banner when below tablet size (fixes 10827) (#12289) * Remove party banner when below tablet size - Use Bootstrap breakpoints to remove party banner @ 768px - Remove old media query that removed party button on small screens * Make progress bars smaller @ 992px - Makes room for party piece commit0d8df9f1a2Author: Sabe Jones <sabrecat@gmail.com> Date: Tue Jun 16 13:42:28 2020 -0500 More Armoire content refactoring (#12288) * refactor(armoire): still more defaultification * fix(refactor): look at array for index, not object * refactor(armoire): skip stat processing if item already has notes commit679c8f725bMerge:274a5f310eed0cffce76Author: Melior <admin@habitica.com> Date: Tue Jun 16 20:39:36 2020 +0200 Merge branch 'origin/develop' into Weblate. commited0cffce76Author: Melior <admin@habitica.com> Date: Tue Jun 16 20:39:25 2020 +0200 Translated using Weblate (Dutch) Currently translated at 94.6% (2000 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Japanese) Currently translated at 96.4% (677 of 702 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ja/ Translated using Weblate (Dutch) Currently translated at 94.6% (2000 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Japanese) Currently translated at 97.5% (81 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/ja/ Translated using Weblate (Vietnamese) Currently translated at 100.0% (536 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (213 of 213 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2113 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (702 of 702 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (359 of 359 strings) Translation: Habitica/Content Translate-URL: https://translate.habitica.com/projects/habitica/content/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (536 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/pt_BR/ Translated using Weblate (Vietnamese) Currently translated at 97.0% (520 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Vietnamese) Currently translated at 94.0% (504 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Japanese) Currently translated at 100.0% (140 of 140 strings) Translation: Habitica/Quests Translate-URL: https://translate.habitica.com/projects/habitica/quests/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (173 of 173 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/ja/ Translated using Weblate (Russian) Currently translated at 98.2% (690 of 702 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ru/ Translated using Weblate (Japanese) Currently translated at 95.4% (670 of 702 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (359 of 359 strings) Translation: Habitica/Content Translate-URL: https://translate.habitica.com/projects/habitica/content/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (213 of 213 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (173 of 173 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (536 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Japanese) Currently translated at 95.1% (79 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/ja/ Translated using Weblate (Vietnamese) Currently translated at 92.3% (495 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Romanian) Currently translated at 100.0% (213 of 213 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/ro/ Translated using Weblate (Romanian) Currently translated at 100.0% (57 of 57 strings) Translation: Habitica/Spells Translate-URL: https://translate.habitica.com/projects/habitica/spells/ro/ Translated using Weblate (Romanian) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/ro/ Translated using Weblate (Romanian) Currently translated at 100.0% (63 of 63 strings) Translation: Habitica/Defaulttasks Translate-URL: https://translate.habitica.com/projects/habitica/defaulttasks/ro/ Translated using Weblate (Romanian) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/ro/ Translated using Weblate (Russian) Currently translated at 100.0% (143 of 143 strings) Translation: Habitica/Pets Translate-URL: https://translate.habitica.com/projects/habitica/pets/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (359 of 359 strings) Translation: Habitica/Content Translate-URL: https://translate.habitica.com/projects/habitica/content/ru/ Translated using Weblate (Japanese) Currently translated at 99.6% (534 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Russian) Currently translated at 99.5% (210 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/ru/ Translated using Weblate (Vietnamese) Currently translated at 90.8% (487 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Japanese) Currently translated at 98.8% (530 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (536 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/zh_Hans/ Translated using Weblate (Vietnamese) Currently translated at 83.2% (446 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Vietnamese) Currently translated at 100.0% (213 of 213 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/vi/ Translated using Weblate (Dutch) Currently translated at 94.4% (1996 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Japanese) Currently translated at 95.4% (670 of 702 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (359 of 359 strings) Translation: Habitica/Content Translate-URL: https://translate.habitica.com/projects/habitica/content/ja/ Translated using Weblate (Japanese) Currently translated at 98.3% (527 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ commit274a5f310eMerge:d961b8aaafbceccd55bfAuthor: Sabe Jones <sabrecat@gmail.com> Date: Tue Jun 16 13:36:42 2020 -0500 Merge branch 'release' into develop commitd961b8aaafAuthor: Frank Maximus <frank@healingjourneyman.com> Date: Tue Jun 16 19:06:14 2020 +0200 #9498: Hide Wolf-Veteran and LionCub-Ethereal (#12292) commit430ff64875Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 15:12:39 2020 +0200 build(deps): bump @vue/cli-plugin-eslint in /website/client (#12301) Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 4.4.1 to 4.4.4. - [Release notes](https://github.com/vuejs/vue-cli/releases) - [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-cli/commits/v4.4.4/packages/@vue/cli-plugin-eslint) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commitac99c6c3c5Merge:1be03d741aa43f410031Author: Matteo Pagliazzi <matteopagliazzi@gmail.com> Date: Tue Jun 16 15:04:30 2020 +0200 build(deps): bump @vue/cli-service in /website/client (#12305) Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.4.1 to 4.4.4. - [Release notes](https://github.com/vuejs/vue-cli/releases) - [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-cli/commits/v4.4.4/packages/@vue/cli-service) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commit1be03d741aAuthor: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 15:04:13 2020 +0200 build(deps): bump @vue/cli-plugin-router in /website/client (#12304) Bumps [@vue/cli-plugin-router](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-router) from 4.4.1 to 4.4.4. - [Release notes](https://github.com/vuejs/vue-cli/releases) - [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-cli/commits/v4.4.4/packages/@vue/cli-plugin-router) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commita43f410031Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 13:00:43 2020 +0000 build(deps): bump @vue/cli-service in /website/client Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 4.4.1 to 4.4.4. - [Release notes](https://github.com/vuejs/vue-cli/releases) - [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-cli/commits/v4.4.4/packages/@vue/cli-service) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> commitb84395b17dAuthor: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 14:58:02 2020 +0200 build(deps): bump vue-router from 3.3.2 to 3.3.4 in /website/client (#12306) Bumps [vue-router](https://github.com/vuejs/vue-router) from 3.3.2 to 3.3.4. - [Release notes](https://github.com/vuejs/vue-router/releases) - [Changelog](https://github.com/vuejs/vue-router/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-router/compare/v3.3.2...v3.3.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commitd5d4afe613Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 14:57:43 2020 +0200 build(deps): bump @vue/cli-plugin-unit-mocha in /website/client (#12303) Bumps [@vue/cli-plugin-unit-mocha](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-unit-mocha) from 4.4.1 to 4.4.4. - [Release notes](https://github.com/vuejs/vue-cli/releases) - [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-cli/commits/v4.4.4/packages/@vue/cli-plugin-unit-mocha) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commitdef62d5716Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 14:57:37 2020 +0200 build(deps): bump habitica-markdown in /website/client (#12302) Bumps [habitica-markdown](https://github.com/HabitRPG/habitica-markdown) from 2.0.0 to 2.0.2. - [Release notes](https://github.com/HabitRPG/habitica-markdown/releases) - [Commits](https://github.com/HabitRPG/habitica-markdown/commits/v2.0.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commit5846898592Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 14:57:25 2020 +0200 build(deps): bump @vue/cli-plugin-babel in /website/client (#12299) Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 4.4.1 to 4.4.4. - [Release notes](https://github.com/vuejs/vue-cli/releases) - [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-cli/commits/v4.4.4/packages/@vue/cli-plugin-babel) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commit524aac4d95Author: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue Jun 16 14:57:11 2020 +0200 build(deps): bump helmet from 3.22.0 to 3.23.0 (#12297) Bumps [helmet](https://github.com/helmetjs/helmet) from 3.22.0 to 3.23.0. - [Release notes](https://github.com/helmetjs/helmet/releases) - [Changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md) - [Commits](https://github.com/helmetjs/helmet/compare/v3.22.0...v3.23.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> commit92dc332ab9Merge:7902db2edcbcd3e2851cAuthor: Melior <admin@habitica.com> Date: Fri Jun 12 00:02:52 2020 +0200 Merge branch 'origin/develop' into Weblate. commit7902db2edcMerge:f3ea5f0b62e6b65871e7Author: Sabe Jones <sabrecat@gmail.com> Date: Thu Jun 11 16:38:48 2020 -0500 Merge branch 'release' into develop commitf3ea5f0b62Author: negue <negue@users.noreply.github.com> Date: Thu Jun 11 21:14:33 2020 +0200 Tasks Redesign: Colors, Title, Notes, Habit Controls, Button Style (#12274) * extract color changes + habit-controls out of #12142 * extract title / notes changes from #12142 * extracted delete btn + style fixes of #12142 * fix taskModal footer + advancedSettings * extracted the button style changes from #12142 * remove un-used method commitbcd3e2851cAuthor: Melior <admin@habitica.com> Date: Thu Jun 11 20:46:57 2020 +0200 Translated using Weblate (Vietnamese) Currently translated at 100.0% (83 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/vi/ Translated using Weblate (Latin) Currently translated at 85.5% (71 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/la/ Translated using Weblate (Russian) Currently translated at 97.3% (2056 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/ru/ Translated using Weblate (German) Currently translated at 99.8% (2110 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/de/ Translated using Weblate (Russian) Currently translated at 99.4% (533 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ru/ Translated using Weblate (Japanese) Currently translated at 97.9% (525 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (German) Currently translated at 99.6% (534 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/de/ Translated using Weblate (Catalan) Currently translated at 100.0% (4 of 4 strings) Translation: Habitica/Noscript Translate-URL: https://translate.habitica.com/projects/habitica/noscript/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (12 of 12 strings) Translation: Habitica/Merch Translate-URL: https://translate.habitica.com/projects/habitica/merch/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (230 of 230 strings) Translation: Habitica/Character Translate-URL: https://translate.habitica.com/projects/habitica/character/ca/ Translated using Weblate (Vietnamese) Currently translated at 80.9% (434 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (Catalan) Currently translated at 100.0% (28 of 28 strings) Translation: Habitica/Rebirth Translate-URL: https://translate.habitica.com/projects/habitica/rebirth/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (31 of 31 strings) Translation: Habitica/Maintenance Translate-URL: https://translate.habitica.com/projects/habitica/maintenance/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (27 of 27 strings) Translation: Habitica/Loginincentives Translate-URL: https://translate.habitica.com/projects/habitica/loginincentives/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (6 of 6 strings) Translation: Habitica/Inventory Translate-URL: https://translate.habitica.com/projects/habitica/inventory/ca/ Translated using Weblate (Catalan) Currently translated at 82.3% (1740 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (63 of 63 strings) Translation: Habitica/Defaulttasks Translate-URL: https://translate.habitica.com/projects/habitica/defaulttasks/ca/ Translated using Weblate (Catalan) Currently translated at 100.0% (15 of 15 strings) Translation: Habitica/Death Translate-URL: https://translate.habitica.com/projects/habitica/death/ca/ Translated using Weblate (Catalan) Currently translated at 99.1% (123 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/ca/ Translated using Weblate (Portuguese) Currently translated at 83.0% (1754 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/pt/ Translated using Weblate (Portuguese) Currently translated at 83.0% (1754 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/pt/ Translated using Weblate (French) Currently translated at 100.0% (2113 of 2113 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/fr/ Translated using Weblate (Russian) Currently translated at 98.8% (530 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ru/ Translated using Weblate (Japanese) Currently translated at 97.5% (523 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (French) Currently translated at 100.0% (536 of 536 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/fr/ Translated using Weblate (Spanish) Currently translated at 94.6% (53 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/es/ Translated using Weblate (Spanish) Currently translated at 99.1% (123 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/es/ Translated using Weblate (Spanish) Currently translated at 97.1% (205 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/es/ commit5957930709Author: Frank Maximus <frank@healingjourneyman.com> Date: Wed Jun 10 15:01:07 2020 +0200 Display descriptive error when mongod isn't running (#12196) Add test:prepare:mongo task to check is mongod is running. Fixes: #12101 commit1df4e687f1Author: Matteo Pagliazzi <matteopagliazzi@gmail.com> Date: Wed Jun 10 14:57:57 2020 +0200 fix(mentions): do not fill empty mentions with following username, fixes #12272 commit3063a38d60Merge:4b489fe4ca51d20ef7e8Author: Sabe Jones <sabrecat@gmail.com> Date: Tue Jun 9 15:28:16 2020 -0500 Merge branch 'release' into develop commit4b489fe4caMerge:afd50ddc2d074004ec75Author: Melior <admin@habitica.com> Date: Tue Jun 9 21:21:14 2020 +0200 Merge branch 'origin/develop' into Weblate. commit074004ec75Author: Melior <admin@habitica.com> Date: Tue Jun 9 21:21:04 2020 +0200 Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (140 of 140 strings) Translation: Habitica/Quests Translate-URL: https://translate.habitica.com/projects/habitica/quests/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (173 of 173 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (493 of 493 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/pt_BR/ Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/pt_BR/ Translated using Weblate (Japanese) Currently translated at 100.0% (140 of 140 strings) Translation: Habitica/Quests Translate-URL: https://translate.habitica.com/projects/habitica/quests/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (493 of 493 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/ja/ Translated using Weblate (Dutch) Currently translated at 94.6% (1994 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Japanese) Currently translated at 98.2% (520 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Catalan) Currently translated at 92.0% (487 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ca/ Translated using Weblate (Russian) Currently translated at 93.9% (234 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/ru/ Translated using Weblate (Russian) Currently translated at 97.4% (2053 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (522 of 522 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ru/ Translated using Weblate (French) Currently translated at 100.0% (140 of 140 strings) Translation: Habitica/Quests Translate-URL: https://translate.habitica.com/projects/habitica/quests/fr/ Translated using Weblate (French) Currently translated at 100.0% (173 of 173 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/fr/ Translated using Weblate (French) Currently translated at 100.0% (493 of 493 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/fr/ Translated using Weblate (Russian) Currently translated at 99.2% (518 of 522 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ru/ Translated using Weblate (Vietnamese) Currently translated at 80.7% (427 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/vi/ Translated using Weblate (German) Currently translated at 100.0% (140 of 140 strings) Translation: Habitica/Quests Translate-URL: https://translate.habitica.com/projects/habitica/quests/de/ Translated using Weblate (German) Currently translated at 100.0% (173 of 173 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/de/ Translated using Weblate (German) Currently translated at 100.0% (493 of 493 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/de/ commitafd50ddc2dMerge:61ca500013e31ce11052Author: Sabe Jones <sabrecat@gmail.com> Date: Tue Jun 9 14:17:53 2020 -0500 Merge branch 'release' into develop commit61ca500013Merge:9ab79ef225630c848ff5Author: Melior <admin@habitica.com> Date: Mon Jun 8 21:50:11 2020 +0200 Merge branch 'origin/develop' into Weblate. commit630c848ff5Author: Melior <admin@habitica.com> Date: Mon Jun 8 16:37:50 2020 +0200 Translated using Weblate (Vietnamese) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/vi/ Translated using Weblate (Vietnamese) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/vi/ Translated using Weblate (Russian) Currently translated at 93.5% (233 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/ru/ Translated using Weblate (Russian) Currently translated at 97.2% (2049 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/ru/ Translated using Weblate (Dutch) Currently translated at 94.6% (1994 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Japanese) Currently translated at 97.9% (518 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (696 of 696 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/zh_Hans/ Translated using Weblate (Japanese) Currently translated at 97.5% (516 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (German) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/de/ Translated using Weblate (Japanese) Currently translated at 97.1% (514 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Dutch) Currently translated at 94.5% (1992 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (German) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/de/ Translated using Weblate (German) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/de/ Translated using Weblate (Japanese) Currently translated at 96.7% (512 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (German) Currently translated at 99.9% (2105 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/de/ Translated using Weblate (Japanese) Currently translated at 96.4% (510 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (Dutch) Currently translated at 94.4% (1990 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Dutch) Currently translated at 94.4% (1990 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Japanese) Currently translated at 100.0% (492 of 492 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/ja/ Translated using Weblate (Russian) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (57 of 57 strings) Translation: Habitica/Spells Translate-URL: https://translate.habitica.com/projects/habitica/spells/ru/ Translated using Weblate (Russian) Currently translated at 97.6% (168 of 172 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/ru/ Translated using Weblate (Russian) Currently translated at 98.3% (178 of 181 strings) Translation: Habitica/Limited Translate-URL: https://translate.habitica.com/projects/habitica/limited/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (492 of 492 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/ru/ Translated using Weblate (Russian) Currently translated at 96.6% (2037 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/ru/ Translated using Weblate (Russian) Currently translated at 99.6% (297 of 298 strings) Translation: Habitica/Generic Translate-URL: https://translate.habitica.com/projects/habitica/generic/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (328 of 328 strings) Translation: Habitica/Front Translate-URL: https://translate.habitica.com/projects/habitica/front/ru/ Translated using Weblate (Russian) Currently translated at 98.2% (55 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (15 of 15 strings) Translation: Habitica/Death Translate-URL: https://translate.habitica.com/projects/habitica/death/ru/ Translated using Weblate (Russian) Currently translated at 99.1% (690 of 696 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ru/ Translated using Weblate (German) Currently translated at 100.0% (696 of 696 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/de/ Translated using Weblate (Russian) Currently translated at 100.0% (126 of 126 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (70 of 70 strings) Translation: Habitica/Contrib Translate-URL: https://translate.habitica.com/projects/habitica/contrib/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (230 of 230 strings) Translation: Habitica/Character Translate-URL: https://translate.habitica.com/projects/habitica/character/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (134 of 134 strings) Translation: Habitica/Challenge Translate-URL: https://translate.habitica.com/projects/habitica/challenge/ru/ Translated using Weblate (Russian) Currently translated at 99.0% (209 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/ru/ Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/zh_Hant/ Translated using Weblate (Polish) Currently translated at 83.6% (1763 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/pl/ Translated using Weblate (Dutch) Currently translated at 94.3% (1989 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (696 of 696 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/zh_Hans/ Translated using Weblate (Vietnamese) Currently translated at 96.4% (54 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/vi/ Translated using Weblate (Vietnamese) Currently translated at 90.3% (75 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/vi/ Translated using Weblate (Russian) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Tasks Translate-URL: https://translate.habitica.com/projects/habitica/tasks/ru/ Translated using Weblate (Russian) Currently translated at 99.2% (691 of 696 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/ru/ Translated using Weblate (Russian) Currently translated at 100.0% (134 of 134 strings) Translation: Habitica/Challenge Translate-URL: https://translate.habitica.com/projects/habitica/challenge/ru/ Translated using Weblate (Japanese) Currently translated at 100.0% (492 of 492 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/ja/ Translated using Weblate (Dutch) Currently translated at 94.3% (1987 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/zh_Hant/ Translated using Weblate (Dutch) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/nl/ Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/en_GB/ Translated using Weblate (Dutch) Currently translated at 100.0% (181 of 181 strings) Translation: Habitica/Limited Translate-URL: https://translate.habitica.com/projects/habitica/limited/nl/ Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/zh_Hant/ Translated using Weblate (Dutch) Currently translated at 94.2% (1985 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Spanish) Currently translated at 91.4% (1927 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/es/ Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/en_GB/ Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/zh_Hant/ Translated using Weblate (Dutch) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/nl/ Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/en_GB/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (696 of 696 strings) Translation: Habitica/Questscontent Translate-URL: https://translate.habitica.com/projects/habitica/questscontent/zh_Hans/ Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/zh_Hant/ Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/en_GB/ Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/zh_Hant/ Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/en_GB/ Translated using Weblate (Vietnamese) Currently translated at 85.5% (71 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/vi/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (83 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/zh_Hans/ Translated using Weblate (Japanese) Currently translated at 100.0% (172 of 172 strings) Translation: Habitica/Npc Translate-URL: https://translate.habitica.com/projects/habitica/npc/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (328 of 328 strings) Translation: Habitica/Front Translate-URL: https://translate.habitica.com/projects/habitica/front/ja/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/zh_Hans/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/zh_Hans/ Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/zh_Hans/ Translated using Weblate (Chinese (Simplified)) Currently translated at 99.3% (2094 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/zh_Hans/ Translated using Weblate (French) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/fr/ Translated using Weblate (French) Currently translated at 100.0% (2107 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/fr/ Translated using Weblate (French) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/fr/ Translated using Weblate (French) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/fr/ Translated using Weblate (Spanish) Currently translated at 99.7% (357 of 358 strings) Translation: Habitica/Content Translate-URL: https://translate.habitica.com/projects/habitica/content/es/ Translated using Weblate (French) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/fr/ Translated using Weblate (Japanese) Currently translated at 100.0% (249 of 249 strings) Translation: Habitica/Subscriber Translate-URL: https://translate.habitica.com/projects/habitica/subscriber/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (28 of 28 strings) Translation: Habitica/Rebirth Translate-URL: https://translate.habitica.com/projects/habitica/rebirth/ja/ Translated using Weblate (Dutch) Currently translated at 94.1% (1983 of 2107 strings) Translation: Habitica/Gear Translate-URL: https://translate.habitica.com/projects/habitica/gear/nl/ Translated using Weblate (Dutch) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/nl/ Translated using Weblate (Dutch) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/nl/ Translated using Weblate (Japanese) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (78 of 78 strings) Translation: Habitica/Contrib Translate-URL: https://translate.habitica.com/projects/habitica/contrib/ja/ Translated using Weblate (Dutch) Currently translated at 100.0% (83 of 83 strings) Translation: Habitica/Achievements Translate-URL: https://translate.habitica.com/projects/habitica/achievements/nl/ Translated using Weblate (Dutch) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/nl/ Translated using Weblate (Japanese) Currently translated at 100.0% (492 of 492 strings) Translation: Habitica/Groups Translate-URL: https://translate.habitica.com/projects/habitica/groups/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/ja/ Translated using Weblate (Japanese) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/ja/ Translated using Weblate (Japanese) Currently translated at 96.0% (508 of 529 strings) Translation: Habitica/Backgrounds Translate-URL: https://translate.habitica.com/projects/habitica/backgrounds/ja/ Translated using Weblate (German) Currently translated at 100.0% (56 of 56 strings) Translation: Habitica/Faq Translate-URL: https://translate.habitica.com/projects/habitica/faq/de/ Translated using Weblate (German) Currently translated at 100.0% (124 of 124 strings) Translation: Habitica/Communityguidelines Translate-URL: https://translate.habitica.com/projects/habitica/communityguidelines/de/ Translated using Weblate (German) Currently translated at 100.0% (211 of 211 strings) Translation: Habitica/Settings Translate-URL: https://translate.habitica.com/projects/habitica/settings/de/
553 lines
20 KiB
JavaScript
553 lines
20 KiB
JavaScript
import moment from 'moment';
|
|
import _ from 'lodash';
|
|
import cloneDeep from 'lodash/cloneDeep';
|
|
import nconf from 'nconf';
|
|
import { model as User } from '../models/user';
|
|
import common from '../../common';
|
|
import { preenUserHistory } from './preening';
|
|
import sleep from './sleep';
|
|
import { revealMysteryItems } from './payments/subscriptions';
|
|
|
|
const CRON_SAFE_MODE = nconf.get('CRON_SAFE_MODE') === 'true';
|
|
const CRON_SEMI_SAFE_MODE = nconf.get('CRON_SEMI_SAFE_MODE') === 'true';
|
|
const { MAX_INCENTIVES } = common.constants;
|
|
const { shouldDo } = common;
|
|
const { scoreTask } = common.ops;
|
|
const { i18n } = common;
|
|
const { loginIncentives } = common.content;
|
|
// const maxPMs = 200;
|
|
|
|
function setIsDueNextDue (task, user, now) {
|
|
const optionsForShouldDo = cloneDeep(user.preferences.toObject());
|
|
task.isDue = common.shouldDo(now, task, optionsForShouldDo);
|
|
optionsForShouldDo.nextDue = true;
|
|
const nextDue = common.shouldDo(now, task, optionsForShouldDo);
|
|
if (nextDue && nextDue.length > 0) {
|
|
task.nextDue = nextDue;
|
|
}
|
|
}
|
|
|
|
export async function recoverCron (status, locals) {
|
|
const { user } = locals;
|
|
|
|
await sleep(0.3);
|
|
|
|
const reloadedUser = await User.findOne({ _id: user._id }).exec();
|
|
|
|
if (!reloadedUser) {
|
|
throw new Error(`User ${user._id} not found while recovering.`);
|
|
} else if (reloadedUser._cronSignature !== 'NOT_RUNNING') {
|
|
status.times += 1;
|
|
|
|
if (status.times < 5) {
|
|
await recoverCron(status, locals);
|
|
} else {
|
|
throw new Error(`Impossible to recover from cron for user ${user._id}.`);
|
|
}
|
|
} else {
|
|
locals.user = reloadedUser;
|
|
}
|
|
}
|
|
|
|
const CLEAR_BUFFS = {
|
|
str: 0,
|
|
int: 0,
|
|
per: 0,
|
|
con: 0,
|
|
stealth: 0,
|
|
streaks: false,
|
|
};
|
|
|
|
function grantEndOfTheMonthPerks (user, now) {
|
|
// multi-month subscriptions are for multiples of 3 months
|
|
const SUBSCRIPTION_BASIC_BLOCK_LENGTH = 3;
|
|
const { plan } = user.purchased;
|
|
const subscriptionEndDate = moment(plan.dateTerminated).isBefore() ? moment(plan.dateTerminated).startOf('month') : moment(now).startOf('month');
|
|
const dateUpdatedMoment = moment(plan.dateUpdated).startOf('month');
|
|
const elapsedMonths = moment(subscriptionEndDate).diff(dateUpdatedMoment, 'months');
|
|
|
|
if (elapsedMonths > 0) {
|
|
plan.dateUpdated = now;
|
|
// For every month, inc their "consecutive months" counter.
|
|
// Give perks based on consecutive blocks
|
|
// If they already got perks for those blocks (eg, 6mo subscription,
|
|
// subscription gifts, etc) - then dec the offset until it hits 0
|
|
_.defaults(plan.consecutive, {
|
|
count: 0, offset: 0, trinkets: 0, gemCapExtra: 0,
|
|
});
|
|
|
|
// Award mystery items
|
|
revealMysteryItems(user, elapsedMonths);
|
|
|
|
// 1 for one-month recurring or gift subscriptions; later set to 3 for 3-month recurring, etc.
|
|
let planMonthsLength = 1;
|
|
|
|
for (let i = 0; i < elapsedMonths; i += 1) {
|
|
plan.consecutive.count += 1;
|
|
|
|
plan.consecutive.offset -= 1;
|
|
// If offset is now greater than 0, the user is within a period
|
|
// for which they have already been given the consecutive months perks.
|
|
//
|
|
// If offset now equals 0, this is the final month for which
|
|
// the user has already been given the consecutive month perks.
|
|
// We do not give them more perks yet because they might cancel
|
|
// the subscription before the next payment is taken.
|
|
//
|
|
// If offset is now less than 0, the user EITHER has
|
|
// a single-month recurring subscription and MIGHT be due for perks,
|
|
// OR has a multi-month subscription that renewed some time
|
|
// in the previous calendar month and so they are due for a new set of perks
|
|
// (strictly speaking, they should have been given the perks
|
|
// at the time that next payment was taken, but we don't have support for
|
|
// tracking payments like that - giving the perks when offset is < 0 is a workaround).
|
|
|
|
if (plan.consecutive.offset < 0) {
|
|
if (plan.planId) {
|
|
// NB gift subscriptions don't have a planID
|
|
// (which doesn't matter because we don't need to reapply perks
|
|
// for them and by this point they should have expired anyway)
|
|
const planIdRegExp = new RegExp('_([0-9]+)mo'); // e.g., matches 'google_6mo' / 'basic_12mo' and captures '6' / '12'
|
|
const match = plan.planId.match(planIdRegExp);
|
|
if (match !== null && match[0] !== null) {
|
|
// 3 for 3-month recurring subscription, etc
|
|
planMonthsLength = match[1]; // eslint-disable-line prefer-destructuring
|
|
}
|
|
}
|
|
|
|
// every 3 months you get one set of perks - this variable records how many sets you need
|
|
let perkAmountNeeded = 0;
|
|
if (planMonthsLength === 1) {
|
|
// User has a single-month recurring subscription and are due for perks
|
|
// IF they've been subscribed for a multiple of 3 months.
|
|
if (plan.consecutive.count % SUBSCRIPTION_BASIC_BLOCK_LENGTH === 0) { // every 3 months
|
|
perkAmountNeeded = 1;
|
|
}
|
|
plan.consecutive.offset = 0; // allow the same logic to be run next month
|
|
} else {
|
|
// User has a multi-month recurring subscription
|
|
// and it renewed in the previous calendar month.
|
|
|
|
// e.g., for a 6-month subscription, give two sets of perks
|
|
perkAmountNeeded = planMonthsLength / SUBSCRIPTION_BASIC_BLOCK_LENGTH;
|
|
// don't need to check for perks again for this many months
|
|
// (subtract 1 because we should have run this when the payment was taken last month)
|
|
plan.consecutive.offset = planMonthsLength - 1;
|
|
}
|
|
if (perkAmountNeeded > 0) {
|
|
plan.consecutive.trinkets += perkAmountNeeded; // one Hourglass every 3 months
|
|
plan.consecutive.gemCapExtra += 5 * perkAmountNeeded; // 5 extra Gems every 3 months
|
|
// cap it at 50 (hard 25 limit + extra 25)
|
|
if (plan.consecutive.gemCapExtra > 25) plan.consecutive.gemCapExtra = 25;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function removeTerminatedSubscription (user) {
|
|
const { plan } = user.purchased;
|
|
|
|
_.merge(plan, {
|
|
planId: null,
|
|
customerId: null,
|
|
paymentMethod: null,
|
|
});
|
|
|
|
_.merge(plan.consecutive, {
|
|
count: 0,
|
|
offset: 0,
|
|
gemCapExtra: 0,
|
|
});
|
|
|
|
user.markModified('purchased.plan');
|
|
}
|
|
|
|
function resetHabitCounters (user, tasksByType, now, daysMissed) {
|
|
// check if we've passed a day on which we should reset the habit counters, including today
|
|
let resetWeekly = false;
|
|
let resetMonthly = false;
|
|
for (let i = 0; i < daysMissed; i += 1) {
|
|
if (resetWeekly === true && resetMonthly === true) {
|
|
break;
|
|
}
|
|
const thatDay = moment(now)
|
|
.zone(user.preferences.timezoneOffset + user.preferences.dayStart * 60)
|
|
.subtract({ days: i });
|
|
if (thatDay.day() === 1) {
|
|
resetWeekly = true;
|
|
}
|
|
if (thatDay.date() === 1) {
|
|
resetMonthly = true;
|
|
}
|
|
}
|
|
|
|
tasksByType.habits.forEach(task => {
|
|
// reset counters if appropriate
|
|
|
|
let reset = false;
|
|
if (task.frequency === 'daily') {
|
|
reset = true;
|
|
} else if (task.frequency === 'weekly' && resetWeekly === true) {
|
|
reset = true;
|
|
} else if (task.frequency === 'monthly' && resetMonthly === true) {
|
|
reset = true;
|
|
}
|
|
if (reset === true) {
|
|
task.counterUp = 0;
|
|
task.counterDown = 0;
|
|
}
|
|
});
|
|
}
|
|
|
|
function trackCronAnalytics (analytics, user, _progress, options) {
|
|
analytics.track('Cron', {
|
|
category: 'behavior',
|
|
gaLabel: 'Cron Count',
|
|
gaValue: user.flags.cronCount,
|
|
uuid: user._id,
|
|
user,
|
|
resting: user.preferences.sleep,
|
|
cronCount: user.flags.cronCount,
|
|
progressUp: _.min([_progress.up, 900]),
|
|
progressDown: _progress.down,
|
|
headers: options.headers,
|
|
loginIncentives: user.loginIncentives,
|
|
});
|
|
|
|
if (
|
|
user.party && user.party.quest && !user.party.quest.RSVPNeeded
|
|
&& !user.party.quest.completed && user.party.quest.key && !user.preferences.sleep
|
|
) {
|
|
analytics.track('quest participation', {
|
|
category: 'behavior',
|
|
uuid: user._id,
|
|
user,
|
|
questName: user.party.quest.key,
|
|
headers: options.headers,
|
|
});
|
|
}
|
|
}
|
|
|
|
function awardLoginIncentives (user) {
|
|
if (user.loginIncentives > MAX_INCENTIVES) return;
|
|
|
|
// Remove old notifications if they exists
|
|
user.notifications.forEach((notif, index) => {
|
|
if (notif && notif.type === 'LOGIN_INCENTIVE') user.notifications.splice(index, 1);
|
|
});
|
|
|
|
const notificationData = {};
|
|
notificationData.message = i18n.t('checkinEarned', user.preferences.language);
|
|
|
|
const loginIncentive = loginIncentives[user.loginIncentives];
|
|
|
|
if (loginIncentive.rewardKey) {
|
|
loginIncentive.assignReward(user);
|
|
notificationData.reward = loginIncentive.reward;
|
|
notificationData.rewardText = '';
|
|
|
|
// @TODO: Abstract this logic and share it across the server and client
|
|
let count = 0;
|
|
for (const reward of loginIncentive.reward) {
|
|
if (reward.text) {
|
|
notificationData.rewardText += reward.text(user.preferences.language);
|
|
if (reward.key === 'RoyalPurple') {
|
|
notificationData.rewardText = i18n.t('potion', { potionType: notificationData.rewardText }, user.preferences.language);
|
|
}
|
|
} else if (loginIncentive.rewardKey[0] === 'background_blue') {
|
|
notificationData.rewardText = i18n.t('incentiveBackgrounds', user.preferences.language);
|
|
}
|
|
|
|
if (loginIncentive.reward.length > 0 && count < loginIncentive.reward.length - 1) notificationData.rewardText += ', ';
|
|
|
|
count += 1;
|
|
}
|
|
|
|
// Overwrite notificationData.rewardText if rewardName was explicitly declared
|
|
if (loginIncentive.rewardName) {
|
|
notificationData.rewardText = i18n.t(loginIncentive.rewardName, user.preferences.language);
|
|
}
|
|
|
|
notificationData.rewardKey = loginIncentive.rewardKey;
|
|
notificationData.message = i18n.t('unlockedCheckInReward', user.preferences.language);
|
|
}
|
|
|
|
notificationData.nextRewardAt = loginIncentives[user.loginIncentives].nextRewardAt || 0;
|
|
user.addNotification('LOGIN_INCENTIVE', notificationData);
|
|
}
|
|
|
|
// Perform various beginning-of-day reset actions.
|
|
export function cron (options = {}) {
|
|
const {
|
|
user, tasksByType, analytics, now = new Date(), daysMissed, timezoneOffsetFromUserPrefs,
|
|
} = options;
|
|
let _progress = { down: 0, up: 0, collectedItems: 0 };
|
|
|
|
// Record pre-cron values of HP and MP to show notifications later
|
|
const beforeCronStats = _.pick(user.stats, ['hp', 'mp']);
|
|
|
|
user.preferences.timezoneOffsetAtLastCron = timezoneOffsetFromUserPrefs;
|
|
// User is only allowed a certain number of drops a day. This resets the count.
|
|
if (user.items.lastDrop.count > 0) user.items.lastDrop.count = 0;
|
|
|
|
// "Perfect Day" achievement for perfect days
|
|
let perfect = true;
|
|
|
|
// Reset Gold-to-Gems cap if it's the start of the month
|
|
const dateUpdatedFalse = !moment(user.purchased.plan.dateUpdated).startOf('month').isSame(moment().startOf('month')) || !user.purchased.plan.dateUpdated;
|
|
|
|
if (user.purchased && user.purchased.plan && dateUpdatedFalse) {
|
|
user.purchased.plan.gemsBought = 0;
|
|
if (!user.purchased.plan.dateUpdated) user.purchased.plan.dateUpdated = moment();
|
|
}
|
|
|
|
if (user.isSubscribed()) {
|
|
grantEndOfTheMonthPerks(user, now);
|
|
}
|
|
|
|
const { plan } = user.purchased;
|
|
const userHasTerminatedSubscription = plan.dateTerminated
|
|
&& moment(plan.dateTerminated).isBefore(new Date());
|
|
if (!CRON_SAFE_MODE && userHasTerminatedSubscription) removeTerminatedSubscription(user);
|
|
|
|
// Login Incentives
|
|
user.loginIncentives += 1;
|
|
awardLoginIncentives(user);
|
|
|
|
const multiDaysCountAsOneDay = true;
|
|
// If the user does not log in for two or more days,
|
|
// cron (mostly) acts as if it were only one day.
|
|
// When site-wide difficulty settings are introduced, this can be a user preference option.
|
|
|
|
// Tally each task
|
|
let todoTally = 0;
|
|
|
|
// make uncompleted To Do's redder (further incentive to complete them)
|
|
tasksByType.todos.forEach(task => {
|
|
if (
|
|
task.completed
|
|
|| (task.group.assignedDate
|
|
&& moment(task.group.assignedDate).isAfter(user.auth.timestamps.updated))
|
|
) return;
|
|
scoreTask({
|
|
task,
|
|
user,
|
|
direction: 'down',
|
|
cron: true,
|
|
times: multiDaysCountAsOneDay ? 1 : daysMissed,
|
|
});
|
|
|
|
todoTally += task.value;
|
|
});
|
|
|
|
// For incomplete Dailys, add value (further incentive),
|
|
// deduct health, keep records for later decreasing the nightly mana gain.
|
|
// The negative effects are not done when resting in the inn.
|
|
let dailyChecked = 0; // how many dailies were checked?
|
|
let dailyDueUnchecked = 0; // how many dailies were un-checked?
|
|
let atLeastOneDailyDue = false; // were any dailies due?
|
|
if (!user.party.quest.progress.down) user.party.quest.progress.down = 0;
|
|
|
|
tasksByType.dailys.forEach(task => {
|
|
if (
|
|
task.group.assignedDate
|
|
&& moment(task.group.assignedDate).isAfter(user.auth.timestamps.updated)
|
|
) return;
|
|
const { completed } = task;
|
|
// Deduct points for missed Daily tasks
|
|
let EvadeTask = 0;
|
|
let scheduleMisses = daysMissed;
|
|
|
|
if (completed) {
|
|
dailyChecked += 1;
|
|
if (!atLeastOneDailyDue) { // only bother checking until the first thing is found
|
|
const thatDay = moment(now).subtract({ days: daysMissed });
|
|
atLeastOneDailyDue = shouldDo(thatDay.toDate(), task, user.preferences);
|
|
}
|
|
} else {
|
|
// dailys repeat, so need to calculate how many they've missed according to their own schedule
|
|
scheduleMisses = 0;
|
|
|
|
for (let i = 0; i < daysMissed; i += 1) {
|
|
const thatDay = moment(now).subtract({ days: i + 1 });
|
|
|
|
if (shouldDo(thatDay.toDate(), task, user.preferences)) {
|
|
atLeastOneDailyDue = true;
|
|
scheduleMisses += 1;
|
|
if (user.stats.buffs.stealth) {
|
|
user.stats.buffs.stealth -= 1;
|
|
EvadeTask += 1;
|
|
}
|
|
}
|
|
if (multiDaysCountAsOneDay) break;
|
|
}
|
|
|
|
if (scheduleMisses > EvadeTask) {
|
|
// The user did not complete this due Daily
|
|
// (but no penalty if cron is running in safe mode).
|
|
if (CRON_SAFE_MODE) {
|
|
dailyChecked += 1; // allows full allotment of mp to be gained
|
|
} else {
|
|
perfect = false;
|
|
|
|
// Partially completed checklists dock fewer mana points
|
|
if (task.checklist && task.checklist.length > 0) {
|
|
const fractionChecked = _.reduce(
|
|
task.checklist,
|
|
(m, i) => m + (i.completed ? 1 : 0),
|
|
0,
|
|
) / task.checklist.length;
|
|
dailyDueUnchecked += 1 - fractionChecked;
|
|
dailyChecked += fractionChecked;
|
|
} else {
|
|
dailyDueUnchecked += 1;
|
|
}
|
|
|
|
if (!user.preferences.sleep) {
|
|
const delta = scoreTask({
|
|
user,
|
|
task,
|
|
direction: 'down',
|
|
times: multiDaysCountAsOneDay ? 1 : scheduleMisses - EvadeTask,
|
|
cron: true,
|
|
});
|
|
|
|
if (!CRON_SEMI_SAFE_MODE) {
|
|
// Apply damage from a boss, less damage for Trivial priority (difficulty)
|
|
user.party.quest.progress.down += delta * (task.priority < 1 ? task.priority : 1);
|
|
// NB: Medium and Hard priorities do not increase damage from boss.
|
|
// This was by accident
|
|
// initially, and when we realised, we could not fix it because users are used to
|
|
// their Medium and Hard Dailies doing an Easy amount of damage from boss.
|
|
// Easy is task.priority = 1. Anything < 1 will be Trivial (0.1) or any future
|
|
// setting between Trivial and Easy.
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// add history entry when task was not completed
|
|
task.history.push({
|
|
date: Number(new Date()),
|
|
value: task.value,
|
|
});
|
|
}
|
|
|
|
task.completed = false;
|
|
setIsDueNextDue(task, user, now);
|
|
|
|
if (completed || scheduleMisses > 0) {
|
|
if (task.checklist) {
|
|
task.checklist.forEach(i => { i.completed = false; });
|
|
}
|
|
}
|
|
|
|
if (task.group && task.group.approval && task.group.approval.approved) {
|
|
task.group.approval.approved = false;
|
|
task.group.approval.dateApproved = null;
|
|
task.group.approval.requested = false;
|
|
task.group.approval.requestedDate = null;
|
|
}
|
|
});
|
|
|
|
resetHabitCounters(user, tasksByType, now, daysMissed);
|
|
|
|
tasksByType.habits.forEach(task => {
|
|
// slowly reset value to 0 for "onlies" (Habits with + or - but not both)
|
|
// move singleton Habits towards yellow.
|
|
if (task.up === false || task.down === false) {
|
|
task.value = Math.abs(task.value) < 0.1 ? 0 : task.value /= 2;
|
|
}
|
|
if (task.group && task.group.approval && task.group.approval.approved) {
|
|
task.group.approval.approved = false;
|
|
task.group.approval.dateApproved = null;
|
|
task.group.approval.requested = false;
|
|
task.group.approval.requestedDate = null;
|
|
}
|
|
});
|
|
|
|
// Finished tallying
|
|
user.history.todos.push({ date: now, value: todoTally });
|
|
|
|
// tally experience
|
|
let expTally = user.stats.exp;
|
|
let lvl = 0; // iterator
|
|
while (lvl < user.stats.lvl - 1) {
|
|
lvl += 1;
|
|
expTally += common.tnl(lvl);
|
|
}
|
|
|
|
user.history.exp.push({ date: now, value: expTally });
|
|
|
|
// Remove any remaining completed todos from the list of active todos
|
|
user.tasksOrder.todos = user.tasksOrder.todos
|
|
.filter(taskOrderId => _.some(
|
|
tasksByType.todos,
|
|
taskType => taskType._id === taskOrderId && taskType.completed === false,
|
|
));
|
|
// TODO also adjust tasksOrder arrays to remove deleted tasks of any kind (including rewards), ensure that all existing tasks are in the arrays, no tasks IDs are duplicated -- https://github.com/HabitRPG/habitica/issues/7645
|
|
|
|
// preen user history so that it doesn't become a performance problem
|
|
// also for subscribed users but differently
|
|
preenUserHistory(user, tasksByType);
|
|
|
|
if (perfect && atLeastOneDailyDue) {
|
|
user.achievements.perfect += 1;
|
|
const lvlDiv2 = Math.ceil(common.capByLevel(user.stats.lvl) / 2);
|
|
user.stats.buffs = {
|
|
str: lvlDiv2,
|
|
int: lvlDiv2,
|
|
per: lvlDiv2,
|
|
con: lvlDiv2,
|
|
stealth: 0,
|
|
streaks: false,
|
|
};
|
|
} else {
|
|
user.stats.buffs = _.cloneDeep(CLEAR_BUFFS);
|
|
}
|
|
|
|
common.setDebuffPotionItems(user);
|
|
|
|
// Add 10 MP, or 10% of max MP if that'd be more.
|
|
// Perform this after Perfect Day for maximum benefit
|
|
// Adjust for fraction of dailies completed
|
|
if (!user.preferences.sleep) {
|
|
if (dailyDueUnchecked === 0 && dailyChecked === 0) dailyChecked = 1;
|
|
user.stats.mp += (_.max([10, 0.1 * common.statsComputed(user).maxMP]) * dailyChecked) / (dailyDueUnchecked + dailyChecked); // eslint-disable-line max-len
|
|
if (user.stats.mp > common.statsComputed(user).maxMP) {
|
|
user.stats.mp = common.statsComputed(user).maxMP;
|
|
}
|
|
}
|
|
|
|
// After all is said and done,
|
|
// progress up user's effect on quest, return those values & reset the user's
|
|
if (!user.preferences.sleep) {
|
|
const { progress } = user.party.quest;
|
|
_progress = progress.toObject(); // clone the old progress object
|
|
_.merge(progress, { down: 0, up: 0, collectedItems: 0 });
|
|
}
|
|
|
|
// Send notification for changes in HP and MP.
|
|
// First remove a possible previous cron notification because
|
|
// we don't want to flood the users with many cron notifications at once.
|
|
const oldCronNotif = user.notifications.find((notif, index) => {
|
|
if (notif && notif.type === 'CRON') {
|
|
user.notifications.splice(index, 1);
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
|
|
user.addNotification('CRON', {
|
|
hp: user.stats.hp - beforeCronStats.hp - (oldCronNotif ? oldCronNotif.data.hp : 0),
|
|
mp: user.stats.mp - beforeCronStats.mp - (oldCronNotif ? oldCronNotif.data.mp : 0),
|
|
});
|
|
|
|
// Analytics
|
|
user.flags.cronCount += 1;
|
|
trackCronAnalytics(analytics, user, _progress, options);
|
|
|
|
return _progress;
|
|
}
|