General fixes

This commit is contained in:
naielv
2025-07-31 16:43:01 +02:00
parent a274de3c4d
commit a016e06557
15 changed files with 176 additions and 248 deletions

View File

@@ -1,85 +0,0 @@
[
"icon512_maskable.png",
"icon512_rounded.png",
"manifest.json",
"static/axe.js",
"static/doublescroll.js",
"static/gun.js",
"static/jquery.js",
"static/load.js",
"static/open.js",
"static/path.js",
"static/radisk.js",
"static/radix.js",
"static/rindexed.js",
"static/sea.js",
"static/showdown.min.js",
"static/simplemde.min.css",
"static/simplemde.min.js",
"static/store.js",
"static/synchronous.js",
"static/TeleSec.jpg",
"static/toastr.min.css",
"static/toastr.min.js",
"static/webrtc.js",
"static/yson.js",
"static/ico/add.png",
"static/ico/azucar-moreno.png",
"static/ico/azucar-blanco.jpg",
"static/ico/stevia.jpg",
"static/ico/stevia-gotas.webp",
"static/ico/sacarina.jpg",
"static/ico/arrow_down_blue.png",
"static/ico/arrow_left_green.png",
"static/ico/arrow_up_red.png",
"static/ico/camera2.png",
"static/ico/cereales.png",
"static/ico/checkbox.png",
"static/ico/checkbox_unchecked.png",
"static/ico/connect_ok.svg",
"static/ico/connect_ko.svg",
"static/ico/coffee_bean.png",
"static/ico/colacao.jpg",
"static/ico/cookies.png",
"static/ico/cow.png",
"static/ico/delete.png",
"static/ico/fire.png",
"static/ico/keyboard_key_g.png",
"static/ico/keyboard_key_p.png",
"static/ico/lollipop.png",
"static/ico/milk.png",
"static/ico/preferences.png",
"static/ico/sizes.png",
"static/ico/statusok.png",
"static/ico/snowflake.png",
"static/ico/tea_bag.png",
"static/ico/thermometer2.png",
"static/ico/user.png",
"static/ico/user_generic.png",
"static/ico/water_tap.png",
"static/ico/wheat.png",
"static/ico/layered1/Azucar-Az. Blanco.png",
"static/ico/layered1/Azucar-Az. Moreno.png",
"static/ico/layered1/Azucar-Edulcorante.png",
"static/ico/layered1/Azucar-Sacarina.png",
"static/ico/layered1/Azucar-Sin.png",
"static/ico/layered1/Azucar-Stevia (Gotas).png",
"static/ico/layered1/Azucar-Stevia (Pastillas).png",
"static/ico/layered1/Background.png",
"static/ico/layered1/Cafeina-Con.png",
"static/ico/layered1/Cafeina-Sin.png",
"static/ico/layered1/Leche-Agua.png",
"static/ico/layered1/Leche-Sin lactosa.png",
"static/ico/layered1/Leche-Vegetal.png",
"static/ico/layered1/Leche-de Vaca.png",
"static/ico/layered1/Selección-CafeSolo.png",
"static/ico/layered1/Selección-CaféLeche.png",
"static/ico/layered1/Selección-ColaCao.png",
"static/ico/layered1/Selección-Infusion.png",
"static/ico/layered1/Selección-Leche.png",
"static/ico/layered1/Tamaño-Grande.png",
"static/ico/layered1/Tamaño-Pequeño.png",
"static/ico/layered1/Temperatura-Caliente.png",
"static/ico/layered1/Temperatura-Frio.png",
"static/ico/layered1/Temperatura-Templado.png"
]

0
assets/page/.placeholder Normal file
View File

View File

@@ -1,10 +1,23 @@
import json
import os
def get_all_files(directory):
files = []
for root, _, filenames in os.walk(directory):
for filename in filenames:
path = os.path.join(root, filename)
# Convert to relative path and normalize separators
rel_path = os.path.relpath(path, directory)
files.append(rel_path.replace('\\', '/'))
return files
PREFETCH = ""
VERSIONCO = "2025-07-30_4"
HANDLEPARSE = os.listdir("src/")
ASSETS = json.load(open("_assets.json", "r")) + HANDLEPARSE
HANDLEPARSE = get_all_files("src")
# Combine assets from JSON and recursively found files
ASSETS = get_all_files("assets")
for asset in ASSETS:
if asset != "sw.js":
PREFETCH += f'<link rel="prefetch" href="{asset}" />\n'
@@ -18,7 +31,8 @@ def replace_handles(string):
for file in HANDLEPARSE:
with open("src/" + file, "r") as f:
out = replace_handles(f.read())
with open("dist/" + file, "w") as f:
f.write(out)
print(file)
with open("src/" + file, "r") as f1:
out = replace_handles(f1.read())
with open("dist/" + file, "w") as f2:
f2.write(out)

View File

@@ -1,155 +1,154 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="manifest.json" />
<title>TeleSec</title>
<link rel="icon" type="image/png" href="static/TeleSec.jpg" />
<link href="static/euskaditech-css/simple.css" rel="stylesheet" />
<link href="static/toastr.min.css" rel="stylesheet" />
%%PREFETCH%%
</head>
<body>
<details class="supermesh-indicator">
<summary>
<b>SuperMesh</b><br />
<br /><small id="peerPID" style="font-family: monospace"
>PID ??????????</small
>
</summary>
<ul id="peerList"></ul>
<i>Todos los datos están encriptados.</i>
</details>
<main>
<header class="no_print" id="header_hide_query">
<details id="LinkAccount_details" open>
<summary>
<b
>TeleSec - <span id="groupId">???</span> - (<span id="peerCount"
>?</span
>
nodos)</b
>
</summary>
<fieldset id="auth_fieldSet">
<legend>Credenciales</legend>
<br />
<label
>Codigo de grupo:<br />
<input type="text" id="LinkAccount_group"
/></label>
<br />
<br />
<label
>Clave secreta:<br />
<input type="text" id="LinkAccount_secret"
/></label>
<br /><br />
<button
type="button"
onclick='LinkAccount(document.getElementById("LinkAccount_group").value, document.getElementById("LinkAccount_secret").value, true)'
>
Iniciar sesión
</button>
</fieldset>
</details>
<!-- <button onclick="displayPost('index')">Ir a la pagina de inicio</button> -->
<div id="appendApps">
<!--<a class="button nav-supercafe nav-disabled" disabled>SuperCafé</a>
<a class="button nav-comedor nav-disabled" disabled>Menú Comedor</a>
<a class="button nav-recetas nav-disabled" disabled>Recetas</a>-->
</div>
<hr />
</header>
<div id="container"></div>
<!-- <br><br><br>
<footer>
<hr>
<details>
<summary><b>Apps SuperMesh</b></summary>
<button type="button">
<img src="static/TeleSec.jpg" alt="" width="100px">
<br>TeleSec
</button>
</details>
</footer> -->
<img
id="connectStatus"
style="bottom: 15px; right: 15px; position: fixed; width: 50px"
/>
</main>
<img
id="actionStatus"
src="static/ico/statusok.png"
style="
z-index: 2048;
margin: 0px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 100px;
display: none;
"
/>
<div id="snackbar">
Hay una nueva versión de TeleSec.<br /><a id="reload"
>Pulsa aqui para actualizar.</a
>
</div>
<script src="static/showdown.min.js"></script>
<script src="static/jquery.js"></script>
<script src="static/gun.js"></script>
<script src="static/webrtc.js"></script>
<script src="static/sea.js"></script>
<script src="static/yson.js"></script>
<script src="static/radix.js"></script>
<!-- <script src="static/radisk.js"></script> -->
<!-- <script src="static/store.js"></script> -->
<script src="static/rindexed.js"></script>
<script src="static/path.js"></script>
<script src="static/open.js"></script>
<script src="static/load.js"></script>
<!--<script src="static/synchronous.js"></script>-->
<!--<script src="static/axe.js"></script>-->
<script src="static/toastr.min.js"></script>
<script src="static/doublescroll.js"></script>
<!--<script src="static/simplemde.min.js"></script>-->
<script async>
async function getQuota(cb = () => {}) {
if (navigator.storage && navigator.storage.estimate) {
const quota = await navigator.storage.estimate();
// quota.usage -> Number of bytes used.
// quota.quota -> Maximum number of bytes available.
const percentageUsed = (quota.usage / quota.quota) * 100;
console.log(
`You've used ${percentageUsed}% of the available storage.`
);
const remaining = quota.quota - quota.usage;
cb(percentageUsed, remaining);
console.log(`You can write up to ${remaining} more bytes.`);
}
}
getQuota();
</script>
<script src="pwa.js"></script>
<script src="config.js"></script>
<script src="gun_init.js"></script>
<script src="app_logic.js"></script>
<script src="app_modules.js"></script>
<script src="page__login.js"></script>
<script src="page__index.js"></script>
<script src="page__importar.js"></script>
<script src="page__exportar.js"></script>
<script src="page__materiales.js"></script>
<script src="page__resumen_diario.js"></script>
<script src="page__personas.js"></script>
<script src="page__supercafe.js"></script>
<script src="page__notificaciones.js"></script>
<script src="page__comedor.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="manifest.json" />
<title>TeleSec</title>
<link rel="icon" type="image/png" href="static/TeleSec.jpg" />
<link href="static/euskaditech-css/simple.css" rel="stylesheet" />
<link href="static/toastr.min.css" rel="stylesheet" />
%%PREFETCH%%
</head>
<body>
<details class="supermesh-indicator">
<summary>
<b>SuperMesh</b><br />
<br /><small id="peerPID" style="font-family: monospace"
>PID ??????????</small
>
</summary>
<ul id="peerList"></ul>
<i>Todos los datos están encriptados.</i>
</details>
<main>
<header class="no_print" id="header_hide_query">
<details id="LinkAccount_details" open>
<summary>
<b
>TeleSec - <span id="groupId">???</span> - (<span id="peerCount"
>?</span
>
nodos)</b
>
</summary>
<fieldset id="auth_fieldSet">
<legend>Credenciales</legend>
<br />
<label
>Codigo de grupo:<br />
<input type="text" id="LinkAccount_group"
/></label>
<br />
<br />
<label
>Clave secreta:<br />
<input type="text" id="LinkAccount_secret"
/></label>
<br /><br />
<button
type="button"
onclick='LinkAccount(document.getElementById("LinkAccount_group").value, document.getElementById("LinkAccount_secret").value, true)'
>
Iniciar sesión
</button>
</fieldset>
</details>
<!-- <button onclick="displayPost('index')">Ir a la pagina de inicio</button> -->
<div id="appendApps">
<!--<a class="button nav-supercafe nav-disabled" disabled>SuperCafé</a>
<a class="button nav-comedor nav-disabled" disabled>Menú Comedor</a>
<a class="button nav-recetas nav-disabled" disabled>Recetas</a>-->
</div>
<hr />
</header>
<div id="container"></div>
<!-- <br><br><br>
<footer>
<hr>
<details>
<summary><b>Apps SuperMesh</b></summary>
<button type="button">
<img src="static/TeleSec.jpg" alt="" width="100px">
<br>TeleSec
</button>
</details>
</footer> -->
<img
id="connectStatus"
style="bottom: 15px; right: 15px; position: fixed; width: 50px"
/>
</main>
<img
id="actionStatus"
src="static/ico/statusok.png"
style="
z-index: 2048;
margin: 0px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 100px;
display: none;
"
/>
<div id="snackbar">
Hay una nueva versión de TeleSec.<br /><a id="reload"
>Pulsa aqui para actualizar.</a
>
</div>
<script src="static/showdown.min.js"></script>
<script src="static/jquery.js"></script>
<script src="static/gun.js"></script>
<script src="static/webrtc.js"></script>
<script src="static/sea.js"></script>
<script src="static/yson.js"></script>
<script src="static/radix.js"></script>
<!-- <script src="static/radisk.js"></script> -->
<!-- <script src="static/store.js"></script> -->
<script src="static/rindexed.js"></script>
<script src="static/path.js"></script>
<script src="static/open.js"></script>
<script src="static/load.js"></script>
<!--<script src="static/synchronous.js"></script>-->
<!--<script src="static/axe.js"></script>-->
<script src="static/toastr.min.js"></script>
<script src="static/doublescroll.js"></script>
<!--<script src="static/simplemde.min.js"></script>-->
<script async>
async function getQuota(cb = () => {}) {
if (navigator.storage && navigator.storage.estimate) {
const quota = await navigator.storage.estimate();
// quota.usage -> Number of bytes used.
// quota.quota -> Maximum number of bytes available.
const percentageUsed = (quota.usage / quota.quota) * 100;
console.log(
`You've used ${percentageUsed}% of the available storage.`
);
const remaining = quota.quota - quota.usage;
cb(percentageUsed, remaining);
console.log(`You can write up to ${remaining} more bytes.`);
}
}
getQuota();
</script>
<script src="pwa.js"></script>
<script src="config.js"></script>
<script src="gun_init.js"></script>
<script src="app_logic.js"></script>
<script src="app_modules.js"></script>
<script src="page/login.js"></script>
<script src="page/index.js"></script>
<script src="page/importar.js"></script>
<script src="page/exportar.js"></script>
<script src="page/materiales.js"></script>
<script src="page/resumen_diario.js"></script>
<script src="page/personas.js"></script>
<script src="page/supercafe.js"></script>
<script src="page/notificaciones.js"></script>
<script src="page/comedor.js"></script>
</body>
</html>

View File

@@ -1,10 +1,10 @@
var cacheName = 'telesec_%%VERSIONCO%%';
var cacheName = 'telesec_2025-07-30_4';
self.addEventListener('install', event => {
event.waitUntil(
caches.open(cacheName)
.then(cache => cache.addAll(%%ASSETSJSON%%))
.then(cache => cache.addAll(["index.html", "icon512_maskable.png", "icon512_rounded.png", "cola_cao.jpg", "manifest.json", "static/webrtc.js", "static/synchronous.js", "static/sea.js", "static/gun.js", "static/toastr.min.css", "static/store.js", "static/simplemde.min.css", "static/doublescroll.js", "static/rindexed.js", "static/yson.js", "static/toastr.min.js", "static/showdown.min.js", "static/load.js", "static/radix.js", "static/axe.js", "static/TeleSec.jpg", "static/path.js", "static/radisk.js", "static/open.js", "static/simplemde.min.js", "static/jquery.js", "static/euskaditech-css/README.md", "static/euskaditech-css/.gitignore", "static/euskaditech-css/simple.css", "static/euskaditech-css/.git", "static/euskaditech-css/logos/EuskadiTech/long nobg color.svg", "static/euskaditech-css/logos/EuskadiTech/nobg color.png", "static/euskaditech-css/logos/EuskadiTech/nobg color.svg", "static/euskaditech-css/logos/EuskadiTech/long nobg color.png", "static/ico/add.png", "static/ico/user_generic.png", "static/ico/keyboard_key_g.png", "static/ico/keyboard_key_p.png", "static/ico/snowflake.png", "static/ico/coffee_bean.png", "static/ico/arrow_up_red.png", "static/ico/milk (1).png", "static/ico/azucar-moreno.png", "static/ico/arrow_down_blue.png", "static/ico/camera2.png", "static/ico/fire.png", "static/ico/cookies.png", "static/ico/checkbox_unchecked.png", "static/ico/wheat.png", "static/ico/sacarina.jpg", "static/ico/arrow_left_green.png", "static/ico/tea_bag.png", "static/ico/cow.png", "static/ico/connect_ko.svg", "static/ico/milk.png", "static/ico/user.png", "static/ico/stevia.jpg", "static/ico/water_tap.png", "static/ico/thermometer2.png", "static/ico/statusok.png", "static/ico/lollipop.png", "static/ico/colacao.jpg", "static/ico/delete.png", "static/ico/cereales.png", "static/ico/checkbox.png", "static/ico/azucar-blanco.jpg", "static/ico/preferences.png", "static/ico/sizes.png", "static/ico/stevia-gotas.webp", "static/ico/connect_ok.svg", "static/ico/layered1/Azucar-Az. Moreno.png", "static/ico/layered1/Azucar-Stevia (Pastillas).png", "static/ico/layered1/Azucar-Sacarina.png", "static/ico/layered1/Selección-ColaCao.png", "static/ico/layered1/Temperatura-Templado.png", "static/ico/layered1/Tamaño-Pequeño.png", "static/ico/layered1/Leche-Sin lactosa.png", "static/ico/layered1/Cafeina-Sin.png", "static/ico/layered1/Leche-Vegetal.png", "static/ico/layered1/Leche-de Vaca.png", "static/ico/layered1/Selección-Infusion.png", "static/ico/layered1/Azucar-Sin.png", "static/ico/layered1/Selección-Leche.png", "static/ico/layered1/Temperatura-Frio.png", "static/ico/layered1/Background.png", "static/ico/layered1/Azucar-Edulcorante.png", "static/ico/layered1/Cafeina-Con.png", "static/ico/layered1/Selección-CaféLeche.png", "static/ico/layered1/Tamaño-Grande.png", "static/ico/layered1/Selección-CafeSolo.png", "static/ico/layered1/Leche-Agua.png", "static/ico/layered1/Temperatura-Caliente.png", "static/ico/layered1/Azucar-Stevia (Gotas).png", "static/ico/layered1/Azucar-Az. Blanco.png"]))
);
});