Skip to content

Commit c78cda9

Browse files
authored
Merge branch 'dev' into hex
2 parents 1aa9746 + b5a8bc6 commit c78cda9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1518
-558
lines changed

assets/icons.json

Lines changed: 19 additions & 0 deletions
Large diffs are not rendered by default.

assets/styles/base.scss

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ body {
245245
-webkit-font-smoothing: antialiased;
246246
-moz-osx-font-smoothing: grayscale;
247247

248-
user-select: none;
248+
user-select: text;
249249
}
250250

251251
*::-webkit-scrollbar {
@@ -338,3 +338,45 @@ body {
338338
.slide-leave-to {
339339
transform: translateY(-25px);
340340
}
341+
342+
.table_column_alias {
343+
max-width: 125px;
344+
345+
white-space: nowrap;
346+
overflow: hidden;
347+
text-overflow: ellipsis;
348+
}
349+
350+
.overflow_ellipsis {
351+
white-space: nowrap;
352+
overflow: hidden;
353+
text-overflow: ellipsis;
354+
}
355+
356+
// .ods_wrap {
357+
358+
// }
359+
360+
// .ods_wrap:hover .ods_group[data-index]:not(:hover) {
361+
// filter: brightness(0.7);
362+
// }
363+
364+
.ods_group {
365+
transition: all 0.3s ease;
366+
}
367+
368+
// .ods_group:hover {
369+
// filter: brightness(1.2); /* Яркость */
370+
// }
371+
372+
// .ods_group[data-index]:hover,
373+
// .ods_group[data-index]:hover ~ .ods_group[data-index],
374+
// .ods_group[data-index]:hover ~ svg .ods_group[data-index],
375+
// .ods_group[data-index]:hover ~ .ods_group:not([data-index]):not(:hover) {
376+
// filter: brightness(0.7);
377+
// }
378+
379+
// .ods_group:hover ~ .ods_group,
380+
// .ods_group:hover:not(:hover) {
381+
// filter: brightness(0.7);
382+
// }

components/AddressBadge.vue

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,26 @@
11
<script setup>
2-
defineProps({
2+
const props = defineProps({
33
hash: {
44
type: String,
55
required: true,
66
},
77
color: {
88
type: String,
99
default: "primary"
10-
}
10+
},
11+
})
12+
13+
const alias = computed(() => {
14+
const { $getDisplayName } = useNuxtApp()
15+
16+
return $getDisplayName('addresses', props.hash)
1117
})
1218
</script>
1319

1420
<template>
1521
<NuxtLink :to="`/address/${hash}`" @click.stop>
1622
<Flex align="center" gap="6">
17-
<template v-if="hash.startsWith('celestiavaloper')">
18-
<Text size="13" weight="600" :color="color"> celestiavaloper </Text>
19-
20-
<Flex align="center" gap="3">
21-
<div v-for="dot in 3" class="dot" />
22-
</Flex>
23-
24-
<Text size="13" weight="600" :color="color">
25-
{{ hash.slice(hash.length - 4, hash.length) }}
26-
</Text>
27-
</template>
28-
<template v-else-if="hash.startsWith('celestiavalcons')">
29-
<Text size="13" weight="600" :color="color"> celestiavalcons </Text>
30-
31-
<Flex align="center" gap="3">
32-
<div v-for="dot in 3" class="dot" />
33-
</Flex>
34-
35-
<Text size="13" weight="600" :color="color">
36-
{{ hash.slice(hash.length - 4, hash.length) }}
37-
</Text>
38-
</template>
39-
<template v-else>
40-
<Text size="13" weight="600" :color="color"> celestia </Text>
41-
42-
<Flex align="center" gap="3">
43-
<div v-for="dot in 3" class="dot" />
44-
</Flex>
45-
46-
<Text size="13" weight="600" :color="color">
47-
{{ hash.slice(hash.length - 4, hash.length) }}
48-
</Text>
49-
</template>
23+
<Text size="13" weight="600" :color="color"> {{ alias }} </Text>
5024
</Flex>
5125
</NuxtLink>
5226
</template>

components/BookmarkButton.vue

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<script setup>
2+
/** UI */
3+
import Button from "@/components/ui/Button.vue"
4+
5+
/** Services */
6+
import { capitilize } from "~/services/utils"
7+
8+
/** Store */
9+
import { useBookmarksStore } from "@/store/bookmarks"
10+
import { useCacheStore } from "@/store/cache"
11+
import { useModalsStore } from "@/store/modals"
12+
import { useNotificationsStore } from "@/store/notifications"
13+
const bookmarksStore = useBookmarksStore()
14+
const cacheStore = useCacheStore()
15+
const modalsStore = useModalsStore()
16+
const notificationsStore = useNotificationsStore()
17+
18+
const props = defineProps({
19+
type: {
20+
type: String,
21+
required: true,
22+
},
23+
id: {
24+
type: [String, Number],
25+
required: true,
26+
},
27+
})
28+
29+
const router = useRouter()
30+
31+
const bookmark = ref(null)
32+
const isBookmarked = ref(false)
33+
const isButtonHovered = ref(false)
34+
const bookmarkText = computed(() => {
35+
if (isButtonHovered.value && isBookmarked.value) return "Remove"
36+
37+
return isBookmarked.value ? "Saved" : "Save"
38+
})
39+
40+
const handleBookmark = () => {
41+
if (!isBookmarked.value) {
42+
43+
let newBookmark = {
44+
id: props.id,
45+
type: capitilize(props.type),
46+
ts: new Date().getTime(),
47+
}
48+
49+
isBookmarked.value = bookmarksStore.addBookmark(newBookmark)
50+
51+
if (isBookmarked.value) {
52+
notificationsStore.create({
53+
notification: {
54+
type: "success",
55+
icon: "check",
56+
title: `${capitilize(props.type)} added to bookmarks`,
57+
description: "View all bookmarks on dedicated page",
58+
autoDestroy: true,
59+
actions: [
60+
{
61+
name: "Open Bookmarks",
62+
callback: () => {
63+
router.push("/bookmarks")
64+
},
65+
},
66+
],
67+
},
68+
})
69+
70+
cacheStore.current.bookmark = newBookmark
71+
modalsStore.open("edit_alias")
72+
}
73+
74+
} else {
75+
let notification = {}
76+
77+
if (bookmarksStore.removeBookmark(props.type, props.id)) {
78+
notification = {
79+
type: "success",
80+
icon: "check",
81+
title: `${capitilize(props.type)} removed from bookmarks`,
82+
autoDestroy: true,
83+
}
84+
85+
isBookmarked.value = false
86+
} else {
87+
notification = {
88+
type: "error",
89+
icon: "close",
90+
title: `Failed to remove the bookmark`,
91+
autoDestroy: true,
92+
}
93+
}
94+
95+
notificationsStore.create({
96+
notification: notification,
97+
})
98+
}
99+
}
100+
101+
onMounted(() => {
102+
isBookmarked.value = bookmarksStore.getBookmark(props.type, props.id) ? true : false
103+
})
104+
105+
</script>
106+
107+
<template>
108+
<Flex align="center" gap="8">
109+
<Button
110+
@click="handleBookmark"
111+
@mouseenter="isButtonHovered = true"
112+
@mouseleave="isButtonHovered = false"
113+
type="secondary"
114+
size="mini"
115+
>
116+
<Icon
117+
:name="isButtonHovered && isBookmarked ? 'close' : isBookmarked ? 'bookmark-check' : 'bookmark-plus'"
118+
size="12"
119+
:color="isBookmarked && !isButtonHovered ? 'green' : 'primary'"
120+
/>
121+
{{ bookmarkText }}
122+
</Button>
123+
</Flex>
124+
</template>
125+
126+
<style module>
127+
.items {
128+
overflow: hidden;
129+
}
130+
131+
.item {
132+
& a {
133+
display: flex;
134+
135+
&:hover {
136+
& span {
137+
color: var(--txt-primary);
138+
}
139+
}
140+
}
141+
}
142+
</style>

components/Connection.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,16 @@ const handleDisconnect = () => {
149149
</Tooltip>
150150
151151
<Tooltip v-else-if="!isWalletAvailable" position="end">
152-
<Button type="white" size="small" disabled> Connect </Button>
152+
<Button type="white" size="mini" disabled> Connect </Button>
153153
154-
<template #content> Insall Keplr Wallet before connection </template>
154+
<template #content> Install Keplr Wallet before connection </template>
155155
</Tooltip>
156156
157-
<Button v-else-if="!appStore.address" @click="handleConnect" type="white" size="small"> Connect </Button>
157+
<Button v-else-if="!appStore.address" @click="handleConnect" type="white" size="mini"> Connect </Button>
158158
159159
<Dropdown v-else>
160-
<Button type="secondary" size="small">
161-
<Icon name="address" size="14" color="primary" />
160+
<Button type="secondary" size="mini">
161+
<Icon name="address" size="13" color="primary" />
162162
{{ appStore.balance }} TIA
163163
</Button>
164164

0 commit comments

Comments
 (0)