Skip to content

Commit febf727

Browse files
authored
Merge branch 'master' into dev
2 parents 4c2847d + 0117383 commit febf727

File tree

7 files changed

+87
-54
lines changed

7 files changed

+87
-54
lines changed

components/LeftSidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ const mainLinks = reactive([
9494
{
9595
name: "Ecosystem",
9696
path: "/stats?tab=ecosystem",
97-
queryParam: { tab: "ecosystem" },
98-
show: false,
97+
queryParam: {tab: "ecosystem"},
98+
show: isMainnet(),
9999
},
100100
],
101101
},

components/modules/stats/GeoMap.vue

Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -455,44 +455,53 @@ watch(
455455
456456
<template>
457457
<Flex direction="column" justify="start" gap="8" wide :class="$style.wrapper">
458-
<Flex
459-
@click="handleChangeChartView"
460-
align="center"
461-
gap="12"
462-
:class="$style.chart_selector"
463-
:style="{
464-
background: `linear-gradient(to ${chartView === 'countries' ? 'right' : 'left'}, var(--op-5) 50%, transparent 50%)`,
465-
}"
466-
>
467-
<Icon name="earth" size="14" :style="{ fill: `${chartView === 'countries' ? 'var(--mint)' : 'var(--txt-tertiary)'}` }" />
468-
469-
<Icon name="city" size="14" :style="{ fill: `${chartView === 'cities' ? 'var(--mint)' : 'var(--txt-tertiary)'}` }" />
470-
</Flex>
471-
472-
<Tooltip v-if="chartView === 'cities'" position="start" :class="$style.chart_info">
473-
<Icon name="info" size="16" color="yellow" />
474-
475-
<template #content>
476-
<Flex align="center" gap="2" :style="{ width: '200px' }">
477-
<Text size="12" weight="600" color="secondary">
478-
Somewhere in..
479-
<Text size="12" weight="400" color="secondary">
480-
means that it was not possible to determine the exact location.
481-
</Text>
482-
</Text>
483-
</Flex>
484-
</template>
485-
</Tooltip>
486-
487-
<Flex ref="chartEl" :class="$style.chart" />
488-
489-
<Flex v-if="isLoading" align="center" direction="column" gap="8" :class="$style.loader">
490-
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 512 512">
491-
<path id="france-path" fill="transparent" :d="loaderPath" />
492-
</svg>
493-
494-
<Text size="12" color="secondary">Loading map..</Text>
495-
</Flex>
458+
<Flex
459+
@click="handleChangeChartView"
460+
align="center"
461+
gap="12"
462+
:class="$style.chart_selector"
463+
:style="{
464+
background: `linear-gradient(to ${chartView === 'countries' ? 'right' : 'left'}, var(--op-5) 50%, transparent 50%)`,
465+
}"
466+
>
467+
<Icon
468+
name="earth"
469+
size="14"
470+
:style="{ fill: `${chartView === 'countries' ? 'var(--mint)' : 'var(--txt-tertiary)'}` }"
471+
/>
472+
473+
<Icon
474+
name="city"
475+
size="14"
476+
:style="{ fill: `${chartView === 'cities' ? 'var(--mint)' : 'var(--txt-tertiary)'}` }"
477+
/>
478+
</Flex>
479+
480+
<Tooltip v-if="chartView === 'cities'" position="start" :class="$style.chart_info">
481+
<Icon name="info" size="16" color="yellow" />
482+
483+
<template #content>
484+
<Flex align="center" gap="2" :style="{ width: '200px' }">
485+
<Text size="12" weight="600" color="secondary">
486+
"Somewhere in ..."
487+
<Text size="12" weight="400" color="secondary">
488+
means that it was not possible to determine the exact location.
489+
</Text>
490+
</Text>
491+
492+
</Flex>
493+
</template>
494+
</Tooltip>
495+
496+
<Flex ref="chartEl" :class="$style.chart" />
497+
498+
<Flex v-if="isLoading" align="center" direction="column" gap="8" :class="$style.loader">
499+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 512 512">
500+
<path id="france-path" fill="transparent" :d="loaderPath"/>
501+
</svg>
502+
503+
<Text size="12" color="secondary">Loading map..</Text>
504+
</Flex>
496505
</Flex>
497506
</template>
498507

components/modules/stats/tabs/EcosystemTab.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,22 @@ onMounted(async () => {
6969
</script>
7070

7171
<template>
72-
<Flex align="center" direction="column" gap="16" wide :class="$style.wrapper">
73-
<Flex align="start" direction="column" gap="32" wide :class="$style.section">
74-
<Text size="16" weight="600" color="primary" justify="start">Light Node Distribution</Text>
72+
<Flex align="center" direction="column" gap="16" wide :class="$style.wrapper">
73+
<Flex align="start" direction="column" gap="32" wide :class="$style.section">
74+
<Text size="16" weight="600" color="primary" justify="start">Celestia Node Distribution</Text>
7575

7676
<GeoMap :class="$style.chart" />
7777

7878
<Flex v-if="!isLoading" align="center" justify="between" gap="16" wide :class="$style.charts_wrapper">
7979
<BarplotChartCard v-for="s in series" :series="s" :data="s.data" :class="$style.chart_card" />
8080
</Flex>
81+
82+
<Flex align="center" justify="end" wide>
83+
<Text size="12" color="tertiary" justify="start">Data provided by the
84+
<NuxtLink to="https://probelab.io" target="_blank" :class="$style.link">ProbeLab</NuxtLink>
85+
team
86+
</Text>
87+
</Flex>
8188
</Flex>
8289
</Flex>
8390
</template>
@@ -110,6 +117,11 @@ onMounted(async () => {
110117
height: 240px;
111118
}
112119
120+
.link {
121+
color: var(--brand);
122+
font-weight: 600;
123+
}
124+
113125
@media (max-width: 1050px) {
114126
.chart {
115127
/* width: 700px; */

nuxt.config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@ import { nodePolyfills } from "vite-plugin-node-polyfills"
22
import wasm from "vite-plugin-wasm"
33
import topLevelAwait from "vite-plugin-top-level-await"
44

5-
import { updateSiteConfig } from "nuxt-site-config/kit"
6-
75
import path from "path"
86

97
export default defineNuxtConfig({
108
modules: ["nuxt-site-config", "@pinia/nuxt", "nuxt-og-image", "@nuxtjs/sitemap"],
119

12-
hooks: {
13-
"site-config:resolve": () => {
14-
updateSiteConfig({
15-
url: process.env.CF_PAGES_URL ?? "https://celenium.io",
16-
})
17-
},
10+
site: {
11+
url: "https://celenium.io",
1812
},
1913

2014
sitemap: {

pages/rollups/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const config = reactive({
113113
}
114114
: {}),
115115
da_change: {
116-
show: true,
116+
show: false,
117117
},
118118
size: {
119119
show: true,
@@ -131,7 +131,7 @@ const config = reactive({
131131
show: true,
132132
},
133133
today_blobs: {
134-
show: false,
134+
show: true,
135135
sortPath: "stats.day_blobs_count",
136136
},
137137
...(isMainnet()

pages/stats/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const tabs = ref([
7777
},
7878
{
7979
name: "ecosystem",
80-
visible: false,
80+
visible: isMainnet(),
8181
},
8282
])
8383
const activeTab = ref(

server/plugins/siteConfig.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const origins = [
2+
"https://mocha.celenium.io/",
3+
"https://arabica.celenium.io/",
4+
"https://mocha-4.celenium.io/",
5+
"https://mammoth.celenium.io/",
6+
]
7+
8+
export default defineNitroPlugin((nitroApp) => {
9+
nitroApp.hooks.hook("site-config:init", ({ event, siteConfig }) => {
10+
const origin = useNitroOrigin(event)
11+
12+
if (!origins.includes(origin)) return
13+
14+
siteConfig.push({
15+
url: origin,
16+
})
17+
})
18+
})

0 commit comments

Comments
 (0)