https://astroport.copylaradio.com/?qrcode=station - PalPay Welcome -
This commit is contained in:
parent
efc6bb4c91
commit
4ca5ef07ce
148
API/QRCODE.sh
148
API/QRCODE.sh
@ -32,10 +32,18 @@ mkdir -p ~/.zen/tmp/${MOATS}/
|
||||
if [[ ${QRCODE} == "station" ]]; then
|
||||
## GENERATE PLAYER G1 TO ZEN ACCOUNTING
|
||||
ISTATION=$($MY_PATH/../tools/make_image_ipfs_index_carousel.sh | tail -n 1)
|
||||
echo $ISTATION > ~/.zen/ISTATION
|
||||
## SEND TO ISTATION PAGE
|
||||
sed "s~_TWLINK_~${myIPFSGW}${ISTATION}/~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myIPFSGW}${ISTATION}"'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo $ISTATION > ~/.zen/ISTATION ## STATION G1WALLET CAROUSEL
|
||||
|
||||
## SHOW G1PALPAY FRONT
|
||||
sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../www/G1PalPay/index.html > ~/.zen/tmp/${MOATS}/index.htm
|
||||
sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm
|
||||
|
||||
WSTATION="/ipfs/$(ipfs add -q ~/.zen/tmp/${MOATS}/index.htm)"
|
||||
echo "NEW WSTATION ${myIPFS}${WSTATION}"
|
||||
|
||||
## SEND TO WSTATION PAGE
|
||||
sed "s~_TWLINK_~${myIPFS}${WSTATION}/~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myIPFS}${WSTATION}"'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
(
|
||||
cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
|
||||
) &
|
||||
@ -51,51 +59,129 @@ if [[ $ASTROPATH != "" ]]; then
|
||||
#### SELECT PARRAIN "G1PalPé"
|
||||
|
||||
## SEND TO TW PAGE
|
||||
sed "s~_TWLINK_~${myIPFSGW}${QRCODE}/~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myIPFSGW}${QRCODE}"'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
sed "s~_TWLINK_~${myIPFSGW}/ipns/${QRCODE}/#:[tag[G1Voeu]]~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myIPFSGW}/ipns/${QRCODE}"'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
(
|
||||
cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
|
||||
) &
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## FILTRAGE NON G1 TO IPFS READY QRCODE
|
||||
ASTROTOIPFS=$(~/.zen/Astroport.ONE/tools/g1_to_ipfs.py ${QRCODE})
|
||||
ASTROTOIPFS=$(~/.zen/Astroport.ONE/tools/g1_to_ipfs.py ${QRCODE} 2>/dev/null)
|
||||
[[ ! ${ASTROTOIPFS} ]] \
|
||||
&& (echo "$HTTPCORS ERROR - ASTRONAUTENS !!" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \
|
||||
&& echo "INVALID QRCODE : ${QRCODE}" \
|
||||
&& (echo "$HTTPCORS ERROR - INVALID QRCODE : ${QRCODE}" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \
|
||||
&& exit 1
|
||||
|
||||
echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPFS"
|
||||
|
||||
## SEND MESSAGE TO CESIUM+ ACCOUNT (ME or .current)
|
||||
###########################################""
|
||||
###########################################
|
||||
## PROCESS QRCODE = G1PUB or IPNS
|
||||
###########################################""
|
||||
MYPLAYERKEY=$(grep ${QRCODE} ~/.zen/game/players/*/secret.dunikey | cut -d ':' -f 1)
|
||||
[[ ! $MYPLAYERKEY ]] && MYPLAYERKEY="$HOME/.zen/game/players/.current/secret.dunikey"
|
||||
echo "$MYPLAYERKEY"
|
||||
echo
|
||||
|
||||
## PARRAIN
|
||||
###########################################
|
||||
CURPLAYER=$(cat ~/.zen/game/players/.current/.player)
|
||||
CURG1=$(cat ~/.zen/game/players/.current/.g1pub)
|
||||
CURCOINS=$(~/.zen/Astroport.ONE/tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${CURG1})
|
||||
echo "${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${CURG1}"
|
||||
CURCOINS=$(~/.zen/Astroport.ONE/tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${CURG1} | cut -d '.' -f 1)
|
||||
echo "CURRENT PLAYER : $CURCOINS G1"
|
||||
|
||||
## FAUCHE
|
||||
###########################################
|
||||
if [[ $CURCOINS == "null" ]]; then
|
||||
echo "NULL"
|
||||
sed "s~_TWLINK_~$(cat ~/.zen/ISTATION)~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect
|
||||
echo "url='"${myIPFSGW}$(cat ~/.zen/ISTATION)"'" >> ~/.zen/tmp/${MOATS}/index.redirect
|
||||
(
|
||||
cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
|
||||
) &
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# MOA
|
||||
###########################################
|
||||
if [[ ${CURG1} == ${QRCODE} ]]; then
|
||||
|
||||
echo "SAME PLAYER AS CURRENT"
|
||||
|
||||
else
|
||||
# PAS MOA
|
||||
###########################################
|
||||
## GET VISITOR G1 WANNET AMOUNT : VISITORCOINS
|
||||
VISITORCOINS=$(~/.zen/Astroport.ONE/tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE})
|
||||
echo "${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE}"
|
||||
VISITORCOINS=$(~/.zen/Astroport.ONE/tools/timeout.sh -t 20 ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE} | cut -d '.' -f 1)
|
||||
|
||||
## PALPE COMBIEN ?
|
||||
if [[ $VISITORCOINS == "" || $VISITORCOINS == "null" ]]; then
|
||||
PALPE=${RANDOM:0:2}
|
||||
# NOUVEAU 1 G1
|
||||
PALPE=1
|
||||
else
|
||||
PALPE=0
|
||||
fi
|
||||
|
||||
echo "VISITEUR POSSEDE ${VISITORCOINS} G1"
|
||||
|
||||
## GET G1 WALLET HISTORY
|
||||
$MY_PATH/../tools/jaklis/jaklis.py history -p ${QRCODE} -j > ~/.zen/tmp/${MOATS}/g1history.json
|
||||
|
||||
## SCAN CCHANGE +
|
||||
curl -s ${myDATA}/user/profile/${QRCODE} > ~/.zen/tmp/${MOATS}/gchange.json
|
||||
GFOUND=$(cat ~/.zen/tmp/${MOATS}/gchange.json | jq -r '.found')
|
||||
[[ $GFOUND == "false" ]] \
|
||||
&& echo "AUCUN GCHANGE" \
|
||||
&& sed "s~_TWLINK_~${myGCHANGE}~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect \
|
||||
&& echo "url='"${myGCHANGE}"'" >> ~/.zen/tmp/${MOATS}/index.redirect \
|
||||
&& ( cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1) &
|
||||
|
||||
## CHECK IF RELATED TO CESIUM
|
||||
CPUB=$(cat ~/.zen/tmp/${MOATS}/gchange.json | jq -r '._source.pubkey' 2>/dev/null)
|
||||
## SCAN GPUB CESIUM +
|
||||
curl -s ${myCESIUM}/user/profile/${QRCODE} > ~/.zen/tmp/${MOATS}/gplus.json 2>/dev/null
|
||||
GCFOUND=$(cat ~/.zen/tmp/${MOATS}/gplus.json | jq -r '.found')
|
||||
[[ $GCFOUND == "false" ]] \
|
||||
&& echo "AUCUN GCPLUS" \
|
||||
&& sed "s~_TWLINK_~${myASTRONEF}~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect \
|
||||
&& echo "url='"${myASTRONEF}"'" >> ~/.zen/tmp/${MOATS}/index.redirect \
|
||||
&& ( cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1) &
|
||||
|
||||
##### MEMBER ??
|
||||
if [[ $CPUB && $CPUB != 'null' ]]; then
|
||||
|
||||
## SCAN CPUB CESIUM +
|
||||
curl -s ${myCESIUM}/user/profile/${CPUB} > ~/.zen/tmp/${MOATS}/cplus.json 2>/dev/null
|
||||
CCFOUND=$(cat ~/.zen/tmp/${MOATS}/cplus.json | jq -r '.found')
|
||||
|
||||
[[ $CCFOUND == "false" ]] \
|
||||
&& echo "AUCUN CCPLUS" \
|
||||
&& sed "s~_TWLINK_~https://monnaie-libre.fr~g" ~/.zen/Astroport.ONE/templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect \
|
||||
&& ( cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1) &
|
||||
|
||||
## MESSAGE LINKED CESIUM WALLET
|
||||
$MY_PATH/../tools/jaklis/jaklis.py -n $myCESIUM -k $MYPLAYERKEY send -d "${QRCODE}" -t "FORGERON" \
|
||||
-m "ASTROPORT. G1. FORGERON."
|
||||
|
||||
else
|
||||
|
||||
[[ $GCFOUND != "false" ]] \
|
||||
&& echo "GPLUS"
|
||||
## EXTRACT GPS ... CONTINUE THE GAME
|
||||
|
||||
fi
|
||||
|
||||
## DOES CURRENT IS RICHER THAN 100 G1
|
||||
if [ $CURCOINS -gt 99 ]; then
|
||||
if [[ $CURCOINS -gt 1 && $PALPE != 0 ]]; then
|
||||
|
||||
## LE COMPTE VISITOR EST VIDE
|
||||
echo "## PARRAIN $CURPLAYER SEND $PALPE TO ${QRCODE}"
|
||||
## G1 PAYEMENT
|
||||
$MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/game/players/.current/secret.dunikey pay -a ${PALPE} -p ${QRCODE} -c "ASTRO:ZEN_${PALPE}" -m
|
||||
|
||||
## MESSAGE CESIUM +
|
||||
$MY_PATH/../tools/jaklis/jaklis.py -n $myCESIUM -k $MYPLAYERKEY send -d "${QRCODE}" -t "CADEAU" \
|
||||
-m "ASTRO:${CURPLAYER} VOUS ENVOI ${PALPE} JUNE.
|
||||
@ -106,38 +192,9 @@ else
|
||||
else
|
||||
## CURRENT PLAYER IS TOO POOR
|
||||
PALPE=0
|
||||
echo "VISITEUR POSSEDE ${CURCOINS} G1"
|
||||
|
||||
## GET G1 WALLET HISTORY
|
||||
$MY_PATH/../tools/jaklis/jaklis.py history -p ${QRCODE} -j > ~/.zen/tmp/${MOATS}/g1history.json
|
||||
|
||||
## SCAN CCHANGE +
|
||||
curl -s ${myDATA}/user/profile/${QRCODE} > ~/.zen/tmp/${MOATS}/gchange.json
|
||||
## CHECK IF RELATED TO CESIUM
|
||||
CPUB=$(cat ~/.zen/tmp/${MOATS}/gchange.json | jq -r '._source.pubkey' 2>/dev/null)
|
||||
## SCAN GPUB CESIUM +
|
||||
curl -s ${myCESIUM}/user/profile/${QRCODE} > ~/.zen/tmp/${MOATS}/gplus.json 2>/dev/null
|
||||
|
||||
##### MEMBER ??
|
||||
if [[ $CPUB && $CPUB != 'null' ]]; then
|
||||
|
||||
## SCAN CPUB CESIUM +
|
||||
curl -s ${myCESIUM}/user/profile/${CPUB} > ~/.zen/tmp/${MOATS}/cplus.json 2>/dev/null
|
||||
|
||||
## LINKED CESIUM WALLET
|
||||
$MY_PATH/../tools/jaklis/jaklis.py -n $myCESIUM -k $MYPLAYERKEY send -d "${QRCODE}" -t "FORGERON" \
|
||||
-m "ASTROPORT. G1. FORGERON ET RESEAU DE CONFIANCE Ŋ1. \
|
||||
INSCRIVEZ VOTRE COMPTE GCHANGE SUR : https://astroport.copylaradio.com"
|
||||
|
||||
|
||||
|
||||
else
|
||||
|
||||
## EXTRACT GPS ... CONTINUE THE GAME
|
||||
|
||||
fi
|
||||
# $MY_PATH/../tools/jaklis/jaklis.py -n $myGCHANGE -k $MYPLAYERKEY send -d "${QRCODE}" -t "COUCOU" -m "ASTRO ZEN CONTACT"
|
||||
|
||||
ls ~/.zen/tmp/${MOATS}/
|
||||
fi
|
||||
|
||||
echo "************************************************************"
|
||||
@ -222,3 +279,6 @@ if [[ $AND == "url" ]]; then
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
3
setup.sh
3
setup.sh
@ -84,6 +84,7 @@ User=_USER_
|
||||
RestartSec=1
|
||||
Restart=always
|
||||
ExecStart=/home/_USER_/.zen/Astroport.ONE/12345.sh
|
||||
StandardOutput=file:/home/_USER_/.zen/tmp/12345.log
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -94,7 +95,7 @@ sudo sed -i "s/_USER_/$USER/g" /etc/systemd/system/astroport.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable astroport
|
||||
sudo systemctl start astroport
|
||||
sudo systemctl restart astroport
|
||||
|
||||
ACTUAL=$(cat /etc/resolv.conf | grep -w nameserver | head -n 1)
|
||||
|
||||
|
@ -62,9 +62,9 @@ header {
|
||||
<h2>
|
||||
<div id="typed-strings">
|
||||
<p>Activez <span>/ <strong><em><a href="https://opencollective.com/monnaie-libre/projects/coeurbox" target="funding">LA ♥BOX</a></u></em></strong> /^3223</p>
|
||||
<p>Copiez une chaine <em>YOUTUBE</em> 👍</span> dans IPFS^3222</p>
|
||||
<p>Ajoutez des Voeux <strong><em><u>👉<a href="https://qwantic.com">OpenSource Planet</a>👈</u></em></strong>^3112</p>
|
||||
<p>🔥.^999.^888.^777.^666.^555.^444.3^333.2^222.1^111 Go 🚀^4321</p>
|
||||
<p>Echappez-vous du <em>CLOUD</em> 👍</span> ^3222</p>
|
||||
<p>Alimentez <strong><em><u>👉<a href="https://qwantic.com">Le Claude</a>👈</u></em></strong> sur IPFS^3112</p>
|
||||
<p>🔥.^999.^888.^777.^666.^555.^444.3^333.2^222.1^111 Allez 🚀^4321</p>
|
||||
</div>
|
||||
<span id="typed"></span>
|
||||
</h2>
|
||||
|
@ -60,7 +60,7 @@ echo "<link rel=\"stylesheet\" href=\"/ipfs/QmX9QyopkTw9TdeC6yZpFzutfjNFWP36nzfP
|
||||
</style>
|
||||
|
||||
<div class=\"container\">
|
||||
<h2> Astroport $myHOST ZEN Gallery $(date) </h2>
|
||||
|
||||
<div id=\"myCarousel\" class=\"carousel slide\" data-ride=\"carousel\">
|
||||
<!-- Indicators -->
|
||||
<ul class=\"carousel-indicators\">
|
||||
@ -124,6 +124,7 @@ echo " </div>
|
||||
<span class=\"carousel-control-next-icon\"></span>
|
||||
</a>
|
||||
</div>
|
||||
<h2> Astroport $myHOST ZEN Gallery $(date) </h2>
|
||||
</div>
|
||||
|
||||
<script src=\"/ipfs/QmX9QyopkTw9TdeC6yZpFzutfjNFWP36nzfPQTULc4cYVJ/jquery-3.2.1.slim.min.js\"></script>
|
||||
@ -131,12 +132,10 @@ echo " </div>
|
||||
<script src=\"/ipfs/QmX9QyopkTw9TdeC6yZpFzutfjNFWP36nzfPQTULc4cYVJ/bootstrap.min.js\"></script>" >> $core_file
|
||||
|
||||
cat $core_file >> $html_file
|
||||
echo "</body>
|
||||
</html>" >> $html_file
|
||||
echo "</body></html>" >> $html_file
|
||||
|
||||
coreipfs=$(ipfs add -q $core_file)
|
||||
htmlipfs=$(ipfs add -q $html_file)
|
||||
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open http://ipfs.localhost:8080/ipfs/$htmlipfs
|
||||
echo /ipfs/$core_file
|
||||
echo /ipfs/$htmlipfs
|
||||
|
||||
exit 0
|
||||
|
@ -389,7 +389,7 @@ myGCHANGE="https://www.gchange.fr"
|
||||
myCESIUM="https://g1.data.e-is.pro"
|
||||
myHOST="$(myHostName)"
|
||||
myIP="$(myIp)"
|
||||
myIPFS="http://$(myIp):8080"
|
||||
myIPFS="http://ipfs.localhost:8080"
|
||||
myIPFSGW="$(myIpfsGw)"
|
||||
myTUBE="$(myTube)"
|
||||
myASTROTUBE="https://$(myAstroTube)"
|
||||
|
@ -2,17 +2,17 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<link rel="icon" type="image/x-icon" href="https://ipfs.copylaradio.com/ipfs/QmNwECbSL6xihpS2QLpts8a8Boekk3rEVGeySuzg83jTDA/favicon.ico">
|
||||
<link rel="icon" type="image/x-icon" href="http://127.0.0.1:8080/ipfs/QmNwECbSL6xihpS2QLpts8a8Boekk3rEVGeySuzg83jTDA/favicon.ico">
|
||||
<title>Compte Ğ1 dans le Claude Inter Planetaire - Astroport Ŋ1 - </title>
|
||||
<link rel="stylesheet" href="/ipfs/QmVuJCKVp57b3HzwDRAoURonaFwWTwvoqq2Am2JoSQhdPz/index_fichiers/demo.css">
|
||||
<script src="G1PalPay_fichiers/jquery-3.6.3.min.js"></script>
|
||||
<script src="G1PalPay_fichiers/instascan.min.js"></script>
|
||||
<link rel="stylesheet" href="https://ipfs.copylaradio.com/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://ipfs.copylaradio.com/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type="text/css" />
|
||||
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmVuJCKVp57b3HzwDRAoURonaFwWTwvoqq2Am2JoSQhdPz/index_fichiers/demo.css">
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmXd2PdXAB52ErzzBj41UjUrEnLNuM39VHTZoA7YwYdcwa/jquery-3.6.3.min.js"></script>
|
||||
<script src="http://127.0.0.1:8080/ipfs/QmXd2PdXAB52ErzzBj41UjUrEnLNuM39VHTZoA7YwYdcwa/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("https://ipfs.copylaradio.com/ipfs/QmSFgatcq3q898J56epa8SyGbH651vRBFnv93kQSwfoi83/background.014.jpg");
|
||||
background-image:url("http://127.0.0.1:8080/ipfs/QmSFgatcq3q898J56epa8SyGbH651vRBFnv93kQSwfoi83/background.014.jpg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
padding: 0;
|
||||
@ -35,10 +35,11 @@ header {
|
||||
width: 26em; height: 2em;
|
||||
}
|
||||
#yellow {
|
||||
background: yellow;
|
||||
background: black;
|
||||
position: absolute;
|
||||
top: 33%;
|
||||
left: 66%;
|
||||
bottom: 2%;
|
||||
left: 2%;
|
||||
width: 800px;
|
||||
visibility: hidden;
|
||||
}
|
||||
h1 {
|
||||
@ -96,9 +97,9 @@ a {
|
||||
|
||||
<div id="demo">
|
||||
<div id="description">
|
||||
<h1>Invasion Ğ1 Dons</h1>
|
||||
<h1>Ğ1 Dons Invasion</h1>
|
||||
<h2>Pourquoi attendre sa Retraite ?</h2>
|
||||
<h2>Oubliez la crise...</h2>
|
||||
<h2>Oubliez la crise... Evadez-vous</h2>
|
||||
|
||||
<h2>Utilisez la Monnaie Libre !</a></h2>
|
||||
|
||||
@ -109,9 +110,9 @@ a {
|
||||
<video id="preview" style="transform: scaleX(-1);width: 240px;height: 240px;" autoplay="autoplay" class="active"></video>
|
||||
|
||||
<p><ul>
|
||||
<li> 1 - <a target="cesium" href="https://cesium.app/fr/telechargement">Télécharger Cesium</a> </li>
|
||||
<li> 1 - <a target="cesium" href="https://cesium.app/fr/telechargement">Téléchargez Cesium</a> </li>
|
||||
<li> 2 - <a target="cesium" href="https://cesium.app/fr/fonctionnalites">Créez un "Simple Portefeuille"</a> </li>
|
||||
<li> 3 - Renseignez vos géo-coordonnées <br>puis présentez votre QRCode face à la Webcam. </li>
|
||||
<li> 3 - Présentez son QRCode face à la Webcam</li>
|
||||
|
||||
</ul></p>
|
||||
|
||||
@ -120,15 +121,41 @@ 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)
|
||||
|
||||
setTimeout(function() {
|
||||
// let two = await fetch(redirectURL);
|
||||
// document.mydiv.innerHTML = await two.text(); // Replaces body with response
|
||||
window.open( redirectURL, "AstroTab");
|
||||
}, 15000);
|
||||
|
||||
} 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);
|
||||
/*
|
||||
$.ajax({
|
||||
url: "http://astroport.localhost:1234",
|
||||
data: "qrcode="+content,
|
||||
type: 'GET'
|
||||
});
|
||||
*/
|
||||
//
|
||||
var myU = 'http://astroport.localhost:1234/?qrcode=' + content;
|
||||
fetchAstroport(myU);
|
||||
// BORIS STUFF COMES HERE
|
||||
|
||||
});
|
||||
@ -153,8 +180,17 @@ a {
|
||||
|
||||
</script>
|
||||
|
||||
<div id="yellow" >
|
||||
<iframe src="_STATION_" width="100%" height="220px"></iframe>
|
||||
</div>
|
||||
|
||||
</center>
|
||||
<script>
|
||||
const el = document.getElementById('yellow');
|
||||
|
||||
setTimeout(() => {
|
||||
el.style.visibility = 'visible';
|
||||
}, 6000); // 👈️ delay in milliseconds
|
||||
|
||||
</script>
|
||||
|
||||
</body></html>
|
||||
|
@ -222,5 +222,4 @@
|
||||
<p>Powered by <a href="https://github.com/papiche/Astroport.ONE">Astroport.ONE</a></p>
|
||||
<p>/ <a href="https://opencollective.com/monnaie-libre/projects/stiits">LaSTI</a> / <a href="https://opencollective.com/monnaie-libre/projects/coeurbox">La♥BOX</a> /
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</body></html>
|
||||
|
Loading…
Reference in New Issue
Block a user