From c0873db1f967f8c3ddec7547b1787e7dac075851 Mon Sep 17 00:00:00 2001 From: Alys Date: Sat, 14 Mar 2020 20:04:05 +1000 Subject: [PATCH] add avatar appearance and drops section in Admin Panel --- .../src/components/admin-panel/index.vue | 39 ++++++++++++++++++- website/server/controllers/api-v3/hall.js | 2 +- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/website/client/src/components/admin-panel/index.vue b/website/client/src/components/admin-panel/index.vue index 8985e0692a..76d30f6cfc 100644 --- a/website/client/src/components/admin-panel/index.vue +++ b/website/client/src/components/admin-panel/index.vue @@ -158,6 +158,29 @@ +
+

+ Current Avatar Appearance, Drop Count Today +

+
+
Drops Today: {{ hero.items.lastDrop.count }}
+
Most Recent Drop: {{ formatDate(hero.items.lastDrop.date) }}
+
Use Costume: {{ hero.preferences.costume ? 'on' : 'off' }}
+
+ Equipped Gear: +
    +
    +
    + Costume: +
      +
      +
      +
      +
      - Update Item + Update Items
      { + const item = gearWorn[gearType] || 'none'; + description += `
    • ${gearType} : ${item}
    • \n`; + }); + return description; + }, getAllItemPaths () { // let questsFormat = this.getFormattedItemReference // ('items.quests', keys(this.quests), 'Numeric Quantity'); @@ -434,7 +468,8 @@ export default { this.expandPriv = false; // XXX true this.expandAuth = false; this.expandParty = false; - this.expandItems = false; + this.expandAvatar = false; + this.expandItems = true; // XXX false this.expandContrib = false; // XXX true }, async saveHero () { diff --git a/website/server/controllers/api-v3/hall.js b/website/server/controllers/api-v3/hall.js index 206cdeef89..2de005c934 100644 --- a/website/server/controllers/api-v3/hall.js +++ b/website/server/controllers/api-v3/hall.js @@ -145,7 +145,7 @@ api.getHeroes = { // Note, while the following routes are called getHero / updateHero // they can be used by admins to get/update any user -const heroAdminFields = 'contributor balance profile.name purchased items auth lastCron flags.chatRevoked flags.chatShadowMuted party'; +const heroAdminFields = 'contributor balance profile.name purchased items preferences auth lastCron flags.chatRevoked flags.chatShadowMuted party'; /** * @api {get} /api/v3/hall/heroes/:heroId Get any user ("hero") given the UUID or Username