mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 04:47:27 +00:00
fix: display/hide detailed runes
This commit is contained in:
parent
889360fbed
commit
8060766638
4 changed files with 17 additions and 11 deletions
|
|
@ -395,9 +395,9 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
this.displayOrHideRunes(player.perks)
|
||||
this.displayRunes(player.perks)
|
||||
},
|
||||
...mapActions('cdragon', ['displayOrHideRunes']),
|
||||
...mapActions('cdragon', ['displayRunes']),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -83,15 +83,15 @@ export default {
|
|||
|
||||
methods: {
|
||||
close() {
|
||||
this.displayOrHideRunes({})
|
||||
this.hideRunes({})
|
||||
},
|
||||
handleEscape(e) {
|
||||
if (e.key === 'Esc' || e.key === 'Escape') {
|
||||
this.displayOrHideRunes({})
|
||||
this.hideRunes({})
|
||||
}
|
||||
},
|
||||
createCDragonAssetUrl,
|
||||
...mapActions('cdragon', ['displayOrHideRunes']),
|
||||
...mapActions('cdragon', ['hideRunes']),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -282,11 +282,11 @@ export default {
|
|||
},
|
||||
selectRunes(player) {
|
||||
if (!player.perks) return
|
||||
this.displayOrHideRunes(player.perks)
|
||||
this.displayRunes(player.perks)
|
||||
},
|
||||
getPrimarRune,
|
||||
getSecondaryRune,
|
||||
...mapActions('cdragon', ['displayOrHideRunes']),
|
||||
...mapActions('cdragon', ['displayRunes']),
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -14,18 +14,24 @@ export const state = {
|
|||
}
|
||||
|
||||
export const mutations = {
|
||||
DISPLAY_HIDE_RUNES(state, selectedRunes) {
|
||||
state.runesOpen = !state.runesOpen
|
||||
DISPLAY_RUNES(state, selectedRunes) {
|
||||
state.runesOpen = true
|
||||
state.selectedRunes = selectedRunes
|
||||
},
|
||||
HIDE_RUNES(state) {
|
||||
state.runesOpen = false
|
||||
},
|
||||
SET_RUNES(state, runes) {
|
||||
state.runes = runes
|
||||
},
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
displayOrHideRunes({ commit }, selectedRunes) {
|
||||
commit('DISPLAY_HIDE_RUNES', selectedRunes)
|
||||
displayRunes({ commit }, selectedRunes) {
|
||||
commit('DISPLAY_RUNES', selectedRunes)
|
||||
},
|
||||
hideRunes({ commit }) {
|
||||
commit('HIDE_RUNES')
|
||||
},
|
||||
async getRunes({ commit, getters }) {
|
||||
if (getters.runesLoaded) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue