From 347038252869dd1f68b5f64a2d8893e5e2ecc05e Mon Sep 17 00:00:00 2001 From: SabreCat Date: Tue, 31 Jan 2023 10:59:53 -0600 Subject: [PATCH 1/8] fix(lint): revert bad lint rule again --- website/client/.eslintrc.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/website/client/.eslintrc.js b/website/client/.eslintrc.js index 56eb1c8668..7dc69cc284 100644 --- a/website/client/.eslintrc.js +++ b/website/client/.eslintrc.js @@ -14,10 +14,6 @@ module.exports = { // TODO find a way to let eslint understand webpack aliases 'import/no-unresolved': 'off', 'import/extensions': 'off', - 'vue/component-tags-order': ['warn', { - order: [ 'template', 'style', 'script' ], - }], - 'vue/no-mutating-props': 'warn', 'vue/no-v-html': 'off', 'vue/html-self-closing': ['error', { html: { From 96a8c1a41c1c873e61ddf5498e57ebddefae6f2d Mon Sep 17 00:00:00 2001 From: SabreCat Date: Thu, 2 Feb 2023 09:02:05 -0600 Subject: [PATCH 2/8] fix(chat): correctly hide flag counts from non-moderators --- website/server/models/group.js | 1 + 1 file changed, 1 insertion(+) diff --git a/website/server/models/group.js b/website/server/models/group.js index 35e35b3b86..dbf17f3f10 100644 --- a/website/server/models/group.js +++ b/website/server/models/group.js @@ -403,6 +403,7 @@ schema.statics.toJSONCleanChat = async function groupToJSONCleanChat (group, use if (user._id !== chatMsg.uuid && chatMsg.flagCount >= CHAT_FLAG_LIMIT_FOR_HIDING) { return undefined; } + chatMsg.flagCount = 0; } return chatMsg; From 5f66aa35f23b35f9d6a17f923221708f1bca7965 Mon Sep 17 00:00:00 2001 From: SabreCat Date: Thu, 2 Feb 2023 16:36:44 -0600 Subject: [PATCH 3/8] 4.258.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f1a270bfa..750b931316 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "habitica", - "version": "4.258.0", + "version": "4.258.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1c7d06a247..be8ff1ce96 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "habitica", "description": "A habit tracker app which treats your goals like a Role Playing Game.", - "version": "4.258.0", + "version": "4.258.1", "main": "./website/server/index.js", "dependencies": { "@babel/core": "^7.20.12", From a213fb723a5fec779814193b776f15f085ae6ad5 Mon Sep 17 00:00:00 2001 From: SabreCat Date: Fri, 3 Feb 2023 09:23:21 -0600 Subject: [PATCH 4/8] fix(purchases): correct hardcoded date range for Gryph --- website/server/libs/payments/skuItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/server/libs/payments/skuItem.js b/website/server/libs/payments/skuItem.js index 89ede4a053..0edb551a35 100644 --- a/website/server/libs/payments/skuItem.js +++ b/website/server/libs/payments/skuItem.js @@ -12,8 +12,8 @@ const RESPONSE_INVALID_ITEM = 'INVALID_ITEM_PURCHASED'; const EVENTS = { birthday10: { - start: '2023-01-23T08:00-05:00', - end: '2023-02-01T23:59-05:00', + start: '2023-01-30T08:00-05:00', + end: '2023-02-08T23:59-05:00', }, }; From c7deb1eb1901dab8093e922cf238bac155c21a7b Mon Sep 17 00:00:00 2001 From: SabreCat Date: Fri, 3 Feb 2023 09:23:27 -0600 Subject: [PATCH 5/8] 4.258.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 750b931316..1e31e889e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "habitica", - "version": "4.258.1", + "version": "4.258.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index be8ff1ce96..bf15796653 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "habitica", "description": "A habit tracker app which treats your goals like a Role Playing Game.", - "version": "4.258.1", + "version": "4.258.2", "main": "./website/server/index.js", "dependencies": { "@babel/core": "^7.20.12", From e0a5938711c6a94c417366fea9141743a1196c9d Mon Sep 17 00:00:00 2001 From: SabreCat Date: Mon, 6 Feb 2023 21:34:29 -0600 Subject: [PATCH 6/8] fix(test): update expectations for new flagging logic --- .../chat/POST-groups_id_chat_id_clear_flags.test.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js b/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js index 4bb99cc33f..9f98d73d85 100644 --- a/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js +++ b/test/api/v3/integration/chat/POST-groups_id_chat_id_clear_flags.test.js @@ -66,7 +66,7 @@ describe('POST /groups/:id/chat/:id/clearflags', () => { type: 'party', privacy: 'private', }, - members: 1, + members: 2, }); await members[0].update({ 'auth.timestamps.created': new Date('2022-01-01') }); @@ -76,12 +76,17 @@ describe('POST /groups/:id/chat/:id/clearflags', () => { await admin.post(`/groups/${group._id}/chat/${privateMessage.id}/flag`); // first test that the flag was actually successful + // author always sees own message; flag count is hidden from non-admins let messages = await members[0].get(`/groups/${group._id}/chat`); - expect(messages[0].flagCount).to.eql(5); + expect(messages[0].flagCount).to.eql(0); + messages = await members[1].get(`/groups/${group._id}/chat`); + expect(messages.length).to.eql(0); + // admin cannot directly request private group chat, but after unflag, + // message should be revealed again and still have flagCount of 0 await admin.post(`/groups/${group._id}/chat/${privateMessage.id}/clearflags`); - - messages = await members[0].get(`/groups/${group._id}/chat`); + messages = await members[1].get(`/groups/${group._id}/chat`); + expect(messages.length).to.eql(1); expect(messages[0].flagCount).to.eql(0); }); From 0335eb1f7ec315a67d12a95abfe73a8dccd8b667 Mon Sep 17 00:00:00 2001 From: Natalie L <78037386+CuriousMagpie@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:12:19 -0500 Subject: [PATCH 7/8] chore(content): add February backgrounds and Enchanted Armoire Items (#14482) * chore(content): add February backgrounds and Enchanted Armoire Items * fix(test): birthday week adjustment * fix(strings): . * fix(strings): correct background tokens --------- Co-authored-by: SabreCat Co-authored-by: Sabe Jones --- habitica-images | 2 +- test/api/unit/libs/payments/skuItem.test.js | 2 +- .../assets/css/sprites/spritesmith-main.css | 65 +++++++++++++++++++ website/common/locales/en/backgrounds.json | 8 +++ website/common/locales/en/gear.json | 9 ++- .../script/content/appearance/backgrounds.js | 5 ++ .../script/content/gear/sets/armoire.js | 13 ++++ 7 files changed, 100 insertions(+), 4 deletions(-) diff --git a/habitica-images b/habitica-images index 7203f4633c..7051701604 160000 --- a/habitica-images +++ b/habitica-images @@ -1 +1 @@ -Subproject commit 7203f4633cc90ede5b2f6745393d54493c487ff6 +Subproject commit 7051701604ff6ea246bf96995f4869ca95696d88 diff --git a/test/api/unit/libs/payments/skuItem.test.js b/test/api/unit/libs/payments/skuItem.test.js index bc4bbb5c94..41aa180faf 100644 --- a/test/api/unit/libs/payments/skuItem.test.js +++ b/test/api/unit/libs/payments/skuItem.test.js @@ -23,7 +23,7 @@ describe('payments/skuItems', () => { describe('#gryphatrice', () => { const sku = 'Pet-Gryphatrice-Jubilant'; it('returns true during birthday week', () => { - clock = sinon.useFakeTimers(new Date('2023-01-29')); + clock = sinon.useFakeTimers(new Date('2023-01-31')); expect(canBuySkuItem(sku, user)).to.be.true; }); it('returns false outside of birthday week', () => { diff --git a/website/client/src/assets/css/sprites/spritesmith-main.css b/website/client/src/assets/css/sprites/spritesmith-main.css index 7f3f7c653d..e20700e5c5 100644 --- a/website/client/src/assets/css/sprites/spritesmith-main.css +++ b/website/client/src/assets/css/sprites/spritesmith-main.css @@ -945,6 +945,11 @@ width: 141px; height: 147px; } +.background_fancy_bedroom { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_fancy_bedroom.png'); + width: 141px; + height: 147px; +} .background_fantastical_shoe_store { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_fantastical_shoe_store.png'); width: 141px; @@ -1164,6 +1169,11 @@ width: 141px; height: 147px; } +.background_golden_birdcage { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_golden_birdcage.png'); + width: 141px; + height: 147px; +} .background_gorgeous_greenhouse { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_gorgeous_greenhouse.png'); width: 141px; @@ -1319,6 +1329,11 @@ width: 141px; height: 147px; } +.background_in_front_of_fountain { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_in_front_of_fountain.png'); + width: 141px; + height: 147px; +} .background_in_the_armory { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_in_the_armory.png'); width: 141px; @@ -2586,6 +2601,11 @@ width: 68px; height: 68px; } +.icon_background_fancy_bedroom { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_fancy_bedroom.png'); + width: 68px; + height: 68px; +} .icon_background_fantastical_shoe_store { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_fantastical_shoe_store.png'); width: 68px; @@ -2805,6 +2825,11 @@ width: 68px; height: 68px; } +.icon_background_golden_birdcage { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_golden_birdcage.png'); + width: 68px; + height: 68px; +} .icon_background_gorgeous_greenhouse { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_gorgeous_greenhouse.png'); width: 68px; @@ -2960,6 +2985,11 @@ width: 68px; height: 68px; } +.icon_background_in_front_of_fountain { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_in_front_of_fountain.png'); + width: 68px; + height: 68px; +} .icon_background_in_the_armory { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_in_the_armory.png'); width: 68px; @@ -18660,6 +18690,11 @@ width: 114px; height: 90px; } +.broad_armor_armoire_teaGown { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/broad_armor_armoire_teaGown.png'); + width: 114px; + height: 90px; +} .broad_armor_armoire_vermilionArcherArmor { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/broad_armor_armoire_vermilionArcherArmor.png'); width: 90px; @@ -19100,6 +19135,11 @@ width: 90px; height: 90px; } +.head_armoire_teaHat { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/head_armoire_teaHat.png'); + width: 114px; + height: 90px; +} .head_armoire_toqueBlanche { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/head_armoire_toqueBlanche.png'); width: 114px; @@ -19465,6 +19505,11 @@ width: 114px; height: 87px; } +.shield_armoire_teaKettle { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shield_armoire_teaKettle.png'); + width: 114px; + height: 90px; +} .shield_armoire_treasureMap { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shield_armoire_treasureMap.png'); width: 114px; @@ -19900,6 +19945,11 @@ width: 68px; height: 68px; } +.shop_armor_armoire_teaGown { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_armor_armoire_teaGown.png'); + width: 68px; + height: 68px; +} .shop_armor_armoire_vermilionArcherArmor { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_armor_armoire_vermilionArcherArmor.png'); width: 68px; @@ -20355,6 +20405,11 @@ width: 68px; height: 68px; } +.shop_head_armoire_teaHat { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_head_armoire_teaHat.png'); + width: 68px; + height: 68px; +} .shop_head_armoire_toqueBlanche { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_head_armoire_toqueBlanche.png'); width: 68px; @@ -20720,6 +20775,11 @@ width: 68px; height: 68px; } +.shop_shield_armoire_teaKettle { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_shield_armoire_teaKettle.png'); + width: 68px; + height: 68px; +} .shop_shield_armoire_treasureMap { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_shield_armoire_treasureMap.png'); width: 68px; @@ -21615,6 +21675,11 @@ width: 114px; height: 90px; } +.slim_armor_armoire_teaGown { + background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/slim_armor_armoire_teaGown.png'); + width: 114px; + height: 90px; +} .slim_armor_armoire_vermilionArcherArmor { background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/slim_armor_armoire_vermilionArcherArmor.png'); width: 90px; diff --git a/website/common/locales/en/backgrounds.json b/website/common/locales/en/backgrounds.json index 5abbb901a2..7825d8edb2 100644 --- a/website/common/locales/en/backgrounds.json +++ b/website/common/locales/en/backgrounds.json @@ -851,6 +851,14 @@ "backgroundWinterLakeWithSwansText": "Winter Lake With Swans", "backgroundWinterLakeWithSwansNotes": "Enjoy Nature at a Winter Lake With Swans.", + "backgrounds022023": " SET 105: Released February 2022", + "backgroundInFrontOfFountainText": "In Front of a Fountain", + "backgroundInFrontOfFountainNotes": "Stroll In Front of a Fountain.", + "backgroundGoldenBirdcageText": "Golden Birdcage", + "backgroundGoldenBirdcageNotes": "Hide out in a Golden Birdcage.", + "backgroundFancyBedroomText": "Fancy Bedroom", + "backgroundFancyBedroomNotes": "Luxuriate in a Fancy Bedroom.", + "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 c9ee405725..c02f62d6c3 100644 --- a/website/common/locales/en/gear.json +++ b/website/common/locales/en/gear.json @@ -1428,7 +1428,9 @@ "armorArmoireJewelersApronNotes": "This heavy-duty apron is just the thing to wear when you feel creative. Best of all, there are dozens of small pockets to hold everything you need. Increases Intelligence by <%= int %>. Enchanted Armoire: Jeweler Set (Item 1 of 4).", "armorArmoireShawlCollarCoatText": "Shawl-Collar Coat", "armorArmoireShawlCollarCoatNotes": "A wise wizard once said there’s nothing better than being both cozy and productive! Wear this warm and stylish coat as you conquer the year’s challenges. Increases Constitution by <%= con %>. Enchanted Armoire: Independent Item.", - + "armorArmoireTeaGownText": "Tea Party Gown", + "armorArmoireTeaGownNotes": "You’re resilient, creative, brilliant, and so fashionable! Increases Strength and Intelligence by <%= attrs %> each. Enchanted Armoire: Tea Party Set (Item 1 of 3).", + "headgear": "helm", "headgearCapitalized": "Headgear", @@ -2189,6 +2191,8 @@ "headArmoireStrawRainHatNotes": "You’ll be able to spot every obstacle in your path when you wear this water-resistant, conical hat. Increases Perception by <%= per %>. Enchanted Armoire: Straw Raincoat Set (Item 2 of 2).", "headArmoireFancyPirateHatText": "Fancy Pirate Hat", "headArmoireFancyPirateHatNotes": "Be protected from the sun and any seagulls flying overhead as you drink tea on the deck of your ship. Increases Perception by <%= per %>. Enchanted Armoire: Fancy Pirate Set (Item 2 of 3).", + "headArmoireTeaHatText": "Tea Party Hat", + "headArmoireTeaHatNotes": "This elegant hat is both fancy and functional. Increases Perception by <%= per %>. Enchanted Armoire: Tea Party Set (Item 2 of 3).", "offhand": "off-hand item", "offHandCapitalized": "Off-Hand Item", @@ -2595,7 +2599,8 @@ "shieldArmoireBubblingCauldronNotes": "The perfect cauldron for brewing up a productivity potion or cooking a savory soup. In fact, there is little difference between the two! Increases Constitution by <%= con %>. Enchanted Armoire: Cooking Implements Set (Item 2 of 2).", "shieldArmoireJewelersPliersText": "Jeweler's Pliers", "shieldArmoireJewelersPliersNotes": "They cut, twist, pinch, and more. This tool can help you create whatever you can imagine. Increases Strength by <%= str %>. Enchanted Armoire: Jeweler Set (Item 3 of 4).", - + "shieldArmoireTeaKettleText": "Tea Kettle", + "shieldArmoireTeaKettleNotes": "All your favorite, flavorful teas can be brewed in this kettle. Are you in the mood for black tea, green tea, oolong, or perhaps an herbal infusion? Increases Constitution by <%= con %>. Enchanted Armoire: Tea Party Set (Item 3 of 3).", "back": "Back Accessory", "backBase0Text": "No Back Accessory", diff --git a/website/common/script/content/appearance/backgrounds.js b/website/common/script/content/appearance/backgrounds.js index 49e8daabc9..452855ea81 100644 --- a/website/common/script/content/appearance/backgrounds.js +++ b/website/common/script/content/appearance/backgrounds.js @@ -540,6 +540,11 @@ const backgrounds = { snowy_temple: { }, winter_lake_with_swans: { }, }, + backgrounds022023: { + in_front_of_fountain: { }, + golden_birdcage: { }, + fancy_bedroom: { }, + }, eventBackgrounds: { birthday_bash: { price: 0, diff --git a/website/common/script/content/gear/sets/armoire.js b/website/common/script/content/gear/sets/armoire.js index 58170d6a9c..c79e433e7b 100644 --- a/website/common/script/content/gear/sets/armoire.js +++ b/website/common/script/content/gear/sets/armoire.js @@ -411,6 +411,11 @@ const armor = { shawlCollarCoat: { con: 8, }, + teaGown: { + str: 5, + int: 5, + set: 'teaParty', + }, }; const body = { @@ -832,6 +837,10 @@ const head = { per: 8, set: 'fancyPirate', }, + teaHat: { + per: 10, + set: 'teaParty', + }, }; const shield = { @@ -1133,6 +1142,10 @@ const shield = { str: 10, set: 'jewelers', }, + teaKettle: { + con: 10, + set: 'teaParty', + }, }; const headAccessory = { From 1de2adf301ea5520ae690d53e7b9841b1b7003a3 Mon Sep 17 00:00:00 2001 From: SabreCat Date: Tue, 7 Feb 2023 09:11:52 -0600 Subject: [PATCH 8/8] 4.259.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e31e889e6..e2b06a9914 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "habitica", - "version": "4.258.2", + "version": "4.259.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bf15796653..f5c9da55c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "habitica", "description": "A habit tracker app which treats your goals like a Role Playing Game.", - "version": "4.258.2", + "version": "4.259.0", "main": "./website/server/index.js", "dependencies": { "@babel/core": "^7.20.12",