From 56f9e82326a904678b3da008a674b6b0e48c742e Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 29 Jun 2020 14:52:47 +0200 Subject: [PATCH] Improved spells tab to be more in line with the v1 implementation --- .../api/creature/getActiveProperties.js | 2 +- app/imports/api/properties/Spells.js | 10 --- .../characterSheetTabs/InventoryTab.vue | 2 +- .../characterSheetTabs/SpellsTab.vue | 26 +++----- .../components/spells/SpellList.vue | 66 +++++++++++++++++++ .../components/spells/SpellListCard.vue | 30 +++------ .../components/spells/SpellListTile.vue | 8 --- app/imports/ui/properties/forms/SpellForm.vue | 13 ---- 8 files changed, 86 insertions(+), 71 deletions(-) create mode 100644 app/imports/ui/properties/components/spells/SpellList.vue diff --git a/app/imports/api/creature/getActiveProperties.js b/app/imports/api/creature/getActiveProperties.js index bc954e88..3b783ea9 100644 --- a/app/imports/api/creature/getActiveProperties.js +++ b/app/imports/api/creature/getActiveProperties.js @@ -4,7 +4,7 @@ import CreatureProperties from '/imports/api/creature/CreatureProperties.js'; export default function getActiveProperties({ ancestorId, filter = {}, - options, + options = {sort: {order: 1}}, includeUntoggled = false, excludeAncestors, }){ diff --git a/app/imports/api/properties/Spells.js b/app/imports/api/properties/Spells.js index ecb1fd88..92a42be2 100644 --- a/app/imports/api/properties/Spells.js +++ b/app/imports/api/properties/Spells.js @@ -38,16 +38,6 @@ let SpellSchema = new SimpleSchema({}) hasAttackRoll: { type: Boolean, optional: true, - }, - // Spell list that this spell appears on - spellLists: { - type: Array, - defaultValue: [], - }, - 'spellLists.$': { - type: String, - regEx: VARIABLE_NAME_REGEX, - min: 2, }, description: { type: String, diff --git a/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue b/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue index 4185ac48..8b71d30a 100644 --- a/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue +++ b/app/imports/ui/creature/character/characterSheetTabs/InventoryTab.vue @@ -1,6 +1,6 @@ - - - + diff --git a/app/imports/ui/properties/components/spells/SpellListTile.vue b/app/imports/ui/properties/components/spells/SpellListTile.vue index 71236f5c..b512ea5a 100644 --- a/app/imports/ui/properties/components/spells/SpellListTile.vue +++ b/app/imports/ui/properties/components/spells/SpellListTile.vue @@ -17,11 +17,6 @@ {{ components }} - - - {{ levelText }} - - @@ -42,9 +37,6 @@ export default { if (this.model.material) components.push(`M (${this.model.material})`); return components.join(', '); }, - levelText(){ - return this.model.level || 'Cantrip' - }, }, methods: { click(e){ diff --git a/app/imports/ui/properties/forms/SpellForm.vue b/app/imports/ui/properties/forms/SpellForm.vue index ac5b9bce..3a10f4cb 100644 --- a/app/imports/ui/properties/forms/SpellForm.vue +++ b/app/imports/ui/properties/forms/SpellForm.vue @@ -102,19 +102,6 @@ @change="change('description', ...arguments)" /> - - -