Skip to content

Commit beecc41

Browse files
committed
Merge branch 'lumina' into advertising
2 parents fecbf53 + 44874fe commit beecc41

25 files changed

Lines changed: 9778 additions & 6512 deletions

app.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import { fetchHead } from "@/services/api/main"
1313
import { fetchLatestBlocks } from "@/services/api/block"
1414
1515
/** Store */
16+
import { useNodeStore } from "@/store/node"
1617
import { useAppStore } from "@/store/app"
1718
import { useBookmarksStore } from "@/store/bookmarks"
1819
import { useSettingsStore } from "@/store/settings"
20+
const nodeStore = useNodeStore()
1921
const appStore = useAppStore()
2022
const bookmarksStore = useBookmarksStore()
2123
const settingsStore = useSettingsStore()
@@ -31,6 +33,10 @@ onMounted(async () => {
3133
bookmarksStore.bookmarks = JSON.parse(localStorage.bookmarks)
3234
}
3335
36+
if (localStorage.nodeSettings) {
37+
nodeStore.settings = JSON.parse(localStorage.nodeSettings)
38+
}
39+
3440
const runtimeConfig = useRuntimeConfig()
3541
amp.init(runtimeConfig.public.AMP)
3642
@@ -55,7 +61,7 @@ onMounted(async () => {
5561
<template>
5662
<CommandMenu :show="appStore.showCmd" />
5763

58-
<NuxtLoadingIndicator height="2" color="#0ade71" />
64+
<NuxtLoadingIndicator :height="2" color="#0ade71" />
5965
<NuxtLayout>
6066
<NuxtPage />
6167

assets/icons.json

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

assets/styles/base.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ $grayscale: (
2828
--txt-tertiary: rgba(255, 255, 255, 35%);
2929
--txt-support: rgba(255, 255, 255, 15%);
3030
--txt-black: rgba(0, 0, 0, 95%);
31+
--txt-semiblack: rgba(0, 0, 0, 45%);
3132
--txt-white: rgba(255, 255, 255, 95%);
3233

3334
/* General */
3435
--brand: #18d2a5;
35-
--blue: #076acd;
36+
--blue: #379bff;
3637
--red: #eb5757;
3738
--dark-red: #592121;
3839
--orange: #ff5a17;
3940
--light-orange: #ff8351;
40-
--yellow: #ffd400;
41+
--yellow: #e6c525;
4142
--green: #0ade71;
4243
--neutral-green: #33a853;
4344
--purple: #5856de;
44-
--mint: #18D2A5;
45+
--mint: #18d2a5;
4546
--neutral-mint: #109373;
4647
--dark-mint: #1e473d;
4748

@@ -110,7 +111,7 @@ $grayscale: (
110111
--green: #0ade71;
111112
--neutral-green: #33a853;
112113
--purple: #5856de;
113-
--mint: #18D2A5;
114+
--mint: #18d2a5;
114115
--neutral-mint: #109373;
115116
--dark-mint: #1e473d;
116117

@@ -171,7 +172,7 @@ $grayscale: (
171172
--green: #26c071;
172173
--neutral-green: #33a853;
173174
--purple: #5856de;
174-
--mint: #18D2A5;
175+
--mint: #18d2a5;
175176
--neutral-mint: #109373;
176177
--dark-mint: #1e473d;
177178

assets/styles/text.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ $textColors: (
5555
"tertiary": "--txt-tertiary",
5656
"support": "--txt-support",
5757
"black": "--txt-black",
58+
"semiblack": "--txt-semiblack",
5859
"white": "--txt-white",
5960
"blue": "--blue",
6061
"orange": "--orange",

assets/workers/worker.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import init, { run_worker } from "@/services/lumina-node-wasm/index.js"
2+
3+
async function worker_main() {
4+
let queued = []
5+
if (typeof SharedWorkerGlobalScope !== "undefined" && self instanceof SharedWorkerGlobalScope) {
6+
onconnect = (event) => {
7+
queued.push(event)
8+
}
9+
} else {
10+
onmessage = (event) => {
11+
queued.push(event)
12+
}
13+
}
14+
15+
await init()
16+
await run_worker(queued)
17+
}
18+
19+
if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) {
20+
Error.stackTraceLimit = 99
21+
worker_main()
22+
}

components/LeftSidebar.vue

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ import NavLink from "@/components/modules/navigation/NavLink.vue"
99
1010
/** Utils */
1111
import { getNetworkName } from "@/services/utils/general"
12+
import { StatusMap } from "@/services/constants/node"
1213
1314
/** Store */
1415
import { useAppStore } from "~/store/app"
16+
import { useNodeStore } from "~/store/node"
1517
import { useModalsStore } from "~/store/modals"
1618
const appStore = useAppStore()
19+
const nodeStore = useNodeStore()
1720
const modalsStore = useModalsStore()
1821
1922
const { isMobile } = useDevice()
@@ -231,15 +234,34 @@ const handleNavigate = (url) => {
231234
<AdvBanner />
232235
</Flex>
233236

234-
<Flex direction="column" gap="12" style="margin-right: 20px">
237+
<Flex direction="column" gap="16" style="margin-right: 20px">
238+
<Flex @click="modalsStore.open('lightNode')" align="center" gap="8" justify="between" :class="$style.light_node_btn">
239+
<Flex align="center" gap="8">
240+
<Icon
241+
v-if="nodeStore.status === StatusMap.Started"
242+
name="lumina"
243+
size="14"
244+
color="brand"
245+
:class="$style.light_node_running_icon"
246+
/>
247+
<Icon v-else name="lumina" size="14" color="secondary" />
248+
249+
<Text v-if="nodeStore.status === StatusMap.Started" size="13" weight="600" color="primary">Running</Text>
250+
<Text size="13" weight="600" color="secondary">Node</Text>
251+
</Flex>
252+
253+
<Icon v-if="nodeStore.status !== StatusMap.Started" name="arrow-narrow-right" size="14" color="secondary" />
254+
<Text v-else size="12" weight="600" color="tertiary">{{ nodeStore.percentage.toFixed(0) }}%</Text>
255+
</Flex>
256+
235257
<!-- <Flex justify="end" :class="$style.ad">
236-
<Flex justify="end" direction="column" gap="8">
237-
<Text size="12" weight="500" color="brand">Introducing Celenium API</Text>
238-
<Text size="12" weight="500" height="140" color="secondary">
239-
Unlock the power of Celestia: Scalable, Secure and Modular.
240-
</Text>
241-
</Flex>
242-
</Flex> -->
258+
<Flex justify="end" direction="column" gap="8">
259+
<Text size="12" weight="500" color="brand">Introducing Celenium API</Text>
260+
<Text size="12" weight="500" height="140" color="secondary">
261+
Unlock the power of Celestia: Scalable, Secure and Modular.
262+
</Text>
263+
</Flex>
264+
</Flex> -->
243265

244266
<Dropdown position="end" fullWidth>
245267
<Flex align="center" gap="8" justify="between" :class="$style.network_selector">
@@ -299,6 +321,7 @@ const handleNavigate = (url) => {
299321
display: flex;
300322
301323
background: var(--app-background);
324+
overflow: auto;
302325
303326
z-index: 100;
304327
}
@@ -339,6 +362,22 @@ const handleNavigate = (url) => {
339362
}
340363
}
341364
365+
.light_node_btn {
366+
height: 32px;
367+
368+
cursor: pointer;
369+
border-radius: 6px;
370+
background: var(--op-5);
371+
372+
padding: 0 8px;
373+
374+
transition: all 0.2s ease;
375+
376+
&:hover {
377+
background: var(--op-8);
378+
}
379+
}
380+
342381
.network_selector {
343382
height: 32px;
344383
@@ -367,6 +406,27 @@ const handleNavigate = (url) => {
367406
margin-right: 20px;
368407
}
369408
409+
.light_node_running_icon {
410+
animation: lightNodeIcon 2s ease infinite;
411+
}
412+
413+
@keyframes lightNodeIcon {
414+
0% {
415+
opacity: 1;
416+
filter: drop-shadow(0 0 8px var(--brand));
417+
}
418+
419+
50% {
420+
opacity: 0.3;
421+
filter: drop-shadow(0 0 2px var(--brand));
422+
}
423+
424+
100% {
425+
opacity: 1;
426+
filter: drop-shadow(0 0 8px var(--brand));
427+
}
428+
}
429+
370430
@media (max-width: 1300px) {
371431
.close_btn {
372432
display: flex;

0 commit comments

Comments
 (0)