@@ -17,9 +17,7 @@ import { fetchTransactions } from "@/services/api/tx"
1717
1818/** Store */
1919import { useAppStore } from " @/store/app"
20- import { useNotificationsStore } from " @/store/notifications"
2120const appStore = useAppStore ()
22- const notificationsStore = useNotificationsStore ()
2321
2422useHead ({
2523 title: " All Transactions - Celestia Explorer" ,
@@ -123,19 +121,6 @@ const handlePrev = () => {
123121
124122 page .value -= 1
125123}
126-
127- const handleCopy = (target ) => {
128- window .navigator .clipboard .writeText (target)
129-
130- notificationsStore .create ({
131- notification: {
132- type: " info" ,
133- icon: " check" ,
134- title: " Successfully copied to clipboard" ,
135- autoDestroy: true ,
136- },
137- })
138- }
139124 </script >
140125
141126<template >
@@ -194,24 +179,37 @@ const handleCopy = (target) => {
194179 >
195180 <td style =" width : 1px " >
196181 <Tooltip :disabled =" !tx.hash" position =" start" >
197- <Flex @click.stop =" handleCopy(tx.hash)" class =" copyable" align =" center" gap =" 8" >
198- <Icon :name =" tx.status === 'success' ? 'tx_success' : 'tx_error'" size =" 14" color =" secondary" />
199-
200- <template v-if =" tx .hash " >
201- <Text size =" 13" weight =" 600" color =" primary" >{{ tx.hash.slice(0, 4).toUpperCase() }}</Text >
202-
203- <Flex align =" center" gap =" 3" >
204- <div v-for =" dot in 3" class =" dot" />
182+ <template v-if =" tx .hash " >
183+ <Flex align =" center" gap =" 10" >
184+ <Flex align =" center" gap =" 6" >
185+ <Icon
186+ :name =" tx.status === 'success' ? 'tx_success' : 'tx_error'"
187+ size =" 14"
188+ color =" secondary"
189+ />
190+
191+ <Text size =" 13" weight =" 600" color =" primary" >{{
192+ tx.hash.slice(0, 4).toUpperCase()
193+ }}</Text >
194+
195+ <Flex align =" center" gap =" 3" >
196+ <div v-for =" dot in 3" class =" dot" />
197+ </Flex >
198+
199+ <Text size =" 13" weight =" 600" color =" primary" >
200+ {{ tx.hash.slice(tx.hash.length - 4, tx.hash.length).toUpperCase() }}
201+ </Text >
205202 </Flex >
206203
207- <Text size =" 13" weight =" 600" color =" primary" >
208- {{ tx.hash.slice(tx.hash.length - 4, tx.hash.length).toUpperCase() }}
209- </Text >
210- </template >
211- <template v-else >
204+ <CopyButton :text =" tx.hash" />
205+ </Flex >
206+ </template >
207+ <template v-else >
208+ <Flex align =" center" gap =" 8" >
209+ <Icon name =" tx" size =" 14" color =" secondary" />
212210 <Text size =" 13" weight =" 600" color =" primary" >Genesis</Text >
213- </template >
214- </Flex >
211+ </Flex >
212+ </template >
215213
216214 <template #content >
217215 {{ space(tx.hash).toUpperCase() }}
0 commit comments