@@ -4,15 +4,20 @@ import Button from "@/components/ui/Button.vue"
44import { Dropdown , DropdownItem , DropdownTitle , DropdownDivider } from " @/components/ui/Dropdown"
55
66/** Components */
7+ import AdvBanner from " @/components/shared/AdvBanner.vue"
78import NavLink from " @/components/modules/navigation/NavLink.vue"
89
910/** Utils */
1011import { getNetworkName } from " @/services/utils/general"
12+ import { StatusMap } from " @/services/constants/node"
13+ import { isMobile } from " @/services/utils"
1114
1215/** Store */
1316import { useAppStore } from " ~/store/app"
17+ import { useNodeStore } from " ~/store/node"
1418import { useModalsStore } from " ~/store/modals"
1519const appStore = useAppStore ()
20+ const nodeStore = useNodeStore ()
1621const modalsStore = useModalsStore ()
1722
1823const head = computed (() => appStore .lastHead )
@@ -171,7 +176,7 @@ const handleNavigate = (url) => {
171176 </Flex >
172177 </NuxtLink >
173178
174- <Button @click =" appStore.showSidebar = !appStore.showSidebar" type =" secondary" size =" mini" :class =" $style.close_btn" >
179+ <Button v-if = " isMobile() " @click =" appStore.showSidebar = !appStore.showSidebar" type =" secondary" size =" mini" :class =" $style.close_btn" >
175180 <Icon name =" close" size =" 14" color =" primary" />
176181 </Button >
177182 </Flex >
@@ -212,7 +217,7 @@ const handleNavigate = (url) => {
212217 </Flex >
213218 </Flex >
214219
215- <Flex direction =" column" gap =" 8" >
220+ <!-- < Flex direction="column" gap="8">
216221 <Flex align="center" gap="8" style="padding: 0 8px">
217222 <Icon name="stars" size="12" color="tertiary" />
218223 <Text size="12" weight="500" color="tertiary">New things</Text>
@@ -221,18 +226,30 @@ const handleNavigate = (url) => {
221226 <Flex direction="column" gap="2">
222227 <NavLink v-for="link in newLinks" :link="link" @onClose="appStore.showSidebar = false" />
223228 </Flex>
224- </Flex >
229+ </Flex> -->
230+
231+ <AdvBanner />
225232 </Flex >
226233
227- <Flex direction =" column" gap =" 12" style =" margin-right : 20px " >
228- <!-- <Flex justify="end" :class="$style.ad">
229- <Flex justify="end" direction="column" gap="8">
230- <Text size="12" weight="500" color="brand">Introducing Celenium API</Text>
231- <Text size="12" weight="500" height="140" color="secondary">
232- Unlock the power of Celestia: Scalable, Secure and Modular.
233- </Text>
234- </Flex>
235- </Flex> -->
234+ <Flex direction =" column" gap =" 16" style =" margin-right : 20px " >
235+ <Flex @click =" modalsStore.open('lightNode')" align =" center" gap =" 8" justify =" between" :class =" $style.light_node_btn" >
236+ <Flex align =" center" gap =" 8" >
237+ <Icon
238+ v-if =" nodeStore.status === StatusMap.Started"
239+ name =" lumina"
240+ size =" 14"
241+ color =" brand"
242+ :class =" $style.light_node_running_icon"
243+ />
244+ <Icon v-else name =" lumina" size =" 14" color =" secondary" />
245+
246+ <Text v-if =" nodeStore.status === StatusMap.Started" size =" 13" weight =" 600" color =" primary" >Running</Text >
247+ <Text size =" 13" weight =" 600" color =" secondary" >Node</Text >
248+ </Flex >
249+
250+ <Icon v-if =" nodeStore.status !== StatusMap.Started" name =" arrow-narrow-right" size =" 14" color =" secondary" />
251+ <Text v-else size =" 12" weight =" 600" color =" tertiary" >{{ nodeStore.percentage.toFixed(0) }}%</Text >
252+ </Flex >
236253
237254 <Dropdown position =" end" fullWidth >
238255 <Flex align =" center" gap =" 8" justify =" between" :class =" $style.network_selector" >
@@ -292,6 +309,7 @@ const handleNavigate = (url) => {
292309 display : flex ;
293310
294311 background : var (--app-background );
312+ overflow : auto ;
295313
296314 z-index : 100 ;
297315 }
@@ -332,6 +350,22 @@ const handleNavigate = (url) => {
332350 }
333351}
334352
353+ .light_node_btn {
354+ height : 32px ;
355+
356+ cursor : pointer ;
357+ border-radius : 6px ;
358+ background : var (--op-5 );
359+
360+ padding : 0 8px ;
361+
362+ transition : all 0.2s ease ;
363+
364+ &:hover {
365+ background : var (--op-8 );
366+ }
367+ }
368+
335369.network_selector {
336370 height : 32px ;
337371
@@ -360,6 +394,27 @@ const handleNavigate = (url) => {
360394 margin-right : 20px ;
361395}
362396
397+ .light_node_running_icon {
398+ animation : lightNodeIcon 2s ease infinite ;
399+ }
400+
401+ @keyframes lightNodeIcon {
402+ 0% {
403+ opacity : 1 ;
404+ filter : drop-shadow (0 0 8px var (--brand ));
405+ }
406+
407+ 50% {
408+ opacity : 0.3 ;
409+ filter : drop-shadow (0 0 2px var (--brand ));
410+ }
411+
412+ 100% {
413+ opacity : 1 ;
414+ filter : drop-shadow (0 0 8px var (--brand ));
415+ }
416+ }
417+
363418@media (max-width : 1300px ) {
364419 .close_btn {
365420 display : flex ;
0 commit comments