-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
launcher/src/components/UI/control-page/components/fragments/ServiceLine.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<div | ||
class="service-line w-full h-1/3 flex justify-start items-center" | ||
@mouseenter="footerStore.cursorLocation = props.hoverText" | ||
@mouseleave="footerStore.cursorLocation = ''" | ||
> | ||
<div class="service-name w-1/4 h-full text-gray-200 uppercase text-[45%] font-semibold flex justify-start items-center mr-4 ml-1"> | ||
{{ props.label }} | ||
</div> | ||
<div | ||
class="service-ip w-2/3 h-5/6 flex justify-center items-center border border-gray-400 rounded-md text-[55%] text-gray-200 font-semibold" | ||
> | ||
{{ props.value }} | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { useFooter } from "@/store/theFooter"; | ||
const props = defineProps({ | ||
label: String, | ||
value: String, | ||
hoverText: { | ||
type: String, | ||
default: "", | ||
}, | ||
}); | ||
const footerStore = useFooter(); | ||
</script> |
81 changes: 46 additions & 35 deletions
81
launcher/src/components/UI/control-page/components/widgets/EpochSlot.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,52 @@ | ||
<template> | ||
<div class="volume-Parent flex w-full h-full justify-center items-center flex-col p-1 gap-1"> | ||
<div class="service-line w-full h-1/3 flex justify-start items-center"> | ||
<div class="service-name w-1/4 h-full text-gray-200 uppercase text-[45%] font-semibold flex justify-start items-center mr-4 ml-1"> | ||
CURRENT EPOCH | ||
</div> | ||
|
||
<div | ||
class="service-ip w-2/3 h-5/6 flex justify-center items-center border border-gray-400 rounded-md text-[55%] text-gray-200 font-semibold" | ||
> | ||
255.255.255.225:12345 | ||
</div> | ||
</div> | ||
<div class="service-line w-full h-1/3 flex justify-start items-center"> | ||
<div class="service-name w-1/4 h-full text-gray-200 uppercase text-[45%] font-semibold flex justify-start items-center mr-4 ml-1"> | ||
INDEX | ||
</div> | ||
|
||
<div | ||
class="service-ip w-2/3 h-5/6 flex justify-center items-center border border-gray-400 rounded-md text-[55%] text-gray-200 font-semibold" | ||
> | ||
255.255.255.225:12345 | ||
</div> | ||
</div> | ||
<div class="service-line w-full h-1/3 flex justify-start items-center"> | ||
<div class="service-name w-1/4 h-full text-gray-200 uppercase text-[45%] font-semibold flex justify-start items-center mr-4 ml-1"> | ||
CURRENT SLOT | ||
</div> | ||
<div | ||
v-if="!footerStore.isConsensusRunning || isConsensusMissing" | ||
class="NoDataParent flex w-full h-full justify-center items-center relative" | ||
> | ||
<NoData /> | ||
</div> | ||
|
||
<div | ||
class="service-ip w-2/3 h-5/6 flex justify-center items-center border border-gray-400 rounded-md text-[55%] text-gray-200 font-semibold" | ||
> | ||
255.255.255.225:12345 | ||
</div> | ||
</div> | ||
<div v-else class="volume-Parent flex w-full h-full justify-center items-center flex-col p-1 gap-1"> | ||
<ServiceLine | ||
:label="t('controlPage.currentEpoch')" | ||
:value="flag ? beaconControler : controlStore?.currentResult?.currentEpoch" | ||
:hover-text=" | ||
t('controlPage.currentEpochIs', { | ||
epoch: flag ? beaconControler : controlStore?.currentResult?.currentEpoch, | ||
}) | ||
" | ||
/> | ||
<ServiceLine label="INDEX" value="-----" /> | ||
<ServiceLine | ||
:label="t('controlPage.currentSlot')" | ||
:value="flag ? beaconControler : controlStore?.currentResult?.currentSlot" | ||
:hover-text=" | ||
t('controlPage.currentSlotIs', { | ||
slot: flag ? beaconControler : controlStore?.currentResult?.currentSlot, | ||
}) | ||
" | ||
/> | ||
</div> | ||
</template> | ||
<script setup></script> | ||
<script setup> | ||
import { useControlStore } from "@/store/theControl"; | ||
import { useFooter } from "@/store/theFooter"; | ||
import { computed } from "vue"; | ||
import NoData from "./NoData.vue"; | ||
import ServiceLine from "../fragments/ServiceLine.vue"; // Assuming ServiceLine is the reusable component | ||
import i18n from "@/includes/i18n"; | ||
const t = i18n.global.t; | ||
const controlStore = useControlStore(); | ||
const footerStore = useFooter(); | ||
const beaconControler = computed(() => { | ||
if (!controlStore.currentResult || controlStore.currentResult.beaconStatus === undefined) { | ||
return "Checking Beacon Status..."; | ||
} | ||
return controlStore.currentResult.beaconStatus !== 0 ? "No Running Beacon Node!" : "Loading..."; | ||
}); | ||
<style scoped></style> | ||
const flag = computed(() => !controlStore.currentResult || controlStore.currentResult.beaconStatus !== 0); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters