mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Remember equipment drawer tab (#10458)
* Remember equipment drawer tab * Split local setting value constants
This commit is contained in:
committed by
Matteo Pagliazzi
parent
d549fea4ed
commit
c91da86b89
@@ -190,7 +190,7 @@ export default {
|
||||
mounted () {
|
||||
// @TODO: should we abstract the drawer state/local store to a library and mixing combo? We use a similar pattern in equipment
|
||||
const spellDrawerState = getLocalSetting(CONSTANTS.keyConstants.SPELL_DRAWER_STATE);
|
||||
if (spellDrawerState === CONSTANTS.valueConstants.DRAWER_CLOSED) {
|
||||
if (spellDrawerState === CONSTANTS.drawerStateValues.DRAWER_CLOSED) {
|
||||
this.$store.state.spellOptions.spellDrawOpen = false;
|
||||
}
|
||||
},
|
||||
@@ -205,11 +205,11 @@ export default {
|
||||
this.$store.state.spellOptions.spellDrawOpen = newState;
|
||||
|
||||
if (newState) {
|
||||
setLocalSetting(CONSTANTS.keyConstants.SPELL_DRAWER_STATE, CONSTANTS.valueConstants.DRAWER_OPEN);
|
||||
setLocalSetting(CONSTANTS.keyConstants.SPELL_DRAWER_STATE, CONSTANTS.drawerStateValues.DRAWER_OPEN);
|
||||
return;
|
||||
}
|
||||
|
||||
setLocalSetting(CONSTANTS.keyConstants.SPELL_DRAWER_STATE, CONSTANTS.valueConstants.DRAWER_CLOSED);
|
||||
setLocalSetting(CONSTANTS.keyConstants.SPELL_DRAWER_STATE, CONSTANTS.drawerStateValues.DRAWER_CLOSED);
|
||||
},
|
||||
spellDisabled (skill) {
|
||||
if (skill === 'frost' && this.user.stats.buffs.streaks) {
|
||||
|
||||
Reference in New Issue
Block a user