diff --git a/assets/icons.json b/assets/icons.json index 93d7aa61..9c18c3c5 100644 --- a/assets/icons.json +++ b/assets/icons.json @@ -202,6 +202,8 @@ "bar-chart": "M3,22V8H7V22H3M10,22V2H14V22H10M17,22V14H21V22H17Z", "gantt-chart": "M2,5H10V2H12V22H10V18H6V15H10V13H4V10H10V8H2V5M14,5H17V8H14V5M14,10H19V13H14V10M14,15H22V18H14V15Z", "crown": "M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z", + "earth": "M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z", + "city": "M15,23H13V21H15V23M19,21H17V23H19V21M15,17H13V19H15V17M7,21H5V23H7V21M7,17H5V19H7V17M19,17H17V19H19V17M15,13H13V15H15V13M19,13H17V15H19V13M21,9A2,2 0 0,1 23,11V23H21V11H11V23H9V15H3V23H1V15A2,2 0 0,1 3,13H9V11A2,2 0 0,1 11,9V7A2,2 0 0,1 13,5H15V1H17V5H19A2,2 0 0,1 21,7V9M19,9V7H13V9H19Z" "drop": "M12 18C12 18.7 12.12 19.36 12.34 20C12.23 20 12.12 20 12 20C8.69 20 6 17.31 6 14C6 10 12 3.25 12 3.25S16.31 8.1 17.62 12C16.93 12.06 16.28 12.22 15.67 12.47C15 10.68 13.5 8.33 12 6.39C10 8.96 8 12.23 8 14C8 16.21 9.79 18 12 18M19 17V14H17V17H14V19H17V22H19V19H22V17H19Z", "faucet": "M21 21H3C3 19.9 3.9 19 5 19H19C20.11 19 21 19.89 21 21M19 7C19 5.39 17.93 3 15 3S11 5.39 11 7V18H13V7C13 6.54 13.17 5 15 5S17 6.54 17 7H16.5V9H19.5V7H19M7 12C6.45 12 6 12.45 6 13V14H3V15H6V18H8V13C8 12.45 7.55 12 7 12M21 14H18V13C18 12.45 17.55 12 17 12S16 12.45 16 13V18H18V15H21V14Z" } diff --git a/assets/styles/base.scss b/assets/styles/base.scss index 8151e013..4c4a465a 100644 --- a/assets/styles/base.scss +++ b/assets/styles/base.scss @@ -78,6 +78,7 @@ $grayscale: ( // --supply: #65c7f8; --supply: #1ca7ed; --staking: #85f891; + --geo-map: #8B8C8D; } [theme="dimmed"] { @@ -139,6 +140,7 @@ $grayscale: ( --block-progress-fill-background: #33a853; --logo-name: var(--txt-primary); --bar-fill: rgb(243, 147, 45); + --geo-map: #8B8C8D; } [theme="light"] { @@ -200,6 +202,7 @@ $grayscale: ( --block-progress-fill-background: #33a853; --logo-name: var(--txt-primary); --bar-fill: rgb(243, 147, 45); + --geo-map: #8B8C8D; } @font-face { diff --git a/components/LeftSidebar.vue b/components/LeftSidebar.vue index 19b8d3a5..035119e3 100644 --- a/components/LeftSidebar.vue +++ b/components/LeftSidebar.vue @@ -85,6 +85,11 @@ const mainLinks = reactive([ path: "/stats?tab=rollups", queryParam: {tab: "rollups"}, }, + { + name: "Ecosystem", + path: "/stats?tab=ecosystem", + queryParam: {tab: "ecosystem"}, + }, ], }, ]) diff --git a/components/modules/stats/BarplotChartCard.vue b/components/modules/stats/BarplotChartCard.vue new file mode 100644 index 00000000..7da2f42b --- /dev/null +++ b/components/modules/stats/BarplotChartCard.vue @@ -0,0 +1,290 @@ + + + + + diff --git a/components/modules/stats/GeoMap.vue b/components/modules/stats/GeoMap.vue new file mode 100644 index 00000000..e5635186 --- /dev/null +++ b/components/modules/stats/GeoMap.vue @@ -0,0 +1,632 @@ + + + + + diff --git a/components/modules/stats/InsightCard.vue b/components/modules/stats/InsightCard.vue index 1108a0b5..277e205e 100644 --- a/components/modules/stats/InsightCard.vue +++ b/components/modules/stats/InsightCard.vue @@ -10,7 +10,7 @@ import DiffChip from "@/components/modules/stats/DiffChip.vue" import { abbreviate, capitilize, comma, formatBytes, shareOfTotal, shareOfTotalString } from "@/services/utils" /** API */ -import { fetch24hDiffs, fetchSummary } from "@/services/api/stats" +import { fetchGeneralStats, fetchSummary } from "@/services/api/stats" const props = defineProps({ series: { @@ -67,7 +67,7 @@ const getSeries = async () => { }, ] } else { - data = await fetch24hDiffs({ name: props.series.name }) + data = await fetchGeneralStats({ name: props.series.name }) } switch (props.series.name) { diff --git a/components/modules/stats/RollupsActivityGraph.vue b/components/modules/stats/RollupsActivityGraph.vue index ad4b5b72..edb5a248 100644 --- a/components/modules/stats/RollupsActivityGraph.vue +++ b/components/modules/stats/RollupsActivityGraph.vue @@ -19,9 +19,15 @@ const metrics = ref([ \ No newline at end of file diff --git a/components/modules/stats/tabs/EcosystemTab.vue b/components/modules/stats/tabs/EcosystemTab.vue new file mode 100644 index 00000000..fe0feba9 --- /dev/null +++ b/components/modules/stats/tabs/EcosystemTab.vue @@ -0,0 +1,146 @@ + + + + + \ No newline at end of file diff --git a/components/modules/stats/tabs/GeneralTab.vue b/components/modules/stats/tabs/GeneralTab.vue index a15ba6a7..6c5508bc 100644 --- a/components/modules/stats/tabs/GeneralTab.vue +++ b/components/modules/stats/tabs/GeneralTab.vue @@ -14,7 +14,7 @@ import InsightCard from "@/components/modules/stats/InsightCard.vue" import { getInsightsByGroup, getSeriesByGroupAndType, STATS_PERIODS } from "@/services/constants/stats.js" /** API */ -import { fetch24hDiffs } from "@/services/api/stats.js" +import { fetchGeneralStats } from "@/services/api/stats.js" /** Store */ import { useAppStore } from "@/store/app" @@ -62,7 +62,7 @@ const insights = computed(() => getInsightsByGroup('General')) const get24hDiffs = async () => { isLoading.value = true - const data = await fetch24hDiffs({ name: 'changes_24h' }) + const data = await fetchGeneralStats({ name: 'changes_24h' }) diffs24h.value = data isLoading.value = false diff --git a/components/modules/stats/tabs/RollupsTab.vue b/components/modules/stats/tabs/RollupsTab.vue index 5a8c99fa..c2c21d04 100644 --- a/components/modules/stats/tabs/RollupsTab.vue +++ b/components/modules/stats/tabs/RollupsTab.vue @@ -17,7 +17,7 @@ import Popover from "@/components/ui/Popover.vue" import { getSeriesByGroupAndType } from "@/services/constants/stats.js" /** Services */ -import { capitilize, capitalizeAndReplaceUnderscore } from "@/services/utils" +import { capitilize, capitalizeAndReplaceUnderscore, isMainnet } from "@/services/utils" /** API */ import { fetchRollups, fetchRollupsDailyStats } from "@/services/api/rollup.js" @@ -266,7 +266,7 @@ watch( -