mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-12-17 07:30:47 +00:00
modification de l'identification des resources plus robuste
This commit is contained in:
parent
0494298159
commit
96d028dfa6
14 changed files with 130 additions and 94 deletions
|
|
@ -77,6 +77,7 @@
|
|||
import { mapState } from 'vuex'
|
||||
import Breadcrumb from '@theme/components/Breadcrumb'
|
||||
import { setUrlParams, getUrlParameter } from '@theme/util/filterHelpers'
|
||||
import { isResourceInLibrary } from '@theme/util'
|
||||
import MagicItem from '@theme/components/MagicItem'
|
||||
import MyMagicItemsButton from '@theme/global-components/MyMagicItemsButton'
|
||||
|
||||
|
|
@ -182,13 +183,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
isItemInTreasureChest (magicItem) {
|
||||
let isInTreasureChest = false
|
||||
for (let mi of this.$store.state.myMagicItems.magicItems) {
|
||||
if (mi.key == magicItem.key) {
|
||||
isInTreasureChest = true
|
||||
}
|
||||
}
|
||||
return isInTreasureChest
|
||||
return isResourceInLibrary(magicItem, this.$store.state.myMagicItems.magicItems)
|
||||
},
|
||||
toggleItemInTreasureChest (magicItem) {
|
||||
if (this.isItemInTreasureChest(magicItem)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue