moves shared store inside AppStorage.js
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { store } from '../App.vue'
|
||||
import { AppStorage } from '../AppStorage'
|
||||
import Chest from './Chest.vue'
|
||||
import Wealth from './Wealth.vue'
|
||||
/*
|
||||
@@ -74,7 +74,7 @@
|
||||
components: { Chest, Wealth },
|
||||
data () {
|
||||
return {
|
||||
state: store.state,
|
||||
state: AppStorage.state,
|
||||
show_dropdown: false,
|
||||
edit_wealth: false,
|
||||
handleOutsideClick: null,
|
||||
@@ -96,7 +96,7 @@
|
||||
},
|
||||
methods: {
|
||||
switchPlayerChestVisibility () {
|
||||
store.switchPlayerChestVisibility();
|
||||
AppStorage.switchPlayerChestVisibility();
|
||||
},
|
||||
hidePlayerChest () {
|
||||
if (this.state.show_player_chest) {
|
||||
@@ -105,7 +105,7 @@
|
||||
},
|
||||
setActivePlayer (playerIdx) {
|
||||
const newId = this.state.player_list[playerIdx].id;
|
||||
store.setActivePlayer(newId);
|
||||
AppStorage.setActivePlayer(newId);
|
||||
if (newId == 0) { this.hidePlayerChest() }
|
||||
this.player.name = this.state.player_list[playerIdx].name
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user