mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-08-24 16:05:07 +03:00
Changed coords format to [a b c ...]
This commit is contained in:
parent
e0ff9c9994
commit
951f0a1631
2 changed files with 10 additions and 2 deletions
|
@ -381,11 +381,15 @@ ui.getSelfInfo = function () {
|
|||
});
|
||||
};
|
||||
|
||||
function replaceAll(string, search, replace) {
|
||||
return string.split(search).join(replace);
|
||||
}
|
||||
|
||||
ui.updateSelfInfo = function () {
|
||||
return ui.getSelfInfo().then(function (info) {
|
||||
$("ipv6").innerText = info.address;
|
||||
$("subnet").innerText = info.subnet;
|
||||
$("coordinates").innerText = info.coords;
|
||||
$("coordinates").innerText = "".concat('[',replaceAll(info.coords, ',', ' '),']');
|
||||
$("pub_key").innerText = info.key;
|
||||
$("priv_key").innerText = info.private_key;
|
||||
$("ipv6").innerText = info.address;
|
||||
|
|
|
@ -357,12 +357,16 @@ ui.getSelfInfo = () =>
|
|||
fetch('api/self')
|
||||
.then((response) => response.json())
|
||||
|
||||
function replaceAll(string, search, replace) {
|
||||
return string.split(search).join(replace);
|
||||
}
|
||||
|
||||
ui.updateSelfInfo = () =>
|
||||
ui.getSelfInfo()
|
||||
.then((info) => {
|
||||
$("ipv6").innerText = info.address;
|
||||
$("subnet").innerText = info.subnet;
|
||||
$("coordinates").innerText = info.coords;
|
||||
$("coordinates").innerText = "".concat('[',replaceAll(info.coords, ',', ' '),']');
|
||||
$("pub_key").innerText = info.key;
|
||||
$("priv_key").innerText = info.private_key;
|
||||
$("ipv6").innerText = info.address;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue