mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-05 20:41:43 -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 = {};
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
.netBtn {
|
||||
font-size: 1em;
|
||||
padding: 0 10px;
|
||||
min-height: 50px;
|
||||
max-height: 50px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #b5b5b5;
|
||||
margin: 2px;
|
||||
font-size: 1em;
|
||||
padding: 0 10px;
|
||||
min-height: 50px;
|
||||
max-height: 50px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #b5b5b5;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.netBtn:hover {
|
||||
transform: translateY(0) scale(1.02);
|
||||
background: rgba(0,0,0,0);
|
||||
box-shadow: inset 0 0 0 3px #ffc107;
|
||||
transform: translateY(0) scale(1.02);
|
||||
background: rgba(0, 0, 0, 0);
|
||||
box-shadow: inset 0 0 0 3px #ffc107;
|
||||
}
|
||||
|
||||
.netBtn:focus {
|
||||
border: 1px solid white;
|
||||
outline: 0;
|
||||
border: 1px solid white;
|
||||
outline: 0;
|
||||
}
|
||||
|
|
|
@ -101,46 +101,44 @@ function NetworkMembers({ network }) {
|
|||
name: "Peer status",
|
||||
minWidth: "100px",
|
||||
cell: (row) =>
|
||||
(row.online === 0) ? (
|
||||
row.online === 0 ? (
|
||||
<Typography color="error">OFFLINE</Typography>
|
||||
) : ( (row.online === 1) ? (
|
||||
|
||||
<Typography style={{ color: "#008000" }}>
|
||||
{"ONLINE (v" +
|
||||
row.config.vMajor +
|
||||
"." +
|
||||
row.config.vMinor +
|
||||
"." +
|
||||
row.config.vRev +
|
||||
")"}
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography style={{ color: "#f1c232" }}>
|
||||
{"RELAYED (v" +
|
||||
row.config.vMajor +
|
||||
"." +
|
||||
row.config.vMinor +
|
||||
"." +
|
||||
row.config.vRev +
|
||||
")"}
|
||||
</Typography>
|
||||
)),
|
||||
) : row.online === 1 ? (
|
||||
<Typography style={{ color: "#008000" }}>
|
||||
{"ONLINE (v" +
|
||||
row.config.vMajor +
|
||||
"." +
|
||||
row.config.vMinor +
|
||||
"." +
|
||||
row.config.vRev +
|
||||
")"}
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography style={{ color: "#f1c232" }}>
|
||||
{"RELAYED (v" +
|
||||
row.config.vMajor +
|
||||
"." +
|
||||
row.config.vMinor +
|
||||
"." +
|
||||
row.config.vRev +
|
||||
")"}
|
||||
</Typography>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: "physicalip",
|
||||
name: "Physical IP / Latency",
|
||||
minWidth: "220px",
|
||||
cell: (row) =>
|
||||
(row.online === 1) ? (
|
||||
<p>
|
||||
{row.physicalAddress +
|
||||
"/" +
|
||||
row.physicalPort}<br />{
|
||||
"(" +
|
||||
row.latency +
|
||||
" ms)"}
|
||||
</p>
|
||||
) : (""),
|
||||
row.online === 1 ? (
|
||||
<p>
|
||||
{row.physicalAddress + "/" + row.physicalPort}
|
||||
<br />
|
||||
{"(" + row.latency + " ms)"}
|
||||
</p>
|
||||
) : (
|
||||
""
|
||||
),
|
||||
},
|
||||
{
|
||||
id: "delete",
|
||||
|
|
|
@ -27,18 +27,18 @@ function NetworkSettings({ network, setNetwork }) {
|
|||
}
|
||||
};
|
||||
|
||||
const handleChange = (key1, key2, mode = "text", additionalData = null) => (
|
||||
event
|
||||
) => {
|
||||
const value = parseValue(event, mode, additionalData);
|
||||
const handleChange =
|
||||
(key1, key2, mode = "text", additionalData = null) =>
|
||||
(event) => {
|
||||
const value = parseValue(event, mode, additionalData);
|
||||
|
||||
let updatedNetwork = replaceValue({ ...network }, key1, key2, value);
|
||||
setNetwork(updatedNetwork);
|
||||
let updatedNetwork = replaceValue({ ...network }, key1, key2, value);
|
||||
setNetwork(updatedNetwork);
|
||||
|
||||
let data = setValue({}, key1, key2, value);
|
||||
let data = setValue({}, key1, key2, value);
|
||||
|
||||
sendReq(data);
|
||||
};
|
||||
sendReq(data);
|
||||
};
|
||||
|
||||
return (
|
||||
<Accordion>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue