From c6fcc1677275ed003649fc76b7e020f465661237 Mon Sep 17 00:00:00 2001 From: Alys Date: Sat, 4 Apr 2020 17:46:03 +1000 Subject: [PATCH] add gear names and set details to Avatar Costume/Battle Gear section --- .../src/components/admin-panel/index.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/website/client/src/components/admin-panel/index.vue b/website/client/src/components/admin-panel/index.vue index 0a6b0817d2..b9aa2dda65 100644 --- a/website/client/src/components/admin-panel/index.vue +++ b/website/client/src/components/admin-panel/index.vue @@ -481,12 +481,15 @@ export default { formatEquipment (gearWorn) { const gearTypes = ['head', 'armor', 'weapon', 'shield', 'headAccessory', 'eyewear', 'body', 'back']; - let description = ''; + let equipmentList = ''; gearTypes.forEach(gearType => { - const item = gearWorn[gearType] || 'none'; - description += `
  • ${gearType} : ${item}
  • \n`; + const key = gearWorn[gearType] || ''; + const description = (key) + ? `${key} (${this.getItemDescription('gear', gearWorn[gearType])})` + : 'none'; + equipmentList += `
  • ${gearType} : ${description}
  • \n`; }); - return description; + return equipmentList; }, collateItemData () { @@ -597,7 +600,10 @@ export default { }; let wantSetName = true; // some set names are useful, others aren't let setType = '[cannot determine set type]'; - if (setName.includes('special-turkey')) { + if (setName === 'base-0') { + setType = 'empty slot'; + wantSetName = false; + } else if (setName.includes('special-turkey')) { setType = 'Turkey Day https://habitica.fandom.com/wiki/Turkey_Day'; wantSetName = false; } else if (setName.includes('special-nye')) { @@ -631,7 +637,7 @@ export default { } else if (content.gear.flat[key].klass === 'special') { const specialClass = content.gear.flat[key].specialClass || ''; if (specialClass && Object.keys(klassNames).includes(specialClass)) { - setType = `Grand Gala ${klassNames[specialClass]} gear`; + setType = `Grand Gala ${klassNames[specialClass]} set`; } else if (key.includes('special_gaymerx')) { setType = 'GaymerX'; wantSetName = false;