Skip to content

Commit 574402c

Browse files
authored
Merge pull request #26 from celenium-io/dev
Dev
2 parents ce5d1bf + 129b5a1 commit 574402c

33 files changed

+1058
-293
lines changed

app.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<script setup>
22
/** Services */
33
import Socket from "@/services/api/socket"
4-
import { fetchHead } from "@/services/api/main"
54
import amp from "@/services/amp"
65
76
/** Components */
87
import ModalsManager from "@/components/modals/ModalsManager.vue"
98
import CommandMenu from "@/components/cmd/CommandMenu.vue"
109
10+
/** API */
11+
import { fetchGasPrice } from "@/services/api/gas"
12+
import { fetchHead } from "@/services/api/main"
13+
1114
/** Store */
1215
import { useAppStore } from "@/store/app"
1316
import { useBookmarksStore } from "@/store/bookmarks"
@@ -21,14 +24,17 @@ onMounted(async () => {
2124
const runtimeConfig = useRuntimeConfig()
2225
amp.init(runtimeConfig.public.AMP)
2326
27+
const head = await fetchHead()
28+
if (head) appStore.lastHead = head
29+
30+
Socket.init()
31+
2432
if (localStorage.bookmarks) {
2533
bookmarksStore.bookmarks = JSON.parse(localStorage.bookmarks)
2634
}
2735
28-
Socket.init()
29-
30-
const data = await fetchHead()
31-
if (data) appStore.head = data
36+
const gasPrice = await fetchGasPrice()
37+
appStore.gas = gasPrice
3238
3339
window.onbeforeunload = function () {
3440
Socket.close()

assets/icons.json

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

components/CopyButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const notificationsStore = useNotificationsStore()
55
66
const props = defineProps({
77
text: {
8-
type: String,
8+
type: [String, Number],
99
},
1010
size: {
1111
type: String,

components/Feed.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { fetchPrice, fetchPriceSeries } from "@/services/api/stats"
1515
import { useAppStore } from "@/store/app"
1616
const appStore = useAppStore()
1717
18-
const head = computed(() => appStore.head)
18+
const head = computed(() => appStore.lastHead)
1919
2020
const series = ref([])
2121
const price = reactive({
@@ -139,7 +139,7 @@ onMounted(async () => {
139139
<Text color="primary">Price diff from the previous day</Text>
140140
</Flex>
141141

142-
<Flex align="center" gap="4">
142+
<Flex v-if="series.length" align="center" gap="4">
143143
<Text color="tertiary">{{ DateTime.fromISO(series[1].time).setLocale("en").toFormat("ff") }} -></Text>
144144
<Text color="primary">${{ parseFloat(series[1].close).toFixed(2) }}</Text>
145145
</Flex>

components/TheFooter.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const handleChangeTheme = (theme) => {
141141
</Flex>
142142
</Flex>
143143

144-
<Flex align="center" gap="16">
144+
<Flex align="center" gap="16" :class="$style.links">
145145
<NuxtLink to="/blocks" :class="$style.link">
146146
<Text size="12" weight="500" color="tertiary"> Blocks </Text>
147147
</NuxtLink>
@@ -151,6 +151,9 @@ const handleChangeTheme = (theme) => {
151151
<NuxtLink to="/namespaces" :class="$style.link">
152152
<Text size="12" weight="500" color="tertiary"> Namespaces </Text>
153153
</NuxtLink>
154+
<NuxtLink to="/rollups" :class="$style.link">
155+
<Text size="12" weight="500" color="tertiary"> Rollups </Text>
156+
</NuxtLink>
154157
<NuxtLink to="/addresses" :class="$style.link">
155158
<Text size="12" weight="500" color="tertiary"> Addresses </Text>
156159
</NuxtLink>
@@ -215,5 +218,10 @@ const handleChangeTheme = (theme) => {
215218
flex-direction: column;
216219
gap: 12px;
217220
}
221+
222+
.links {
223+
flex-wrap: wrap;
224+
justify-content: center;
225+
}
218226
}
219227
</style>

components/TheHeader.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let removeOutside = null
2323
const headerEl = ref(null)
2424
const showPopup = ref(false)
2525
26-
const head = computed(() => appStore.head)
26+
const head = computed(() => appStore.lastHead)
2727
2828
const featurePreviewMode = ref(false)
2929
const isWalletAvailable = ref(false)
@@ -72,6 +72,9 @@ const isActive = (link) => {
7272
case "namespaces":
7373
return splittedPath.includes("namespace") || splittedPath.includes("namespaces")
7474
75+
case "rollups":
76+
return splittedPath.includes("rollup") || splittedPath.includes("rollups")
77+
7578
default:
7679
break
7780
}
@@ -125,6 +128,10 @@ const handleConnect = async () => {
125128
<NuxtLink to="/namespaces" :class="[$style.link, isActive('namespaces') && $style.active]">
126129
<Text size="13" weight="600" color="tertiary">Namespaces</Text>
127130
</NuxtLink>
131+
132+
<NuxtLink to="/rollups" :class="[$style.link, isActive('rollups') && $style.active]">
133+
<Text size="13" weight="600" color="tertiary">Rollups</Text>
134+
</NuxtLink>
128135
</Flex>
129136

130137
<Flex align="center" gap="8">
@@ -192,6 +199,10 @@ const handleConnect = async () => {
192199
<NuxtLink to="/namespaces" :class="[$style.link, isActive('namespaces') && $style.active]">
193200
<Text size="13" weight="600" color="tertiary">Namespaces</Text>
194201
</NuxtLink>
202+
203+
<NuxtLink to="/rollups" :class="[$style.link, isActive('rollups') && $style.active]">
204+
<Text size="13" weight="600" color="tertiary">Rollups</Text>
205+
</NuxtLink>
195206
</Flex>
196207
</Flex>
197208
</template>
@@ -340,7 +351,7 @@ const handleConnect = async () => {
340351
}
341352
}
342353
343-
@media (max-width: 700px) {
354+
@media (max-width: 850px) {
344355
.links {
345356
display: none;
346357
}
@@ -359,4 +370,10 @@ const handleConnect = async () => {
359370
margin: 0 12px;
360371
}
361372
}
373+
374+
@media (max-width: 400px) {
375+
.logo_name {
376+
display: none;
377+
}
378+
}
362379
</style>

0 commit comments

Comments
 (0)