Browse Source

Link to Dojo Maintenance Tools from Samourai Server app (#544)

Co-authored-by: Mayank <mayankchhabra9@gmail.com>
lnbits-disable-amilk
Luke Childs 4 years ago
committed by GitHub
parent
commit
e1d5be19c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      apps/samourai-server/nginx/connect/css/style.css
  2. 9
      apps/samourai-server/nginx/connect/index.html
  3. 2
      apps/samourai-server/nginx/connect/js/conf.template.js
  4. 4
      apps/samourai-server/nginx/connect/js/script.js

24
apps/samourai-server/nginx/connect/css/style.css

@ -18,6 +18,10 @@ body {
opacity: 0.8;
}
.text-small {
font-size: 14px;
}
hr {
width: 100%;
height: 2px;
@ -54,8 +58,6 @@ hr {
margin: 10px 0 0 0;
}
.app > .app-details > .app-name {
font-size: 52px;
line-height: 52px;
@ -79,6 +81,7 @@ hr {
font-weight: bold;
box-shadow: 0 0 20px 0 rgba(0,0,0,0.8);
}
.heading > .text {
font-size: 52px;
line-height: 52px;
@ -120,4 +123,21 @@ hr {
height: 60px;
margin: 3px 0 0 3px;
border-radius: 15%;
}
.note {
margin-top: 30px;
background: #111010;
border-radius: 8px;
padding: 30px;
border: 2px dashed #3D3838;
}
.note > .note-heading {
margin: 0 0 20px 0;
font-weight: 300;
}
.note > .note-text {
word-wrap: break-word
}

9
apps/samourai-server/nginx/connect/index.html

@ -56,6 +56,15 @@
Network Options by tapping the WiFi-like icon on the top to verify if “Dojo Full Node” is successfully
enabled (it should display a green dot).</li>
</ol>
<div class="note">
<h5 class="note-heading text-muted text-small">Advanced</h5>
<p class="note-text">
If you need to access the Dojo Maintenance Tool, <a href="/admin/" target="_blank">click here</a>.
</p>
<p class="note-text text-small">
Admin key: <code id="dojo-admin-key"></code>
</p>
</div>
</section>
<hr />
<section class="container">

2
apps/samourai-server/nginx/connect/js/conf.template.js

@ -1,5 +1,5 @@
var dojoHiddenService = "$DOJO_HIDDEN_SERVICE";
var whirlpoolHiddenService = "http://$WHIRLPOOL_HIDDEN_SERVICE";
var bitcoinNetwork = "$COMMON_BTC_NETWORK";
var apiKey = "$NODE_ADMIN_KEY";
var dojoAdminKey = "$NODE_ADMIN_KEY";
var supportPrefix = "$NODE_PREFIX_SUPPORT";

4
apps/samourai-server/nginx/connect/js/script.js

@ -1,3 +1,5 @@
document.getElementById('dojo-admin-key').innerText = dojoAdminKey;
var baseRoute = bitcoinNetwork == "testnet" ? "test/v2" : "v2";
fetch(`http://${window.location.host}/${baseRoute}/auth/login`, {
@ -5,7 +7,7 @@ fetch(`http://${window.location.host}/${baseRoute}/auth/login`, {
headers: new Headers({
'Content-Type': 'application/x-www-form-urlencoded'
}),
body: `apikey=${apiKey}`
body: `apikey=${dojoAdminKey}`
})
.then(response => response.json())
.then(data => {

Loading…
Cancel
Save