amzqr Player & Wishes Pimp Up

This commit is contained in:
fred 2023-03-02 23:48:10 +01:00
parent e5ddce0b79
commit fc16efd83f
15 changed files with 180 additions and 294 deletions

View File

@ -40,11 +40,11 @@ echo
# CREATION DU TW G1VOEU
#####################################################
source ~/.zen/game/players/$PLAYER/secret.june ## CLEF DERIVEE ET MEMORISABLE
[[ $PEPPER ]] && SALT=$PEPPER ## Using PLAYER PEPPER AS WISH SALT
[[ $PEPPER ]] && echo "Using PLAYER PEPPER AS WISH SALT" && SALT=$PEPPER ##
[[ ! $SALT ]] && SALT=$(${MY_PATH}/../tools/diceware.sh 3 | xargs)
echo "$SALT"
echo "## TITRE DE VOTRE VOEU ? CapitalGluedWords"
echo "## TITRE DU G1VOEU ? CapitalGluedWords please"
[[ ! $TITRE ]] && read TITRE
PEPPER=$(echo "$TITRE" | sed -r 's/\<./\U&/g' | sed 's/ //g') # CapitalGluedWords
echo "$PEPPER" && [[ ! $PEPPER ]] && echo "EMPTY PEPPER - ERROR" && exit 1
@ -63,7 +63,9 @@ echo
## TEST IPFS
ipfs --timeout=30s cat /ipns/$VOEUNS > ~/.zen/tmp/$VOEUNS.json
[[ -s ~/.zen/tmp/$VOEUNS.json ]] && echo "HEY !!! UN CHANNEL EXISTE DEJA POUR CE VOEU ! ~/.zen/tmp/$VOEUNS.json - EXIT -" && exit 1
[[ -s ~/.zen/tmp/$VOEUNS.json ]] \
&& echo "HEY !!! UN CHANNEL EXISTE DEJA POUR CE VOEU ! ~/.zen/tmp/$VOEUNS.json - EXIT -" \
&& exit 1
echo "# UPGRADING WORLD WHISHKEY DATABASE"
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
@ -78,8 +80,23 @@ echo
LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
qrencode -s 12 -o "$HOME/.zen/game/world/$PEPPER/$WISHKEY/QR.WISHLINK.png" "$LIBRA/ipns/$VOEUNS"
## TRYING amrzqr
amzqr "$LIBRA/ipns/$VOEUNS" -d "$HOME/.zen/game/world/$PEPPER/$WISHKEY" -p ${MY_PATH}/../images/g1magicien.png -c
## MAKING amrzqr containing G1PUB/SSL[SEC(SALT)].BASE58/PASS.SHA
## LE MOT DE PASSE DU PLAYER PEUT DECOUVRIR LE SECRET (
## SEC PASS PROTECTED QRCODE : base58 secFromDunikey.openssl(pass)
secFromDunikey=$(cat ~/.zen/tmp/qrtw.dunikey | grep "sec" | cut -d ' ' -f2)
echo "$secFromDunikey" > ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
openssl enc -aes-256-cbc -salt -in ~/.zen/tmp/${MOATS}/${PSEUDO}.sec -out "$HOME/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec" -k "$SALT" 2>/dev/null
PASsec=$(cat ~/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec | base58)
HPass=$(echo "$SALT" | sha512sum)
qrencode -s 12 -o $HOME/.zen/game/players/${PLAYER}/QRsec.png $PASsec
## MAKE amzqr WITH astro:// LINK
amzqr "astro://$WISHKEY/?sslpassdunikeysec=$PASsec&hashpass=$HPass&player=$PLAYER&tw=/ipns/$ASTRONAUTENS&g1pub=$G1PUB&flux=/ipns/$VOEUNS" \
-d "$HOME/.zen/game/world/$PEPPER/$WISHKEY" \
-l H \
-p ${MY_PATH}/../images/g1magicien.png -c
IMAGIC=$(ipfs add -Hq ~/.zen/game/world/$PEPPER/$WISHKEY/g1magicien_qrcode.png | tail -n 1)
qrencode -s 12 -o "$HOME/.zen/game/world/$PEPPER/$WISHKEY/QR.ASTROLINK.png" "$LIBRA/ipns/$ASTRONAUTENS"
@ -115,6 +132,13 @@ convert -gravity northwest -pointsize 50 -fill black -draw "text 30,300 \"$PEPPE
IVOEUPLAY=$(ipfs add -Hq ~/.zen/tmp/player.png | tail -n 1)
IVOEU=$(ipfs add -Hq ~/.zen/tmp/voeu.png | tail -n 1)
### G1VOEU LIGHTBEAM :: ${PLAYER}_${PEPPER} :: /ipns/${VOEUNS}
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-name","text":"'${PLAYER}_${PEPPER}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-name.json
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key-'${PEPPER}'","text":"'${VOEUNS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-key.json
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/g1/lightbeam-key-'${PEPPER}'","text":"'${WISHKEY}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-g1.json
# TEXT="<a target='_blank' href='"/ipns/${VOEUNS}"'><img src='"/ipfs/${IVOEUPLAY}"'></a><br><br><a target='_blank' href='"/ipns/${VOEUNS}"'>"${PEPPER}"</a>"
#:[tag[G1CopierYoutube]] [tag[pdf]]
# Contains QRCode linked to G1VoeuTW and BUTTON listing G1Voeux
@ -154,6 +178,9 @@ convert -gravity northwest -pointsize 50 -fill black -draw "text 30,300 \"$PEPPE
echo "Nouveau Voeu $PEPPER dans MOA $PSEUDO : http://127.0.0.1:8080/ipns/$ASTRONAUTENS"
tiddlywiki --load $INDEX \
--deletetiddlers '[tag[voeu]]' \
--import ~/.zen/tmp/${MOATS}/lightbeam-name.json "application/json" \
--import ~/.zen/tmp/${MOATS}/lightbeam-key.json "application/json" \
--import ~/.zen/tmp/${MOATS}/lightbeam-g1.json "application/json" \
--import ~/.zen/game/world/$PEPPER/$WISHKEY/${PEPPER}.voeu.json "application/json" \
--output ~/.zen/tmp --render "$:/core/save/all" "newindex.html" "text/plain"
@ -171,6 +198,8 @@ convert -gravity northwest -pointsize 50 -fill black -draw "text 30,300 \"$PEPPE
echo "NO PRINTER FOUND - Plug a Brother QL700 or Add your printer"
else
echo "IMPRESSION VOEU"
brother_ql_create --model QL-700 --label-size 62 ~/.zen/game/world/$PEPPER/$WISHKEY/g1magicien_qrcode.png > ~/.zen/tmp/toprint.bin 2>/dev/null
sudo brother_ql_print ~/.zen/tmp/toprint.bin $LP
brother_ql_create --model QL-700 --label-size 62 ~/.zen/tmp/player.png > ~/.zen/tmp/toprint.bin 2>/dev/null
sudo brother_ql_print ~/.zen/tmp/toprint.bin $LP
brother_ql_create --model QL-700 --label-size 62 ~/.zen/tmp/voeu.png > ~/.zen/tmp/toprint.bin 2>/dev/null
@ -185,20 +214,25 @@ convert -gravity northwest -pointsize 50 -fill black -draw "text 30,300 \"$PEPPE
cp ~/.zen/game/world/$PEPPER/$WISHKEY/*.png ~/.zen/game/players/$PLAYER/voeux/$PEPPER/$WISHKEY/
# PUBLISHING
banner="## ${PLAYER} YOUR WISH IS READY TO MAKE Ŋ1 TW FLUX for G1$PEPPER"
echo "ipfs name publish --key=${WISHKEY} $banner"
IPUSH=$(echo "$banner" | ipfs add -q)
echo "ipfs name publish --key=${WISHKEY}"
banner="## ${PLAYER} G1WISH READY :: G1$PEPPER
<img src=/ipfs/IMAGIC>
G1Voeu Astronaute (TW) : $LIBRA/ipns/$ASTRONAUTENS
$PEPPER FLUX Ŋ1
G1$PEPPER : $LIBRA/ipns/$VOEUNS
WHISHKEY(G1PUB) : ${WISHKEY}
- Only $PLAYER PEPPER used as login or sslpass can make $PEPPER wish evolution"
IPUSH=$(echo "$banner" | ipfs add -q | tail -n 1)
ipfs name publish --key=${WISHKEY} /ipfs/$IPUSH 2>/dev/null
echo $IPUSH > ~/.zen/game/players/$PLAYER/voeux/$PEPPER/$WISHKEY/.chain.$MOATS
echo
echo "Astronaute TW : $LIBRA/ipns/$ASTRONAUTENS"
echo "Nouveau G1Voeu : $PEPPER (FLUX Ŋ1)"
echo "TW $PEPPER : $LIBRA/ipns/$VOEUNS"
echo $banner > ~/.zen/game/players/$PLAYER/voeux/$PEPPER/$WISHKEY/banner
cat ~/.zen/game/players/$PLAYER/voeux/$PEPPER/$WISHKEY/banner
echo "## TO RECEIVE G1RONDS Creating Cesium+ Profil #### timeout long ... patience ...."
$MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/tmp/qrtw.dunikey set --name "G1Voeu $PEPPER" --avatar "$HOME/.zen/Astroport.ONE/images/logojune.jpg" --site "$LIBRA/ipns/$VOEUNS" #CESIUM+
$MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/tmp/qrtw.dunikey set --name "G1Voeu $PEPPER" --avatar "$HOME/.zen/game/world/$PEPPER/$WISHKEY/g1magicien_qrcode.png" --site "$LIBRA/ipns/$VOEUNS" #CESIUM+
[[ ! $? == 0 ]] && echo "G1VOEU CESIUM WALLET PROFILE CREATION FAILED !!!!"
echo "************************************************************"

View File

@ -51,7 +51,7 @@ do
[[ ${WISH} == "" || ${WISH} == "null" ]] && echo "BLURP. EMPTY WISH" && continue
echo "==============================="
echo "G1Voeu ${WISH}"
## Get ${WISHNAME} TW
## Get ${WISHNAME}
WISHNAME=$(cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json | jq .[] | jq -r 'select(.wish=="'${WISH}'") | .title')
[[ ! ${WISHNAME} ]] && echo "WISH sans NOM - CONTINUE -" && continue
@ -106,6 +106,7 @@ do
done
##################################
## TODO JOIN WITH FRIENDS JSONS
################################## MOA MAINTENANT
echo ">>> MOA § $myIPFS/$VOEUNS/_${PLAYER}.tiddlers.json"
tiddlywiki --load $INDEX \
@ -127,8 +128,10 @@ do
### ADD TO IPFS
echo "++WISH PUBLISHING++ ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/*"
JSONIPFS=$(ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/* | tail -n 1) # ADDING JSONS TO IPFS
ipfs name publish -k $VOEUKEY /ipfs/$JSONIPFS # PUBLISH $VOEUKEY
du -h ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/
WISHFLUX=$(ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/* | tail -n 1) # ADDING JSONS TO IPFS
ipfs name publish -k $VOEUKEY /ipfs/$WISHFLUX # PUBLISH $VOEUKEY
## MOVE INTO PLAYER AREA
echo ">>> $VOEUKEY : Ŋ1 FLUX $(myIpfsGw)${VOEUNS}"

View File

@ -98,6 +98,8 @@ echo "$(cat ~/.zen/game/players/${PLAYER}/.pseudo 2>/dev/null) TW/Moa"
echo "$myIPFS/ipns/$ASTRONAUTENS"
echo "Activation Réseau P2P Astroport !"
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS"
echo
PS3="$PLAYER choisissez : __ "
choices=("AJOUTER VLOG" "CREER UN VOEU" "IMPRIMER QRVOEU" "IMPRIMER VISA" "EXPORTER VISA" "SUPPRIMER VISA" "QUITTER")
@ -119,7 +121,7 @@ select fav in "${choices[@]}"; do
;;
"SUPPRIMER VISA")
echo "ATTENTION ${PLAYER} SUPPRESSION DEFINITIVE !!"
echo "ATTENTION ${PLAYER} SUPPRESSION CACHE LOCAL DEFINITIVE !!"
echo "Enter to continue. Ctrl+C to stop"
read
echo "REPLACE $IPFSNODEID WITH _ASTROPORT_"
@ -132,13 +134,14 @@ select fav in "${choices[@]}"; do
ipfs key rm $voeu
done
## REMOVE PLAYER DOCKER
[[ $USER == "zen" ]] && make player MAIL=$PLAYER DELETE=true
echo "REMOVING GCHANGE+ PROFILE"
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myDATA" erase
#~ echo "REMOVE CESIUM+"
#~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n https://g1.data.e-is.pro erase
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myCESIUM" erase
echo "rm -Rf ~/.zen/game/players/$PLAYER"
sudo rm -Rf ~/.zen/game/players/$PLAYER

View File

@ -64,11 +64,11 @@
}
#glow-shadows.earth {
background: url(/ipfs/QmY1A2uLGNXbvNs7hadZAKHNiuWxFaWhnaDR1UJXBXRirX/earth-glow-shadows.png);
background: url(/ipfs/QmTVspfoaNL1BK2CR1vVNrEnwo4PfUjwdQxEt57mGJjsLX/earth-glow-shadows.png);
}
#glow-shadows.mars {
background: url(/ipfs/QmPmpDoTGboQDDiYGCfmtcwnDe1buTSkj24cpJV7raQq9x/mars-glow-shadows.png);
background: url(/ipfs/QmTVspfoaNL1BK2CR1vVNrEnwo4PfUjwdQxEt57mGJjsLX/mars-glow-shadows.png);
}
.flight {
position: absolute;
@ -76,7 +76,7 @@
height: 25px;
left: 10px;
top: 10px;
background: url(/ipfs/QmS7UkTKfZi45HCq9KHAJgKosdKrbiZTdJE1xD62yxVi7u/plain.png);
background: url(/ipfs/QmTVspfoaNL1BK2CR1vVNrEnwo4PfUjwdQxEt57mGJjsLX/plain.png);
background-size: 100% 100%;
margin-left: -12px;
margin-top: -12.5px;
@ -114,7 +114,7 @@
let durees = [];
// Récupérer les données
fetch('_LIBRA__VOEUNS_/_PLAYER_.tiddlers.json')
fetch('_LIBRA__VOEUNS_/__PLAYER_.tiddlers.json')
.then(res => res.json())
.then(data => {
// Extraire les gifanime
@ -181,7 +181,7 @@
<div id="showoff">
<div id="container">
<h2>Monde(s)</h2>
<h2>ONE WORLD</h2>
<canvas id="sphere" width="400" height="400"></canvas>
<div id="glow-shadows" class="earth"></div>
<canvas id="flights" width="400" height="400"></canvas>

File diff suppressed because one or more lines are too long

View File

@ -116,16 +116,17 @@ mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/
if [[ $(which amzqr) ]]; then
[[ -s "$HOME/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.gchange_avatar.png" ]] \
&& IMG="$HOME/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.gchange_avatar.png"
&& GIMG="$HOME/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.gchange_avatar.png"\
|| GIMG="$HOME/.zen/Astroport.ONE/images/plain.png"
[[ -s "$HOME/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.cesium_avatar.png" ]] \
&& IMG="$HOME/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.cesium_avatar.png" \
|| IMG="$HOME/.zen/Astroport.ONE/logo.png"
&& CIMG="$HOME/.zen/game/players/${PLAYER}/ipfs/G1SSB/_g1.cesium_avatar.png" \
|| CIMG="$HOME/.zen/Astroport.ONE/images/g1ticket.png"
# QRG1avatar.png
[[ ! -s ~/.zen/game/players/${PLAYER}/QRG1avatar.png ]] && amzqr ${G1PUB} -l H -p "$IMG" -c -n QRG1avatar.png -d ~/.zen/game/players/${PLAYER}/
[[ ! -s ~/.zen/game/players/${PLAYER}/QRG1avatar.png ]] && amzqr ${G1PUB} -l H -p "$GIMG" -c -n QRG1avatar.png -d ~/.zen/game/players/${PLAYER}/
# QRTWavatar.png
[[ ! -s ~/.zen/game/players/${PLAYER}/QRTWavatar.png ]] && amzqr ${myIPFSGW}/ipns/$ASTRONAUTENS -l H -p "$IMG" -c -n QRTWavatar.png -d ~/.zen/game/players/${PLAYER}/
[[ ! -s ~/.zen/game/players/${PLAYER}/QRTWavatar.png ]] && amzqr ${myIPFSGW}/ipns/$ASTRONAUTENS -l H -p "$CIMG" -c -n QRTWavatar.png -d ~/.zen/game/players/${PLAYER}/
else

View File

@ -10,8 +10,8 @@ PLAYER="$1"
##########################
# Generate G1BARRE for each wish
for g1wish in $(ls ~/.zen/game/players/$PLAYER/voeux/); do
wishname=$(cat ~/.zen/game/players/$PLAYER/voeux/$g1wish/.title)
for g1wish in $(ls ~/.zen/game/players/$PLAYER/voeux/*/); do
wishname=$(cat ~/.zen/game/players/$PLAYER/voeux/*/$g1wish/.title)
wishns=$(ipfs key list -l | grep $g1wish | cut -d ' ' -f1)
echo "MISE A JOUR G1BARRE pour VOEU $wishname : "

View File

@ -88,8 +88,8 @@ fi
################################################################################
TWMODEL="/ipfs/bafybeifrpajkcvmoymmlevbuvxb7v47w4v2vpfbacqm5ltf6gfgunb6a3e"
TWEXPERIMENTAL="/ipfs/bafybeia4siwbalwr5smv4sy7rihiit6etkkivfqrywihm7vmivx3d62iie"
TWMODEL="/ipfs/bafybeigzqmzbug6lv4zpzesxydxb27qj74x24negiuuwsc6ryayrhy3my4"
TWLINK="/ipfs/bafybeigyfttjvabeeoa4hbsvtegsqkw3riuquhbil55qhwe3s3q4tesyxi"
# ipfs cat $TWMODEL > templates/twdefault.html
##################################################### # NEW PLAYER ###############
################################################################################
@ -188,13 +188,17 @@ DISCO="https://astroport.$(myHostName)/?salt=${SALT}&pepper=${PEPPER}&logout=${P
## SEC PASS PROTECTED QRCODE : base58 secFromDunikey.openssl(pass)
secFromDunikey=$(cat ~/.zen/game/players/${PLAYER}/secret.dunikey | grep "sec" | cut -d ' ' -f2)
echo "astro://$G1PUB/?dunisec=$secFromDunikey&hashpass=$(echo "$PASS" | sha512sum)" > ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
echo "$secFromDunikey" > ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
openssl enc -aes-256-cbc -salt -in ~/.zen/tmp/${MOATS}/${PSEUDO}.sec -out "$HOME/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec" -k $PASS 2>/dev/null
PASsec=$(cat ~/.zen/tmp/${MOATS}/enc.${PSEUDO}.sec | base58)
HPass=$(echo "$PASS" | sha512sum)
qrencode -s 12 -o $HOME/.zen/game/players/${PLAYER}/QRsec.png $PASsec
## MAKE amzqr
amzqr "$(cat~/.zen/tmp/${MOATS}/${PSEUDO}.sec)" -d $HOME/.zen/game/players/${PLAYER} -p ${MY_PATH}/../images/logoastro.png
## MAKE amzqr WITH astro:// LINK
amzqr "astro://$G1PUB/?sslpassdunikeysec=$PASsec&hashpass=$HPass&player=$PLAYER&tw=/ipns/$ASTRONAUTENS&g1pub=$G1PUB" \
-d $HOME/.zen/game/players/${PLAYER} \
-l H \
-p ${MY_PATH}/../images/G1WorldMap.png
rm -f ~/.zen/tmp/${MOATS}/${PSEUDO}.sec
@ -233,9 +237,6 @@ DISCO="https://astroport.$(myHostName)/?salt=${SALT}&pepper=${PEPPER}&logout=${P
sed -i "s~_G1PUB_~${G1PUB}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
sed -i "s~_QRSEC_~${PASsec}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
## Convert "G1Voeu" into "G1Visa"
sed -i "s~G1Voeu~G1Visa~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html
ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1)
# La Clef IPNS porte comme nom G1PUB et ${PLAYER}
sed -i "s~_MEDIAKEY_~${PLAYER}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html

View File

@ -32,8 +32,8 @@ echo "VOEUX : ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt "
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
for v in $(cat ~/.zen/game/players/*/voeux/*/*/.title); do
g1pub=$(grep -r $v ~/.zen/game/players/*/voeux/ 2>/dev/null | rev | cut -d '/' -f 2 | rev )
for v in $(cat ~/.zen/game/players/$PLAYER/voeux/*/*/.title); do
g1pub=$(grep -r $v ~/.zen/game/players/$PLAYER/voeux/ 2>/dev/null | rev | cut -d '/' -f 2 | rev )
# echo "$v : $g1pub"
# echo '------------------------------------------------------------------'
vlist=($v:$g1pub ${vlist[@]})

View File

@ -1,151 +0,0 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<link rel="icon" type="image/x-icon" href="https://ipfs.copylaradio.com/ipfs/QmNwECbSL6xihpS2QLpts8a8Boekk3rEVGeySuzg83jTDA/favicon.ico">
<title>Astroport Ŋ1 - Ğ1 - IPFS</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>
</head>
<body>
<center>
<h1>SCANNEZ VOTRE QRCODE (CESIUM)</h1>
<video id="preview" style="transform: scaleX(-1);width: 240px;height: 240px;" autoplay="autoplay" class="active"></video>
<script type="text/javascript">
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'
});
//
// BORIS STUFF COMES HERE
});
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>
<h2> - Activez votre Capsule IPFS - </h2>
</center>
<div id="wrapper-auto-scrolling" style="display: none;"><div id="modal-auto-scrolling" class="modal">
<a href="#close" class="modal-overlay" data-close-modal-auto-scrolling="" aria-label="Close"></a>
<div class="modal-container">
<div class="modal-header">
<a href="#close" class="btn btn-clear float-right" data-close-modal-auto-scrolling="" aria-label="Close"></a>
<div class="modal-title h3">Options | AutoScrolling</div>
</div>
<div class="modal-body">
<div id="speed-wrapper-auto-scrolling">
<strong>Scrolling speed(scroll/sec):</strong>
<input type="number" class="scrolling-speed" id="scrolling-speed" value="20">
<p>The value is scrolling speed. A unit is scroll / sec.<br>
Max is 3000, and min is 1.</p>
</div>
<div>
<strong>Enable transmission scrolling:</strong>
<input type="checkbox" id="enable-transmission-scrolling">
<p class="mb-0">
If enabled, you can change scrolling speed per gear.
The gears are Slow / Middle / Fast.
The gears are cycled between
<mark>Slow</mark>, <mark>Middle</mark>, <mark>Fast</mark>
by <i>single/double-clicking</i> browser icon.
</p>
<table id="transmission-wrapper-auto-scrolling" class="d-hide">
<tbody>
<tr>
<th>Fast:</th>
<td><input type="number" class="scrolling-speed" id="transmission-gear-of-fast" value="2000">
</td>
</tr>
<tr>
<th>Middle:</th>
<td><input type="number" class="scrolling-speed" id="transmission-gear-of-middle" value="500">
</td>
</tr>
<tr>
<th>Slow:</th>
<td><input type="number" class="scrolling-speed" id="transmission-gear-of-slow" value="20">
</td>
</tr>
</tbody>
</table>
<p></p>
</div>
<div>
<strong>Scrolling stop by click:</strong>
<input type="checkbox" id="stop-scrolling-by-click">
<p>If enabled the option, scrolling is stopped when you click the scrolling window.</p>
</div>
<div>
<strong>Stop scrolling by cursor hovering over something:</strong>
<input type="checkbox" id="stop-scrolling-by-click-on-hover">
<p>If enabled the option, scrolling is stopped temporally when mouse cursor is hovering over something.</p>
</div>
<div>
<strong>Keyboard shortcut for single-click action:</strong>
<input type="text" id="keybind-single-click" value="Alt+Shift+PageDown">
<p class="mb-0">Fire a single-click action by keyboard shortcut<br>
</p><ul>
<li>Start scrolling when window is stopped</li>
<li>Stop scrolling when window is scrolling</li>
<li>Close option modal window when the window is opened</li>
</ul>
The keybind should be a combination of keycodes concatenated with the '+' sign. <br>
<i>Ex: Ctrl+Shift+Insert.</i><br>
Check out the link for the keycodes: <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#Key_combinations" target="_blank">Key combinations</a><br>
<span class="text-gray">Notice: Some key combinations are reserved by the browser and can't be reassigned to this.<span><p></p>
</span></span></div>
<div>
<strong>Stop scrolling on focus out:</strong>
<input type="checkbox" id="stop-scrolling-on-focus-out">
<p>If enabled the option, scrolling is stopped when focus for the browser is moved to another application or browser window.</p>
</div>
<div>
<strong>Disable double click action:</strong>
<input type="checkbox" id="disable-double-click">
<p class="mb-0">If enabled the option</p>
<ul>
<li>cannot open modal window</li>
<li>start/stop scrolling is immediately</li>
</ul>
<p></p>
</div>
<div>
<strong>Restore scrolling from switch back:</strong>
<input type="checkbox" id="restore-scrolling-from-switch-back">
<p>If this option is enabled, scrolling which stopped by tab changing restarts when user is back to a tab that was scrolling.</p>
</div>
<div>
<strong>Stop when bottom of window:</strong>
<input type="checkbox" id="stop-when-bottom-of-window" checked="checked">
<p>If enabled, scrolling is stopped when window position is reached at bottom.</p>
</div>
</div>
</div>
</div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,28 +4,43 @@
<head>
<title>ASTROPORT PORTAL : http://astroport.localhost:1234</title>
<meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/favicon.ico">
<link rel="stylesheet" href="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/demo.css">
<link rel="stylesheet" href="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/jquery-ui.min.css">
<link rel="icon" type="image/x-icon" href="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/favicon.ico">
<link rel="stylesheet" href="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/demo.css">
<link rel="stylesheet" href="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/jquery-ui.min.css">
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/requestanimationframe.polyfill.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/requestanimationframe.polyfill.js"></script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/instascan.min.js"></script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/html5-qrcode.min.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/instascan.min.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/html5-qrcode.min.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/jquery-ui.0.min.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/sphere-hacked.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/jquery.earth-3d.js"></script>
<script type="text/javascript" src="/ipfs/QmXZaseYPrQTjg7DasSSejXQFfQLmbV7UKoxWjK4SZNTFe/index_fichiers/demo.js"></script>
<script type="text/javascript">
examples['simple_mars'] = function() {
$('#sphere').earth3d({
texture: '/ipfs/QmNNSAJyzVSF2m16dReYgmqmiRkKa5HMKvFUgwhbRzTYto/mars1024x1024.jpg', // texture used by G1Wish planet
dragElement: $('#locations') // where do we catch the mouse drag
});
};
</script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/jquery-ui.0.min.js"></script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/sphere-hacked.js"></script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/jquery.earth-3d.js"></script>
<script type="text/javascript" src="/ipfs/QmUcpeWwA5EZA8UavMU1oAfvRwZhUheBx8Mh8RGC4KHkkD/index_fichiers/demo.js"></script>
<style>
#glow-shadows.earth {
background: url(/ipfs/QmY1A2uLGNXbvNs7hadZAKHNiuWxFaWhnaDR1UJXBXRirX/earth-glow-shadows.png);
background: url(/ipfs/QmTVspfoaNL1BK2CR1vVNrEnwo4PfUjwdQxEt57mGJjsLX/earth-glow-shadows.png);
}
#glow-shadows.mars {
background: url(/ipfs/QmPmpDoTGboQDDiYGCfmtcwnDe1buTSkj24cpJV7raQq9x/mars-glow-shadows.png);
background: url(/ipfs/QmTVspfoaNL1BK2CR1vVNrEnwo4PfUjwdQxEt57mGJjsLX/mars-glow-shadows.png);
}
.flight {
position: absolute;
@ -33,7 +48,7 @@
height: 25px;
left: 10px;
top: 10px;
background: url(/ipfs/QmS7UkTKfZi45HCq9KHAJgKosdKrbiZTdJE1xD62yxVi7u/plain.png);
background: url(/ipfs/QmTVspfoaNL1BK2CR1vVNrEnwo4PfUjwdQxEt57mGJjsLX/plain.png);
background-size: 100% 100%;
margin-left: -12px;
margin-top: -12.5px;
@ -48,18 +63,19 @@
<h1><a target=_blank href="http://astroport.localhost:1234">Astroport Ŋ1</a></h1>
<div class="subtitle">Une Planète à Vous<br>Un Internet à Nous</div>
<div class="subtitle">One Planet</div>
<div id="demo">
<div id="description">
<h2>Un DON ? Flashez le QRCode !</h2>
<h3>ONE Internet 4 ALL</h3>
Visitez TW "_PLAYER_"
<br>
<a href="https://ipfs.copylaradio.com/ipns/_ASTRONAUTENS_">TW♥BOX "_PLAYER_"</a>
<h2>Faites un Don ! Installez <a href="https://cesium.app">Cesium</a></h2>
<p><a href="https://ipfs.copylaradio.com/ipns/_ASTRONAUTENS_">
<img src="/ipfs/QmWUpjGFuF7NhpXgkrCmx8Tbu4xjcFpKhE7Bsvt6HeKYxu/g1ticket_qrcode.png" width=65%></p>
</a>
<h3>Installez <a href="https://cesium.app">Cesium</a>. Indiquez en commentaire vos "G1Talents" et les emails de vos amis qui partage(ront) votre dons.</h3>
<img src="/ipfs/QmWUpjGFuF7NhpXgkrCmx8Tbu4xjcFpKhE7Bsvt6HeKYxu/g1ticket_qrcode.png" width=65%>
</a></p>
<p>Indiquez en commentaire votre email pour valider votre inscription.</p>
<p>/ <a href="https://opencollective.com/monnaie-libre/projects/stiits">LaSTI</a> / G1Services by U + La♥BOX</p>
<br>
</div>
<div id="showoff">

View File

@ -17,13 +17,6 @@ examples['simple_tilted'] = function() {
});
};
examples['simple_mars'] = function() {
$('#sphere').earth3d({
texture: 'images/mars1024x1024.jpg', // texture used by planet
dragElement: $('#locations') // where do we catch the mouse drag
});
};
examples['locations'] = function() {
/* defining locations to display.
Each position must have a key, an alpha and delta position (or x and y if you want to display a static location).
@ -33,27 +26,38 @@ examples['locations'] = function() {
obj1: {
alpha: Math.PI / 4,
delta: 0,
name: 'location 1'
name: '_usa_',
link: 'https://oasis.astroport.com#usa'
},
obj2: {
alpha: 1 * Math.PI / 4,
delta: -2 * Math.PI / 4,
name: 'location 2'
name: '_africa_',
link: 'https://oasis.astroport.com#africa'
},
obj3: {
alpha: 2 * Math.PI / 4,
delta: 0,
name: 'location 3'
name: '_hawai_',
link: 'https://oasis.astroport.com#awai'
},
obj4: {
alpha: 3 * Math.PI / 4,
delta: 3 * Math.PI / 4,
name: 'location 4'
name: '_australia_',
link: 'https://oasis.astroport.com#australia'
},
obj5: {
alpha: 2.2 * Math.PI / 4,
delta: -1.1 * Math.PI / 4,
name: 'location 5'
delta: -0.9 * Math.PI / 4,
name: '_southamerica_',
link: 'https://oasis.astroport.com#southamerica'
},
obj6: {
alpha: 1.2 * Math.PI / 4,
delta: -2 * Math.PI / 4,
name: '_europe_',
link: 'https://oasis.astroport.com#europe'
}
};
$('#sphere').earth3d({
@ -72,42 +76,50 @@ examples['flights'] = function() {
obj1: {
alpha: Math.PI / 4,
delta: 0,
name: 'usa'
name: '_usa_',
link: 'https://oasis.astroport.com#usa'
},
obj2: {
alpha: 1 * Math.PI / 4,
delta: -2 * Math.PI / 4,
name: 'africa'
name: '_africa_',
link: 'https://oasis.astroport.com#africa'
},
obj3: {
alpha: 2 * Math.PI / 4,
delta: 0,
name: 'hawai'
name: '_hawai_',
link: 'https://oasis.astroport.com#awai'
},
obj4: {
alpha: 3 * Math.PI / 4,
delta: 3 * Math.PI / 4,
name: 'australia'
name: '_australia_',
link: 'https://oasis.astroport.com#australia'
},
obj5: {
alpha: 2.2 * Math.PI / 4,
delta: -0.9 * Math.PI / 4,
name: 'southamerica'
name: '_southamerica_',
link: 'https://oasis.astroport.com#southamerica'
},
obj6: {
alpha: 1.2 * Math.PI / 4,
delta: -2 * Math.PI / 4,
name: 'europe'
name: '_europe_',
link: 'https://oasis.astroport.com#europe'
},
zero: {
alpha: 0 * Math.PI / 4,
delta: 0 * Math.PI / 4,
name: 'zero'
name: '_CraftYourWorld_',
link: 'https://ipfs.copylaradio.com/ipfs/QmNcNcYRDUFmR1Ey1MAyhzzZRJEi1Dfq8YXRTXq6XZ9n4A'
},
pi: {
alpha: -3 * Math.PI / 4,
delta: -3 * Math.PI / 4,
name: 'pi'
name: '_OpenTW_',
link: 'https://astroport.copylaradio.com'
}
};
/* defining paths to display.

View File

@ -173,7 +173,8 @@ var earth3d;
var $elem = $('<div class="location"></div>');
$elem.appendTo(widget.options.locationsElement);
$elem.click(function() {
alert('Clicked on ' + location.name);
alert('Clicked on ' + location.name + ' : ' + location.link );
window.open( location.link, "AstroTab");
});
location.$element = $elem;
},
@ -198,6 +199,7 @@ var earth3d;
$elem.appendTo(widget.options.locationsElement);
$elem.click(function() {
alert('Clicked on ' + flight.name);
});
flight.$element = $elem;
},