mirror of
https://github.com/cwchristerw/bokxin-ip
synced 2024-12-04 15:55:30 +00:00
Merge branch 'juhosa:master' into changes
This commit is contained in:
commit
0981ca4407
10
README.md
10
README.md
@ -1,3 +1,13 @@
|
||||
# Bokxi IP
|
||||
|
||||
Auttaa muodostamaan IP:n Bokxin koneellesi.
|
||||
|
||||
## Kehitys
|
||||
|
||||
`npm install`
|
||||
|
||||
`gatsby develop`
|
||||
|
||||
## Tuotantoversio
|
||||
|
||||
[https://bokxi-ip.netlify.app/](https://bokxi-ip.netlify.app/)
|
||||
|
@ -13,7 +13,12 @@ const IndexPage = () => {
|
||||
setIp("")
|
||||
if (osat.loppu === "" || osat.loppu.length !== 4) return
|
||||
if (osat.loppu.slice(0, 1) !== "2" && osat.loppu.slice(0, 1) !== "3") return
|
||||
if (parseInt(osat.loppu.slice(1)) >= 255 || parseInt(osat.loppu.slice(1)) === 0 || isNaN(parseInt(osat.loppu.slice(1)))) return
|
||||
if (
|
||||
parseInt(osat.loppu.slice(1)) >= 255 ||
|
||||
parseInt(osat.loppu.slice(1)) === 0 ||
|
||||
isNaN(parseInt(osat.loppu.slice(1)))
|
||||
)
|
||||
return
|
||||
|
||||
let ekanumero = ""
|
||||
let loppu = osat.loppu
|
||||
@ -30,7 +35,7 @@ const IndexPage = () => {
|
||||
let loppuosa = ""
|
||||
loppuosa = loppu.slice(1)
|
||||
|
||||
while(loppuosa.charAt(0) === '0'){
|
||||
while (loppuosa.charAt(0) === "0") {
|
||||
loppuosa = loppuosa.substr(1)
|
||||
}
|
||||
|
||||
@ -94,12 +99,19 @@ const IndexPage = () => {
|
||||
<br />
|
||||
{ip !== "" ? `${ip} (valitse x väliltä 2-254)` : "10.22x.xxx.xxx"}
|
||||
<br />
|
||||
|
||||
<span>
|
||||
<b>Default gateway</b>
|
||||
</span>
|
||||
<br />
|
||||
{ip !== "" ? `${ip} (x on 1)` : "10.22x.xxx.1"}
|
||||
<br />
|
||||
<span>
|
||||
<b>DNS</b>
|
||||
</span>
|
||||
<br />
|
||||
193.166.40.28
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user