Added build script
86
_assets.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
[
|
||||||
|
"icon512_maskable.png",
|
||||||
|
"icon512_rounded.png",
|
||||||
|
"index.html",
|
||||||
|
"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"
|
||||||
|
]
|
||||||
20
build.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import json
|
||||||
|
ASSETS = json.load(open("_assets.json", "r"))
|
||||||
|
PREFETCH = ""
|
||||||
|
VERSIONCO = "2025-06-27_1"
|
||||||
|
HANDLEPARSE = ["index.html", "sw.js"]
|
||||||
|
for asset in ASSETS:
|
||||||
|
PREFETCH += f'<link rel="prefetch" href="{asset}" />\n'
|
||||||
|
|
||||||
|
def replace_handles(string):
|
||||||
|
string = string.replace("%%PREFETCH%%", PREFETCH)
|
||||||
|
string = string.replace("%%VERSIONCO%%", VERSIONCO)
|
||||||
|
string = string.replace("%%ASSETSJSON%%", json.dumps(ASSETS, ensure_ascii=False))
|
||||||
|
return 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)
|
||||||
0
cola_cao.jpg → dist/cola_cao.jpg
vendored
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
|
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 300 KiB |
0
manifest.json → dist/manifest.json
vendored
0
static/TeleSec.jpg → dist/static/TeleSec.jpg
vendored
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
0
static/axe.js → dist/static/axe.js
vendored
0
static/gun.js → dist/static/gun.js
vendored
0
static/ico/add.png → dist/static/ico/add.png
vendored
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
0
static/ico/cow.png → dist/static/ico/cow.png
vendored
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
0
static/load.js → dist/static/load.js
vendored
0
static/open.js → dist/static/open.js
vendored
0
static/path.js → dist/static/path.js
vendored
0
static/radix.js → dist/static/radix.js
vendored
0
static/sea.js → dist/static/sea.js
vendored
0
static/store.js → dist/static/store.js
vendored
0
static/yson.js → dist/static/yson.js
vendored
3015
index.html
2927
src/index.html
Normal file
26
src/sw.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
var cacheName = 'telesec_%%VERSIONCO%%';
|
||||||
|
|
||||||
|
self.addEventListener('install', event => {
|
||||||
|
event.waitUntil(
|
||||||
|
caches.open(cacheName)
|
||||||
|
.then(cache => cache.addAll(%%ASSETSJSON%%))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener('message', function (event) {
|
||||||
|
if (event.data.action === 'skipWaiting') {
|
||||||
|
self.skipWaiting();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
self.addEventListener('fetch', function (event) {
|
||||||
|
event.respondWith(
|
||||||
|
caches.match(event.request)
|
||||||
|
.then(function (response) {
|
||||||
|
if (response) {
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
return fetch(event.request);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
111
sw.js
@@ -1,111 +0,0 @@
|
|||||||
var cacheName = 'telesec_2025-06-19_2';
|
|
||||||
|
|
||||||
self.addEventListener('install', event => {
|
|
||||||
event.waitUntil(
|
|
||||||
caches.open(cacheName)
|
|
||||||
.then(cache => cache.addAll([
|
|
||||||
"icon512_maskable.png",
|
|
||||||
"icon512_rounded.png",
|
|
||||||
"index.html",
|
|
||||||
"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",
|
|
||||||
]))
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('message', function (event) {
|
|
||||||
if (event.data.action === 'skipWaiting') {
|
|
||||||
self.skipWaiting();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('fetch', function (event) {
|
|
||||||
event.respondWith(
|
|
||||||
caches.match(event.request)
|
|
||||||
.then(function (response) {
|
|
||||||
if (response) {
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
return fetch(event.request);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||