diff --git a/lootalot_front/src/App.vue b/lootalot_front/src/App.vue index f4655d8..afa6664 100644 --- a/lootalot_front/src/App.vue +++ b/lootalot_front/src/App.vue @@ -3,7 +3,7 @@
- +
@@ -32,7 +32,6 @@ export const store = { if (this.debug) console.log('setActivePlayer to ', newPlayerId) this.state.player_id = newPlayerId document.cookie = `player_id=${newPlayerId};`; - if (this.debug) console.log('setCookie', document.cookie); }, switchPlayerChestVisibility () { if (this.debug) console.log('switchPlayerChestVisibility', !this.state.show_player_chest) @@ -43,6 +42,16 @@ export const store = { if (this.debug) console.log('newRequest from', playerId, 'on', itemId) this.state.requests[playerId].push(itemId); }, + cancelRequest(itemId) { + const playerId = this.state.player_id + if (this.debug) console.log('cancelRequest of', playerId, 'on', itemId) + var idx = this.state.requests[playerId].indexOf(itemId); + if (idx > -1) { + this.state.requests[playerId].splice(idx, 1); + } else { + if (this.debug) console.log("cancel a non-existent request") + } + } } function getCookie(cname) { diff --git a/lootalot_front/src/components/Chest.vue b/lootalot_front/src/components/Chest.vue index d572d30..41e4238 100644 --- a/lootalot_front/src/components/Chest.vue +++ b/lootalot_front/src/components/Chest.vue @@ -4,9 +4,9 @@ - - - + +
Objets de {{ player }} + Objets de {{ player }} - -
- +