moves logic to PlayerView, adds simple notifications when debugging
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
<template>
|
||||
<main id="app" class="container">
|
||||
<PlayerView :id="state.player_id" v-slot="{ player, updateWealth }">
|
||||
<PlayerView :id="state.player_id"
|
||||
v-slot="{ player, notifications, actions }">
|
||||
<section class="section">
|
||||
<HeaderBar :app_state="state">
|
||||
<template v-slot:title>{{ player.name }}</template>
|
||||
</HeaderBar>
|
||||
<p v-if="notifications">{{ notifications }}</p>
|
||||
<Wealth
|
||||
:wealth="[player.cp, player.sp, player.gp, player.pp]"
|
||||
:debt="player.debt"
|
||||
@update="updateWealth">
|
||||
@update="actions.updateWealth">
|
||||
</wealth>
|
||||
<Chest :player="state.show_player_chest ? player.id : 0"></Chest>
|
||||
<Chest :player="state.show_player_chest ? player.id : 0"
|
||||
@claim="actions.putClaim"
|
||||
@unclaim="actions.withdrawClaim"></Chest>
|
||||
</section>
|
||||
</PlayerView>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user