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>