Skip to content

Commit df088af

Browse files
committed
Merge branch 'dev' into gov
2 parents c0f1784 + 6659564 commit df088af

133 files changed

Lines changed: 2079 additions & 2178 deletions

File tree

Some content is hidden

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

.oxlintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"rules": {
3+
"no-async-promise-executor": "off"
4+
},
5+
"ignorePatterns": ["services/lumina-node-wasm/**", "services/utils/blob.js", "services/utils/blobtx.js"]
6+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"oxc.enable": true
3+
}

app.vue

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as Sentry from "@sentry/vue"
55
/** Services */
66
import Socket from "@/services/api/socket"
77
import amp from "@/services/amp"
8+
import { watchForUpdate } from "@/services/version"
89
910
/** Components */
1011
import ModalsManager from "@/components/modals/ModalsManager.vue"
@@ -16,22 +17,22 @@ import { fetchHead } from "@/services/api/main"
1617
import { fetchLatestBlocks } from "@/services/api/block"
1718
1819
/** Store */
19-
import { useNodeStore } from "@/store/node"
20-
import { useAppStore } from "@/store/app"
21-
import { useBookmarksStore } from "@/store/bookmarks"
22-
import { useSettingsStore } from "@/store/settings"
23-
import { useEnumStore } from "@/store/enums"
24-
import { useLegalStore } from "@/store/legal"
25-
import { useNotificationsStore } from "@/store/notifications"
26-
import { useRollupsRankingStore } from "@/store/rollupsrank"
20+
import { useNodeStore } from "@/store/node.store"
21+
import { useAppStore } from "@/store/app.store"
22+
import { useBookmarksStore } from "@/store/bookmarks.store"
23+
import { useSettingsStore } from "@/store/settings.store"
24+
import { useEnumStore } from "@/store/enums.store"
25+
import { useLegalStore } from "@/store/legal.store"
26+
import { useNotificationsStore } from "@/store/notifications.store"
27+
import { useActivityStore } from "@/store/activity.store"
2728
const nodeStore = useNodeStore()
2829
const appStore = useAppStore()
2930
const bookmarksStore = useBookmarksStore()
3031
const settingsStore = useSettingsStore()
3132
const enumStore = useEnumStore()
3233
const legalStore = useLegalStore()
3334
const notificationsStore = useNotificationsStore()
34-
const rollupsRankingStore = useRollupsRankingStore()
35+
const activityStore = useActivityStore()
3536
3637
bookmarksStore.$subscribe((mutation, state) => {
3738
localStorage.setItem("bookmarks", JSON.stringify(state.bookmarks))
@@ -42,13 +43,52 @@ settingsStore.$subscribe((mutation, state) => {
4243
legalStore.$subscribe((mutation, state) => {
4344
localStorage.setItem("legal", JSON.stringify(state.legal))
4445
})
45-
rollupsRankingStore.$subscribe((mutation, state) => {
46+
activityStore.$subscribe((mutation, state) => {
4647
localStorage.setItem("rollups_ranking", JSON.stringify(state.rollups_ranking))
4748
})
4849
4950
appStore.initConstants()
5051
52+
let watchInterval = null
53+
5154
onMounted(async () => {
55+
/**
56+
* Watch for package.json->version and notify users about the new version
57+
*/
58+
appStore.version = (await $fetch("/api/version")).version
59+
if (!import.meta.dev)
60+
watchInterval = watchForUpdate(appStore.version, (newVersion) => {
61+
clearInterval(watchInterval)
62+
notificationsStore.create({
63+
notification: {
64+
type: "success",
65+
icon: "info",
66+
title: "New update is available",
67+
description: "Refresh the page to get the latest update with new features & bug fixes.",
68+
autoDestroy: false,
69+
irremovable: true,
70+
actions: [
71+
{
72+
name: "Refresh",
73+
icon: "refresh",
74+
callback: () => {
75+
location.reload()
76+
},
77+
},
78+
{
79+
name: "Changelog",
80+
icon: "menu",
81+
callback: () => {
82+
window
83+
.open(`https://github.com/celenium-io/celenium-interface/releases/tag/v${newVersion}`, "_blank")
84+
.focus()
85+
},
86+
},
87+
],
88+
},
89+
})
90+
})
91+
5292
if (localStorage.bookmarks) {
5393
bookmarksStore.bookmarks = JSON.parse(localStorage.bookmarks)
5494
}
@@ -58,7 +98,7 @@ onMounted(async () => {
5898
}
5999
60100
settingsStore.init()
61-
rollupsRankingStore.init()
101+
activityStore.init()
62102
63103
const runtimeConfig = useRuntimeConfig()
64104
amp.init(runtimeConfig.public.AMP)
@@ -119,6 +159,10 @@ onMounted(async () => {
119159
Socket.close()
120160
}
121161
})
162+
163+
onBeforeUnmount(() => {
164+
clearInterval(watchInterval)
165+
})
122166
</script>
123167
124168
<template>

assets/styles/base.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ $grayscale: (
8181
--validator-active: #85f891;
8282
--validator-inactive: #1ca7ed;
8383
--validator-jailed: #f8774a;
84-
// --supply: #65c7f8;
8584
--supply: #1ca7ed;
8685
--staking: #85f891;
8786
--geo-map: #8b8c8d;
@@ -108,7 +107,6 @@ $grayscale: (
108107
--txt-white: rgba(255, 255, 255, 95%);
109108

110109
/* General */
111-
// --brand: #18d2a5;
112110
--brand: #33a853;
113111
--blue: #0b84fe;
114112
--red: #eb5757;
@@ -173,7 +171,6 @@ $grayscale: (
173171
--txt-white: rgba(255, 255, 255, 95%);
174172

175173
/* General */
176-
// --brand: #18d2a5;
177174
--brand: #0ade71;
178175
--blue: #0b84fe;
179176
--red: #eb5757;

components/ActionBar.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ import Search from "@/components/modules/navigation/Search.vue"
1111
import { isMobile } from "@/services/utils"
1212
1313
/** Store */
14-
import { useAppStore } from "@/store/app"
14+
import { useAppStore } from "@/store/app.store"
1515
const appStore = useAppStore()
1616
</script>
1717

1818
<template>
1919
<Flex wide align="center" justify="between" gap="24" :class="$style.wrapper">
2020
<Flex wide align="center" gap="12">
21-
<Button v-if="isMobile()" @click="appStore.showSidebar = !appStore.showSidebar" type="secondary" size="medium" :class="$style.menu_btn">
21+
<Button
22+
v-if="isMobile()"
23+
@click="appStore.showSidebar = !appStore.showSidebar"
24+
type="secondary"
25+
size="medium"
26+
:class="$style.menu_btn"
27+
>
2228
<Icon name="menu" size="16" color="primary" />
2329
</Button>
2430

components/AmountInCurrency.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { amountToString } from "@/services/utils"
66
import Tooltip from "@/components/ui/Tooltip.vue"
77
88
/** Store */
9-
import { useAppStore } from "@/store/app"
9+
import { useAppStore } from "@/store/app.store"
1010
const appStore = useAppStore()
1111
1212
const currentPrice = computed(() => appStore.currentPrice)
@@ -74,12 +74,12 @@ const calculatedAmount = computed(() => {
7474
...defaultCurrencyStyle,
7575
...props.styles.currency,
7676
},
77-
}
77+
},
7878
}
7979
8080
let tiaDisplay
8181
let tiaExchange
82-
if (finalAmount.amount.unit === 'utia') {
82+
if (finalAmount.amount.unit === "utia") {
8383
tiaExchange = finalAmount.amount.value / 1_000_000
8484
8585
if (finalAmount.amount.currency === "TIA") {

components/BadgeValue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { space } from "@/services/utils"
66
77
/** Store */
8-
import { useNotificationsStore } from "@/store/notifications"
8+
import { useNotificationsStore } from "@/store/notifications.store"
99
const notificationsStore = useNotificationsStore()
1010
1111
const props = defineProps({

components/BookmarkButton.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import Button from "@/components/ui/Button.vue"
66
import { capitilize } from "@/services/utils"
77
88
/** Store */
9-
import { useBookmarksStore } from "@/store/bookmarks"
10-
import { useCacheStore } from "@/store/cache"
11-
import { useModalsStore } from "@/store/modals"
12-
import { useNotificationsStore } from "@/store/notifications"
9+
import { useBookmarksStore } from "@/store/bookmarks.store"
10+
import { useCacheStore } from "@/store/cache.store"
11+
import { useModalsStore } from "@/store/modals.store"
12+
import { useNotificationsStore } from "@/store/notifications.store"
1313
const bookmarksStore = useBookmarksStore()
1414
const cacheStore = useCacheStore()
1515
const modalsStore = useModalsStore()

components/Connection.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { disconnect } from "@/services/wallet"
99
import { arabica, mainnet, mammoth, mocha } from "@/services/chains"
1010
1111
/** Store */
12-
import { useAppStore } from "@/store/app"
13-
import { useModalsStore } from "@/store/modals"
14-
import { useNotificationsStore } from "@/store/notifications"
12+
import { useAppStore } from "@/store/app.store"
13+
import { useModalsStore } from "@/store/modals.store"
14+
import { useNotificationsStore } from "@/store/notifications.store"
1515
const appStore = useAppStore()
1616
const modalsStore = useModalsStore()
1717
const notificationsStore = useNotificationsStore()
@@ -22,7 +22,6 @@ const { hostname } = useRequestURL()
2222
2323
switch (hostname) {
2424
case "celenium.io":
25-
// case "dev.celenium.io":
2625
appStore.network = mainnet
2726
break
2827
@@ -35,11 +34,6 @@ switch (hostname) {
3534
appStore.network = mammoth
3635
break
3736
38-
case "mammoth.celenium.io":
39-
appStore.network = mammoth
40-
break
41-
42-
// case "arabica.celenium.io":
4337
case "localhost":
4438
appStore.network = arabica
4539
break

components/CopyButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
/** Store */
3-
import { useNotificationsStore } from "@/store/notifications"
3+
import { useNotificationsStore } from "@/store/notifications.store"
44
const notificationsStore = useNotificationsStore()
55
66
const props = defineProps({

0 commit comments

Comments
 (0)