Skip to content

Commit 3e5de1c

Browse files
author
Sunlight
committed
fix (NamespaceOverview): links in table
1 parent 6adfd58 commit 3e5de1c

File tree

1 file changed

+73
-52
lines changed

1 file changed

+73
-52
lines changed

components/modules/namespace/NamespaceOverview.vue

Lines changed: 73 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -188,66 +188,82 @@ const handleViewRawMessages = () => {
188188
</thead>
189189
190190
<tbody>
191-
<tr v-for="message in messages" @click="router.push(`/tx/${message.tx.hash}`)">
191+
<tr v-for="message in messages">
192192
<td style="width: 1px">
193-
<Tooltip position="start" delay="500">
194-
<Flex align="center" gap="8">
195-
<Icon
196-
:name="message.tx.status === 'success' ? 'check-circle' : 'close-circle'"
197-
size="14"
198-
:color="message.tx.status === 'success' ? 'green' : 'red'"
199-
/>
200-
201-
<Text size="13" weight="600" color="primary" mono>{{
202-
message.tx.hash.slice(0, 4).toUpperCase()
203-
}}</Text>
204-
205-
<Flex align="center" gap="3">
206-
<div v-for="dot in 3" class="dot" />
207-
</Flex>
193+
<NuxtLink :to="`/tx/${message.tx.hash}`">
194+
<Tooltip position="start" delay="500">
195+
<Flex align="center" gap="8">
196+
<Icon
197+
:name="message.tx.status === 'success' ? 'check-circle' : 'close-circle'"
198+
size="14"
199+
:color="message.tx.status === 'success' ? 'green' : 'red'"
200+
/>
201+
202+
<Text size="13" weight="600" color="primary" mono>{{
203+
message.tx.hash.slice(0, 4).toUpperCase()
204+
}}</Text>
205+
206+
<Flex align="center" gap="3">
207+
<div v-for="dot in 3" class="dot" />
208+
</Flex>
208209
209-
<Text size="13" weight="600" color="primary" mono>{{
210-
message.tx.hash.slice(message.tx.hash.length - 4, message.tx.hash.length).toUpperCase()
211-
}}</Text>
210+
<Text size="13" weight="600" color="primary" mono>{{
211+
message.tx.hash
212+
.slice(message.tx.hash.length - 4, message.tx.hash.length)
213+
.toUpperCase()
214+
}}</Text>
212215
213-
<CopyButton :text="message.tx.hash" />
214-
</Flex>
216+
<CopyButton :text="message.tx.hash" />
217+
</Flex>
215218
216-
<template #content>
217-
<Flex direction="column" gap="6">
218-
<Flex align="center" gap="4">
219-
<Icon
220-
:name="message.tx.status === 'success' ? 'check-circle' : 'close-circle'"
221-
size="14"
222-
:color="message.tx.status === 'success' ? 'green' : 'red'"
223-
/>
224-
<Text size="13" weight="600" color="primary">
225-
{{ message.tx.status === "success" ? "Successful" : "Failed" }} Transaction
226-
</Text>
219+
<template #content>
220+
<Flex direction="column" gap="6">
221+
<Flex align="center" gap="4">
222+
<Icon
223+
:name="message.tx.status === 'success' ? 'check-circle' : 'close-circle'"
224+
size="14"
225+
:color="message.tx.status === 'success' ? 'green' : 'red'"
226+
/>
227+
<Text size="13" weight="600" color="primary">
228+
{{ message.tx.status === "success" ? "Successful" : "Failed" }} Transaction
229+
</Text>
230+
</Flex>
231+
232+
{{ space(message.tx.hash).toUpperCase() }}
227233
</Flex>
228-
229-
{{ space(message.tx.hash).toUpperCase() }}
230-
</Flex>
231-
</template>
232-
</Tooltip>
234+
</template>
235+
</Tooltip>
236+
</NuxtLink>
233237
</td>
234238
<td style="width: 1px">
235-
<MessageTypeBadge :types="[message.type]" />
239+
<NuxtLink :to="`/tx/${message.tx.hash}`">
240+
<Flex align="center">
241+
<MessageTypeBadge :types="[message.type]" />
242+
</Flex>
243+
</NuxtLink>
236244
</td>
237245
<td>
238-
<Text size="13" weight="600" color="primary">
239-
{{ DateTime.fromISO(message.time).toRelative({ locale: "en", style: "short" }) }}
240-
</Text>
246+
<NuxtLink :to="`/tx/${message.tx.hash}`">
247+
<Flex align="center">
248+
<Text size="13" weight="600" color="primary">
249+
{{ DateTime.fromISO(message.time).toRelative({ locale: "en", style: "short" }) }}
250+
</Text>
251+
</Flex>
252+
</NuxtLink>
241253
</td>
242254
<td>
243-
<NuxtLink @click.stop :to="`/block/${message.height}`">
244-
<Outline>
245-
<Flex align="center" gap="6">
246-
<Icon name="block" size="14" color="secondary" />
247-
248-
<Text size="13" weight="600" color="primary" tabular>{{ comma(message.height) }}</Text>
249-
</Flex>
250-
</Outline>
255+
<NuxtLink :to="`/tx/${message.tx.hash}`">
256+
<Flex align="center">
257+
<Outline @click.prevent="router.push(`/block/${message.height}`)">
258+
<Flex align="center" gap="6">
259+
<Icon name="block" size="14" color="secondary" />
260+
261+
<Text size="13" weight="600" color="primary" tabular>{{
262+
comma(message.height)
263+
}}</Text>
264+
</Flex>
265+
</Outline>
266+
</Flex>
251267
</NuxtLink>
252268
</td>
253269
</tr>
@@ -416,15 +432,20 @@ const handleViewRawMessages = () => {
416432
417433
& tr td {
418434
padding: 0;
419-
padding-right: 24px;
420-
padding-top: 6px;
421-
padding-bottom: 6px;
422435
423436
white-space: nowrap;
424437
425438
&:first-child {
426439
padding-left: 16px;
427440
}
441+
442+
& > a {
443+
display: flex;
444+
445+
min-height: 40px;
446+
447+
padding-right: 24px;
448+
}
428449
}
429450
}
430451
}

0 commit comments

Comments
 (0)