Skip to content

Commit ee83e76

Browse files
committed
Merge branch 'dev' into rename-rollups
2 parents 30cc95d + 5dcdf06 commit ee83e76

File tree

11 files changed

+203
-168
lines changed

11 files changed

+203
-168
lines changed

components/modals/BlobModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ const getBlobMetadata = async () => {
7878
// console.error(err);
7979
8080
notFound.value = true
81+
} finally {
82+
isLoading.value = false
8183
}
8284
}
8385

components/modules/hyperlane/TransfersTable.vue

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { DateTime } from "luxon"
55
/** Services */
66
import { comma } from "@/services/utils"
77
8-
/** UI */
9-
import Button from "@/components/ui/Button.vue"
10-
118
/** Shared Components */
129
import TablePlaceholderView from "@/components/shared/TablePlaceholderView.vue"
1310
@@ -17,36 +14,17 @@ import { useCacheStore } from "@/store/cache.store"
1714
const modalsStore = useModalsStore()
1815
const cacheStore = useCacheStore()
1916
20-
const emit = defineEmits(["onPrevPage", "onNextPage", "updatePage"])
2117
const props = defineProps({
2218
transfers: {
2319
type: Array,
2420
default: [],
2521
},
26-
page: {
27-
type: Number,
28-
default: 1,
29-
},
3022
isLoading: {
3123
type: Boolean,
3224
default: false,
3325
},
3426
})
3527
36-
/** Pagination */
37-
const handlePrevPage = () => {
38-
if (props.page === 1) return
39-
emit("onPrevPage")
40-
}
41-
42-
const isNextPageDisabled = computed(() => {
43-
return !props.transfers.length || props.transfers.length !== 10
44-
})
45-
const handleNextPage = () => {
46-
if (isNextPageDisabled.value) return
47-
emit("onNextPage")
48-
}
49-
5028
const handleOpenTransferModal = (transfer) => {
5129
cacheStore.current.hyperlaneTransfer = transfer
5230
modalsStore.open("hyperlaneTransfer")
@@ -165,31 +143,11 @@ const handleOpenTransferModal = (transfer) => {
165143
:descriptionWidth="260"
166144
style="height: 100%"
167145
/>
168-
169-
<!-- Pagination -->
170-
<Flex align="center" gap="6" :class="$style.pagination">
171-
<Button @click="emit('updatePage', 1)" type="secondary" size="mini" :disabled="page === 1">
172-
<Icon name="arrow-left-stop" size="12" color="primary" />
173-
</Button>
174-
<Button type="secondary" @click="handlePrevPage" size="mini" :disabled="page === 1">
175-
<Icon name="arrow-left" size="12" color="primary" />
176-
</Button>
177-
178-
<Button type="secondary" size="mini" disabled>
179-
<Text size="12" weight="600" color="primary"> Page {{ comma(page) }} </Text>
180-
</Button>
181-
182-
<Button @click="handleNextPage" type="secondary" size="mini" :disabled="isNextPageDisabled">
183-
<Icon name="arrow-right" size="12" color="primary" />
184-
</Button>
185-
</Flex>
186146
</Flex>
187147
</template>
188148

189149
<style module>
190150
.wrapper {
191-
height: 100%;
192-
193151
border-radius: 4px 4px 8px 8px;
194152
background: var(--card-background);
195153
@@ -256,7 +214,7 @@ const handleOpenTransferModal = (transfer) => {
256214
overflow-x: auto;
257215
}
258216
259-
.table.disabled {
217+
.disabled {
260218
opacity: 0.5;
261219
pointer-events: none;
262220
}

components/modules/ibc/ChainsTable.vue

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,21 @@
11
<script setup>
22
/** Services */
3-
import { comma, abbreviate } from "@/services/utils"
3+
import { abbreviate } from "@/services/utils"
44
import { IbcChainName, IbcChainLogo } from "@/services/constants/ibc"
55
6-
/** UI */
7-
import Button from "@/components/ui/Button.vue"
8-
96
/** Shared Components */
107
import TablePlaceholderView from "@/components/shared/TablePlaceholderView.vue"
118
12-
const emit = defineEmits(["onPrevPage", "onNextPage", "updatePage"])
139
const props = defineProps({
1410
chains: {
1511
type: Array,
1612
default: [],
1713
},
18-
page: {
19-
type: Number,
20-
default: 1,
21-
},
2214
isLoading: {
2315
type: Boolean,
2416
default: false,
2517
},
2618
})
27-
28-
/** Pagination */
29-
const handlePrevPage = () => {
30-
if (props.page === 1) return
31-
emit("onPrevPage")
32-
}
33-
34-
const isNextPageDisabled = computed(() => {
35-
return !props.chains.length || props.chains.length !== 10
36-
})
37-
const handleNextPage = () => {
38-
if (isNextPageDisabled.value) return
39-
emit("onNextPage")
40-
}
4119
</script>
4220

4321
<template>
@@ -123,31 +101,11 @@ const handleNextPage = () => {
123101
:descriptionWidth="260"
124102
style="height: 100%"
125103
/>
126-
127-
<!-- Pagination -->
128-
<Flex align="center" gap="6" :class="$style.pagination">
129-
<Button @click="emit('updatePage', 1)" type="secondary" size="mini" :disabled="page === 1">
130-
<Icon name="arrow-left-stop" size="12" color="primary" />
131-
</Button>
132-
<Button type="secondary" @click="handlePrevPage" size="mini" :disabled="page === 1">
133-
<Icon name="arrow-left" size="12" color="primary" />
134-
</Button>
135-
136-
<Button type="secondary" size="mini" disabled>
137-
<Text size="12" weight="600" color="primary"> Page {{ comma(page) }} </Text>
138-
</Button>
139-
140-
<Button @click="handleNextPage" type="secondary" size="mini" :disabled="isNextPageDisabled">
141-
<Icon name="arrow-right" size="12" color="primary" />
142-
</Button>
143-
</Flex>
144104
</Flex>
145105
</template>
146106

147107
<style module>
148108
.wrapper {
149-
height: 100%;
150-
151109
border-radius: 4px 4px 8px 8px;
152110
background: var(--card-background);
153111
@@ -220,7 +178,7 @@ const handleNextPage = () => {
220178
}
221179
222180
.pagination {
223-
padding: 8px 16px 16px 16px;
181+
padding: 10px 16px 10px 16px;
224182
}
225183
226184
@media (max-width: 800px) {

components/modules/ibc/TransfersTable.vue

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import { DateTime } from "luxon"
66
import { comma } from "@/services/utils"
77
import { IbcChainName, IbcChainLogo } from "@/services/constants/ibc"
88
9-
/** UI */
10-
import Button from "@/components/ui/Button.vue"
11-
129
/** Shared Components */
1310
import TablePlaceholderView from "@/components/shared/TablePlaceholderView.vue"
1411
@@ -18,36 +15,17 @@ import { useCacheStore } from "@/store/cache.store"
1815
const modalsStore = useModalsStore()
1916
const cacheStore = useCacheStore()
2017
21-
const emit = defineEmits(["onPrevPage", "onNextPage", "updatePage"])
2218
const props = defineProps({
2319
transfers: {
2420
type: Array,
2521
default: [],
2622
},
27-
page: {
28-
type: Number,
29-
default: 1,
30-
},
3123
isLoading: {
3224
type: Boolean,
3325
default: false,
3426
},
3527
})
3628
37-
/** Pagination */
38-
const handlePrevPage = () => {
39-
if (props.page === 1) return
40-
emit("onPrevPage")
41-
}
42-
43-
const isNextPageDisabled = computed(() => {
44-
return !props.transfers.length || props.transfers.length !== 10
45-
})
46-
const handleNextPage = () => {
47-
if (isNextPageDisabled.value) return
48-
emit("onNextPage")
49-
}
50-
5129
const handleOpenTransferModal = (transfer) => {
5230
cacheStore.current.transfer = transfer
5331
modalsStore.open("ibcTransfer")
@@ -173,31 +151,11 @@ const getChainLogo = (transfer, target) => {
173151
:descriptionWidth="260"
174152
style="height: 100%"
175153
/>
176-
177-
<!-- Pagination -->
178-
<Flex align="center" gap="6" :class="$style.pagination">
179-
<Button @click="emit('updatePage', 1)" type="secondary" size="mini" :disabled="page === 1">
180-
<Icon name="arrow-left-stop" size="12" color="primary" />
181-
</Button>
182-
<Button type="secondary" @click="handlePrevPage" size="mini" :disabled="page === 1">
183-
<Icon name="arrow-left" size="12" color="primary" />
184-
</Button>
185-
186-
<Button type="secondary" size="mini" disabled>
187-
<Text size="12" weight="600" color="primary"> Page {{ comma(page) }} </Text>
188-
</Button>
189-
190-
<Button @click="handleNextPage" type="secondary" size="mini" :disabled="isNextPageDisabled">
191-
<Icon name="arrow-right" size="12" color="primary" />
192-
</Button>
193-
</Flex>
194154
</Flex>
195155
</template>
196156
197157
<style module>
198158
.wrapper {
199-
height: 100%;
200-
201159
border-radius: 4px 4px 8px 8px;
202160
background: var(--card-background);
203161
@@ -264,15 +222,11 @@ const getChainLogo = (transfer, target) => {
264222
overflow-x: auto;
265223
}
266224
267-
.table.disabled {
225+
.disabled {
268226
opacity: 0.5;
269227
pointer-events: none;
270228
}
271229
272-
.pagination {
273-
padding: 8px 16px 16px 16px;
274-
}
275-
276230
@media (max-width: 800px) {
277231
.table {
278232
border-radius: 4px 4px 8px 8px;

components/modules/stats/BlocksFeed.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const chartBlocksEl = ref(null)
7171
const chartWidth = ref()
7272
7373
const barWidth = computed(() => Math.max(Math.round(chartWidth.value / 80 - 4), 4))
74-
const marginBar = computed(() => (chartWidth.value - barWidth.value * 80) / 79)
74+
const marginBar = computed(() => Math.round((chartWidth.value - barWidth.value * 80) / 79))
7575
7676
const debouncedRedraw = () => {
7777
chartWidth.value = chartBlocksEl.value?.wrapper?.offsetWidth

components/widgets/BlockWidget.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { DateTime } from "luxon"
44
55
/** Services */
6-
import { comma } from "@/services/utils"
6+
import { comma, roundTo } from "@/services/utils"
77
88
/** UI */
99
import Tooltip from "@/components/ui/Tooltip.vue"
@@ -122,7 +122,7 @@ onBeforeUnmount(() => {
122122

123123
<Tooltip>
124124
<Flex direction="column" gap="12" align="end" justify="end">
125-
<Text v-if="lastBlock" size="14" weight="600" color="primary"> ~{{ Math.ceil(avgBlockTime) }}s </Text>
125+
<Text v-if="lastBlock" size="14" weight="600" color="primary"> ~{{ roundTo(avgBlockTime) }}s </Text>
126126
<Skeleton v-else w="32" h="14" />
127127

128128
<Flex align="center" gap="4">

0 commit comments

Comments
 (0)