adds events api

This commit is contained in:
2019-10-28 15:29:17 +01:00
parent e9f535ac86
commit 8d1344e0b6
2 changed files with 4 additions and 1 deletions

View File

@@ -31,6 +31,7 @@
@update="actions.updateWealth" @update="actions.updateWealth"
></Wealth> ></Wealth>
<p v-show="notifications.length > 0">{{ notifications }}</p> <p v-show="notifications.length > 0">{{ notifications }}</p>
<button class="button" @click="actions.undoLastAction">Annuler action</button>
</header> </header>
<nav> <nav>
<div class="tabs is-centered is-boxed is-medium"> <div class="tabs is-centered is-boxed is-medium">

View File

@@ -75,7 +75,8 @@ export default {
putClaim (itemId) { this.call("claims", "PUT", itemId) }, putClaim (itemId) { this.call("claims", "PUT", itemId) },
withdrawClaim (itemId) { this.call("claims", "DELETE", itemId) }, withdrawClaim (itemId) { this.call("claims", "DELETE", itemId) },
buyItems(items) { this.call("loot", "PUT", items) }, buyItems(items) { this.call("loot", "PUT", items) },
sellItems (items) { this.call("loot", "DELETE", items) }, sellItems (items) { this.call("loot", "DELETE", { items, global_mod: null, players: null }) },
undoLastAction () { this.call("events/last", "DELETE", null) },
}, },
watch: { watch: {
id: { id: {
@@ -100,6 +101,7 @@ export default {
withdrawClaim: this.withdrawClaim, withdrawClaim: this.withdrawClaim,
buyItems: this.buyItems, buyItems: this.buyItems,
sellItems: this.sellItems, sellItems: this.sellItems,
undoLastAction: this.undoLastAction,
}, },
claims: this.claims, claims: this.claims,
}) })