transport addresses now displays in dashboard
parent
6c75c525d2
commit
817f0263db
|
@ -30,6 +30,7 @@
|
||||||
<script defer src="/private/js/motd.js"></script>
|
<script defer src="/private/js/motd.js"></script>
|
||||||
<script defer src="/shared/navbar.js"></script>
|
<script defer src="/shared/navbar.js"></script>
|
||||||
<script defer src="/private/js/windows.js"></script>
|
<script defer src="/private/js/windows.js"></script>
|
||||||
|
<script defer src="/shared/main/loadTransport.js"></script>
|
||||||
<script>alert("Content security policy appears to not be working. Your browser security is weak!")</script>
|
<script>alert("Content security policy appears to not be working. Your browser security is weak!")</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -250,22 +251,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<details>
|
<h4>Transports</h4>
|
||||||
<summary>Transport addresses</summary>
|
|
||||||
<div class="field has-addons torTransportField">
|
<div class="field has-addons torTransportField">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a class="button is-static">
|
<a class="button is-static">
|
||||||
<i class="fas fa-adjust"></i>
|
<i class="fas fa-adjust"></i>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p class="control is-expanded">
|
<p class="control is-expanded">
|
||||||
<input id="myTor" class="input myTor" type="text" readonly>
|
<input class="input myTor" type="text" readonly>
|
||||||
</p>
|
</p>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a id="myTorCopy" class="button is-primary"><i class="fas fa-copy"></i></a>
|
<a class="button is-primary myTorCopy"><i class="fas fa-copy"></i></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
|
||||||
|
|
||||||
<i class="fas fa-link"></i>
|
<i class="fas fa-link"></i>
|
||||||
Outgoing Connections:
|
Outgoing Connections:
|
||||||
|
|
|
@ -57,3 +57,7 @@
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.torTransportField {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
fetch('/gettoraddress', {
|
||||||
|
headers: {
|
||||||
|
"token": webpass
|
||||||
|
}})
|
||||||
|
.then((resp) => resp.text())
|
||||||
|
.then(function(resp) {
|
||||||
|
let torBoxes = document.getElementsByClassName('myTor')
|
||||||
|
Array.from(torBoxes).forEach(element => {
|
||||||
|
element.value = resp
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
Array.from(document.getElementsByClassName('myTorCopy')).forEach(element => {
|
||||||
|
element.onclick = function(){
|
||||||
|
var copyText = document.getElementsByClassName('myTor')[0]
|
||||||
|
copyText.select()
|
||||||
|
document.execCommand("copy")
|
||||||
|
if (typeof PNotify != 'undefined'){
|
||||||
|
PNotify.success({
|
||||||
|
text: "Copied to clipboard"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
Loading…
Reference in New Issue