Market quartils

This commit is contained in:
2023-09-13 16:24:55 +02:00
parent 0e378c2c24
commit 7b765d884e
7 changed files with 159 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { formatIsk, percentFormater } from '@/formaters';
import { SortableHeader, useSort } from '@/table';
import { copyToClipboard } from '@/utils';
import { useStorage } from '@vueuse/core';
import { computed } from 'vue';
import BuySellSlider from './BuySellSlider.vue';
@@ -25,8 +26,6 @@ const { sortedArray, headerProps } = useSort(computed(() => props.result.map(r =
defaultSortKey: 'name',
defaultSortDirection: 'asc'
})
const copyToClipboard = (s: string) => navigator.clipboard.writeText(s);
</script>
<template>
@@ -50,7 +49,10 @@ const copyToClipboard = (s: string) => navigator.clipboard.writeText(s);
</thead>
<tbody>
<tr v-for="r in sortedArray" :key="r.typeID" class="cursor-pointer" :class="{'bg-emerald-500': (useSellOrder ? r.sell_ratio : r.buy_ratio) >= threshold / 100 }" @click="copyToClipboard(r.name)">
<td>{{ r.name }}</td>
<td>
<img :src="`https://images.evetech.net/types/${r.typeID}/icon`" class="inline-block w-5 h-5" />
{{ r.name }}
</td>
<td class="text-right">{{ formatIsk(useSellOrder ? r.sell : r.buy) }}</td>
<td class="text-right">{{ formatIsk(useSellOrder ? r.sell_reprocess : r.buy_reprocess) }}</td>
<td class="text-right">{{ percentFormater.format(useSellOrder ? r.sell_ratio : r.buy_ratio) }}</td>

View File

@@ -1,2 +1,2 @@
export { default as Reprocess } from './Reprocess.vue'
export * from './reprocess'
export * from './reprocess';