forked from STI/Astroport.ONE
${VAL} is lang
This commit is contained in:
parent
a132d32b9e
commit
862d6562bf
@ -63,7 +63,7 @@ LAT=$(makecoord ${ZLAT})
|
||||
LON=$(makecoord ${ZLON})
|
||||
|
||||
#~ ## RECEIVED VAL ## CAN BE USED TO SELECT TW TEMPLATE
|
||||
#~ VAL="$(echo ${VAL} | detox --inline)" ## DETOX VAL
|
||||
VAL="$(echo ${VAL} | detox --inline)" ## DETOX VAL
|
||||
############################################
|
||||
#### TODO USE THIS PARAMETER TO SELECT TW TEMPLATE
|
||||
|
||||
@ -123,9 +123,9 @@ NPASS=$(${MY_PATH}/../tools/diceware.sh $(( $(${MY_PATH}/../tools/getcoins_from_
|
||||
|
||||
## CREATE ASTRONAUTE TW ON CURRENT ASTROPORT
|
||||
(
|
||||
echo VISA.new.sh "${PPASS}" "${NPASS}" "${EMAIL}" "UPlanet" "_URL_" "${LAT}" "${LON}"
|
||||
echo VISA.new.sh "${PPASS}" "${NPASS}" "${EMAIL}" "UPlanet" "${VAL}" "${LAT}" "${LON}"
|
||||
##### (☉_☉ ) #######
|
||||
${MY_PATH}/../RUNTIME/VISA.new.sh "${PPASS}" "${NPASS}" "${EMAIL}" "UPlanet" "_URL_" "${LAT}" "${LON}" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt
|
||||
${MY_PATH}/../RUNTIME/VISA.new.sh "${PPASS}" "${NPASS}" "${EMAIL}" "UPlanet" "${VAL}" "${LAT}" "${LON}" >> ~/.zen/tmp/email.${EMAIL}.${MOATS}.txt
|
||||
|
||||
end=`date +%s`
|
||||
echo "(TW REGISTRATION) Operation time was "`expr $end - $start` seconds.
|
||||
|
@ -145,6 +145,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||
|
||||
#############################################################
|
||||
## FOUND TW
|
||||
err=""
|
||||
#############################################################
|
||||
## CHECK "GPS" Tiddler
|
||||
tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html \
|
||||
@ -160,9 +161,9 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||
--render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion' ## MadeInZion Tiddler
|
||||
|
||||
[[ ! -s ~/.zen/tmp/${MOATS}/MadeInZion.json || $(cat ~/.zen/tmp/${MOATS}/MadeInZion.json) == "[]" ]] \
|
||||
&& msg="${PLAYER} MadeInZion : BAD TW (☓‿‿☓) " && err="(☓‿‿☓)"
|
||||
&& msg="${PLAYER} MadeInZion : BAD TW (☓‿‿☓) " && err="(☓‿‿☓)" && player="" \
|
||||
|| player=$(cat ~/.zen/tmp/${MOATS}/MadeInZion.json | jq -r .[].player)
|
||||
|
||||
player=$(cat ~/.zen/tmp/${MOATS}/MadeInZion.json | jq -r .[].player)
|
||||
#############################################################
|
||||
## CHECK "AstroID" Tiddler
|
||||
tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html \
|
||||
@ -186,7 +187,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||
&& msg="${PLAYER} Astroport : BAD TW (☓‿‿☓) " && err="(☓‿‿☓)"
|
||||
|
||||
############################################################ BAD TW SIGNATURE
|
||||
[[ ( ${player} != ${PLAYER} || ${PLAYER} != ${signature} || "${err}" == "(☓‿‿☓)" ) && ${PLAYER} != ${CURRENT} ]] \
|
||||
[[ ( ${player} != ${PLAYER} || ${PLAYER} != ${signature} || "${err}" == "(☓‿‿☓)" ) && ${PLAYER} != ${CURRENT} ]] \
|
||||
&& echo "> (☓‿‿☓) BAD PLAYER=$player in TW (☓‿‿☓) $msg" \
|
||||
&& ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \
|
||||
&& continue \
|
||||
@ -525,7 +526,7 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||
&& IRSS=$(ipfs add -q ~/.zen/game/players/${PLAYER}/ipfs/${PLAYER}.rss.json | tail -n 1) \
|
||||
&& echo "Publishing ${PLAYER}_feed: /ipns/${FEEDNS} => /ipfs/${IRSS}" \
|
||||
&& ipfs --timeout 300s name publish --key="${PLAYER}_feed" /ipfs/${IRSS} \
|
||||
|| echo ">>>>> ERROR ${PLAYER}_feed IPNS KEY NOT FOUND - ERROR"
|
||||
|| echo ">>>>> WARNING ${PLAYER}_feed IPNS KEY PUBLISHING CUT - WARNING"
|
||||
|
||||
fi
|
||||
|
||||
|
@ -55,7 +55,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${REGION}.g1history.json ]]; then
|
||||
if [[ $ipfs_pop ]]; then
|
||||
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json | tail -n 1)
|
||||
echo "INFO :: $g1pub Memory updater"
|
||||
ipfs --timeout 180s get --progress=false -o ~/.zen/tmp/${MOATS}/${SECTOR} $ipfs_pop \
|
||||
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${SECTOR} $ipfs_pop \
|
||||
|| echo "$ipfs_pop ERROR ... "
|
||||
else
|
||||
echo "WARNING cannot revover any memory !!"
|
||||
|
@ -60,7 +60,7 @@ if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then
|
||||
echo "FOUND $todate MEMORY SLOT"
|
||||
g1pub=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .pubkey' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json | tail -n 1)
|
||||
[[ "$g1pub" != "$G1PUB" ]] && echo "INFO :: $g1pub Memory updater"
|
||||
ipfs --timeout 180s --progress=false get -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
||||
ipfs --timeout 180s get -o ~/.zen/tmp/${MOATS}/${UMAP} $ipfs_pop \
|
||||
|| echo "$ipfs_pop ERROR ... "
|
||||
else
|
||||
echo "WARNING cannot revover any memory !!"
|
||||
|
@ -29,20 +29,20 @@ href="/ipfs/QmeegmN4shouhnzvnDYpbSEJtdRsyy39SpL9XqYVHgtN44/style.css" />
|
||||
</header>
|
||||
<section class="zine-page page-2">
|
||||
<!-- TODO: Page 2 content goes here. This is also the inside of the front cover, so you can be minimal or fit in as much content as possible! -->
|
||||
UPlanet Passport est votre porte d'entrée vers un univers décentralisé de données et d'exploration. Avec UPlanet Passport, vous détenez la clé pour accéder à un vaste réseau d'informations interconnectées, stockées en toute sécurité sur le système de fichiers interplanétaire (IPFS). Au cours de votre voyage dans cet univers sans limites, votre passeport vous sert d'identité numérique et vous permet d'accéder à des expériences, des communautés et des opportunités uniques au sein d'UPlanet.
|
||||
UPlanet AstroID est votre porte d'entrée vers un univers décentralisé de données et d'exploration. Avec UPlanet AstroID, vous détenez la clé pour accéder à un vaste réseau d'informations interconnectées, stockées en toute sécurité sur le système de fichiers interplanétaire (IPFS). Au cours de votre voyage dans cet univers sans limites, votre passeport vous sert d'identité numérique et vous permet d'accéder à des expériences, des communautés et des opportunités uniques au sein d'UPlanet.
|
||||
</section>
|
||||
<section class="zine-page page-3">
|
||||
<!-- TODO: Page 3 content here -->
|
||||
Attention, citoyens d'UPlanet !
|
||||
|
||||
Dans notre cosmos décentralisé, votre Passeport AstroID est votre bien le plus précieux. Ce n'est pas seulement un document ; c'est votre ticket d'entrée pour les opportunités et les aventures illimitées qui vous attendent sur UPlanet.
|
||||
Dans notre cosmos décentralisé, votre AstroID est votre bien le plus précieux. Ce n'est pas seulement un document ; c'est votre ticket d'entrée pour les opportunités et les aventures illimitées qui vous attendent sur UPlanet.
|
||||
|
||||
En tant que gouvernement, nous vous implorons de traiter votre QR Code AstroID et le CODE qui l'accompagne avec le plus grand soin et la plus grande responsabilité. Protégez-les comme vous le feriez pour vos trésors les plus précieux, car ils sont les clés de votre identité et de l'accès aux merveilles de notre royaume décentralisé.
|
||||
|
||||
</section>
|
||||
<section class="zine-page page-4">
|
||||
<!-- TODO: Page 4 - that's the halfway point, you're nearly there! -->
|
||||
Votre passeport AstroID est plus qu'un simple symbole - c'est un témoignage de votre citoyenneté dans l'univers en constante expansion d'UPlanet. Grâce à lui, vous avez le privilège de naviguer en toute sécurité sur notre frontière numérique, de vous engager avec vos concitoyens et de contribuer à l'écosystème florissant de l'innovation et de la collaboration.
|
||||
Votre passeport UPlanet est plus qu'un simple symbole - c'est un témoignage de votre citoyenneté dans l'univers en constante expansion d'UPlanet. Grâce à lui, vous avez le privilège de naviguer en toute sécurité sur notre frontière numérique, de vous engager avec vos concitoyens et de contribuer à l'écosystème florissant de l'innovation et de la collaboration.
|
||||
|
||||
N'oubliez pas, chers voyageurs, que votre Passeport AstroID est votre lien avec le cœur de la gouvernance, de la culture et du progrès d'UPlanet. Gardez-le à portée de main et embarquez pour votre voyage en toute confiance, sachant que vous avez le pouvoir de façonner le destin de notre cosmos décentralisé.
|
||||
Signé,
|
||||
@ -50,7 +50,7 @@ Le gouvernement d'UPlanet 🚀🌠🌠
|
||||
</section>
|
||||
<section class="zine-page page-5">
|
||||
<!-- TODO: You guessed it, page 5 content now -->
|
||||
Obtenez votre passeport AstroID dès aujourd'hui, et rejoignez-nous pour forger un avenir meilleur pour tous les habitants d'UPlanet !
|
||||
Obtenez votre passeport UPlanet dès aujourd'hui, et rejoignez-nous pour forger un avenir meilleur pour tous les habitants d'UPlanet !
|
||||
<hr><a target='TW' href='/ipns/_ASTRONAUTENS_#AstroID'>AstroID<br>
|
||||
<img class="full-img" src='/ipfs/QmdmeZhD8ncBFptmD5VSJoszmu41edtT265Xq3HVh8PhZP'\></a><br>
|
||||
<br>CODE : 0448
|
||||
|
@ -196,6 +196,37 @@ input[name="uplanet"] {
|
||||
</center>
|
||||
</main>
|
||||
</body>
|
||||
<script>
|
||||
// Function to detect the browser language
|
||||
function detectBrowserLanguage() {
|
||||
// Check if the browser supports navigator.language
|
||||
if (navigator.language) {
|
||||
return navigator.language;
|
||||
}
|
||||
// For browsers that don't support navigator.language, fallback to navigator.browserLanguage
|
||||
else if (navigator.browserLanguage) {
|
||||
return navigator.browserLanguage;
|
||||
}
|
||||
// If neither is supported, return a default language
|
||||
else {
|
||||
return 'en'; // default to English if no language information is available
|
||||
}
|
||||
}
|
||||
|
||||
// Function to change iframe source based on browser language
|
||||
function changeIframeSrc() {
|
||||
var browserLanguage = detectBrowserLanguage();
|
||||
var iframe = document.getElementById('aframe');
|
||||
// Construct the new URL based on the detected language
|
||||
var newSrc = 'https://pad.p2p.legal/Astroport_1234_' + browserLanguage;
|
||||
iframe.src = newSrc;
|
||||
const passElement = document.querySelector('input[name="g1pub"]');
|
||||
passElement.value = browserLanguage;
|
||||
}
|
||||
|
||||
// Call the function to change iframe source
|
||||
changeIframeSrc();
|
||||
</script>
|
||||
<script>
|
||||
|
||||
// Extract latitude and longitude from URL parameters
|
||||
@ -209,13 +240,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const latElement = document.querySelector('input[name="zlat"]');
|
||||
const lonElement = document.querySelector('input[name="zlon"]');
|
||||
const uplanetElement = document.querySelector('input[name="uplanet"]');
|
||||
const passElement = document.querySelector('input[name="g1pub"]');
|
||||
|
||||
//~ // Generate a random 6-digit number and set it as the default value for "PASS"
|
||||
if (passElement) {
|
||||
const randomPass = Math.floor(100000 + Math.random() * 900000); // Generates a random 6-digit number
|
||||
passElement.value = randomPass.toString();
|
||||
}
|
||||
|
||||
if (latElement && lonElement) {
|
||||
latElement.value = zlat || '0.00'; // Default to '0.00' if lat is missing
|
||||
@ -286,34 +310,5 @@ setTimeout(() => {
|
||||
}
|
||||
// promptUser();
|
||||
</script>
|
||||
<script>
|
||||
// Function to detect the browser language
|
||||
function detectBrowserLanguage() {
|
||||
// Check if the browser supports navigator.language
|
||||
if (navigator.language) {
|
||||
return navigator.language;
|
||||
}
|
||||
// For browsers that don't support navigator.language, fallback to navigator.browserLanguage
|
||||
else if (navigator.browserLanguage) {
|
||||
return navigator.browserLanguage;
|
||||
}
|
||||
// If neither is supported, return a default language
|
||||
else {
|
||||
return 'en'; // default to English if no language information is available
|
||||
}
|
||||
}
|
||||
|
||||
// Function to change iframe source based on browser language
|
||||
function changeIframeSrc() {
|
||||
var browserLanguage = detectBrowserLanguage();
|
||||
var iframe = document.getElementById('aframe');
|
||||
// Construct the new URL based on the detected language
|
||||
var newSrc = 'https://pad.p2p.legal/Astroport_1234_' + browserLanguage;
|
||||
iframe.src = newSrc;
|
||||
}
|
||||
|
||||
// Call the function to change iframe source
|
||||
changeIframeSrc();
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user