style: lint files

This commit is contained in:
dec0dOS 2021-12-19 19:09:54 +03:00
parent 504ce7f4b1
commit 51733497f6
6 changed files with 61 additions and 67 deletions

View file

@ -37,19 +37,15 @@ async function getMemberAdditionalData(data) {
let peerData = {};
if (peer) {
peerData.latency = peer.latency;
if (peer.latency !== -1)
peerData.online = 1;
if (peer.latency == -1)
peerData.online = 2;
if (peer.latency !== -1) peerData.online = 1;
if (peer.latency == -1) peerData.online = 2;
peerData.clientVersion = peer.version;
if (peer.paths[0]) {
peerData.lastOnline = peer.paths[0].lastReceive;
peerData.physicalAddress = peer.paths[0].address.split("/")[0];
peerData.physicalPort = peer.paths[0].address.split("/")[1];
}
}
else
{
} else {
peerData.online = 0;
}

View file

@ -2,13 +2,13 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="%PUBLIC_URL%/">
<base href="%PUBLIC_URL%/" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta
name="description"
content="ZeroUI"
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="description" content="ZeroUI" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>ZeroUI</title>
</head>

View file

@ -101,10 +101,9 @@ function NetworkMembers({ network }) {
name: "Peer status",
minWidth: "100px",
cell: (row) =>
(row.online === 0) ? (
row.online === 0 ? (
<Typography color="error">OFFLINE</Typography>
) : ( (row.online === 1) ? (
) : row.online === 1 ? (
<Typography style={{ color: "#008000" }}>
{"ONLINE (v" +
row.config.vMajor +
@ -124,23 +123,22 @@ function NetworkMembers({ network }) {
row.config.vRev +
")"}
</Typography>
)),
),
},
{
id: "physicalip",
name: "Physical IP / Latency",
minWidth: "220px",
cell: (row) =>
(row.online === 1) ? (
row.online === 1 ? (
<p>
{row.physicalAddress +
"/" +
row.physicalPort}<br />{
"(" +
row.latency +
" ms)"}
{row.physicalAddress + "/" + row.physicalPort}
<br />
{"(" + row.latency + " ms)"}
</p>
) : (""),
) : (
""
),
},
{
id: "delete",

View file

@ -27,9 +27,9 @@ function NetworkSettings({ network, setNetwork }) {
}
};
const handleChange = (key1, key2, mode = "text", additionalData = null) => (
event
) => {
const handleChange =
(key1, key2, mode = "text", additionalData = null) =>
(event) => {
const value = parseValue(event, mode, additionalData);
let updatedNetwork = replaceValue({ ...network }, key1, key2, value);

View file

@ -1,8 +1,8 @@
body {
margin: 0;
overflow-x: hidden;
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;