Skip to content

Commit f65e381

Browse files
authored
Merge pull request #18 from celenium-io/Small-fixes-before-release
Feed price + GasPriceHeatMap
2 parents c3fd4cc + eba3008 commit f65e381

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

components/Feed.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ onMounted(async () => {
124124

125125
<Flex v-if="price.diff" align="center" gap="4">
126126
<Icon v-if="price.side === 'rise'" name="arrow-circle-right-up" size="12" color="neutral-green" />
127-
<Icon v-else name="arrow-circle-right-down" size="12" color="secondary" />
127+
<Icon v-else name="arrow-circle-right-down" size="12" color="red" />
128128

129-
<Text size="12" weight="600" :color="price.side === 'rise' ? 'neutral-green' : 'secondary'" noWrap>
129+
<Text size="12" weight="600" :color="price.side === 'rise' ? 'neutral-green' : 'red'" noWrap>
130130
{{ price.diff.toFixed(2) }}%</Text
131131
>
132132
</Flex>
@@ -135,11 +135,17 @@ onMounted(async () => {
135135

136136
<template #content>
137137
<Flex direction="column" gap="6">
138-
Price diff from the previous day
138+
<Flex align="center" gap="4">
139+
<Text color="primary">Price diff from the previous day</Text>
140+
</Flex>
139141

140142
<Flex align="center" gap="4">
141143
<Text color="tertiary">{{ DateTime.fromISO(series[1].time).setLocale("en").toFormat("ff") }} -></Text>
142-
<Text color="primary">${{ series[1].close }}</Text>
144+
<Text color="primary">${{ parseFloat(series[1].close).toFixed(2) }}</Text>
145+
</Flex>
146+
147+
<Flex align="center" gap="4">
148+
<Text size="11" color="tertiary">Binance quotes</Text>
143149
</Flex>
144150
</Flex>
145151
</template>

components/modules/gas/GasPriceHeatmap.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const props = defineProps({
1515
const seriesByDay = ref({})
1616
1717
const maxValue = ref(0)
18+
const days = [7, 6, 5, 4, 3, 2, 1]
1819
1920
onMounted(async () => {
2021
let rawSeries = []
@@ -43,6 +44,7 @@ onMounted(async () => {
4344
})
4445
4546
Object.keys(seriesByDay.value).forEach((d) => {
47+
seriesByDay.value[d].reverse();
4648
if (seriesByDay.value[d].length !== 24) {
4749
while (seriesByDay.value[d].length !== 24) {
4850
seriesByDay.value[d].push({
@@ -72,7 +74,7 @@ onMounted(async () => {
7274
</tr>
7375
</thead>
7476
<tbody>
75-
<tr v-for="dayIdx in 7">
77+
<tr v-for="dayIdx in days">
7678
<td
7779
v-for="hour in seriesByDay[
7880
DateTime.now()

0 commit comments

Comments
 (0)