diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 038ecb6c..48129a52 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -33,13 +33,15 @@ mkdir -p ~/.zen/tmp/${MOATS}/ ################################################################################ if [[ ${QRCODE} == "station" ]]; then - rm ~/.zen/tmp/WSTATION ## REMOVE IN PROD + # rm ~/.zen/tmp/ISTATION ## REMOVE IN PROD - if [[ ! -s ~/.zen/tmp/WSTATION ]]; then + if [[ ! -s ~/.zen/tmp/ISTATION ]]; then ## GENERATE PLAYER G1 TO ZEN ACCOUNTING ISTATION=$($MY_PATH/../tools/make_image_ipfs_index_carousel.sh | tail -n 1) echo $ISTATION > ~/.zen/ISTATION ## STATION G1WALLET CAROUSEL - + else + ISTATION=$(cat ~/.zen/ISTATION) + fi ## SHOW G1PALPAY FRONT (IFRAME) 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 @@ -47,10 +49,7 @@ if [[ ${QRCODE} == "station" ]]; then WSTATION="/ipfs/$(ipfs add -q ~/.zen/tmp/${MOATS}/index.htm)" echo "NEW WSTATION ${myIPFS}${WSTATION}" echo $WSTATION > ~/.zen/tmp/WSTATION - else - WSTATION=$(cat ~/.zen/tmp/WSTATION) - echo "WSTATION ${myIPFS}${WSTATION}" - fi + ## 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 @@ -78,6 +77,12 @@ if [[ $ASTROPATH != "" ]]; then rm -Rf ~/.zen/tmp/${MOATS} ) & exit 0 +else + + echo "NOT ON BOARD" + echo "What is this $QRCODE ?" + echo "AND=$3 THIS=$4 APPNAME=$5 WHAT=$6 OBJ=$7 VAL=$8 MOATS=$9" + fi ################################################################################ @@ -96,7 +101,7 @@ echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPFS" ###########################################"" MYPLAYERKEY=$(grep ${QRCODE} ~/.zen/game/players/*/secret.dunikey | cut -d ':' -f 1) [[ ! $MYPLAYERKEY ]] && MYPLAYERKEY="$HOME/.zen/game/players/.current/secret.dunikey" -echo "SELECTECT KEY : $MYPLAYERKEY" +echo "SELECTES KEY : $(cat MYPLAYERKEY)" echo ## PARRAIN ID EXTRACTION @@ -146,7 +151,7 @@ else $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 + ~/.zen/Astroport.ONE/tools/timeout.sh -t 10 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" \ @@ -157,7 +162,7 @@ else ## 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 + ~/.zen/Astroport.ONE/tools/timeout.sh -t 10 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" \ @@ -169,7 +174,7 @@ else if [[ $CPUB && $CPUB != 'null' ]]; then ## SCAN CPUB CESIUM + - curl -s ${myCESIUM}/user/profile/${CPUB} > ~/.zen/tmp/${MOATS}/cplus.json 2>/dev/null + ~/.zen/Astroport.ONE/tools/timeout.sh -t 10 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" ]] \ diff --git a/tools/jaklis/.env b/tools/jaklis/.env index 032c1c17..99c6cd37 100644 --- a/tools/jaklis/.env +++ b/tools/jaklis/.env @@ -2,8 +2,8 @@ DUNIKEY=/.zen/game/players/.current/secret.dunikey # Noeud Duniter -NODE=https://g1.asycn.io/gva -#NODE=https://duniter.pini.fr/gva +#NODE=https://g1.asycn.io/gva +NODE=https://duniter.pini.fr/gva #NODE=https://g1.duniter.org # Adresse du pod Cesium ou Gchange à utiliser diff --git a/tools/make_image_ipfs_index_carousel.sh b/tools/make_image_ipfs_index_carousel.sh index c5b78f29..954b2228 100755 --- a/tools/make_image_ipfs_index_carousel.sh +++ b/tools/make_image_ipfs_index_carousel.sh @@ -25,11 +25,14 @@ if [[ ! -d $img_dir ]]; then echo "+++ ${PLAYER} have $COINS Ğ1 Coins +++" ## USE G1BARRE SERVICE AS 1ST IMAGE - curl -so ~/.zen/tmp/carousel/${pub}.png \ + curl -so ~/.zen/tmp/carousel/${pub}.one.png \ "https://g1sms.fr/g1barre/image.php?pubkey=${pub}&target=20000&title=${PLAYER}&node=g1.asycn.io&start_date=2020-01-01&display_pubkey=true&display_qrcode=true" echo "GOT ~/.zen/tmp/carousel/${pub}.png" ## WRITE ON IT : ASK FOR REFILL + convert -font 'Liberation-Sans' \ + -pointsize 80 -fill black -draw 'text 150,150 "'"$COINS"'"' \ + "${HOME}/.zen/tmp/carousel/${pub}.one.png" "${HOME}/.zen/tmp/carousel/${pub}.png" ## PREPARE LOOP LINK LINE ASTRONAUTENS=$(cat ~/.zen/game/players/${PLAYER}/.playerns) diff --git a/www/G1PalPay/index.html b/www/G1PalPay/index.html index 0fb72ce6..2780bd78 100644 --- a/www/G1PalPay/index.html +++ b/www/G1PalPay/index.html @@ -100,11 +100,9 @@ a {
-

Ğ1 Invasion

-

Pourquoi attendre sa Retraite ? Oubliez la crise...

-

Société Interplanétaire by La STI

- - +

♥Box (Ğ1) Station

+

Pourquoi attendre la Retraite ? Oubliez la crise...

+

Rechargez-votre portefeuille ou Ğ1BILLET.

@@ -137,8 +135,7 @@ a { console.log(redirectURL) setTimeout(function() { - // let two = await fetch(redirectURL); - // document.mydiv.innerHTML = await two.text(); // Replaces body with response + window.open( redirectURL, "AstroTab"); }, 15123); @@ -153,7 +150,8 @@ a { alert(content); // var myU = 'http://astroport.localhost:1234/?qrcode=' + content; - fetchAstroport(myU); + // fetchAstroport(myU); + homeAstroportStation(myU, 'aframe', 15123) // BORIS STUFF COMES HERE });