manage PLAYER on Station

This commit is contained in:
fred 2023-03-26 03:50:17 +02:00
parent 2d04627169
commit 081c330277
2 changed files with 11 additions and 17 deletions

View File

@ -102,7 +102,7 @@ echo "Activation Réseau P2P Astroport !"
echo
PS3="$PLAYER choisissez : __ "
choices=("AJOUTER VLOG" "CREER UN VOEU" "IMPRIMER QRVOEU" "IMPRIMER VISA" "EXPORTER VISA" "SUPPRIMER VISA" "QUITTER")
choices=("AJOUTER VLOG" "CREER UN VOEU" "IMPRIMER QRVOEU" "IMPRIMER VISA" "SUPPRIMER PLAYER" "QUITTER")
select fav in "${choices[@]}"; do
case $fav in
"IMPRIMER VISA")
@ -110,17 +110,7 @@ select fav in "${choices[@]}"; do
${MY_PATH}/tools/VISA.print.sh "$PLAYER"
;;
"EXPORTER VISA")
echo "EXPORT IDENTITE ASTRONAUTE"
du -h ~/.zen/game/players/$PLAYER/
echo "MANUAL BACKUP ZIP ~/.zen/game/players/$PLAYER/"
## EXPORT TW + VOEUX IPNS KEYS
break
;;
"SUPPRIMER VISA")
"SUPPRIMER PLAYER")
echo "ATTENTION ${PLAYER} DECONNEXION DE VOTRE TW !!"
echo "Enter to continue. Ctrl+C to stop"
read
@ -128,6 +118,7 @@ select fav in "${choices[@]}"; do
ipfs key rm ${PLAYER}; ipfs key rm ${PLAYER}_feed; ipfs key rm $G1PUB;
for voeu in $(ls ~/.zen/game/players/$PLAYER/voeux/*/ 2>/dev/null); do
echo "ipfs key rm $voeu"
ipfs key rm $voeu
done
@ -136,9 +127,9 @@ select fav in "${choices[@]}"; do
#~ 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 "$myCESIUM" erase
echo "PLAYER IPNS KEYS REMOVED"
echo "rm -Rf ~/.zen/game/players/$PLAYER"
rm -Rf ~/.zen/game/players/$PLAYER
@ -161,7 +152,7 @@ select fav in "${choices[@]}"; do
~/.zen/game/players/$PLAYER/ipfs/moa/.chain.$(cat ~/.zen/game/players/$PLAYER/ipfs/moa/.moats)
TW=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/ipfs/moa/index.html | tail -n 1)
ipfs name publish --allow-offline -t 72h --key=$PLAYER /ipfs/$TW
ipfs name publish --allow-offline --key=$PLAYER /ipfs/$TW
echo $TW > ~/.zen/game/players/$PLAYER/ipfs/moa/.chain
echo $MOATS > ~/.zen/game/players/$PLAYER/ipfs/moa/.moats

View File

@ -114,6 +114,7 @@ a {
<video id="preview" style="transform: scaleX(-1);width: 240px;height: 240px;" autoplay="autoplay" class="active"></video>
<strong><div id="countdown"></div></strong>
<strong><div id="scan"></div></strong>
<p> <strong>Scannez QRCode</strong> </p>
<p><a target="g1billet" href="https://g1sms.fr/fr/g1billet">G1BILLET</a> </p>
<p>et "<a target="cesium" href="https://cesium.app/fr/fonctionnalites">portefeuille</a>" <a target="cesium" href="https://cesium.app/fr/telechargement">Cesium</a></p>
@ -167,13 +168,15 @@ a {
//print the decrypted url
console.log(decrypted.data);
var amount = prompt("Saisir MONTANT Ğ1:");
var myU = 'http://astroport.localhost:1234' + decrypted.data +'&pay=' + amount + '&g1pub=' + document.getElementById("countdown").innerHTML.value ;
var myU = 'http://astroport.localhost:1234' + decrypted.data +'&pay=' + amount + '&g1pub=' + document.getElementById("scan").innerHTML.value ;
document.getElementById("scan").innerHTML = decrypted.data;
} else {
document.getElementById("scan").innerHTML = content;
var myU = 'http://astroport.localhost:1234/?qrcode=' + content;
document.getElementById("countdown").innerHTML = content;
}
fetchAstroport(myU)
// homeAstroportStation(myU, 'aframe', 15123)
});