From 980e35880f0f7863edbb15acdccef97cc92d6f7f Mon Sep 17 00:00:00 2001 From: SabreCat Date: Mon, 16 May 2022 15:36:09 -0500 Subject: [PATCH 1/6] fix(login): sanitize redirect --- website/client/package-lock.json | 38 ++++++++--------- website/client/package.json | 1 + .../components/auth/registerLoginReset.vue | 42 +++++-------------- 3 files changed, 29 insertions(+), 52 deletions(-) diff --git a/website/client/package-lock.json b/website/client/package-lock.json index 5d59e78db4..65381191f1 100644 --- a/website/client/package-lock.json +++ b/website/client/package-lock.json @@ -17309,6 +17309,11 @@ "domelementtype": "1" } }, + "dompurify": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.8.tgz", + "integrity": "sha512-eVhaWoVibIzqdGYjwsBWodIQIaXFSB+cKDf4cfxLMsK0xiud6SE+/WCVx/Xw/UwQsa4cS3T2eITcdtmTg2UKcw==" + }, "domutils": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", @@ -18805,13 +18810,8 @@ }, "chownr": { "version": "1.1.1", -<<<<<<< HEAD - "resolved": false, - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==" -======= "bundled": true, "optional": true ->>>>>>> 9af2289773af196ab1de83de6af54c8732805177 }, "code-point-at": { "version": "1.1.0", @@ -18858,13 +18858,8 @@ }, "fs-minipass": { "version": "1.2.5", -<<<<<<< HEAD - "resolved": false, - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", -======= "bundled": true, "optional": true, ->>>>>>> 9af2289773af196ab1de83de6af54c8732805177 "requires": { "minipass": "^2.2.1" } @@ -18974,13 +18969,8 @@ }, "minizlib": { "version": "1.2.1", -<<<<<<< HEAD - "resolved": false, - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", -======= "bundled": true, "optional": true, ->>>>>>> 9af2289773af196ab1de83de6af54c8732805177 "requires": { "minipass": "^2.2.1" } @@ -19207,8 +19197,6 @@ "bundled": true, "optional": true }, -<<<<<<< HEAD -======= "tar": { "version": "4.4.8", "bundled": true, @@ -19223,7 +19211,6 @@ "yallist": "^3.0.2" } }, ->>>>>>> 9af2289773af196ab1de83de6af54c8732805177 "util-deprecate": { "version": "1.0.2", "bundled": true, @@ -29128,6 +29115,7 @@ "version": "npm:vue-loader@16.8.3", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "optional": true, "requires": { "chalk": "^4.1.0", "hash-sum": "^2.0.0", @@ -29138,6 +29126,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "optional": true, "requires": { "color-convert": "^2.0.1" } @@ -29146,6 +29135,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "optional": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -29155,6 +29145,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "optional": true, "requires": { "color-name": "~1.1.4" } @@ -29162,22 +29153,26 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "optional": true }, "emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "optional": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "optional": true }, "loader-utils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", + "optional": true, "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", @@ -29188,6 +29183,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "optional": true, "requires": { "has-flag": "^4.0.0" } diff --git a/website/client/package.json b/website/client/package.json index d9726f15c2..142b217ee8 100644 --- a/website/client/package.json +++ b/website/client/package.json @@ -33,6 +33,7 @@ "bootstrap-vue": "^2.21.2", "chai": "^4.3.6", "core-js": "^3.21.0", + "dompurify": "^2.3.8", "eslint": "^6.8.0", "eslint-config-habitrpg": "^6.2.0", "eslint-plugin-mocha": "^5.3.0", diff --git a/website/client/src/components/auth/registerLoginReset.vue b/website/client/src/components/auth/registerLoginReset.vue index eeecca89b1..7ecb8505b5 100644 --- a/website/client/src/components/auth/registerLoginReset.vue +++ b/website/client/src/components/auth/registerLoginReset.vue @@ -614,6 +614,7 @@ import axios from 'axios'; import hello from 'hellojs'; import debounce from 'lodash/debounce'; import isEmail from 'validator/lib/isEmail'; +import DOMPurify from 'dompurify'; import { buildAppleAuthUrl } from '../../libs/auth'; import { MINIMUM_PASSWORD_LENGTH } from '@/../../common/script/constants'; @@ -754,6 +755,12 @@ export default { } }); }, 500), + sanitizeRedirect (redirect) { + if (!redirect) return '/'; + let sanitizedString = DOMPurify.sanitize(redirect); + if (sanitizedString.slice(0, 1) !== '/') sanitizedString = `/${sanitizedString}`; + return sanitizedString; + }, async register () { // @TODO do not use alert if (!this.email) { @@ -785,19 +792,14 @@ export default { passwordConfirm: this.passwordConfirm, }); - let redirectTo; - - if (this.$route.query.redirectTo) { - redirectTo = this.$route.query.redirectTo; - } else { - redirectTo = '/'; - } + const redirectTo = this.sanitizeRedirect(this.$route.query.redirectTo); // @TODO do not reload entire page // problem is that app.vue created hook should be called again // after user is logged in / just signed up // ALSO it's the only way to make sure language data // is reloaded and correct for the logged in user + // Same situation in login and socialAuth functions window.location.href = redirectTo; }, async login () { @@ -807,19 +809,8 @@ export default { password: this.password, }); - let redirectTo; + const redirectTo = this.sanitizeRedirect(this.$route.query.redirectTo); - if (this.$route.query.redirectTo) { - redirectTo = this.$route.query.redirectTo; - } else { - redirectTo = '/'; - } - - // @TODO do not reload entire page - // problem is that app.vue created hook should be called again - // after user is logged in / just signed up - // ALSO it's the only way to make sure language data - // is reloaded and correct for the logged in user window.location.href = redirectTo; }, // @TODO: Abstract hello in to action or lib @@ -842,19 +833,8 @@ export default { auth, }); - let redirectTo; + const redirectTo = this.sanitizeRedirect(this.$route.query.redirectTo); - if (this.$route.query.redirectTo) { - redirectTo = this.$route.query.redirectTo; - } else { - redirectTo = '/'; - } - - // @TODO do not reload entire page - // problem is that app.vue created hook should be called again - // after user is logged in / just signed up - // ALSO it's the only way to make sure language data - // is reloaded and correct for the logged in user window.location.href = redirectTo; } }, From 5bcfdbe066e8c899f3ecf3fdcdbacc2ecba7f02f Mon Sep 17 00:00:00 2001 From: SabreCat Date: Fri, 20 May 2022 14:29:15 -0500 Subject: [PATCH 2/6] fix(login): catch double-slash exploit --- website/client/src/components/auth/registerLoginReset.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/client/src/components/auth/registerLoginReset.vue b/website/client/src/components/auth/registerLoginReset.vue index 7ecb8505b5..60a08f3b70 100644 --- a/website/client/src/components/auth/registerLoginReset.vue +++ b/website/client/src/components/auth/registerLoginReset.vue @@ -757,8 +757,8 @@ export default { }, 500), sanitizeRedirect (redirect) { if (!redirect) return '/'; - let sanitizedString = DOMPurify.sanitize(redirect); - if (sanitizedString.slice(0, 1) !== '/') sanitizedString = `/${sanitizedString}`; + let sanitizedString = DOMPurify.sanitize(redirect).replace(/\\|\/\/|\./g, ''); + sanitizedString = `/${sanitizedString}`; return sanitizedString; }, async register () { From d726b88a86a5bf9b6c14a60aab9c5ee6363ad151 Mon Sep 17 00:00:00 2001 From: Natalie L <78037386+CuriousMagpie@users.noreply.github.com> Date: Fri, 3 Jun 2022 16:04:27 -0400 Subject: [PATCH 3/6] Content: Beta Groups Testing Achievement (#14014) * content: beta Groups testing achievement * resolving merge conflict --- website/common/locales/en/achievements.json | 5 ++++- website/common/script/content/achievements.js | 5 +++++ website/common/script/libs/achievements.js | 4 ++++ website/server/models/user/schema.js | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/website/common/locales/en/achievements.json b/website/common/locales/en/achievements.json index 7e8bb8f59a..a88747b02c 100644 --- a/website/common/locales/en/achievements.json +++ b/website/common/locales/en/achievements.json @@ -132,5 +132,8 @@ "achievementBirdsOfAFeatherModalText": "You collected all the flying pets!", "achievementReptacularRumble": "Reptacular Rumble", "achievementReptacularRumbleText": "Has hatched all the standard colors of reptile pets: Alligator, Pterodactyl, Snake, Triceratops, Turtle, Tyrannosaurus Rex, and Velociraptor!", - "achievementReptacularRumbleModalText": "You collected all the reptile pets!" + "achievementReptacularRumbleModalText": "You collected all the reptile pets!", + "achievementGroupsBeta2022":"Interactive Beta Tester", + "achievementGroupsBeta2022Text":"You and your group provided invaluable feedback to help Habitica test.", + "achievementGroupsBeta2022ModalText":"You and your groups helped Habitica by testing and providing feedback!" } diff --git a/website/common/script/content/achievements.js b/website/common/script/content/achievements.js index 705dec9f8a..cc7734b8a0 100644 --- a/website/common/script/content/achievements.js +++ b/website/common/script/content/achievements.js @@ -372,6 +372,11 @@ const specialAchievs = { titleKey: 'achievementKickstarter2019', textKey: 'achievementKickstarter2019Text', }, + groupsBeta2022: { + icon: 'achievement-groupsBeta2022', + titleKey: 'achievementGroupsBeta2022', + textKey: 'achievementGroupsBeta2022Text', + }, }; Object.assign(achievementsData, specialAchievs); diff --git a/website/common/script/libs/achievements.js b/website/common/script/libs/achievements.js index 882feddf50..3f7cf1e93f 100644 --- a/website/common/script/libs/achievements.js +++ b/website/common/script/libs/achievements.js @@ -344,6 +344,10 @@ function _getSpecialAchievements (user, language) { _addSimple(result, user, { path: 'kickstarter2019', language }); } + if (user.achievements.groupsBeta2022) { + _addSimple(result, user, { path: 'groupsBeta2022', language }); + } + return result; } diff --git a/website/server/models/user/schema.js b/website/server/models/user/schema.js index b2765a4051..9e9fd4fd5d 100644 --- a/website/server/models/user/schema.js +++ b/website/server/models/user/schema.js @@ -156,6 +156,7 @@ export default new Schema({ hatchedPet: Boolean, fedPet: Boolean, purchasedEquipment: Boolean, + groupsBeta2022: Boolean, }, backer: { From c9671b5319abbe5933deaddee3ff85d81bb3482c Mon Sep 17 00:00:00 2001 From: Emiel Popelier Date: Fri, 3 Jun 2022 22:41:46 +0200 Subject: [PATCH 4/6] Styling Bugfix: 13772 (#13983) --- website/client/src/assets/scss/typography.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/client/src/assets/scss/typography.scss b/website/client/src/assets/scss/typography.scss index f4b3306baf..a15f2b7eae 100644 --- a/website/client/src/assets/scss/typography.scss +++ b/website/client/src/assets/scss/typography.scss @@ -18,8 +18,10 @@ body { // Restore the default styling for a elements without an href attribute // that was changed in bootstrap 4.5.1 a:not([href]), a:not([href]):hover { - color: inherit; - text-decoration: none; + &:not([role=button]) { + color: inherit; + text-decoration: none; + } } a, a:not([href]):not([tabindex]) { From 986ba1b8ba26527609edf1b073a2976ff111d3b4 Mon Sep 17 00:00:00 2001 From: SabreCat Date: Mon, 6 Jun 2022 12:42:35 -0500 Subject: [PATCH 5/6] chore(sprites): compile --- habitica-images | 2 +- .../assets/css/sprites/spritesmith-main.css | 80 +++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/habitica-images b/habitica-images index b9f9a9b6e3..a6f741c997 160000 --- a/habitica-images +++ b/habitica-images @@ -1 +1 @@ -Subproject commit b9f9a9b6e313787b773a2db6f5205a10481c3189 +Subproject commit a6f741c997717d0a11ee7fe14e0b7fd0d8c0f6cb diff --git a/website/client/src/assets/css/sprites/spritesmith-main.css b/website/client/src/assets/css/sprites/spritesmith-main.css index b4ee575052..f153612926 100644 --- a/website/client/src/assets/css/sprites/spritesmith-main.css +++ b/website/client/src/assets/css/sprites/spritesmith-main.css @@ -605,6 +605,11 @@ width: 141px; height: 147px; } +.background_beach_with_dunes { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_beach_with_dunes.png'); + width: 141px; + height: 147px; +} .background_beehive { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_beehive.png'); width: 141px; @@ -1389,6 +1394,11 @@ width: 141px; height: 147px; } +.background_mountain_waterfall { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_mountain_waterfall.png'); + width: 141px; + height: 147px; +} .background_mystical_observatory { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_mystical_observatory.png'); width: 141px; @@ -1559,6 +1569,11 @@ width: 141px; height: 147px; } +.background_sailboat_at_sunset { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_sailboat_at_sunset.png'); + width: 141px; + height: 147px; +} .background_salt_lake { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_salt_lake.png'); width: 141px; @@ -2116,6 +2131,11 @@ width: 68px; height: 68px; } +.icon_background_beach_with_dunes { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_beach_with_dunes.png'); + width: 67px; + height: 69px; +} .icon_background_beehive { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_beehive.png'); width: 68px; @@ -2905,6 +2925,11 @@ width: 68px; height: 68px; } +.icon_background_mountain_waterfall { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_mountain_waterfall.png'); + width: 68px; + height: 68px; +} .icon_background_mystical_observatory { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_mystical_observatory.png'); width: 68px; @@ -3075,6 +3100,11 @@ width: 68px; height: 68px; } +.icon_background_sailboat_at_sunset { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_sailboat_at_sunset.png'); + width: 68px; + height: 68px; +} .icon_background_salt_lake { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_salt_lake.png'); width: 68px; @@ -20415,6 +20445,11 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_blueKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_blueKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_blueLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_blueLongbow.png'); width: 68px; @@ -20515,6 +20550,11 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_greenKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_greenKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_guardiansCrook { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_guardiansCrook.png'); width: 68px; @@ -20630,11 +20670,21 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_orangeKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_orangeKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_paperCutter { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_paperCutter.png'); width: 68px; height: 68px; } +.shop_weapon_armoire_pinkKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_pinkKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_pinkLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_pinkLongbow.png'); width: 68px; @@ -20775,6 +20825,11 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_yellowKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_yellowKite.png'); + width: 68px; + height: 68px; +} .slim_armor_armoire_alchemistsRobe { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/slim_armor_armoire_alchemistsRobe.png'); width: 114px; @@ -21250,6 +21305,11 @@ width: 114px; height: 90px; } +.weapon_armoire_blueKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_blueKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_blueLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_blueLongbow.png'); width: 90px; @@ -21350,6 +21410,11 @@ width: 90px; height: 90px; } +.weapon_armoire_greenKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_greenKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_guardiansCrook { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_guardiansCrook.png'); width: 114px; @@ -21465,11 +21530,21 @@ width: 90px; height: 90px; } +.weapon_armoire_orangeKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_orangeKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_paperCutter { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_paperCutter.png'); width: 114px; height: 90px; } +.weapon_armoire_pinkKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_pinkKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_pinkLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_pinkLongbow.png'); width: 114px; @@ -21610,6 +21685,11 @@ width: 90px; height: 90px; } +.weapon_armoire_yellowKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_yellowKite.png'); + width: 114px; + height: 90px; +} .armor_special_bardRobes { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/armor_special_bardRobes.png'); width: 90px; From 2d1bf74858812d6dabed7a600260d054c64a840a Mon Sep 17 00:00:00 2001 From: Natalie L <78037386+CuriousMagpie@users.noreply.github.com> Date: Mon, 6 Jun 2022 15:55:38 -0400 Subject: [PATCH 6/6] June 2022 Backgrounds and Enchanted Armoire (#14049) --- habitica-images | 2 +- .../assets/css/sprites/spritesmith-main.css | 80 +++++++++++++++++++ website/common/locales/en/backgrounds.json | 8 ++ website/common/locales/en/gear.json | 10 +++ .../script/content/appearance/backgrounds.js | 5 ++ .../script/content/gear/sets/armoire.js | 35 ++++++++ 6 files changed, 139 insertions(+), 1 deletion(-) diff --git a/habitica-images b/habitica-images index b9f9a9b6e3..a6f741c997 160000 --- a/habitica-images +++ b/habitica-images @@ -1 +1 @@ -Subproject commit b9f9a9b6e313787b773a2db6f5205a10481c3189 +Subproject commit a6f741c997717d0a11ee7fe14e0b7fd0d8c0f6cb diff --git a/website/client/src/assets/css/sprites/spritesmith-main.css b/website/client/src/assets/css/sprites/spritesmith-main.css index b4ee575052..f153612926 100644 --- a/website/client/src/assets/css/sprites/spritesmith-main.css +++ b/website/client/src/assets/css/sprites/spritesmith-main.css @@ -605,6 +605,11 @@ width: 141px; height: 147px; } +.background_beach_with_dunes { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_beach_with_dunes.png'); + width: 141px; + height: 147px; +} .background_beehive { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_beehive.png'); width: 141px; @@ -1389,6 +1394,11 @@ width: 141px; height: 147px; } +.background_mountain_waterfall { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_mountain_waterfall.png'); + width: 141px; + height: 147px; +} .background_mystical_observatory { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_mystical_observatory.png'); width: 141px; @@ -1559,6 +1569,11 @@ width: 141px; height: 147px; } +.background_sailboat_at_sunset { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_sailboat_at_sunset.png'); + width: 141px; + height: 147px; +} .background_salt_lake { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_salt_lake.png'); width: 141px; @@ -2116,6 +2131,11 @@ width: 68px; height: 68px; } +.icon_background_beach_with_dunes { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_beach_with_dunes.png'); + width: 67px; + height: 69px; +} .icon_background_beehive { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_beehive.png'); width: 68px; @@ -2905,6 +2925,11 @@ width: 68px; height: 68px; } +.icon_background_mountain_waterfall { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_mountain_waterfall.png'); + width: 68px; + height: 68px; +} .icon_background_mystical_observatory { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_mystical_observatory.png'); width: 68px; @@ -3075,6 +3100,11 @@ width: 68px; height: 68px; } +.icon_background_sailboat_at_sunset { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_sailboat_at_sunset.png'); + width: 68px; + height: 68px; +} .icon_background_salt_lake { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_salt_lake.png'); width: 68px; @@ -20415,6 +20445,11 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_blueKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_blueKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_blueLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_blueLongbow.png'); width: 68px; @@ -20515,6 +20550,11 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_greenKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_greenKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_guardiansCrook { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_guardiansCrook.png'); width: 68px; @@ -20630,11 +20670,21 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_orangeKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_orangeKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_paperCutter { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_paperCutter.png'); width: 68px; height: 68px; } +.shop_weapon_armoire_pinkKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_pinkKite.png'); + width: 68px; + height: 68px; +} .shop_weapon_armoire_pinkLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_pinkLongbow.png'); width: 68px; @@ -20775,6 +20825,11 @@ width: 68px; height: 68px; } +.shop_weapon_armoire_yellowKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_yellowKite.png'); + width: 68px; + height: 68px; +} .slim_armor_armoire_alchemistsRobe { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/slim_armor_armoire_alchemistsRobe.png'); width: 114px; @@ -21250,6 +21305,11 @@ width: 114px; height: 90px; } +.weapon_armoire_blueKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_blueKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_blueLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_blueLongbow.png'); width: 90px; @@ -21350,6 +21410,11 @@ width: 90px; height: 90px; } +.weapon_armoire_greenKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_greenKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_guardiansCrook { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_guardiansCrook.png'); width: 114px; @@ -21465,11 +21530,21 @@ width: 90px; height: 90px; } +.weapon_armoire_orangeKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_orangeKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_paperCutter { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_paperCutter.png'); width: 114px; height: 90px; } +.weapon_armoire_pinkKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_pinkKite.png'); + width: 114px; + height: 90px; +} .weapon_armoire_pinkLongbow { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_pinkLongbow.png'); width: 114px; @@ -21610,6 +21685,11 @@ width: 90px; height: 90px; } +.weapon_armoire_yellowKite { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_yellowKite.png'); + width: 114px; + height: 90px; +} .armor_special_bardRobes { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/armor_special_bardRobes.png'); width: 90px; diff --git a/website/common/locales/en/backgrounds.json b/website/common/locales/en/backgrounds.json index 8218926222..d1d6106dd7 100644 --- a/website/common/locales/en/backgrounds.json +++ b/website/common/locales/en/backgrounds.json @@ -787,6 +787,14 @@ "backgroundEnchantedMusicRoomText": "Enchanted Music Room", "backgroundEnchantedMusicRoomNotes": "Play in an Enchanted Music Room.", + "backgrounds062022": "SET 97: Released June 2022", + "backgroundBeachWithDunesText": "Beach With Dunes", + "backgroundBeachWithDunesNotes": "Explore a beach with dunes.", + "backgroundMountainWaterfallText": "Mountain Waterfall", + "backgroundMountainWaterfallNotes": "Admire a mountain waterfall.", + "backgroundSailboatAtSunsetText": "Sailboat At Sunset", + "backgroundSailboatAtSunsetNotes": "Enjoy the beauty of a sailboat at sunset.", + "timeTravelBackgrounds": "Steampunk Backgrounds", "backgroundAirshipText": "Airship", "backgroundAirshipNotes": "Become a sky sailor on board your very own Airship.", diff --git a/website/common/locales/en/gear.json b/website/common/locales/en/gear.json index 4d49fa003b..52624b7cf1 100644 --- a/website/common/locales/en/gear.json +++ b/website/common/locales/en/gear.json @@ -630,6 +630,16 @@ "weaponArmoireGardenersWateringCanNotes": "You can’t get far without water! Have an infinite supply on hand with this magic, refilling watering can. Increases Intelligence by <%= int %>. Enchanted Armoire: Gardener Set (Item 4 of 4).", "weaponArmoireHuntingHornText": "Hunting Horn", "weaponArmoireHuntingHornNotes": "Twooooo! Twoo! Twoo! Gather your party for an adventure or quest by playing this horn. Increases Strength by <%= str %> and Intelligence by <%= int %>. Enchanted Armoire: Musical Instrument Set 1 (Item 1 of 3)", + "weaponArmoireBlueKiteText":"Blue Kite", + "weaponArmoireBlueKiteNotes":"Sailing high up in the blue, what tricks can you make your kite do? Increases all stats by <%= attrs %> each. Enchanted Armoire: Kite Set (Item 1 of 5)", + "weaponArmoireGreenKiteText":"Green Kite", + "weaponArmoireGreenKiteNotes":"A more stunning kite you’ve never seen, with its shades of yellow and green. Increases all stats by <%= attrs %> each. Enchanted Armoire: Kite Set (Item 2 of 5)", + "weaponArmoireOrangeKiteText":"Orange Kite", + "weaponArmoireOrangeKiteNotes":"With colors like sunrise and sunset, let’s see how high your kite can get! Increases all stats by <%= attrs %> each. Enchanted Armoire: Kite Set (Item 3 of 5)", + "weaponArmoirePinkKiteText":"Pink Kite", + "weaponArmoirePinkKiteNotes":"Diving, twirling, soaring high, your kite stands out against the sky. Increases all stats by <%= attrs %> each. Enchanted Armoire: Kite Set (Item 4 of 5)", + "weaponArmoireYellowKiteText":"Yellow Kite", + "weaponArmoireYellowKiteNotes":"Swooping and swerving to and fro, watch your cheerful kite go. Increases all stats by <%= attrs %> each. Enchanted Armoire: Kite Set (Item 5 of 5)", "armor": "armor", "armorCapitalized": "Armor", diff --git a/website/common/script/content/appearance/backgrounds.js b/website/common/script/content/appearance/backgrounds.js index 20ac40b4b6..54d3a7b570 100644 --- a/website/common/script/content/appearance/backgrounds.js +++ b/website/common/script/content/appearance/backgrounds.js @@ -500,6 +500,11 @@ const backgrounds = { enchanted_music_room: { }, castle_gate: { }, }, + backgrounds062022: { + beach_with_dunes: { }, + mountain_waterfall: { }, + sailboat_at_sunset: { }, + }, timeTravelBackgrounds: { airship: { price: 1, diff --git a/website/common/script/content/gear/sets/armoire.js b/website/common/script/content/gear/sets/armoire.js index 08a92cf612..ff543ad7dd 100644 --- a/website/common/script/content/gear/sets/armoire.js +++ b/website/common/script/content/gear/sets/armoire.js @@ -1475,6 +1475,41 @@ const weapon = { int: 6, set: 'musicalInstrumentOne', }, + blueKite: { + str: 3, + con: 3, + int: 3, + per: 3, + set: 'kite', + }, + greenKite: { + str: 3, + con: 3, + int: 3, + per: 3, + set: 'kite', + }, + orangeKite: { + str: 3, + con: 3, + int: 3, + per: 3, + set: 'kite', + }, + pinkKite: { + str: 3, + con: 3, + int: 3, + per: 3, + set: 'kite', + }, + yellowKite: { + str: 3, + con: 3, + int: 3, + per: 3, + set: 'kite', + }, }; forEach({