diff --git a/Cargo.lock b/Cargo.lock index 57be5fe..03b186f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" dependencies = [ "base64ct", "blake2", - "cpufeatures", + "cpufeatures 0.2.17", "password-hash", ] @@ -149,6 +149,23 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core 0.10.1", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -158,6 +175,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -203,7 +229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -309,6 +335,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "rand_core 0.10.1", + "wasm-bindgen", +] + [[package]] name = "hashbrown" version = "0.15.5" @@ -398,6 +451,22 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + [[package]] name = "hyper-util" version = "0.1.21" @@ -594,6 +663,12 @@ version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + [[package]] name = "matchit" version = "0.8.4" @@ -620,7 +695,7 @@ checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -714,7 +789,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -754,6 +829,62 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + [[package]] name = "quote" version = "1.0.47" @@ -763,12 +894,44 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + [[package]] name = "reqwest" version = "0.12.28" @@ -783,16 +946,21 @@ dependencies = [ "http-body", "http-body-util", "hyper", + "hyper-rustls", "hyper-util", "js-sys", "log", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", + "tokio-rustls", "tokio-util", "tower", "tower-http", @@ -802,6 +970,21 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", ] [[package]] @@ -818,6 +1001,47 @@ dependencies = [ "smallvec", ] +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.23" @@ -912,7 +1136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -960,7 +1184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1056,6 +1280,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + [[package]] name = "tokio" version = "1.54.1" @@ -1069,7 +1299,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -1083,6 +1313,16 @@ dependencies = [ "syn 3.0.10", ] +[[package]] +name = "tokio-rustls" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.20" @@ -1254,6 +1494,12 @@ version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.8" @@ -1392,12 +1638,40 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -1407,6 +1681,70 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "0.7.15" @@ -1469,6 +1807,12 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + [[package]] name = "zerotrie" version = "0.2.5" diff --git a/Cargo.toml b/Cargo.toml index 9e02e06..4d6d68a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ nexus-api = { path = "crates/nexus-api" } nexus-scheduler = { path = "crates/nexus-scheduler" } async-trait = "0.1" axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "json"] } -reqwest = { version = "0.12", default-features = false, features = ["stream"] } +reqwest = { version = "0.12", default-features = false, features = ["stream", "rustls-tls-webpki-roots"] } serde_json = "1" sha2 = "0.10" libc = "0.2" diff --git a/crates/nexus-api/assets/tabellen.js b/crates/nexus-api/assets/tabellen.js new file mode 100644 index 0000000..c979312 --- /dev/null +++ b/crates/nexus-api/assets/tabellen.js @@ -0,0 +1,169 @@ +// Ortszeit (#1082) und Filtern/Sortieren von Tabellen (#1085). +// formatLocalTime und filterAndSort sind reine Funktionen (mit Strata geschrieben, mit Testfällen in +// tests/js geprüft). Der Rest hängt sie an die Seite. Ohne JavaScript bleibt alles in UTC und unsortiert. +(function (root) { + "use strict"; + + // 2026-11-17T08:27:30Z -> 17.11.2026, 09:27:30 in der Zeitzone des Browsers; ungültig -> – + function formatLocalTime(isoUtc) { + if (!isoUtc || typeof isoUtc !== "string") return "–"; + var date = new Date(isoUtc); + if (isNaN(date.getTime())) return "–"; + var p = function (n) { return String(n).padStart(2, "0"); }; + return p(date.getDate()) + "." + p(date.getMonth() + 1) + "." + date.getFullYear() + ", " + + p(date.getHours()) + ":" + p(date.getMinutes()) + ":" + p(date.getSeconds()); + } + + // Filter: Freitext nur auf dem Feld name (ohne Groß/Klein), filters = exakte Werte je Spalte + // (leer = kein Filter). Sortierung: Zahlen numerisch, Texte deutsch ohne Groß/Klein, null zuletzt, + // stabil. Gibt ein neues Array zurück, die Eingabe bleibt unverändert. + function filterAndSort(rows, options) { + options = options || {}; + var text = options.text, filters = options.filters, sortBy = options.sortBy, direction = options.direction; + var result = rows.slice(); + if (text && text !== "") { + var lowerText = String(text).toLowerCase(); + result = result.filter(function (row) { return row.name && String(row.name).toLowerCase().indexOf(lowerText) !== -1; }); + } + if (filters) { + Object.keys(filters).forEach(function (col) { + var val = filters[col]; + if (val === "" || val === null || val === undefined) return; + result = result.filter(function (row) { return row[col] === val; }); + }); + } + if (sortBy) { + var dir = direction === "desc" ? -1 : 1; + result.sort(function (a, b) { + var aVal = a[sortBy], bVal = b[sortBy]; + var aNull = aVal === null || aVal === undefined, bNull = bVal === null || bVal === undefined; + if (aNull && bNull) return 0; + if (aNull) return 1; + if (bNull) return -1; + if (typeof aVal === "number" && typeof bVal === "number") return (aVal - bVal) * dir; + return String(aVal).localeCompare(String(bVal), "de", { sensitivity: "base" }) * dir; + }); + } + return result; + } + + root.NexusTabellen = { formatLocalTime: formatLocalTime, filterAndSort: filterAndSort }; + if (typeof document === "undefined") return; + + // --- Ortszeit: wird in die Ortszeit umgeschrieben --- + function zeitenAnwenden(wurzel) { + wurzel.querySelectorAll("time[datetime]:not([data-lokal])").forEach(function (el) { + var iso = el.getAttribute("datetime"); + var text = formatLocalTime(iso); + el.setAttribute("data-lokal", "1"); + if (text !== "–") { el.textContent = text; el.title = iso + " (UTC)"; } + }); + } + + // --- Tabellen:
| , + // | für Zahlen (fehlt = leer). Der Zustand bleibt beim Neuladen des Teils erhalten
+ // und geht erst beim Neustart der Seite verloren. ---
+ var zustand = {};
+
+ function zellWert(td, zahl) {
+ if (zahl) {
+ var w = td.getAttribute("data-wert");
+ if (w === null || w === "") return null;
+ var n = parseFloat(w);
+ return isNaN(n) ? null : n;
+ }
+ var sv = td.getAttribute("data-sort");
+ if (sv !== null) { return sv; }
+ var t = td.textContent.trim();
+ return t === "" || t === "–" ? null : t;
+ }
+
+ function tabelleAufbauen(tabelle) {
+ var kennung = tabelle.getAttribute("data-filtern");
+ var z = zustand[kennung] || (zustand[kennung] = { text: "", filters: {}, sortBy: null, direction: "asc" });
+ var spalten = [];
+ tabelle.querySelectorAll("thead th").forEach(function (th, i) {
+ var s = th.getAttribute("data-spalte");
+ if (s) { spalten.push({ name: s, index: i, th: th, filter: th.hasAttribute("data-filter"), zahl: th.hasAttribute("data-zahl") }); }
+ });
+ var tbody = tabelle.tBodies[0];
+ if (!tbody || !spalten.length) { return; }
+ var zeilen = Array.prototype.map.call(tbody.rows, function (tr) {
+ var o = { _tr: tr };
+ spalten.forEach(function (s) { o[s.name] = zellWert(tr.cells[s.index], s.zahl); });
+ return o;
+ });
+
+ function anwenden() {
+ var sichtbar = filterAndSort(zeilen, z);
+ var menge = new Set(sichtbar);
+ zeilen.forEach(function (r) { r._tr.hidden = !menge.has(r); });
+ sichtbar.forEach(function (r) { tbody.appendChild(r._tr); });
+ spalten.forEach(function (s) {
+ if (z.sortBy === s.name) { s.th.setAttribute("aria-sort", z.direction === "asc" ? "ascending" : "descending"); }
+ else { s.th.removeAttribute("aria-sort"); }
+ });
+ zahl.textContent = sichtbar.length === zeilen.length ? zeilen.length + " Einträge" : sichtbar.length + " von " + zeilen.length;
+ }
+
+ var leiste = document.createElement("div");
+ leiste.className = "tabellenleiste";
+ var suche = document.createElement("input");
+ suche.type = "search"; suche.placeholder = "Name suchen"; suche.value = z.text;
+ suche.setAttribute("aria-label", "Name suchen");
+ suche.addEventListener("input", function () { z.text = suche.value; anwenden(); });
+ leiste.appendChild(suche);
+ spalten.filter(function (s) { return s.filter; }).forEach(function (s) {
+ var werte = [];
+ zeilen.forEach(function (r) { if (r[s.name] !== null && werte.indexOf(r[s.name]) === -1) { werte.push(r[s.name]); } });
+ werte.sort(function (a, b) { return String(a).localeCompare(String(b), "de", { sensitivity: "base" }); });
+ var sel = document.createElement("select");
+ sel.setAttribute("aria-label", s.th.textContent.trim() + " filtern");
+ var alle = document.createElement("option");
+ alle.value = ""; alle.textContent = "Alle: " + s.th.textContent.trim();
+ sel.appendChild(alle);
+ werte.forEach(function (w) { var o = document.createElement("option"); o.value = w; o.textContent = w; sel.appendChild(o); });
+ sel.value = z.filters[s.name] || "";
+ if (sel.value === "") { delete z.filters[s.name]; }
+ sel.addEventListener("change", function () { if (sel.value === "") { delete z.filters[s.name]; } else { z.filters[s.name] = sel.value; } anwenden(); });
+ leiste.appendChild(sel);
+ });
+ var zahl = document.createElement("span");
+ zahl.className = "muted klein";
+ leiste.appendChild(zahl);
+ var anker = tabelle.closest(".breit") || tabelle;
+ anker.parentNode.insertBefore(leiste, anker);
+
+ spalten.forEach(function (s) {
+ s.th.classList.add("sortierbar");
+ s.th.setAttribute("tabindex", "0");
+ var umschalten = function () {
+ if (z.sortBy === s.name) { z.direction = z.direction === "asc" ? "desc" : "asc"; }
+ else { z.sortBy = s.name; z.direction = "asc"; }
+ anwenden();
+ };
+ s.th.addEventListener("click", umschalten);
+ s.th.addEventListener("keydown", function (e) { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); umschalten(); } });
+ });
+ anwenden();
+ }
+
+ function tabellenAnwenden(wurzel) {
+ wurzel.querySelectorAll("table[data-filtern]:not([data-bereit])").forEach(function (t) {
+ t.setAttribute("data-bereit", "1");
+ tabelleAufbauen(t);
+ });
+ }
+
+ var geplant = false;
+ function alles() {
+ geplant = false;
+ zeitenAnwenden(document);
+ tabellenAnwenden(document);
+ }
+ alles();
+ // Die Seite erneuert Teile von selbst (data-refresh); neue Zeiten und Tabellen werden nachgezogen.
+ new MutationObserver(function () {
+ if (!geplant) { geplant = true; (window.requestAnimationFrame || setTimeout)(alles); }
+ }).observe(document.body, { childList: true, subtree: true });
+})(typeof window !== "undefined" ? window : globalThis);
diff --git a/crates/nexus-api/src/lib.rs b/crates/nexus-api/src/lib.rs
index 088407d..df10d4e 100644
--- a/crates/nexus-api/src/lib.rs
+++ b/crates/nexus-api/src/lib.rs
@@ -19,6 +19,7 @@ mod runtime;
mod state;
mod tap;
mod ui;
+mod update;
mod usage;
use std::sync::Arc;
diff --git a/crates/nexus-api/src/ui.rs b/crates/nexus-api/src/ui.rs
index 0f94a96..837276e 100644
--- a/crates/nexus-api/src/ui.rs
+++ b/crates/nexus-api/src/ui.rs
@@ -119,6 +119,7 @@ pub fn routes() -> Router{title}{body} |
|---|