diff --git a/gui/index.html b/gui/index.html new file mode 100644 index 0000000000000000000000000000000000000000..45ca6ae0fe0331e43a57b1cce8a1c0616c4efa82 --- /dev/null +++ b/gui/index.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>Duniter</title> + <style> + html { + font-family: "Courier New", Courier, monospace; + } + img { + width: 50%; + margin-left: auto; + margin-right: auto; + display: block; + + margin-top: 40vh; + transform: translateY(-50%); + } + h1 { + text-align: center; + width: 80%; + margin-top: -10%; + margin-left: auto; + margin-right: auto; + } + </style> +</head> +<body> +<img src="duniter.png"/> +<h1 id="loader">Loading...</h1> +<script type="text/javascript"> + function reqListener () { + document.getElementById('loader').innerHTML = 'Server ready.'; + location.href = 'http://127.0.0.1:9220'; + } + function test() { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", reqListener); + oReq.open("GET", "http://127.0.0.1:9220/"); + oReq.send(); + } + function strange () { + document.getElementById('loader').innerHTML = 'The server is not starting...'; + } + setInterval(test, 800); + setTimeout(strange, 8000); +</script> +</body> +</html> \ No newline at end of file diff --git a/gui/package.json b/gui/package.json index b27890d8ab8d166edbcc84dd696b1264128c1ad0..693d2c26946809d19c1589186d44872c52e3537a 100644 --- a/gui/package.json +++ b/gui/package.json @@ -1,9 +1,13 @@ { "name": "Duniter", - "main": "http://localhost:9220", + "main": "index.html", "node-main": "../sources/bin/ucoind", "window": { "icon": "duniter.png", - "title": "Duniter v0.2" + "title": "Duniter", + "width": 800, + "height": 800, + "min_width": 750, + "min_height": 400 } }