mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-12-17 15:40:37 +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
|
|
@ -18,6 +18,7 @@ import Breadcrumb from '@theme/components/Breadcrumb'
|
|||
import Spell from '@theme/components/Spell'
|
||||
import MySpellsButton from '@theme/global-components/MySpellsButton'
|
||||
import Edit from '@theme/components/Edit'
|
||||
import { isResourceInLibrary } from '@theme/util'
|
||||
|
||||
export default {
|
||||
name: 'SpellLayout',
|
||||
|
|
@ -31,13 +32,7 @@ export default {
|
|||
|
||||
computed: {
|
||||
isSpellInSpellBook () {
|
||||
let isInSpellBook = false
|
||||
for (let s of this.$store.state.mySpells.spells) {
|
||||
if (s.key == this.$page.key) {
|
||||
isInSpellBook = true
|
||||
}
|
||||
}
|
||||
return isInSpellBook
|
||||
return isResourceInLibrary(this.$page, this.$store.state.mySpells.spells)
|
||||
},
|
||||
|
||||
displayToggleSpellButton () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue