mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
@@ -47,6 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import clone from 'lodash/clone';
|
||||||
import { mapState } from 'client/libs/store';
|
import { mapState } from 'client/libs/store';
|
||||||
|
|
||||||
import bModal from 'bootstrap-vue/lib/components/modal';
|
import bModal from 'bootstrap-vue/lib/components/modal';
|
||||||
@@ -72,8 +73,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
Object.assign(this.restoreValues.stats, this.user.stats);
|
this.restoreValues.stats = clone(this.user.stats);
|
||||||
Object.assign(this.restoreValues.achievements.streak, this.user.achievements.streak);
|
this.restoreValues.achievements.streak = clone(this.user.achievements.streak);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({user: 'user.data'}),
|
...mapState({user: 'user.data'}),
|
||||||
@@ -89,8 +90,8 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.user.stats = this.restoreValues.stats;
|
this.user.stats = clone(this.restoreValues.stats);
|
||||||
this.user.achievements.streak = this.restoreValues.achievements.streak;
|
this.user.achievements.streak = clone(this.restoreValues.achievements.streak);
|
||||||
|
|
||||||
let settings = {
|
let settings = {
|
||||||
'stats.hp': this.restoreValues.stats.hp,
|
'stats.hp': this.restoreValues.stats.hp,
|
||||||
|
|||||||
Reference in New Issue
Block a user