Skip to content

Commit

Permalink
format check
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayasgalan committed Sep 12, 2024
1 parent 6001235 commit 88c7ea5
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 453 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<template>
<div class="col-start-1 col-span-full row-start-2 row-span-1 z-10 flex">
<div class="w-full relative mt-1">
<button
class="relative w-full cursor-default rounded-md bg-gray-200 p-1 text-left shadow-md text-sm"
@click="toggleDropdown"
>
<span
class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"
>
<button class="relative w-full cursor-default rounded-md bg-gray-200 p-1 text-left shadow-md text-sm" @click="toggleDropdown">
<span class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon class="h-3 w-3 text-gray-400" aria-hidden="true" />
</span>
<span class="block truncate text-center capitalize">{{ selectedFilter }}</span>
Expand All @@ -28,10 +23,7 @@
class="flex justify-center cursor-default select-none p-1 text-gray-900 hover:bg-gray-300"
@click="selectFilter(filter.name)"
>
<span
v-if="selectedFilter === filter.name"
class="flex items-center text-cyan-600"
>
<span v-if="selectedFilter === filter.name" class="flex items-center text-cyan-600">
<CheckIcon class="h-3 w-3" aria-hidden="true" />
</span>
<span
Expand All @@ -57,13 +49,7 @@ import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
import { useSetups } from "../../../../../store/setups";
const filters = [
{ name: "all" },
{ name: "execution" },
{ name: "consensus" },
{ name: "validator" },
{ name: "service" },
];
const filters = [{ name: "all" }, { name: "execution" }, { name: "consensus" }, { name: "validator" }, { name: "service" }];
const serviceStore = useServices();
const setupStore = useSetups();
Expand All @@ -85,9 +71,7 @@ const selectFilter = (filter) => {
const archFilter = (service) => {
const armArchs = ["arm", "arm64", "aarch64_be", "aarch64", "armv8b", "armv8l"];
return armArchs.includes(manageStore.architecture)
? !/(Prysm|ValidatorEjector|KeysAPI|Notification)/.test(service.service)
: true;
return armArchs.includes(manageStore.architecture) ? !/(Prysm|ValidatorEjector|KeysAPI|Notification)/.test(service.service) : true;
};
const networkFilter = (service) => {
Expand All @@ -99,9 +83,7 @@ const networkFilter = (service) => {
case "sepolia":
return service.service !== "SSVNetworkService";
case "gnosis":
return /(Lighthouse|Teku|Nethermind|Erigon|Grafana|Prometheus)/.test(
service.service
);
return /(Lighthouse|Teku|Nethermind|Erigon|Grafana|Prometheus)/.test(service.service);
case "devnet":
return;
default:
Expand All @@ -113,14 +95,8 @@ const determineCurrentNetwork = () => {
const selectedNetwork = setupStore.selectedSetup?.network;
if (selectedNetwork) {
const foundNetwork = manageStore.networkList.find(
(network) => network.network === selectedNetwork
);
currentNetwork.value = foundNetwork
? foundNetwork.network
: selectedNetwork === "devnet"
? selectedNetwork
: null;
const foundNetwork = manageStore.networkList.find((network) => network.network === selectedNetwork);
currentNetwork.value = foundNetwork ? foundNetwork.network : selectedNetwork === "devnet" ? selectedNetwork : null;
}
};
Expand All @@ -135,9 +111,7 @@ const filteredServices = computed(() => {
const filterName = selectedFilter.value ?? "all";
return filterName === "all"
? networkArchFilteredServices.value
: networkArchFilteredServices.value.filter(
(service) => service.category === filterName
);
: networkArchFilteredServices.value.filter((service) => service.category === filterName);
});
// Watchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
<div
class="w-full h-full col-start-1 col-span-full row-start-1 row-span-full grid grid-cols-6 grid-rows-15 items-center gap-y-1 bg-[#292e32] p-1 rounded-md"
>
<span
class="col-start-1 col-span-full row-start-1 row-span-1 text-xs text-center text-gray-100 font-sans uppercase"
>{{ t("multiServer.addConfServ") }}</span
>
<span class="col-start-1 col-span-full row-start-1 row-span-1 text-xs text-center text-gray-100 font-sans uppercase">{{
t("multiServer.addConfServ")
}}</span>
<DrawerFilter />
<div
class="h-7 col-start-1 col-span-full row-start-3 row-span-1 mb-1 self-end flex justify-start items-center relative"
>
<div class="h-7 col-start-1 col-span-full row-start-3 row-span-1 mb-1 self-end flex justify-start items-center relative">
<label for="Search" class="sr-only"> {{ t("multiServer.serch") }} </label>

<input
Expand All @@ -24,14 +21,7 @@
<button type="button" class="text-gray-600 hover:text-gray-700">
<span class="sr-only">{{ t("multiServer.serch") }} </span>

<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="h-4 w-4"
>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-4 w-4">
<path
stroke-linecap="round"
stroke-linejoin="round"
Expand All @@ -54,23 +44,14 @@
@click="addServices(service)"
@mouseenter="footerStore.cursorLocation = `${service.name} ${serv}`"
>
<img
:src="service.icon"
alt="Client Icon"
class="col-start-1 col-span-1 w-full mx-auto"
/>
<span
class="col-start-2 col-span-full w-full self-center text-xs text-gray-100 truncate ml-2"
>{{ service.name }}</span
>
<img :src="service.icon" alt="Client Icon" class="col-start-1 col-span-1 w-full mx-auto" />
<span class="col-start-2 col-span-full w-full self-center text-xs text-gray-100 truncate ml-2">{{ service.name }}</span>
</div>
</div>
<div
class="col-start-1 col-span-full row-start-14 row-span-full w-full h-full bg-[#151618] rounded-md flex flex-col justify-between items-center p-1 shadow-sm shadow-black active:shadow-none border border-gray-700"
>
<span class="text-xs text-center text-gray-100 font-sans uppercase mt-1">{{
t("multiServer.cstmServ")
}}</span>
<span class="text-xs text-center text-gray-100 font-sans uppercase mt-1">{{ t("multiServer.cstmServ") }}</span>

<div
class="w-full h-8 bg-teal-700 rounded-sm text-center p-1 cursor-pointer hover:bg-teal-900 transition-all duration-100"
Expand Down
Loading

0 comments on commit 88c7ea5

Please sign in to comment.