General fixes
This commit is contained in:
85
_assets.json
85
_assets.json
@@ -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
0
assets/page/.placeholder
Normal file
26
build.py
26
build.py
@@ -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)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<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>
|
||||
|
||||
@@ -141,15 +140,15 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -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"]))
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user