File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
1
<script setup>
2
+ /** UI */
3
+ import Tooltip from " @/components/ui/Tooltip.vue"
4
+
2
5
/** API */
3
6
import { fetchSummary } from " @/services/api/stats"
4
7
import { fetchAddressesCount } from " @/services/api/address"
@@ -37,9 +40,25 @@ onMounted(async () => {
37
40
<Text size =" 13" weight =" 600" height =" 110" color =" secondary" >Validators</Text >
38
41
</Flex >
39
42
40
- <Flex gap =" 2" :class =" $style.bars" >
41
- <div v-for =" item in 10" :class =" [$style.bar, (100 * 100) / totalValidators > item * 10 && $style.active]" />
42
- </Flex >
43
+ <Tooltip position =" start" >
44
+ <Flex gap =" 2" :class =" $style.bars" >
45
+ <div v-for =" item in 10" :class =" [$style.bar, (100 * 100) / totalValidators > item * 10 && $style.active]" />
46
+ </Flex >
47
+
48
+ <template #content >
49
+ <Flex direction =" column" gap =" 4" >
50
+ <Flex justify =" between" align =" center" gap =" 40" >
51
+ <Text color =" secondary" >Active / Total</Text >
52
+ <Text color =" primary" > 100 / {{ totalValidators }} </Text >
53
+ </Flex >
54
+
55
+ <Flex justify =" between" align =" center" gap =" 8" >
56
+ <Text color =" secondary" >Percentage</Text >
57
+ <Text color =" primary" >{{ ((100 * 100) / totalValidators).toFixed(2) }}%</Text >
58
+ </Flex >
59
+ </Flex >
60
+ </template >
61
+ </Tooltip >
43
62
44
63
<Flex align =" center" justify =" between" >
45
64
<Text size =" 12" weight =" 600" color =" tertiary" > Active Validators </Text >
You can’t perform that action at this time.
0 commit comments