Skip to content

Commit b6a4f53

Browse files
committed
Small fixes after call
1 parent 733688b commit b6a4f53

File tree

13 files changed

+147
-63
lines changed

13 files changed

+147
-63
lines changed

components/cmd/CommandMenu.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ const autocompleteGroup = computed(() => {
922922
})
923923
924924
const debouncedSearch = useDebounceFn(async (e) => {
925-
const bookmarks = bookmarksStore.searchBookmark(searchTerm.value)
925+
const bookmarks = bookmarksStore.searchBookmarks(searchTerm.value)
926926
const { data } = await search(searchTerm.value.trim())
927927
928928
data.value = [...bookmarks, ...data.value]
@@ -933,7 +933,7 @@ const debouncedSearch = useDebounceFn(async (e) => {
933933
934934
autocompleteActions.value = []
935935
936-
for (let i = 0; i < Math.min(3, data.value.length); i++) {
936+
for (let i = 0; i < Math.min(5, data.value.length); i++) {
937937
let title
938938
let routerLink
939939
switch (data.value[i].type) {
@@ -974,6 +974,7 @@ const debouncedSearch = useDebounceFn(async (e) => {
974974
autocompleteActions.value.push({
975975
id: id(),
976976
type: "callback",
977+
bookmark: data.value[i].bookmark,
977978
icon: data.value[i].type,
978979
title: title,
979980
subtitle: capitilize(data.value[i].type),

components/cmd/Item.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ const props = defineProps({
2323
</Text>
2424
</Flex>
2525

26-
<Text v-if="action.subtitle" size="12" weight="600" color="tertiary">
27-
{{ action.subtitle }}
28-
</Text>
26+
<Flex align="center" gap="8">
27+
<Icon v-if="action.bookmark" name="bookmark-check" size="12" color="tertiary" />
28+
29+
<Text v-if="action.subtitle" size="12" weight="600" color="tertiary">
30+
{{ action.subtitle }}
31+
</Text>
32+
</Flex>
2933
</Flex>
3034
</template>
3135

components/data/LatestPFBTable.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,16 @@ isLoading.value = false
5555
:color="pfb.status === 'success' ? 'green' : 'red'"
5656
/>
5757

58-
<Text size="12" weight="600" color="primary" mono class="table_column_alias">
59-
{{ $getDisplayName('txs', pfb.hash) }}
58+
<Text size="13" weight="600" color="primary" mono>
59+
{{ pfb.hash.slice(0, 4).toUpperCase() }}
60+
</Text>
61+
62+
<Flex align="center" gap="3">
63+
<div v-for="dot in 3" class="dot" />
64+
</Flex>
65+
66+
<Text size="13" weight="600" color="primary" mono>
67+
{{ pfb.hash.slice(pfb.hash.length - 4, pfb.hash.length).toUpperCase() }}
6068
</Text>
6169

6270
<CopyButton :text="pfb.hash.toUpperCase()" />
@@ -88,7 +96,7 @@ isLoading.value = false
8896
<Flex align="center" gap="6">
8997
<Icon name="block" size="14" color="secondary" />
9098

91-
<Text size="13" weight="600" color="primary" tabular class="table_column_alias">{{ $getDisplayName('blocks', pfb.height) }}</Text>
99+
<Text size="13" weight="600" color="primary" tabular>{{ comma(pfb.height) }}</Text>
92100
</Flex>
93101
</Outline>
94102
</Flex>

components/data/RecentNamespacesTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const handleSort = (by) => {
132132
<Flex align="center" gap="6">
133133
<Icon name="block" size="14" color="secondary" />
134134

135-
<Text size="13" weight="600" color="primary" tabular class="table_column_alias">{{ $getDisplayName('blocks', ns.last_height) }}</Text>
135+
<Text size="13" weight="600" color="primary" tabular>{{ comma(ns.last_height) }}</Text>
136136
</Flex>
137137
</Outline>
138138
</Flex>

components/modals/BlobModal.vue

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Button from "@/components/ui/Button.vue"
55
import Spinner from "@/components/ui/Spinner.vue"
66
77
/** Services */
8-
import { comma, formatBytes, getNamespaceID, space, strToHex } from "@/services/utils"
8+
import { comma, formatBytes, getNamespaceID, shortHash, space, strToHex } from "@/services/utils"
99
1010
/** API */
1111
import { fetchBlobByMetadata } from "@/services/api/namespace"
@@ -238,7 +238,15 @@ const handlePreviewContent = () => {
238238

239239
<Flex align="center" gap="8">
240240
<Text size="13" weight="600" color="primary">
241-
{{ $getDisplayName('txs', cacheStore.selectedBlob.tx.hash) }}
241+
{{ cacheStore.selectedBlob.tx.hash.slice(0, 4) }}
242+
</Text>
243+
244+
<Flex align="center" gap="3">
245+
<div v-for="dot in 3" class="dot" />
246+
</Flex>
247+
248+
<Text size="13" weight="600" color="primary">
249+
{{ cacheStore.selectedBlob.tx.hash.slice(-4) }}
242250
</Text>
243251

244252
<Icon name="arrow-narrow-up-right" size="12" color="secondary" />
@@ -292,7 +300,7 @@ const handlePreviewContent = () => {
292300
<CopyButton :text="cacheStore.selectedBlob.commitment" />
293301

294302
<Text size="13" weight="600" color="primary" :class="$style.value">
295-
{{ cacheStore.selectedBlob.commitment }}
303+
{{ shortHash(cacheStore.selectedBlob.commitment) }}
296304
</Text>
297305
</Flex>
298306
</Flex>
@@ -314,6 +322,24 @@ const handlePreviewContent = () => {
314322
</NuxtLink>
315323
</Flex>
316324
</Flex>
325+
326+
<Flex v-if="cacheStore.selectedBlob.rollup" align="center" justify="between" wide :class="$style.metadata">
327+
<Text size="12" weight="500" color="tertiary">Rollup:</Text>
328+
329+
<NuxtLink :to="`/rollup/${cacheStore.selectedBlob.rollup.slug}`" target="_blank">
330+
<Flex align="center" gap="6">
331+
<Flex align="center" justify="center" :class="$style.avatar_container">
332+
<img :src="cacheStore.selectedBlob.rollup.logo" :class="$style.avatar_image" />
333+
</Flex>
334+
335+
<Text size="13" weight="600" color="primary" :class="$style.value">
336+
{{ cacheStore.selectedBlob.rollup.name }}
337+
</Text>
338+
339+
<Icon name="arrow-narrow-up-right" size="12" color="secondary" />
340+
</Flex>
341+
</NuxtLink>
342+
</Flex>
317343
</Flex>
318344
</Flex>
319345

@@ -433,6 +459,20 @@ const handlePreviewContent = () => {
433459
}
434460
}
435461
462+
.avatar_container {
463+
position: relative;
464+
width: 20px;
465+
height: 20px;
466+
overflow: hidden;
467+
border-radius: 50%;
468+
}
469+
470+
.avatar_image {
471+
width: 100%;
472+
height: 100%;
473+
object-fit: cover;
474+
}
475+
436476
@media (max-width: 550px) {
437477
.metadata {
438478
flex-direction: column;

components/modules/block/BlobsTable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const handleViewBlob = (blob) => {
106106
signer: blob.signer,
107107
size: blob.size,
108108
tx: blob.tx,
109+
rollup: blob.rollup,
109110
}
110111
111112
modalsStore.open("blob")
@@ -171,7 +172,7 @@ const handlePrev = () => {
171172
<th><Text size="12" weight="600" color="tertiary">Share Commitments</Text></th>
172173
<th><Text size="12" weight="600" color="tertiary">Size</Text></th>
173174
<th><Text size="12" weight="600" color="tertiary">Version</Text></th>
174-
<th><Text size="12" weight="600" color="tertiary">Rollup</Text></th>
175+
<th><Text size="12" weight="600" color="tertiary"></Text></th>
175176
</tr>
176177
</thead>
177178

components/modules/block/BlockOverview.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,17 @@ const handleViewRawTransactions = () => {
578578
:color="tx.status === 'success' ? 'green' : 'red'"
579579
/>
580580

581-
<Text size="12" weight="600" color="primary" mono class="table_column_alias">
582-
{{ $getDisplayName('txs', tx.hash) }}
583-
</Text>
581+
<Text size="13" weight="600" color="primary" mono>{{
582+
tx.hash.slice(0, 4).toUpperCase()
583+
}}</Text>
584+
585+
<Flex align="center" gap="3">
586+
<div v-for="dot in 3" class="dot" />
587+
</Flex>
588+
589+
<Text size="13" weight="600" color="primary" mono>{{
590+
tx.hash.slice(tx.hash.length - 4, tx.hash.length).toUpperCase()
591+
}}</Text>
584592

585593
<CopyButton :text="tx.hash" />
586594
</Flex>

components/modules/namespace/tables/MessagesTable.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ const props = defineProps({
4545
:color="message.tx.status === 'success' ? 'green' : 'red'"
4646
/>
4747

48-
<Text size="12" weight="600" color="primary" mono class="table_column_alias">
49-
{{ $getDisplayName('txs', message.tx.hash) }}
48+
<Text size="13" weight="600" color="primary" mono>{{ message.tx.hash.slice(0, 4).toUpperCase() }}</Text>
49+
50+
<Flex align="center" gap="3">
51+
<div v-for="dot in 3" class="dot" />
52+
</Flex>
53+
54+
<Text size="13" weight="600" color="primary" mono>
55+
{{ message.tx.hash.slice(message.tx.hash.length - 4, message.tx.hash.length).toUpperCase() }}
5056
</Text>
5157

5258
<CopyButton :text="message.tx.hash" />

pages/txs.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,16 @@ const handleNext = () => {
556556
:color="tx.status === 'success' ? 'green' : 'red'"
557557
/>
558558

559-
<Text size="12" weight="600" color="primary" mono class="table_column_alias">
560-
{{ $getDisplayName('txs', tx.hash) }}
559+
<Text size="13" weight="600" color="primary" mono>
560+
{{ tx.hash.slice(0, 4).toUpperCase() }}
561+
</Text>
562+
563+
<Flex align="center" gap="3">
564+
<div v-for="dot in 3" class="dot" />
565+
</Flex>
566+
567+
<Text size="13" weight="600" color="primary" mono>
568+
{{ tx.hash.slice(tx.hash.length - 4, tx.hash.length).toUpperCase() }}
561569
</Text>
562570

563571
<CopyButton :text="tx.hash" />

plugins/globalFunctions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** Services */
2-
import { comma, getShortHash, getShortNamespaceID, space, splitAddress } from "@/services/utils"
2+
import { comma, getShortNamespaceID, shortHash, splitAddress } from "@/services/utils"
33

44
/** Store */
55
import { useBookmarksStore } from "@/store/bookmarks"
@@ -22,7 +22,7 @@ export default defineNuxtPlugin((nuxtApp) => {
2222
case 'namespaces':
2323
return getShortNamespaceID(id)
2424
case 'txs':
25-
return getShortHash(id)
25+
return shortHash(id)
2626
default:
2727
return id
2828
}

0 commit comments

Comments
 (0)