clipboard

This commit is contained in:
2023-09-18 11:09:56 +02:00
parent 3ac39dcd45
commit 2b80724692
4 changed files with 14 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
import { formatIsk, percentFormater } from '@/formaters';
import { SortableHeader, useSort } from '@/table';
import { copyToClipboard } from '@/utils';
import { ArrowPathIcon } from '@heroicons/vue/24/outline';
import { useStorage } from '@vueuse/core';
import { computed, ref } from 'vue';
@@ -98,7 +97,7 @@ const getLineColor = (result: Result) => {
</tr>
</thead>
<tbody>
<tr v-for="r in sortedArray" :key="r.typeID" class="cursor-pointer" :class="getLineColor(r)" @click="copyToClipboard(r.name)">
<tr v-for="r in sortedArray" :key="r.typeID" :class="getLineColor(r)">
<td>
<MarketTypeLabel :id="r.typeID" :name="r.name" />
</td>
@@ -109,7 +108,7 @@ const getLineColor = (result: Result) => {
<td class="text-right">{{ formatIsk(r.q3) }}</td>
<td class="text-right">{{ percentFormater.format(r.percent) }}</td>
<td class="text-right">
<button class="btn-icon" @click="$emit('relaod', r.type)"><ArrowPathIcon class="stroke-slate-100 hover:stroke-slate-400"/></button>
<button class="btn-icon-stroke" @click="$emit('relaod', r.type)"><ArrowPathIcon /></button>
</td>
</tr>
</tbody>

View File

@@ -1,4 +1,7 @@
<script setup lang="ts">
import { copyToClipboard } from '@/utils';
import { ClipboardIcon } from '@heroicons/vue/24/outline';
interface Props {
name?: string;
@@ -15,5 +18,6 @@ withDefaults(defineProps<Props>(), {
<img v-if="id" :src="`https://images.evetech.net/types/${id}/icon`" class="inline-block w-5 h-5" />
<template v-if="name">
{{ name }}
</template>
<button class="btn-icon-stroke" @click="copyToClipboard(name)"><ClipboardIcon class="!w-4 !h-4" /></button>
</template>
</template>

View File

@@ -2,7 +2,6 @@
import { formatIsk, percentFormater } from '@/formaters';
import { MarketTypeLabel } from '@/market/type';
import { SortableHeader, useSort } from '@/table';
import { copyToClipboard } from '@/utils';
import { useStorage } from '@vueuse/core';
import { computed } from 'vue';
import BuySellSlider from './BuySellSlider.vue';
@@ -49,7 +48,7 @@ const { sortedArray, headerProps } = useSort(computed(() => props.result.map(r =
</tr>
</thead>
<tbody>
<tr v-for="r in sortedArray" :key="r.typeID" class="cursor-pointer" :class="{'line-green': (useSellOrder ? r.sell_ratio : r.buy_ratio) >= threshold / 100 }" @click="copyToClipboard(r.name)">
<tr v-for="r in sortedArray" :key="r.typeID" :class="{'line-green': (useSellOrder ? r.sell_ratio : r.buy_ratio) >= threshold / 100 }">
<td>
<MarketTypeLabel :id="r.typeID" :name="r.name" />
</td>

View File

@@ -64,4 +64,10 @@
@apply w-6 h-6 hover:text-slate-400;
}
}
.btn-icon-stroke {
@apply btn-icon;
> svg {
@apply stroke-slate-100 hover:stroke-slate-400;
}
}
}