mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.displayOrHideRunes(player.perks)
|
this.displayRunes(player.perks)
|
||||||
},
|
},
|
||||||
...mapActions('cdragon', ['displayOrHideRunes']),
|
...mapActions('cdragon', ['displayRunes']),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -83,15 +83,15 @@ export default {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
this.displayOrHideRunes({})
|
this.hideRunes({})
|
||||||
},
|
},
|
||||||
handleEscape(e) {
|
handleEscape(e) {
|
||||||
if (e.key === 'Esc' || e.key === 'Escape') {
|
if (e.key === 'Esc' || e.key === 'Escape') {
|
||||||
this.displayOrHideRunes({})
|
this.hideRunes({})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createCDragonAssetUrl,
|
createCDragonAssetUrl,
|
||||||
...mapActions('cdragon', ['displayOrHideRunes']),
|
...mapActions('cdragon', ['hideRunes']),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -282,11 +282,11 @@ export default {
|
||||||
},
|
},
|
||||||
selectRunes(player) {
|
selectRunes(player) {
|
||||||
if (!player.perks) return
|
if (!player.perks) return
|
||||||
this.displayOrHideRunes(player.perks)
|
this.displayRunes(player.perks)
|
||||||
},
|
},
|
||||||
getPrimarRune,
|
getPrimarRune,
|
||||||
getSecondaryRune,
|
getSecondaryRune,
|
||||||
...mapActions('cdragon', ['displayOrHideRunes']),
|
...mapActions('cdragon', ['displayRunes']),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,24 @@ export const state = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mutations = {
|
export const mutations = {
|
||||||
DISPLAY_HIDE_RUNES(state, selectedRunes) {
|
DISPLAY_RUNES(state, selectedRunes) {
|
||||||
state.runesOpen = !state.runesOpen
|
state.runesOpen = true
|
||||||
state.selectedRunes = selectedRunes
|
state.selectedRunes = selectedRunes
|
||||||
},
|
},
|
||||||
|
HIDE_RUNES(state) {
|
||||||
|
state.runesOpen = false
|
||||||
|
},
|
||||||
SET_RUNES(state, runes) {
|
SET_RUNES(state, runes) {
|
||||||
state.runes = runes
|
state.runes = runes
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
displayOrHideRunes({ commit }, selectedRunes) {
|
displayRunes({ commit }, selectedRunes) {
|
||||||
commit('DISPLAY_HIDE_RUNES', selectedRunes)
|
commit('DISPLAY_RUNES', selectedRunes)
|
||||||
|
},
|
||||||
|
hideRunes({ commit }) {
|
||||||
|
commit('HIDE_RUNES')
|
||||||
},
|
},
|
||||||
async getRunes({ commit, getters }) {
|
async getRunes({ commit, getters }) {
|
||||||
if (getters.runesLoaded) {
|
if (getters.runesLoaded) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue