WIP(customizations): revised backgrounds modal

This commit is contained in:
Sabe Jones
2024-04-17 18:02:35 -05:00
parent 4277c08324
commit 5f64b2fb25
3 changed files with 49 additions and 189 deletions
+4 -2
View File
@@ -245,7 +245,7 @@
"backgroundWindyAutumnText": "Windy Autumn",
"backgroundWindyAutumnNotes": "Chase leaves during a Windy Autumn.",
"incentiveBackgrounds": "Plain Background Set",
"incentiveBackgrounds": "Standard Backgrounds",
"backgroundVioletText": "Violet",
"backgroundVioletNotes": "A vibrant violet backdrop.",
"backgroundBlueText": "Blue",
@@ -981,5 +981,7 @@
"eventBackgrounds": "Event Backgrounds",
"backgroundBirthdayBashText": "Birthday Bash",
"backgroundBirthdayBashNotes": "Habitica's having a birthday party, and everyone's invited!"
"backgroundBirthdayBashNotes": "Habitica's having a birthday party, and everyone's invited!",
"monthlyBackgrounds": "Monthly Backgrounds"
}
+1 -1
View File
@@ -224,7 +224,7 @@ export default async function unlock (user, req = {}, analytics) {
// The passed paths are not used anymore after this point for full sets
const { set, items, paths } = getSet(setType, firstPath, req);
if (isBackground) {
if (isBackground && !alreadyUnlocked(user, setType, path)) {
const matchers = getScheduleMatchingGroup('backgrounds');
if (!matchers.match(set.key)) {
throw new NotAuthorized(i18n.t('notAvailable', req.language));