Skip to content

Commit

Permalink
style: minor refinement of trade text
Browse files Browse the repository at this point in the history
also remove unnecessary conditional

this is a huge improvement but we might consider also making it so only
non-zero influences are shown, we'll need to re-style the UI though,
simply filtering out the zero influences doesn't look great (and 1 sided
trades look weird, e.g., 1 side has 0 influences, and the other has
some)

refs #751
  • Loading branch information
alee committed Nov 6, 2021
1 parent 521ef52 commit ec2f93c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions client/src/components/game/phases/trade/ActiveTrade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@
:title="name"
v-b-tooltip.hover.bottom
/>
<p v-if="value !== 0" class="text-center my-2">{{ value }}</p>
<p v-if="value === 0" class="text-center my-2">0</p>
<p class="text-center my-2">{{ value }}</p>
</b-col>
</b-row>
</b-col>

<!-- to -->
<b-col cols="auto" class="w-50">
<b-row align-h="end" align-v="center" class="w-100" :style="frameStyle(recipient.role)">
<p>Request from {{ recipient.role }}</p>
<p>In exchange for</p>
<b-img
v-bind="player"
:src="require(`@port-of-mars/client/assets/characters/${recipient.role}.png`)"
Expand All @@ -66,8 +65,7 @@
:title="name"
v-b-tooltip.hover.bottom
/>
<p v-if="value !== 0" class="text-center my-2">{{ value }}</p>
<p v-if="value === 0" class="text-center my-2">0</p>
<span class="text-center my-2">{{ value }}</span>
</b-col>
</b-row>
</b-col>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/game/phases/trade/TradeRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<!-- offer -->
<b-form-group>
<h4>Offer:</h4>
<h4>Your Offer:</h4>
<TradeOptions
:resourceReader="handleSendResources"
:resources="recipientResources"
Expand Down

0 comments on commit ec2f93c

Please sign in to comment.