Skip to content

Commit

Permalink
update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mabasian committed Jan 2, 2024
1 parent 76f1ec9 commit 1294c91
Showing 1 changed file with 43 additions and 10 deletions.
53 changes: 43 additions & 10 deletions launcher/src/components/UI/services-modal/SsvModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,39 @@

<div class="flip-box icon-box">
<div class="flip-box-inner">
<img class="flip-box-front" src="/img/icon/service-icons/ssv-network.png" alt="icon" />
<img
class="flip-box-front"
src="/img/icon/service-icons/ssv-network.png"
alt="icon"
/>

<img class="flip-box-back" src="/img/icon/click-installation/testnet-icon.png" alt="icon" />
<img
class="flip-box-back"
src="/img/icon/click-installation/testnet-icon.png"
alt="icon"
/>
</div>
</div>

<!-- -->
<div class="title-box">
<div class="service-name"><span>ssv.network</span></div>
<div class="service-option">
<img src="/img/icon/service-icons/internet.png" alt="icon" @click="openBrowser" />
<img src="/img/icon/service-icons/github1.png" alt="icon" @click="openGitHub" />
<img src="/img/icon/service-icons/discord.png" alt="icon" @click="openDiscord" />
<img
src="/img/icon/service-icons/internet.png"
alt="icon"
@click="openBrowser"
/>
<img
src="/img/icon/service-icons/github1.png"
alt="icon"
@click="openGitHub"
/>
<img
src="/img/icon/service-icons/discord.png"
alt="icon"
@click="openDiscord"
/>
</div>
</div>
</div>
Expand All @@ -52,7 +72,11 @@
:ssv-service="ssvService"
@insert-key="insertSecretkeyHandler"
></secretkey-register>
<ssv-dashboard v-if="ssvDashboardActive" :operator-data="operatorData" :pubkey="pubkey"></ssv-dashboard>
<ssv-dashboard
v-if="ssvDashboardActive"
:operator-data="operatorData"
:pubkey="pubkey"
></ssv-dashboard>
</div>
</div>
</div>
Expand Down Expand Up @@ -110,23 +134,32 @@ export default {
this.registerModalActive = true;
},
getKeys: async function () {
let ssv = this.runningServices.find((service) => service.service === "SSVNetworkService");
let ssv = this.runningServices.find(
(service) => service.service === "SSVNetworkService"
);
this.ssvService = ssv;
let ssvConfig = await ControlService.getServiceConfig(ssv.config.serviceID);
this.secretkey = ssvConfig.ssv_sk;
this.pubkey = ssvConfig.ssv_pk;
try {
if (!this.pubkey) {
let ssvKeystoreConfig = await ControlService.readSSVKeystoreConfig(ssv.config.serviceID);
let ssvKeystoreConfig = await ControlService.readSSVKeystoreConfig(
ssv.config.serviceID
);
if (ssvKeystoreConfig.privateKeyFileData.publicKey) {
this.pubkey = ssvKeystoreConfig.privateKeyFileData.publicKey;
}
}
let network = ssvConfig.network === "goerli" ? "prater" : ssvConfig.network;
let response = await axios.get(`https://api.ssv.network/api/v4/${network}/operators/public_key/` + this.pubkey);
let response = await axios.get(
`https://api.ssv.network/api/v4/${network}/operators/public_key/` + this.pubkey
);
if (!response.data.data)
response = await axios.get(`https://api.ssv.network/api/v3/${network}/operators/public_key/` + this.pubkey);
response = await axios.get(
`https://api.ssv.network/api/v3/${network}/operators/public_key/` +
this.pubkey
);
if (response.data.data) {
this.operatorData = response.data.data;
this.ssvDashboardActive = true;
Expand Down

0 comments on commit 1294c91

Please sign in to comment.