Skip to content

Commit 22facb1

Browse files
committed
Merge branch 'ms-2-part-2' into ms-2-part-2-mainnet
2 parents b82c5ae + c42ec31 commit 22facb1

File tree

11 files changed

+269
-42
lines changed

11 files changed

+269
-42
lines changed

components/LeftSidebar.vue

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import NavLink from "@/components/modules/navigation/NavLink.vue"
1010
/** Utils */
1111
import { getNetworkName } from "@/services/utils/general"
1212
import { StatusMap } from "@/services/constants/node"
13-
import { isMobile } from "@/services/utils"
13+
import { isMainnet, isMobile } from "@/services/utils"
1414
1515
/** Store */
1616
import { useAppStore } from "~/store/app"
@@ -52,16 +52,19 @@ const mainLinks = reactive([
5252
name: "Active",
5353
path: "/validators?status=active&page=1",
5454
queryParam: {status: "active"},
55+
show: true,
5556
},
5657
{
5758
name: "Jailed",
5859
path: "/validators?status=jailed&page=1",
5960
queryParam: {status: "jailed"},
61+
show: true,
6062
},
6163
{
6264
name: "Inactive",
6365
path: "/validators?status=inactive&page=1",
6466
queryParam: {status: "inactive"},
67+
show: true,
6568
},
6669
],
6770
},
@@ -74,21 +77,25 @@ const mainLinks = reactive([
7477
name: "General",
7578
path: "/stats?tab=general",
7679
queryParam: {tab: "general"},
80+
show: true,
7781
},
7882
{
7983
name: "Blocks",
8084
path: "/stats?tab=blocks",
8185
queryParam: {tab: "blocks"},
86+
show: true,
8287
},
8388
{
8489
name: "Rollups",
8590
path: "/stats?tab=rollups",
8691
queryParam: {tab: "rollups"},
92+
show: true,
8793
},
8894
{
8995
name: "Ecosystem",
9096
path: "/stats?tab=ecosystem",
9197
queryParam: {tab: "ecosystem"},
98+
show: isMainnet(),
9299
},
93100
],
94101
},
@@ -104,11 +111,13 @@ const modularLinks = reactive([
104111
{
105112
name: "Cost Savings",
106113
path: "/calculators/savings",
114+
show: true,
107115
},
108116
{
109117
name: "Register rollup",
110118
path: "https://forms.gle/nimJyQJG4Lb4BTcG7",
111119
external: true,
120+
show: true,
112121
},
113122
],
114123
},
@@ -120,6 +129,7 @@ const modularLinks = reactive([
120129
{
121130
name: "Treemap View",
122131
path: "/namespaces/treemap",
132+
show: true,
123133
},
124134
],
125135
},
@@ -174,6 +184,10 @@ const newLinks = reactive([
174184
const handleNavigate = (url) => {
175185
window.location.replace(url)
176186
}
187+
188+
const handleOnClose = () => {
189+
appStore.showSidebar = false
190+
}
177191
</script>
178192

179193
<template>
@@ -204,7 +218,7 @@ const handleNavigate = (url) => {
204218
</Flex>
205219

206220
<Flex direction="column" gap="2">
207-
<NavLink v-for="link in mainLinks" :link="link" @onClose="appStore.showSidebar = false" />
221+
<NavLink v-for="link in mainLinks" :link="link" @onClose="handleOnClose" />
208222
</Flex>
209223

210224
<Flex direction="column" gap="2">
@@ -219,7 +233,7 @@ const handleNavigate = (url) => {
219233
</Flex>
220234

221235
<Flex v-if="!isModularLinksCollapsed" direction="column" gap="2">
222-
<NavLink v-for="link in modularLinks" :link="link" @onClose="appStore.showSidebar = false" />
236+
<NavLink v-for="link in modularLinks" :link="link" @onClose="handleOnClose" />
223237
</Flex>
224238
</Flex>
225239

@@ -235,7 +249,7 @@ const handleNavigate = (url) => {
235249
</Flex>
236250

237251
<Flex v-if="!isToolsLinkCollapsed" direction="column" gap="2">
238-
<NavLink v-for="link in toolsLinks" :link="link" @onClose="appStore.showSidebar = false" />
252+
<NavLink v-for="link in toolsLinks" :link="link" @onClose="handleOnClose" />
239253
</Flex>
240254
</Flex>
241255

components/modules/address/AddressOverview.vue

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -801,13 +801,15 @@ const handleOpenQRModal = () => {
801801
</Flex>
802802
803803
<Flex v-if="!collapseCelestials" direction="column" gap="12" :class="$style.key_value">
804-
<Flex v-for="c in celestials" align="center" gap="8">
805-
<Flex v-if="c.image_url" align="center" justify="center" :class="$style.cel_image_container">
806-
<img :src="c.image_url" :class="$style.cel_image" />
807-
</Flex>
804+
<NuxtLink v-for="c in celestials" :to="`https://celestials.id/id/${c.name}?utm_source=celenium_address_page`" target="_blank" :class="$style.link">
805+
<Flex align="center" gap="8">
806+
<Flex v-if="c.image_url" align="center" justify="center" :class="$style.cel_image_container">
807+
<img :src="c.image_url" :class="$style.cel_image" />
808+
</Flex>
808809
809-
<Text size="12" weight="600" color="tertiary"> {{ c.name }} </Text>
810-
</Flex>
810+
<Text size="12" weight="600" color="tertiary"> {{ c.name }} </Text>
811+
</Flex>
812+
</NuxtLink>
811813
</Flex>
812814
</Flex>
813815
@@ -1296,6 +1298,18 @@ const handleOpenQRModal = () => {
12961298
}
12971299
}
12981300
1301+
.link {
1302+
&:hover {
1303+
span {
1304+
color: var(--txt-primary);
1305+
}
1306+
1307+
img {
1308+
filter: brightness(1.2)
1309+
}
1310+
}
1311+
}
1312+
12991313
@media (max-width: 800px) {
13001314
.content {
13011315
flex-direction: column;

components/modules/navigation/NavLink.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const handleClick = () => {
6969
</script>
7070
7171
<template>
72-
<NuxtLink @click="handleClick" :to="link.path" :target="link.external && '_blank'">
72+
<NuxtLink @click.stop="handleClick" :to="link.path" :target="link.external && '_blank'">
7373
<Flex
7474
align="center"
7575
justify="between"
@@ -96,7 +96,7 @@ const handleClick = () => {
9696
9797
<template v-if="isExpanded">
9898
<Flex direction="column" gap="2">
99-
<NavLink v-for="l in link.children" :link="l" />
99+
<NavLink v-for="l in link.children?.filter(l => l.show)" :link="l" @onClose="handleClick" />
100100
</Flex>
101101
</template>
102102
</template>

components/modules/rollup/RollupCharts.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ const buildBarChart = (chartEl, data, onEnter, onLeave, metric) => {
354354
const onPointermoved = (event) => {
355355
onEnter()
356356
357-
// const idx = bisect(data, x.invert(d3.pointer(event)[0]))
358357
const idx = bisect(data, x.invert(d3.pointer(event)[0] - barWidth / 2))
359358
360359
const elements = document.querySelectorAll(`[metric="${metric}"]`)

components/modules/stats/BarChart.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ const tooltip = ref({
3333
})
3434
3535
const buildChart = (chart, cData, pData, onEnter, onLeave) => {
36-
const width = chart.getBoundingClientRect().width
37-
const height = chart.getBoundingClientRect().height
36+
const { width, height } = chart.getBoundingClientRect()
3837
const marginTop = 12
3938
const marginRight = 12
4039
const marginBottom = 24

0 commit comments

Comments
 (0)