2023-10-09 15:24:40 +02:00
< html >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "content-type" content = "text/html; charset=UTF-8" >
< link rel = "icon" type = "image/x-icon" href = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/favicon.ico" >
2023-11-18 00:55:40 +01:00
< title > ♥Box - Ẑen Station - Astroport.ONE - < / title >
2023-10-09 15:24:40 +02:00
< link rel = "stylesheet" href = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/demo.css" >
< script src = "http://127.0.0.1:8080/ipfs/QmYD4y1pXHVnGxxFcn2LWo84ytwmWdNbkyUeFnPCbrpUQy/openpgp.min.js" > < / script >
< script src = "http://127.0.0.1:8080/ipfs/Qmae5v9zydax9u6C9ceDijURu5PYdd5avmv4NkenCw7RFv/astro.js" > < / script >
< script src = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/jquery-3.6.3.min.js" > < / script >
< script src = "http://127.0.0.1:8080/ipfs/QmQLQ5WdCEc7mpKw5rhUujUU1URKweei4Bb4esyVNd9Atx/G1PalPay_fichiers/instascan.min.js" > < / script >
< link rel = "stylesheet" href = "http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type = "text/css" / >
< link rel = "stylesheet" href = "http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type = "text/css" / >
< style >
body {
background-image:url("http://127.0.0.1:8080/ipfs/QmSFgatcq3q898J56epa8SyGbH651vRBFnv93kQSwfoi83/background.014.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 0;
margin: 0;
font-family: sans-serif;
}
html {
height: 100%
}
header {
opacity: 0.8;
}
input[type=submit] {
width: 12em; height: 4em;
}
input[type=checkbox] {
width: 2em; height: 2em;
}
input {
width: 26em; height: 2em;
}
#aframe {
background: white;
color: black;
}
2024-02-23 23:39:54 +01:00
#console {
visibility: visible;
background: rgba(0, 0, 0, 0.9);
color: white;
2024-02-27 03:17:51 +01:00
width: 70%;
2024-02-23 23:39:54 +01:00
height: 55%;
position: absolute;
bottom: 0;
left: 0;
padding: 5px;
box-sizing: border-box;
z-index: 1000; /* Ensure the console appears above other elements */
}
2023-10-09 15:24:40 +02:00
#ainfo {
position: absolute;
top: 2%;
left: 50%;
}
h1 {
margin-top: 10px;
font-size: 40px;
margin-bottom: 10px;
}
.subtitle {
font-size: 20px;
margin-bottom: 20px;
color: #777;
}
a {
color: white;
}
#demo {
overflow: hidden;
}
#description {
text-align: left;
float: left;
width: 49%;
max-width: 500px;
padding-top: 15px;
padding-left: 20px;
}
#showoff {
float: right;
width: 30%;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#container {
top: 40px;
right: 0px;
position: absolute;
display: inline-block;
width: 400px;
height: 400px;
}
2024-02-23 23:39:54 +01:00
#toggleConsoleButton {
cursor: pointer;
}
2023-10-09 15:24:40 +02:00
2024-02-23 23:39:54 +01:00
#fullscreenButton {
cursor: pointer;
}
2023-10-09 15:24:40 +02:00
< / style >
< / head >
< body >
< div id = "demo" >
< div id = "description" >
< header >
2023-11-24 14:51:27 +01:00
< h1 > < a href = "http://astroport.localhost:1234" > < span > ♥Box< / span > ẐenStation < / a > < / h1 > < br >
2023-10-09 15:24:40 +02:00
< / header >
< form method = 'get' action = 'http://127.0.0.1:33101' target = 'aframe' >
< input type = 'hidden' name = 'montant' value = '0' >
2024-04-10 02:23:35 +02:00
< input type = 'hidden' name = 'type' value = 'UPlanet' >
2023-11-17 03:29:25 +01:00
< input type = 'hidden' name = 'dice' value = '6' >
2024-04-19 23:09:50 +02:00
< button type = 'submit' > new G1BILLET< / button >
2023-10-09 15:24:40 +02:00
< / form >
< / div >
< / div >
< div id = "showoff" >
< div id = "container" >
< video id = "preview" style = "transform: scaleX(-1);width: 240px;height: 240px;" autoplay = "autoplay" class = "active" > < / video >
< h1 > < div id = "countdown" > ___< / div > < / h1 >
< input type = "hidden" id = "PASS" value = "PASS" / >
< p > < input type = "text" id = "g1pub" value = "2L8vaYixCf97DMT8SistvQFeBj7vb6RQL7tvwyiv1XVH" / > < / p >
2024-03-04 16:10:44 +01:00
< p > destination< / p >
2023-10-09 15:24:40 +02:00
< div id = "appname" >
2023-12-07 17:04:46 +01:00
< input type = "radio" id = "r0" name = "appname" value = "login" checked = "checked" > LOGIN
2023-11-12 20:12:51 +01:00
< input type = "radio" id = "r6" name = "appname" value = "logout" > LOGOUT
2023-10-09 15:24:40 +02:00
< input type = "radio" id = "r1" name = "appname" value = "friend" > (★★★★★)
< input type = "radio" id = "r2" name = "appname" value = "history" > Historique
2023-11-12 20:12:51 +01:00
< input type = "radio" id = "r4" name = "appname" value = "balance" > Balance
2024-02-02 20:00:08 +01:00
< input type = "radio" id = "r3" name = "appname" value = "pay" > Virement
2024-02-02 19:42:57 +01:00
<!--
2023-12-07 17:04:46 +01:00
< input type = "radio" id = "r5" name = "appname" value = "flipper" > Flipper
2024-02-02 19:42:57 +01:00
-->
2023-10-09 15:24:40 +02:00
< / div >
2023-12-07 17:04:46 +01:00
< p > < b > < / b > select operation< / p >
2023-10-09 15:24:40 +02:00
< strong > < div id = "resu" > < / div > < / strong >
2024-04-19 23:09:50 +02:00
< p > < strong > Scan G1BILLET or < b > MULTIPASS< / b > QRCODE< / strong > < / p >
2023-10-09 15:24:40 +02:00
< / div >
< / div >
< a href = "https://opencollective.com/monnaie-libre/" target = "funding" > - (^‿‿^) -< / a >
< script type = "text/javascript" >
async function fetchAstroport(myURL) {
try {
let one = await fetch(myURL); // Gets a promise
var doc = await one.text();
var regex = /url='([^']+)/i; // Get response PORT
var redirectURL = doc.match(regex)[1]
console.log(redirectURL)
// start countdown
var timeLeft = 20;
var elem = document.getElementById("countdown");
var timerId = setInterval(countdown, 1000);
function countdown() {
if (timeLeft == -1) {
clearTimeout(timerId);
elem.innerHTML = "< a target = 'aframe' href = '"+redirectURL+"' > OK< / a > ";
window.open( redirectURL, "AstroTab");
} else {
elem.innerHTML = timeLeft + " s";
timeLeft--;
}
}
} catch (err) {
console.log('Fetch error:' + err); // Error handling
}
}
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
scanner.addListener('scan', function (content) {
alert(content);
if (content.startsWith('~~~~~')) {
// GET APPNAME
var appname = document.querySelector('input[name="appname"]:checked').value;
// GET PASS TO DECODE PGP
var oldpass = document.getElementById("PASS").value;
if ( oldpass == 'PASS') {
var pass = prompt("Saisir PASS:");
} else {
var pass = oldpass;
}
// PREVIOUS G1PUB SCAN
var g1pub = document.getElementById("g1pub").value;
// MEMORIZE
2023-11-12 20:12:51 +01:00
if ( appname == 'pay' || appname == 'flipper' ) {
2023-10-09 15:24:40 +02:00
document.getElementById("PASS").value = pass;
} else {
document.getElementById("PASS").value = "PASS";
}
// APPNAME : DATA COLLECT & ARRANGE
if ( appname == 'pay') {
var amount = prompt("MONTANT (Ğ1) ?");
alert('PAY TO ' + g1pub + ' = ' + amount);
}
if ( appname == 'friend') {
var amount = prompt("Entre 1 et 5 (★) ?");
alert( amount + '★ > ' + g1pub );
}
if ( appname == 'login' || appname == 'logout' ) {
var amount = prompt("Saisir EMAIL:");
}
if ( amount == 'undefined' || amount == '' ) {
var amount = document.getElementById("g1pub").value;
}
var myU = 'http://astroport.localhost:1234/?qrcode=' + content +'& pass=' + pass + '& ' + appname + '=' + amount + '& g1pub=' + g1pub ;
console.log(myU);
2023-11-12 20:12:51 +01:00
if ( appname == 'login' || appname == 'flipper' ) {
2023-10-09 15:24:40 +02:00
homeAstroportStation(myU, 'tab', 5000)
} else {
homeAstroportStation(myU, 'aframe', 12000)
}
} else {
// COPY QRCODE IN g1pub input
document.getElementById("g1pub").value = content;
// document.getElementById("resu").innerHTML = content;
var myU = 'http://astroport.localhost:1234/?qrcode=' + content;
console.log(myU);
homeAstroportStation(myU, 'aframe', 12000)
}
// fetchAstroport(myU)
});
Instascan.Camera.getCameras().then(function (cameras) {
if (cameras.length > 0) {
scanner.start(cameras[0]);
} else {
console.error('No cameras found.');
}
}).catch(function (e) {
console.error(e);
});
< / script >
2024-02-23 23:39:54 +01:00
< h1 > < button id = "ainfo" onclick = "javascript:var x = document.getElementById('console'); if (x.style.visibility === 'hidden') {x.style.visibility = 'visible';} else {x.style.visibility = 'hidden';}" > 0/1< / button > < / h1 >
< div id = "console" >
< a href = "_STATION_" target = "aframe" > CONSOLE< / a >
< button id = "fullscreenButton" onclick = "toggleConsoleFullScreen()" > ^^ < / button > < button onclick = "hideConsole()" > X < / button >
2023-10-09 15:24:40 +02:00
< iframe name = "aframe" id = "aframe" src = "_STATION_" width = "100%" height = "320px" > < / iframe >
< / div >
2024-02-23 23:39:54 +01:00
< script >
function toggleConsole() {
const console = document.getElementById('console');
console.style.visibility = (console.style.visibility === 'visible' ? 'hidden' : 'visible');
}
function hideConsole() {
document.getElementById('console').style.visibility = 'hidden';
}
function toggleConsoleFullScreen() {
const console = document.getElementById('console');
if (console.style.width === '100%' & & console.style.height === '100%') {
console.style.width = '570px';
console.style.height = '480px';
} else {
console.style.width = '100%';
console.style.height = '100%';
}
}
< / script >
2023-10-09 15:24:40 +02:00
< script >
let cookies = document.cookie;
console.log(cookies);
2024-02-23 23:39:54 +01:00
const el = document.getElementById('console');
2023-10-09 15:24:40 +02:00
setTimeout(() => {
el.style.visibility = 'visible';
}, 3000); // 👈️ delay in milliseconds
< / script >
< / body > < / html >