no color in transfers

This commit is contained in:
Sirttas
2026-06-04 19:51:04 +02:00
parent 57b9ec17de
commit 46a2538bef
2 changed files with 15 additions and 3 deletions
+14 -2
View File
@@ -1,13 +1,25 @@
<script setup lang="ts">
import {formatIsk} from "@/formaters";
import {computed} from "vue";
interface Props {
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>
<template>
<span :class="amount >= 0 ? 'text-emerald-400' : 'text-amber-700'">{{ formatIsk(amount) }}</span>
<span :class="computedClass">{{ formatIsk(amount) }}</span>
</template>
+1 -1
View File
@@ -66,7 +66,7 @@ const sortedArray = computedAsync(async () => {
</template>
<template v-else-if="t.type === TransferTypes.Isk">
<td colspan="2" class="text-right">
<IskLabel :amount="t.amount" />
<IskLabel :amount="t.amount" :colored="false" />
</td>
</template>
</tr>