Astroport.ONE/templates/register.html

265 lines
9.6 KiB
HTML
Raw Normal View History

2022-10-30 03:02:59 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>[Astroport] : G1Visa Application : _HOSTNAME_ :: _IPFSNODEID_ </title>
2023-09-10 00:22:22 +02:00
<meta http-equiv="refresh" content="168; url='http://127.0.0.1:12345'" />
2022-10-30 03:02:59 +01:00
<link rel="icon" type="image/png" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/logo.png" />
2022-12-25 23:46:35 +01:00
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type="text/css" />
2022-10-30 03:02:59 +01:00
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type="text/css" />
2022-11-06 11:41:33 +01:00
<style>
body {
background-image:url("http://127.0.0.1:8080/ipfs/QmSFgatcq3q898J56epa8SyGbH651vRBFnv93kQSwfoi83/background.000.jpg");
2022-11-06 11:41:33 +01:00
background-repeat: no-repeat;
background-size: 100% 100%;
}
html {
height: 100%
2022-12-25 22:20:50 +01:00
}
header {
opacity: 0.8;
2022-11-06 11:41:33 +01:00
}
2022-11-06 12:13:19 +01:00
input[type=submit] {
width: 12em; height: 4em;
}
input[type=checkbox] {
width: 2em; height: 2em;
}
2022-11-06 12:27:37 +01:00
input {
2023-01-20 20:45:01 +01:00
width: 26em; height: 2em;
2022-11-06 12:27:37 +01:00
}
2022-12-25 15:12:32 +01:00
#yellow {
background: yellow;
position: absolute;
2023-09-01 03:56:55 +02:00
top: 2%;
left: 56%;
width: 180;
2022-12-25 15:12:32 +01:00
visibility: hidden;
}
#login {
right: 10%;
top: 5%
}
2023-09-04 15:20:43 +02:00
#countdown {
display: flex;
justify-content: center;
align-items: center;
color: #0e2c4c;
font-size: 40px;
width: 200px;
height: 125px;
background-color: #e7d9fc;
border-radius: 50%;
}
2023-09-09 17:11:53 +02:00
#aframe {
background: white;
color: black;
}
#console {
visibility: hidden;
background: rgba(0, 0, 0, 0.7); /* Adjust the background color and opacity as needed */
color: white;
width: 580px;
height: 580px;
position: absolute;
bottom: 0;
left: 0;
padding: 5px;
box-sizing: border-box;
}
2022-11-06 11:41:33 +01:00
</style>
2023-03-10 18:33:28 +01:00
<!-- Astro API JS LIB -->
2023-04-15 15:45:23 +02:00
<script src="http://127.0.0.1:8080/ipfs/Qmae5v9zydax9u6C9ceDijURu5PYdd5avmv4NkenCw7RFv/astro.js"></script>
2023-09-09 17:11:53 +02:00
<script>
// Prepare QRCode generator for this same page
var currentURL = window.location.href;
const amzURL = encodeURIComponent(currentURL);
const rooturl = currentURL.split('/?')[0];
const qrURL = `${rooturl}/?amzqr=${amzURL}&logo=G1WorldMap`;
console.log('qrURL = ' + qrURL);
</script>
2022-10-30 03:02:59 +01:00
</head>
<body>
<header>
2023-04-24 22:43:56 +02:00
<!--
<div id="login"><button onclick="promptUser('login')">LOGIN</button><button onclick="promptUser('logout')">LOGOUT</button></div>
2023-04-24 22:43:56 +02:00
-->
<div>
2023-09-10 00:07:00 +02:00
<button onclick="homeAstroportStation('/?qrcode=station', 'tab', 33000)">Ğ1Station</button>
</div>
2023-04-07 13:33:20 +02:00
<span><div id="ainfo"></div></span>
<div id="debug"></div>
2023-09-10 00:22:22 +02:00
<button onclick="document.getElementById('console').style.visibility = 'visible'; homeAstroportStation( qrURL, 'aframe', 7000);">UMap QR</button>
2023-04-23 01:13:07 +02:00
2022-10-30 03:02:59 +01:00
</header>
<main>
<center>
<b>Welkom - Mirë se vini - Willkommen - Welkomma - Welcome - Marhaban - Bari galoust - Xos gelmissiniz - Welkum - Ongi etorri- Swagata - Ansuf yiswen - ščyra zaprašajem - Kyo tzo pa eit - ॐ★ॐ - Ani kié - Dobro došli - Dagemer mat - Dobre doshŭl - Benvinguts - Ulihebisdi - ௐ- Huān yíng - Karibu - Eoso eoseyo - Benvenuti - Bel bonjou - Bienvini - Dobrodošli - Velkommen - Bienvenido - Bonvenon - Tere tulemast - Gabitê - Vælkomin - Tervetuloa - Welkom - Wìllkòmme - Binvignut - Fàilte - Benvido - Croeso - Planvenguda - Mikouabô - Kalos irthate - Eguahé porá - Baroukh habaim - ﷽ </b><br>
2022-12-25 18:43:27 +01:00
<header>
<form id="formlink" action = "http://127.0.0.1:1234" method = "GET" enctype="application/x-www-form-urlencoded">
2023-09-04 15:00:12 +02:00
<h1><a href="/">U</a><span>Planet</span>
<br><span><a id="satLink" href="#" title="Sat">&nbsp;*&nbsp;</a>(<a href="https://ipfs.copylaradio.com/ipns/copylaradio.com">qo-op</a>)<a id="mapLink" href="#" title="Map">&nbsp;*&nbsp;</a></span></h1>
2023-09-02 22:32:59 +02:00
<span>Email : </span><input name=uplanet value=''></br>
2023-01-20 20:45:01 +01:00
<div id="yellow">
2023-09-02 03:50:54 +02:00
<input name='salt' value='0.00'>
2023-09-03 18:56:17 +02:00
<h3><a target="info" title="CHECK BY YOURSELF" href="http://127.0.0.1:12345"> >>> (◕‿‿◕) <<< </a>
</h3>
2023-09-09 17:11:53 +02:00
<input name='pepper' value='0.00'><br>
2023-09-02 22:32:59 +02:00
</div>
<input type=hidden name=g1pub value=''></br>
2023-09-10 00:22:22 +02:00
(<span id='LAT'></span>:<span id='LON'></span>) registration<br><br>
2023-09-03 18:56:17 +02:00
2022-12-25 18:43:27 +01:00
<input type='submit' value='[(♥‿‿♥)]'>
2023-03-12 22:31:11 +01:00
2022-10-30 03:02:59 +01:00
</form>
2023-09-03 18:56:17 +02:00
2023-09-10 00:22:22 +02:00
<div id="console"><a href="https://pad.p2p.legal/s/Astroport.ONE#Application-name--U-Planet" target="aframe"> IMAGINE ____________</a> <button onclick="document.getElementById('console').style.visibility = 'hidden';">close</button>
<iframe name="aframe" id="aframe" src="https://pad.p2p.legal/s/Astroport.ONE#Application-name--U-Planet" width="100%" height="100%"></iframe>
2023-09-09 17:11:53 +02:00
</div>
2023-09-01 20:15:15 +02:00
<br>
2023-09-10 00:22:22 +02:00
<span><a href="https://pad.p2p.legal/s/Astroport.ONE">Astroport</a>.<a href="https://github.com/papiche/Astroport.ONE">ONE</a>
2023-09-03 20:29:23 +02:00
<br> - Crypto Commons Playground -</span>
2023-09-01 20:15:15 +02:00
<h2>
<form method='get' action='http://g1billet.localhost:33101' target='aframe'>
<input type='hidden' name='montant' value='0' >
<label for='type'>Type :</label>
<select name='type'>
<option value=''>G1BILLET+ ( x 6 )</option>
<option value='jeu'>G1CARD</option>
<option value='xastro' selected>G1CARD+TW</option>
<option value='@astroport'>G1CARD+@</option>
</select>
<input type='hidden' name='dice' value='4' >&nbsp;&nbsp;&nbsp;&nbsp;
2023-09-02 16:40:20 +02:00
<button type='submit'>get more wallets...</button>
</form>
2023-09-01 20:15:15 +02:00
</h2>
<br>
2023-09-03 18:56:17 +02:00
<h1><span id='countdown'>G1Visa registration</span></h1>
2023-09-10 00:22:22 +02:00
<a href="https://opencollective.com/monnaie-libre/" target="funding">- (^‿‿^) -</a>
2022-10-30 03:02:59 +01:00
</main>
</body>
2023-01-03 16:40:07 +01:00
<script>
// Extract latitude and longitude from URL parameters
2023-09-01 03:56:55 +02:00
document.addEventListener('DOMContentLoaded', function() {
const urlParams = new URLSearchParams(window.location.search);
2023-09-02 03:50:54 +02:00
const salt = urlParams.get('salt');
const pepper = urlParams.get('pepper');
2023-09-01 03:56:55 +02:00
const uplanet = urlParams.get('uplanet');
// Set latitude and longitude values to hidden inputs
2023-09-02 03:50:54 +02:00
const latElement = document.querySelector('input[name="salt"]');
const lonElement = document.querySelector('input[name="pepper"]');
2023-09-01 03:56:55 +02:00
const uplanetElement = document.querySelector('input[name="uplanet"]');
2023-09-02 23:11:41 +02:00
const passElement = document.querySelector('input[name="g1pub"]');
2023-09-02 22:32:59 +02:00
//~ // Generate a random 6-digit number and set it as the default value for "PASS"
if (passElement) {
const randomPass = Math.floor(100000 + Math.random() * 900000); // Generates a random 6-digit number
passElement.value = randomPass.toString();
}
2023-09-01 03:56:55 +02:00
2023-09-08 16:58:00 +02:00
if (latElement && lonElement) {
latElement.value = salt || '0.00'; // Default to '0.00' if lat is missing
lonElement.value = pepper || '0.00'; // Default to '0.00' if lon is missing
uplanetElement.value = '@'; // Default to '0.00' if lon is missing
}
2023-09-08 16:50:35 +02:00
// Decalage de - 0.05° = MAP coord SW
2023-09-08 16:58:00 +02:00
var latMAP = (parseFloat(latElement.value) - 0.05).toFixed(2); // Subtract 0.05 from latElement
var lonMAP = (parseFloat(lonElement.value) - 0.05).toFixed(2); // Subtract 0.05 from lonElement
2023-09-08 16:50:35 +02:00
2023-09-08 16:58:00 +02:00
const satURL = `https://ipfs.copylaradio.com/ipfs/Qmduhh6ERX74dx1LhJzB4Bw3ZzM91kAqmPE47BVfMWwYfm/sat_render.html?southWestLat=${latMAP}&southWestLon=${lonMAP}&deg=0.1`;
document.getElementById("satLink").href = satURL;
const mapURL = `https://ipfs.copylaradio.com/ipfs/Qmduhh6ERX74dx1LhJzB4Bw3ZzM91kAqmPE47BVfMWwYfm/map_render.html?southWestLat=${latMAP}&southWestLon=${lonMAP}&deg=0.1`;
document.getElementById("mapLink").href = mapURL;
2023-09-03 18:56:17 +02:00
document.getElementById("LAT").innerHTML = latElement.value ;
document.getElementById("LON").innerHTML = lonElement.value ;
2023-09-01 03:56:55 +02:00
});
2023-01-03 16:40:07 +01:00
</script>
2022-10-30 03:02:59 +01:00
<script>
2022-12-25 15:12:32 +01:00
const el = document.getElementById('yellow');
setTimeout(() => {
2023-03-13 05:52:49 +01:00
el.style.visibility = 'visible';
}, 5456); // 👈️ delay in milliseconds
2022-12-25 15:12:32 +01:00
2022-10-30 03:02:59 +01:00
var arrTimes = [];
var i = 0; // start
var timesToTest = 3;
var tThreshold = 300; //ms
2022-12-25 15:12:32 +01:00
var testImage = "https://ipfs.copylaradio.com/ipfs/QmUUyiuCM4yXgaeGyqC2SVUUXZksuxhDfHQYpUpZPuL2oS/astroport.jpg"; // small image in your server
2022-10-30 03:02:59 +01:00
var dummyImage = new Image();
var isConnectedFast = false;
testLatency(function(avg){
isConnectedFast = (avg <= tThreshold);
/** output */
document.body.appendChild(
2023-09-06 01:09:15 +02:00
document.createTextNode("- IPFS swarm delay - " + (avg.toFixed(2)) + "ms - ♥Box ready ? " + isConnectedFast)
2022-10-30 03:02:59 +01:00
);
});
/** test and average time took to download image from server, called recursively timesToTest times */
function testLatency(cb) {
var tStart = new Date().getTime();
if (i<timesToTest-1) {
dummyImage.src = testImage + '?t=' + tStart;
dummyImage.onload = function() {
var tEnd = new Date().getTime();
var tTimeTook = tEnd-tStart;
arrTimes[i] = tTimeTook;
testLatency(cb);
i++;
};
} else {
/** calculate average of array items then callback */
var sum = arrTimes.reduce(function(a, b) { return a + b; });
var avg = sum / arrTimes.length;
cb(avg);
}
}
</script>
2023-03-12 22:31:11 +01:00
<script>
2022-10-30 03:02:59 +01:00
2023-03-27 17:26:19 +02:00
let cookies = document.cookie;
console.log(cookies);
document.getElementById("countdown").innerHTML = "";
2023-09-08 01:20:18 +02:00
var timeLeft = 42;
2023-03-12 22:31:11 +01:00
var elem = document.getElementById("countdown");
var timerId = setInterval(countdown, 999);
function countdown() {
if (timeLeft == -1) {
clearTimeout(timerId);
2023-09-06 01:09:15 +02:00
elem.innerHTML = "<a href=http://127.0.0.1:12345>OK</a>"
2023-03-12 22:31:11 +01:00
} else {
elem.innerHTML = timeLeft + " s";
2023-03-12 22:31:11 +01:00
timeLeft--;
}
}
// promptUser();
</script>
2023-04-28 03:30:07 +02:00
2022-10-30 03:02:59 +01:00
</html>