no color in transfers
This commit is contained in:
+14
-2
@@ -1,13 +1,25 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {formatIsk} from "@/formaters";
|
import {formatIsk} from "@/formaters";
|
||||||
|
import {computed} from "vue";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
amount: number;
|
amount: number;
|
||||||
|
colored?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { amount } = defineProps<Props>();
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
colored: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const computedClass = computed(() => {
|
||||||
|
if (!props.colored) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return props.amount >= 0 ? 'text-emerald-400' : 'text-amber-700';
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span :class="amount >= 0 ? 'text-emerald-400' : 'text-amber-700'">{{ formatIsk(amount) }}</span>
|
<span :class="computedClass">{{ formatIsk(amount) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -66,7 +66,7 @@ const sortedArray = computedAsync(async () => {
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="t.type === TransferTypes.Isk">
|
<template v-else-if="t.type === TransferTypes.Isk">
|
||||||
<td colspan="2" class="text-right">
|
<td colspan="2" class="text-right">
|
||||||
<IskLabel :amount="t.amount" />
|
<IskLabel :amount="t.amount" :colored="false" />
|
||||||
</td>
|
</td>
|
||||||
</template>
|
</template>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user