update the HTML to match the solution

This commit is contained in:
Andreas Zweili 2021-01-22 20:36:16 +01:00
parent 2a507f8728
commit 189c3862af
1 changed files with 9 additions and 1 deletions

View File

@ -45,7 +45,15 @@
<h2>Battle Log</h2>
<ul>
<li v-for="message in battleLog" :key="message">
{{ message.actionBy }}, {{ message.actionType }}, {{ message.actionValue }}
<span
:class="{'log--player': message.actionBy === 'player', 'log--monster': message.actionBy === 'monster'}">{{
message.actionBy === "player" ? "Player" :
"Monster"}}</span>
<span v-if="message.actionType === 'heal'"> heals himself for <span
class="log--heal">{{message.actionValue }}</span>
</span>
<span v-else> does {{ message.value }} <span class="log--damage">{{ message.actionValue}}</span>
</span>
</li>
</ul>
</section>