Merge branch 'release' into sabrecat/gems-multi-event

This commit is contained in:
SabreCat
2022-09-21 16:04:10 -05:00
7 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "habitica",
"version": "4.243.0",
"version": "4.244.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "habitica",
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
"version": "4.243.0",
"version": "4.244.1",
"main": "./website/server/index.js",
"dependencies": {
"@babel/core": "^7.18.13",
@@ -27,7 +27,7 @@
<customize-options
:items="set.options"
:current-value="user.preferences.hair.color"
:full-set="!hideSet(set) && !userOwnsSet('hair', set.keys, 'color')"
:full-set="!hideSet(set.key) && !userOwnsSet('hair', set.keys, 'color')"
@unlock="unlock(`hair.color.${set.keys.join(',hair.color.')}`)"
/>
</div>
@@ -23,7 +23,7 @@
<customize-options
:items="set.options"
:current-value="user.preferences.skin"
:full-set="!hideSet(set) && !userOwnsSet('skin', set.keys)"
:full-set="!hideSet(set.key) && !userOwnsSet('skin', set.keys)"
@unlock="unlock(`skin.${set.keys.join(',skin.')}`)"
/>
</div>
@@ -17,8 +17,14 @@ export const avatarEditorUtilies = { // eslint-disable-line import/prefer-defaul
};
},
methods: {
hideSet (set) {
return moment(appearanceSets[set.key].availableUntil).isBefore(moment());
hideSet (setKey) {
if (appearanceSets[setKey].availableFrom) {
return !moment().isBetween(
appearanceSets[setKey].availableFrom,
appearanceSets[setKey].availableUntil,
);
}
return moment(appearanceSets[setKey].availableUntil).isBefore(moment());
},
mapKeysToFreeOption (key, type, subType) {
const userPreference = subType
@@ -43,8 +49,8 @@ export const avatarEditorUtilies = { // eslint-disable-line import/prefer-defaul
const locked = !userPurchased || !userPurchased[key];
let hide = false;
if (set && appearanceSets[set]) {
if (locked) hide = moment(appearanceSets[set].availableUntil).isBefore(moment());
if (set && appearanceSets[set] && locked) {
hide = this.hideSet(set);
}
option.gemLocked = locked;
+1 -1
View File
@@ -102,7 +102,7 @@ export function canEdit (store) {
}
break;
case 'group':
isUserCanEditTask = isUserGroupLeader || isUserGroupManager || isUserAdmin;
isUserCanEditTask = isUserGroupLeader || isUserGroupManager;
break;
default:
break;
+1 -1
View File
@@ -190,7 +190,7 @@
"fall2022KappaRogueSet": "Kappa (Rogue)",
"fall2022OrcWarriorSet": "Orc (Warrior)",
"fall2022HarpyMageSet": "Harpy (Mage)",
"fall2022WatcherHealerSet": "Watcher (Healer)",
"fall2022WatcherHealerSet": "Peeker (Healer)",
"eventAvailability": "Available for purchase until <%= date(locale) %>.",
"eventAvailabilityReturning": "Available for purchase until <%= availableDate(locale) %>. This potion was last available in <%= previousDate(locale) %>.",
"dateEndJanuary": "January 31",