mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-28 14:27:28 +00:00
23 lines
449 B
JavaScript
23 lines
449 B
JavaScript
|
|
export const namespaced = true
|
||
|
|
|
||
|
|
export const state = {
|
||
|
|
percent: 'true'
|
||
|
|
}
|
||
|
|
|
||
|
|
export const mutations = {
|
||
|
|
UPDATE_PERCENT(state, percent) {
|
||
|
|
state.percent = percent
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export const actions = {
|
||
|
|
async updatePercent({ commit }, percent) {
|
||
|
|
if (!percent) {
|
||
|
|
percent = localStorage.getItem('settings-percent') || 'true'
|
||
|
|
} else {
|
||
|
|
localStorage.setItem('settings-percent', percent)
|
||
|
|
}
|
||
|
|
commit('UPDATE_PERCENT', percent)
|
||
|
|
}
|
||
|
|
}
|