Skip to content

Commit 01f2983

Browse files
authored
Merge pull request #139 from celenium-io/dev
Release v1.18.0
2 parents c73b27f + 2bbfba8 commit 01f2983

Some content is hidden

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

56 files changed

+3224
-167
lines changed

app.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ activityStore.$subscribe((mutation, state) => {
4747
localStorage.setItem("rollups_ranking", JSON.stringify(state.rollups_ranking))
4848
})
4949
50+
appStore.initConstants()
51+
5052
let watchInterval = null
5153
5254
onMounted(async () => {

assets/icons.json

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

assets/styles/base.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ $grayscale: (
3333

3434
/* General */
3535
--brand: #18d2a5;
36+
--brand-rgb: 24, 210, 165;
3637
--blue: #379bff;
38+
--blue-rgb: 55, 155, 255;
3739
--red: #eb5757;
40+
--red-rgb: 235, 87, 87;
3841
--dark-red: #592121;
3942
--orange: #ff5a17;
4043
--light-orange: #ff8351;

components/AddressBadge.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ const props = defineProps({
66
},
77
color: {
88
type: String,
9-
default: "primary"
9+
default: "primary",
1010
},
1111
})
1212
1313
const alias = computed(() => {
1414
const { $getDisplayName } = useNuxtApp()
15-
16-
return $getDisplayName('addresses', "", props.account)
15+
return $getDisplayName("addresses", "", props.account)
1716
})
1817
</script>
1918

@@ -23,4 +22,4 @@ const alias = computed(() => {
2322
<Text size="13" weight="600" :color="color"> {{ alias }} </Text>
2423
</Flex>
2524
</NuxtLink>
26-
</template>
25+
</template>

components/DatePicker.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,11 @@ watch(
281281
<template>
282282
<Popover :open="isOpen" @on-close="handleClose" :width="popoverStyles.width" :side="popoverStyles.side">
283283
<Button v-if="showTitle" @click="handleOpen" type="secondary" size="mini">
284-
<Icon name="plus-circle" size="12" color="tertiary" />
284+
<Icon name="plus-circle" size="12" :color="selectedRange ? 'brand' : 'tertiary'" />
285285
286-
<Text color="secondary">Date Range</Text>
286+
<Text color="secondary">Date Range<template v-if="selectedRange">:</template></Text>
287287
288288
<template v-if="selectedRange">
289-
<div :class="$style.vertical_divider" />
290-
291289
<Text size="12" weight="600" color="primary">
292290
{{ selectedRange }}
293291
</Text>
@@ -445,12 +443,6 @@ watch(
445443
height: 100%;
446444
}
447445
448-
.vertical_divider {
449-
min-width: 2px;
450-
height: 50%;
451-
background: var(--op-10);
452-
}
453-
454446
.period {
455447
cursor: pointer;
456448
}

components/Feed.vue

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getRankCategory } from "@/services/constants/rollups"
1010
import Tooltip from "@/components/ui/Tooltip.vue"
1111
1212
/** API */
13-
import { fetchPriceSeries } from "@/services/api/stats"
13+
import { fetchPriceSeries, fetchTVS } from "@/services/api/stats"
1414
1515
/** Store */
1616
import { useAppStore } from "@/store/app.store"
@@ -38,13 +38,14 @@ const topRollup = computed(() => {
3838
}
3939
})
4040
41+
const isLoading = ref(true)
4142
const series = ref([])
4243
const price = reactive({
4344
value: 0,
4445
diff: 0,
4546
side: null,
4647
})
47-
48+
const tvs = ref(0)
4849
onMounted(async () => {
4950
const dataSeries = await fetchPriceSeries({ from: parseInt(DateTime.now().minus({ days: 3 }).ts / 1_000) })
5051
series.value = dataSeries
@@ -58,6 +59,13 @@ onMounted(async () => {
5859
side = price.value - prevDayClosePrice > 0 ? "rise" : "fall"
5960
}
6061
price.side = side
62+
63+
const _tvs = await fetchTVS({ period: null })
64+
if (_tvs.value) {
65+
tvs.value = _tvs.value
66+
}
67+
68+
isLoading.value = false
6169
})
6270
</script>
6371
@@ -132,19 +140,19 @@ onMounted(async () => {
132140
<Flex align="center" gap="6" :class="$style.stat">
133141
<Icon name="coins" size="12" color="secondary" :class="$style.icon" />
134142
<Flex align="center" gap="4">
135-
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Supply:</Text>
143+
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">TVS:</Text>
136144
137-
<Text v-if="head.total_supply" size="12" weight="600" noWrap :class="$style.value">
138-
{{ abbreviate(totalSupply, 2) }} TIA
145+
<Text v-if="!isLoading" size="12" weight="600" noWrap :class="$style.value">
146+
{{ abbreviate(tvs, 2) }} USD
139147
</Text>
140148
<Skeleton v-else w="40" h="12" />
141149
</Flex>
142150
</Flex>
143151
144152
<template #content>
145153
<Flex align="center" justify="between" gap="8">
146-
<Text size="12" weight="500" color="tertiary">Total Supply:</Text>
147-
<Text size="12" weight="600" color="secondary"> {{ abbreviate(totalSupplyUSD, 2) }} USD </Text>
154+
<Text size="12" weight="500" color="tertiary">Total Value Secured:</Text>
155+
<Text size="12" weight="600" color="secondary"> {{ comma(tvs) }} USD </Text>
148156
</Flex>
149157
</template>
150158
</Tooltip>

components/Icon.vue

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { computed } from "vue"
44
import icons from "@/assets/icons.json"
55
66
const props = defineProps({
7-
name: { type: String, required: true, default: "warning" },
7+
name: { type: String, required: true, default: "" },
88
size: { type: [String, Number], default: "16" },
99
color: { type: String, default: null },
10+
hoverColor: { type: String, required: false },
1011
rotate: { type: [String, Number], default: 0 },
1112
fill: { type: Boolean, default: false },
1213
scale: { type: [String, Number], default: 1 },
@@ -15,8 +16,8 @@ const props = defineProps({
1516
1617
const styles = computed(() => {
1718
const s = {
18-
minWidth: `${props.size}px`,
19-
minHeight: `${props.size}px`,
19+
minWidth: `${props.size}px`,
20+
minHeight: `${props.size}px`,
2021
transformBox: "view-box",
2122
transformOrigin: "center center",
2223
transform: "",
@@ -25,7 +26,7 @@ const styles = computed(() => {
2526
const ops = []
2627
if (props.rotate) ops.push(`rotate(${props.rotate}deg)`)
2728
if (props.scale != 1) ops.push(`scale(${props.scale})`)
28-
if (ops.length) s.transform = ops.join(" ")
29+
if (ops.length) s.transform = ops.join(" ")
2930
3031
return s
3132
})
@@ -38,6 +39,10 @@ const classes = computed(() => {
3839
return iconClasses
3940
})
4041
42+
const hoverColorVar = computed(() => {
43+
return `var(--txt-${props.hoverColor})`
44+
})
45+
4146
const getIcon = () => {
4247
return icons[props.name.charAt(0).toLowerCase() + props.name.slice(1)]
4348
}
@@ -48,7 +53,14 @@ const isSplitted = () => {
4853
</script>
4954

5055
<template>
51-
<svg viewBox="0 0 24 24" :width="size" :height="size" :style="styles" :class="[classes, loading && $style.loading]" role="img">
56+
<svg
57+
viewBox="0 0 24 24"
58+
:width="size"
59+
:height="size"
60+
:style="styles"
61+
:class="[classes, hoverColor && $style.hovered, loading && $style.loading]"
62+
role="img"
63+
>
5264
<path v-if="!isSplitted(name)" :d="getIcon(name)" />
5365
<template v-else>
5466
<path v-if="!Array.isArray(getIcon(name))" :d="getIcon(name)" :style="{ opacity: path.opacity }" />
@@ -66,6 +78,14 @@ const isSplitted = () => {
6678
</template>
6779

6880
<style module>
81+
.hovered {
82+
transition: all 0.3s var(--bezier);
83+
84+
&:hover {
85+
fill: v-bind(hoverColorVar);
86+
}
87+
}
88+
6989
.loading {
7090
animation: skeleton 1s ease-in-out infinite;
7191
}
@@ -83,4 +103,4 @@ const isSplitted = () => {
83103
opacity: 1;
84104
}
85105
}
86-
</style>
106+
</style>

components/LeftSidebar.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,18 @@ const mainLinks = reactive([
9494
show: true,
9595
},
9696
{
97-
name: "Ecosystem",
98-
path: "/stats?tab=ecosystem",
99-
queryParam: { tab: "ecosystem" },
97+
name: "Nodes",
98+
path: "/stats?tab=nodes",
99+
queryParam: { tab: "nodes" },
100100
show: isMainnet(),
101101
},
102102
],
103103
},
104+
{
105+
icon: "governance",
106+
name: "Governance",
107+
path: "/proposals",
108+
},
104109
])
105110
106111
const isModularLinksCollapsed = ref(false)

components/OgImage/ProposalImage.vue

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<script setup>
2+
/** Vendor */
3+
import { DateTime } from "luxon"
4+
5+
/** Services */
6+
import { comma, formatBytes } from "@/services/utils"
7+
8+
defineOptions({
9+
inheritAttrs: false,
10+
})
11+
12+
const props = defineProps({
13+
title: String,
14+
proposal: Object,
15+
})
16+
17+
const bgStyles = computed(() => {
18+
return {
19+
style: {
20+
filter: "grayscale(1)",
21+
opacity: "0.05",
22+
},
23+
}
24+
})
25+
</script>
26+
27+
<template>
28+
<div class="w-full h-full" :style="{ background: '#111111', padding: '100px', fontFamily: 'IBM+Plex+Mono', overflow: 'hidden' }">
29+
<img src="/img/bg.png" width="1200" height="600" class="absolute" v-bind="bgStyles" />
30+
31+
<div :style="{ height: '100%', display: 'flex', flexDirection: 'column', gap: '32px' }">
32+
<div :style="{ display: 'flex', alignItems: 'center' }">
33+
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.6)', textTransform: 'capitalize', marginRight: '24px;' }">
34+
{{ proposal.status }}
35+
</span>
36+
37+
<span :style="{ fontSize: '40px', color: 'rgba(255,255,255, 0.3)' }">
38+
- {{ DateTime.fromISO(proposal.deposit_time).toFormat("ff") }}
39+
</span>
40+
</div>
41+
42+
<span :style="{ fontSize: '50px', color: 'rgba(255,255,255, 0.9)' }"> {{ proposal.title }} </span>
43+
<span :style="{ fontSize: '50px', color: 'rgba(255,255,255, 0.3)' }"> {{ proposal.description }} </span>
44+
45+
<div>
46+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.3)' }">Yes: </span>
47+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.6)' }">{{ proposal.yes }}</span>
48+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.3)' }">, No: </span>
49+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.6)' }">{{ proposal.no }}</span>
50+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.3)' }">, No with veto: </span>
51+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.6)' }">{{ proposal.no_with_veto }}</span>
52+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.3)' }">, Abstain: </span>
53+
<span :style="{ fontSize: '32px', color: 'rgba(255,255,255, 0.6)' }">{{ proposal.abstain }}</span>
54+
</div>
55+
</div>
56+
</div>
57+
</template>

components/data/LatestPFBTable.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ isLoading.value = false
6363
<Text size="13" weight="600" color="primary" mono>
6464
{{ pfb.hash.slice(pfb.hash.length - 4, pfb.hash.length).toUpperCase() }}
6565
</Text>
66-
67-
<CopyButton :text="pfb.hash.toUpperCase()" />
6866
</Flex>
6967

7068
<template #content>

0 commit comments

Comments
 (0)