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"> <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>
+1 -1
View File
@@ -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>