@@ -155,6 +161,7 @@ import { computed } from "vue";
import { useStakingStore } from "@/store/theStaking";
import { useFooter } from "@/store/theFooter";
import i18n from "@/includes/i18n";
+import { useSetups } from "../../../../../../store/setups";
const props = defineProps({
item: {
@@ -165,14 +172,17 @@ const props = defineProps({
const stakingStore = useStakingStore();
const footerStore = useFooter();
+const setupStore = useSetups();
const t = i18n.global.t;
//Key Status Icons
const activeStatusIcon = "/img/icon/staking-page-icons/validator-state-active.png";
const slashedStatusIcon = "/img/icon/staking-page-icons/validator-state-slashed.png";
-const depositStatusIcon = "/img/icon/staking-page-icons/validator-state-not-deposited.png";
+const depositStatusIcon =
+ "/img/icon/staking-page-icons/validator-state-not-deposited.png";
const offlineStatusIcon = "/img/icon/staking-page-icons/validator-state-offline.png";
-const pendingStatusIcon = "/img/icon/staking-page-icons/validator-state-in-activation-queue.png";
+const pendingStatusIcon =
+ "/img/icon/staking-page-icons/validator-state-in-activation-queue.png";
const exitedStatusIcon = "/img/icon/staking-page-icons/validator-state-exited.png";
const apiProblems = "/img/icon/staking-page-icons/validator-state-unknown.png";
const apiLoading = "/animation/loading/turning-circle.gif";
diff --git a/launcher/src/components/UI/staking-page/sections/SidebarSection.vue b/launcher/src/components/UI/staking-page/sections/SidebarSection.vue
index e05e8c156..ebc5f7dba 100644
--- a/launcher/src/components/UI/staking-page/sections/SidebarSection.vue
+++ b/launcher/src/components/UI/staking-page/sections/SidebarSection.vue
@@ -64,12 +64,21 @@ const hoveredIndex = ref(null);
//Computed
const installedValidators = computed(() => {
let services = [];
- if(setupStore.selectedSetup === null){
- services = serviceStore.installedServices.filter((s) => s.category === "validator" && !/SSVNetwork|Charon/.test(s.service))
- }else{
+ if (setupStore.selectedSetup === null) {
+ services = serviceStore.installedServices.filter(
+ (s) => s.category === "validator" && !/SSVNetwork|Charon/.test(s.service)
+ );
+ } else {
services = serviceStore.installedServices
- .filter((s) => s.category === "validator" && !/SSVNetwork|Charon/.test(s.service) && setupStore.selectedSetup?.services?.map(s => s.config.serviceID).includes(s.config.serviceID))
- .map((service) => ({ ...service, selected: false }));
+ .filter(
+ (s) =>
+ s.category === "validator" &&
+ !/SSVNetwork|Charon/.test(s.service) &&
+ setupStore.selectedSetup?.services
+ ?.map((s) => s.config.serviceID)
+ .includes(s.config.serviceID)
+ )
+ .map((service) => ({ ...service, selected: false }));
}
return services.sort((a, b) => a.name.localeCompare(b.name));
});
@@ -83,7 +92,16 @@ onMounted(() => {
//Methods
const getCurrentService = () => {
+ if (setupStore.selectedSetup) {
+ const matchingService = installedValidators.value.find((validator) =>
+ setupStore.selectedSetup.services.some(
+ (service) => service.id === validator.config?.serviceID
+ )
+ );
+ currentService.value = matchingService?.config?.serviceID;
+ } else {
currentService.value = installedValidators.value[0]?.config?.serviceID;
+ }
};
const getActiveValidator = () => {
diff --git a/launcher/src/components/base/BaseLayout.vue b/launcher/src/components/base/BaseLayout.vue
index a7aa03f54..ba2e44ed6 100755
--- a/launcher/src/components/base/BaseLayout.vue
+++ b/launcher/src/components/base/BaseLayout.vue
@@ -118,7 +118,7 @@ const UpdatePanelCompRef = ref(null);
const isPageLoading = ref(false);
const getLoadingAnime = computed(() => {
- return "/animation/loading/robot-loader.gif";
+ return "/animation/setup/loader.gif";
});