Fixed fab being confused by hiding the spells tab
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
import { getHighestOrder } from '/imports/api/parenting/order.js';
|
||||
import insertProperty from '/imports/api/creature/creatureProperties/methods/insertProperty.js';
|
||||
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
|
||||
import Creatures from '/imports/api/creature/creatures/Creatures.js';
|
||||
import PROPERTIES from '/imports/constants/PROPERTIES.js';
|
||||
import insertPropertyFromLibraryNode from '/imports/api/creature/creatureProperties/methods/insertPropertyFromLibraryNode.js';
|
||||
import fetchDocByRef from '/imports/api/parenting/fetchDocByRef.js';
|
||||
@@ -119,7 +120,11 @@
|
||||
return this.$route.params.id;
|
||||
},
|
||||
tabNumber(){
|
||||
return this.$store.getters.tabById(this.creatureId);
|
||||
let tabNumber = this.$store.getters.tabById(this.creatureId);
|
||||
if (this.hideSpellsTab && tabNumber > 2){
|
||||
tabNumber += 1;
|
||||
}
|
||||
return tabNumber;
|
||||
},
|
||||
speedDials(){
|
||||
return this.speedDialsByTab[tabs[this.tabNumber]];
|
||||
@@ -136,6 +141,12 @@
|
||||
return PROPERTIES;
|
||||
},
|
||||
},
|
||||
meteor: {
|
||||
hideSpellsTab(){
|
||||
let creature = Creatures.findOne(this.creatureId);
|
||||
return creature?.settings.hideSpellsTab;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getPropertyLabel(type){
|
||||
if (type === 'buff') return 'Buff or Condition';
|
||||
|
||||
Reference in New Issue
Block a user