Zen station CONSOLE

This commit is contained in:
fred 2024-02-23 23:39:54 +01:00
parent a0fdaf6e62
commit 80d9d385e9
3 changed files with 48 additions and 15 deletions

View File

@ -104,7 +104,6 @@ if [[ ${QRCODE} == "station" ]]; then
## SHOW ZenStation FRONT ## SHOW ZenStation FRONT
sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../templates/ZenStation/index.html > ~/.zen/tmp/${MOATS}/index.htm sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../templates/ZenStation/index.html > ~/.zen/tmp/${MOATS}/index.htm
[[ ! $isLAN ]] && sed -i "s~MENU~HOSTING~g" ~/.zen/tmp/${MOATS}/index.htm
sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm
sed -i "s~http://127.0.0.1:33101~${myG1BILLET}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:33101~${myG1BILLET}~g" ~/.zen/tmp/${MOATS}/index.htm
sed -i "s~http://astroport.localhost:1234~${myASTROPORT}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://astroport.localhost:1234~${myASTROPORT}~g" ~/.zen/tmp/${MOATS}/index.htm
@ -700,7 +699,7 @@ echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPNS"
## WE SEND WALLET AMOUNT DISPLAY ## WE SEND WALLET AMOUNT DISPLAY
( (
echo "$HTTPCORS <h2>${ZCHK}:${QRCODE}</h2><h1>${DISPLAY}</h1><h2><a href='$myUPLANET/g1gate/?pubkey=$G1PUB'>SCAN WALLET</a><h2>" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 echo "$HTTPCORS <h2>${ZCHK}:${QRCODE}</h2><h1>${DISPLAY}</h1><h2><a href='$myUPLANET/g1gate/?pubkey="$G1PUB"'>SCAN WALLET</a><h2>" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
echo "BLURP ${DISPLAY} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} echo "BLURP ${DISPLAY} $PORT" && rm -Rf ~/.zen/tmp/${MOATS}
) & ) &

View File

@ -43,15 +43,19 @@ header {
background: white; background: white;
color: black; color: black;
} }
#yellow { #console {
background: black; visibility: visible;
color: white; background: rgba(0, 0, 0, 0.9);
position: absolute; color: white;
bottom: 2%; width: 80%;
left: 2%; height: 55%;
width: 60%; position: absolute;
visibility: hidden; bottom: 0;
} left: 0;
padding: 5px;
box-sizing: border-box;
z-index: 1000; /* Ensure the console appears above other elements */
}
#ainfo { #ainfo {
position: absolute; position: absolute;
top: 2%; top: 2%;
@ -106,7 +110,13 @@ a {
width: 400px; width: 400px;
height: 400px; height: 400px;
} }
#toggleConsoleButton {
cursor: pointer;
}
#fullscreenButton {
cursor: pointer;
}
</style> </style>
</head> </head>
@ -277,17 +287,41 @@ a {
}); });
</script> </script>
<h1><button id="ainfo" onclick="javascript:var x = document.getElementById('yellow'); if (x.style.visibility === 'hidden') {x.style.visibility = 'visible';} else {x.style.visibility = 'hidden';}">0/1</button></h1> <h1><button id="ainfo" onclick="javascript:var x = document.getElementById('console'); if (x.style.visibility === 'hidden') {x.style.visibility = 'visible';} else {x.style.visibility = 'hidden';}">0/1</button></h1>
<div id="yellow" ><a href="_STATION_" target="aframe">MENU</a> <div id="console" >
<a href="_STATION_" target="aframe">CONSOLE</a>
&nbsp;&nbsp;&nbsp;<button id="fullscreenButton" onclick="toggleConsoleFullScreen()"> ^^ </button>&nbsp;&nbsp;&nbsp;<button onclick="hideConsole()"> X </button>
<iframe name="aframe" id="aframe" src="_STATION_" width="100%" height="320px"></iframe> <iframe name="aframe" id="aframe" src="_STATION_" width="100%" height="320px"></iframe>
</div> </div>
<script>
function toggleConsole() {
const console = document.getElementById('console');
console.style.visibility = (console.style.visibility === 'visible' ? 'hidden' : 'visible');
}
function hideConsole() {
document.getElementById('console').style.visibility = 'hidden';
}
function toggleConsoleFullScreen() {
const console = document.getElementById('console');
if (console.style.width === '100%' && console.style.height === '100%') {
console.style.width = '570px';
console.style.height = '480px';
} else {
console.style.width = '100%';
console.style.height = '100%';
}
}
</script>
<script> <script>
let cookies = document.cookie; let cookies = document.cookie;
console.log(cookies); console.log(cookies);
const el = document.getElementById('yellow'); const el = document.getElementById('console');
setTimeout(() => { setTimeout(() => {
el.style.visibility = 'visible'; el.style.visibility = 'visible';

View File

@ -223,6 +223,6 @@ htmlipfs=$(ipfs add -q $html_file)
[[ $XDG_SESSION_TYPE == 'x11' || $XDG_SESSION_TYPE == 'wayland' ]] && xdg-open http://ipfs.localhost:8080/ipfs/$htmlipfs [[ $XDG_SESSION_TYPE == 'x11' || $XDG_SESSION_TYPE == 'wayland' ]] && xdg-open http://ipfs.localhost:8080/ipfs/$htmlipfs
echo "/ipfs/$htmlipfs" > ~/.zen/tmp/ISTATION echo "/ipfs/$htmlipfs" > ~/.zen/tmp/ISTATION
cat ~/.zen/tmp/ISTATION cat ~/.zen/tmp/ISTATION ### KEEPIT ON LAST LINE
exit 0 exit 0