mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
* fix: add neededCurrencyOnly prop * fix: worked on logic for displaying only gems * fix: removed gold & hourglasses if neededCurrencyOnly is true * fix: aligned gem count properly * fix: updates based on some comments (all comments answered) * fix: working on displaying only required currency in a new array * chore: trying to figure out currency logic * trying to use .find() now * remove unneeded line of code * still working on finding/filtering the currency * trying to move requiredCurrency into a new function (?!) * fix: added logic to filter for a single currency and fixed CSS * fix: clean up code * fix: really clean up code, sheesh * fix: updated per comments on PR * fix(style): vertically align elements in your-balance --------- Co-authored-by: Kalista Payne <sabrecat@gmail.com>
57 lines
946 B
Vue
57 lines
946 B
Vue
<template>
|
|
<div class="your-balance">
|
|
<span
|
|
v-once
|
|
class="label"
|
|
>
|
|
{{ $t('yourBalance') }}
|
|
</span>
|
|
|
|
<balance-info
|
|
class="balance-info"
|
|
:currency-needed="currencyNeeded"
|
|
:amount-needed="amountNeeded"
|
|
:neededCurrencyOnly="true"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import BalanceInfo from '@/components/shops/balanceInfo.vue';
|
|
|
|
export default {
|
|
name: 'YourBalance',
|
|
components: { BalanceInfo },
|
|
props: {
|
|
currencyNeeded: {
|
|
type: String,
|
|
},
|
|
amountNeeded: {
|
|
type: Number,
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import '~@/assets/scss/colors.scss';
|
|
|
|
.your-balance {
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
background-color: $gray-600;
|
|
display: inline-block;
|
|
align-self: center;
|
|
}
|
|
|
|
.label {
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
line-height: 1.33;
|
|
color: $gray-100;
|
|
}
|
|
|
|
.balance-info {
|
|
display: inline-block !important;
|
|
}
|
|
</style>
|