mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-06 13:01:46 -07:00
style: lint files
This commit is contained in:
parent
504ce7f4b1
commit
51733497f6
6 changed files with 61 additions and 67 deletions
|
@ -37,19 +37,15 @@ async function getMemberAdditionalData(data) {
|
||||||
let peerData = {};
|
let peerData = {};
|
||||||
if (peer) {
|
if (peer) {
|
||||||
peerData.latency = peer.latency;
|
peerData.latency = peer.latency;
|
||||||
if (peer.latency !== -1)
|
if (peer.latency !== -1) peerData.online = 1;
|
||||||
peerData.online = 1;
|
if (peer.latency == -1) peerData.online = 2;
|
||||||
if (peer.latency == -1)
|
|
||||||
peerData.online = 2;
|
|
||||||
peerData.clientVersion = peer.version;
|
peerData.clientVersion = peer.version;
|
||||||
if (peer.paths[0]) {
|
if (peer.paths[0]) {
|
||||||
peerData.lastOnline = peer.paths[0].lastReceive;
|
peerData.lastOnline = peer.paths[0].lastReceive;
|
||||||
peerData.physicalAddress = peer.paths[0].address.split("/")[0];
|
peerData.physicalAddress = peer.paths[0].address.split("/")[0];
|
||||||
peerData.physicalPort = peer.paths[0].address.split("/")[1];
|
peerData.physicalPort = peer.paths[0].address.split("/")[1];
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
peerData.online = 0;
|
peerData.online = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<base href="%PUBLIC_URL%/">
|
<base href="%PUBLIC_URL%/" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<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
|
<meta
|
||||||
name="description"
|
name="viewport"
|
||||||
content="ZeroUI"
|
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" />
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
<title>ZeroUI</title>
|
<title>ZeroUI</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
.netBtn:hover {
|
.netBtn:hover {
|
||||||
transform: translateY(0) scale(1.02);
|
transform: translateY(0) scale(1.02);
|
||||||
background: rgba(0,0,0,0);
|
background: rgba(0, 0, 0, 0);
|
||||||
box-shadow: inset 0 0 0 3px #ffc107;
|
box-shadow: inset 0 0 0 3px #ffc107;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,10 +101,9 @@ function NetworkMembers({ network }) {
|
||||||
name: "Peer status",
|
name: "Peer status",
|
||||||
minWidth: "100px",
|
minWidth: "100px",
|
||||||
cell: (row) =>
|
cell: (row) =>
|
||||||
(row.online === 0) ? (
|
row.online === 0 ? (
|
||||||
<Typography color="error">OFFLINE</Typography>
|
<Typography color="error">OFFLINE</Typography>
|
||||||
) : ( (row.online === 1) ? (
|
) : row.online === 1 ? (
|
||||||
|
|
||||||
<Typography style={{ color: "#008000" }}>
|
<Typography style={{ color: "#008000" }}>
|
||||||
{"ONLINE (v" +
|
{"ONLINE (v" +
|
||||||
row.config.vMajor +
|
row.config.vMajor +
|
||||||
|
@ -124,23 +123,22 @@ function NetworkMembers({ network }) {
|
||||||
row.config.vRev +
|
row.config.vRev +
|
||||||
")"}
|
")"}
|
||||||
</Typography>
|
</Typography>
|
||||||
)),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "physicalip",
|
id: "physicalip",
|
||||||
name: "Physical IP / Latency",
|
name: "Physical IP / Latency",
|
||||||
minWidth: "220px",
|
minWidth: "220px",
|
||||||
cell: (row) =>
|
cell: (row) =>
|
||||||
(row.online === 1) ? (
|
row.online === 1 ? (
|
||||||
<p>
|
<p>
|
||||||
{row.physicalAddress +
|
{row.physicalAddress + "/" + row.physicalPort}
|
||||||
"/" +
|
<br />
|
||||||
row.physicalPort}<br />{
|
{"(" + row.latency + " ms)"}
|
||||||
"(" +
|
|
||||||
row.latency +
|
|
||||||
" ms)"}
|
|
||||||
</p>
|
</p>
|
||||||
) : (""),
|
) : (
|
||||||
|
""
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "delete",
|
id: "delete",
|
||||||
|
|
|
@ -27,9 +27,9 @@ function NetworkSettings({ network, setNetwork }) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChange = (key1, key2, mode = "text", additionalData = null) => (
|
const handleChange =
|
||||||
event
|
(key1, key2, mode = "text", additionalData = null) =>
|
||||||
) => {
|
(event) => {
|
||||||
const value = parseValue(event, mode, additionalData);
|
const value = parseValue(event, mode, additionalData);
|
||||||
|
|
||||||
let updatedNetwork = replaceValue({ ...network }, key1, key2, value);
|
let updatedNetwork = replaceValue({ ...network }, key1, key2, value);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen',
|
font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen",
|
||||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||||
sans-serif;
|
sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue