Compare commits
2 Commits
cca59bcace
...
d4a8a47ccd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4a8a47ccd | ||
|
|
8e8c93410b |
@@ -1,3 +1,6 @@
|
|||||||
|
## v1.4.11 (2026-02-24)
|
||||||
|
- **Feature**: Das Versionsmenü prüft nun im Hintergrund direkt beim Öffnen nach neuen Versionen und aktualisiert die Liste automatisch, selbst wenn eine veraltete Liste noch im Cache liegt.
|
||||||
|
|
||||||
## v1.4.10 (2026-02-24)
|
## v1.4.10 (2026-02-24)
|
||||||
- **Fix**: Die Farben der Benachrichtigungs-Glocke wurden korrigiert: Sie ist nun gelb, während man auf ein Menü wartet, und wird grün, sobald eines verfügbar ist.
|
- **Fix**: Die Farben der Benachrichtigungs-Glocke wurden korrigiert: Sie ist nun gelb, während man auf ein Menü wartet, und wird grün, sobald eines verfügbar ist.
|
||||||
|
|
||||||
|
|||||||
2
dist/bookmarklet-payload.js
vendored
2
dist/bookmarklet-payload.js
vendored
File diff suppressed because one or more lines are too long
2
dist/bookmarklet.txt
vendored
2
dist/bookmarklet.txt
vendored
File diff suppressed because one or more lines are too long
14
dist/install.html
vendored
14
dist/install.html
vendored
File diff suppressed because one or more lines are too long
51
dist/kantine-standalone.html
vendored
51
dist/kantine-standalone.html
vendored
@@ -2021,7 +2021,7 @@ body {
|
|||||||
<div class="brand">
|
<div class="brand">
|
||||||
<span class="material-icons-round logo-icon">restaurant_menu</span>
|
<span class="material-icons-round logo-icon">restaurant_menu</span>
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<h1>Kantinen Übersicht <small class="version-tag" style="font-size: 0.6em; opacity: 0.7; font-weight: 400; cursor: pointer;" title="Klick für Versionsmenü">v1.4.10</small></h1>
|
<h1>Kantinen Übersicht <small class="version-tag" style="font-size: 0.6em; opacity: 0.7; font-weight: 400; cursor: pointer;" title="Klick für Versionsmenü">v1.4.11</small></h1>
|
||||||
<div id="last-updated-subtitle" class="subtitle"></div>
|
<div id="last-updated-subtitle" class="subtitle"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-group" style="margin-left: 1rem;">
|
<div class="nav-group" style="margin-left: 1rem;">
|
||||||
@@ -2163,7 +2163,7 @@ body {
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div style="margin-bottom: 1rem;">
|
<div style="margin-bottom: 1rem;">
|
||||||
<strong>Aktuell:</strong> <span id="version-current">v1.4.10</span>
|
<strong>Aktuell:</strong> <span id="version-current">v1.4.11</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dev-toggle">
|
<div class="dev-toggle">
|
||||||
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
|
<label style="display:flex;align-items:center;gap:8px;cursor:pointer;">
|
||||||
@@ -3893,7 +3893,7 @@ body {
|
|||||||
|
|
||||||
// Periodic update check (runs on init + every hour)
|
// Periodic update check (runs on init + every hour)
|
||||||
async function checkForUpdates() {
|
async function checkForUpdates() {
|
||||||
const currentVersion = 'v1.4.10';
|
const currentVersion = 'v1.4.11';
|
||||||
const devMode = localStorage.getItem('kantine_dev_mode') === 'true';
|
const devMode = localStorage.getItem('kantine_dev_mode') === 'true';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -3934,7 +3934,7 @@ body {
|
|||||||
const modal = document.getElementById('version-modal');
|
const modal = document.getElementById('version-modal');
|
||||||
const container = document.getElementById('version-list-container');
|
const container = document.getElementById('version-list-container');
|
||||||
const devToggle = document.getElementById('dev-mode-toggle');
|
const devToggle = document.getElementById('dev-mode-toggle');
|
||||||
const currentVersion = 'v1.4.10';
|
const currentVersion = 'v1.4.11';
|
||||||
|
|
||||||
if (!modal) return;
|
if (!modal) return;
|
||||||
modal.classList.remove('hidden');
|
modal.classList.remove('hidden');
|
||||||
@@ -3952,19 +3952,8 @@ body {
|
|||||||
const dm = devToggle.checked;
|
const dm = devToggle.checked;
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
||||||
|
|
||||||
try {
|
function renderVersionsList(versions) {
|
||||||
let versions;
|
if (!versions || !versions.length) {
|
||||||
const cached = JSON.parse(localStorage.getItem('kantine_version_cache') || 'null');
|
|
||||||
if (!forceRefresh && cached && cached.devMode === dm && (Date.now() - cached.timestamp < 3600000)) {
|
|
||||||
versions = cached.versions;
|
|
||||||
} else {
|
|
||||||
versions = await fetchVersions(dm);
|
|
||||||
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
|
||||||
timestamp: Date.now(), devMode: dm, versions
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!versions.length) {
|
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3996,6 +3985,34 @@ body {
|
|||||||
`;
|
`;
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. Show cached versions immediately if available
|
||||||
|
const cachedRaw = localStorage.getItem('kantine_version_cache');
|
||||||
|
let cached = null;
|
||||||
|
if (cachedRaw) {
|
||||||
|
try { cached = JSON.parse(cachedRaw); } catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cached && cached.devMode === dm && cached.versions) {
|
||||||
|
renderVersionsList(cached.versions);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Fetch fresh versions in background (or foreground if no cache)
|
||||||
|
const liveVersions = await fetchVersions(dm);
|
||||||
|
|
||||||
|
// Compare with cache to see if we need to re-render
|
||||||
|
const liveVersionsStr = JSON.stringify(liveVersions);
|
||||||
|
const cachedVersionsStr = cached ? JSON.stringify(cached.versions) : '';
|
||||||
|
|
||||||
|
if (liveVersionsStr !== cachedVersionsStr) {
|
||||||
|
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
||||||
|
timestamp: Date.now(), devMode: dm, versions: liveVersions
|
||||||
|
}));
|
||||||
|
renderVersionsList(liveVersions);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
||||||
}
|
}
|
||||||
|
|||||||
43
kantine.js
43
kantine.js
@@ -2002,19 +2002,8 @@
|
|||||||
const dm = devToggle.checked;
|
const dm = devToggle.checked;
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Lade Versionen...</p>';
|
||||||
|
|
||||||
try {
|
function renderVersionsList(versions) {
|
||||||
let versions;
|
if (!versions || !versions.length) {
|
||||||
const cached = JSON.parse(localStorage.getItem('kantine_version_cache') || 'null');
|
|
||||||
if (!forceRefresh && cached && cached.devMode === dm && (Date.now() - cached.timestamp < 3600000)) {
|
|
||||||
versions = cached.versions;
|
|
||||||
} else {
|
|
||||||
versions = await fetchVersions(dm);
|
|
||||||
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
|
||||||
timestamp: Date.now(), devMode: dm, versions
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!versions.length) {
|
|
||||||
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
container.innerHTML = '<p style="color:var(--text-secondary);">Keine Versionen gefunden.</p>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2046,6 +2035,34 @@
|
|||||||
`;
|
`;
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. Show cached versions immediately if available
|
||||||
|
const cachedRaw = localStorage.getItem('kantine_version_cache');
|
||||||
|
let cached = null;
|
||||||
|
if (cachedRaw) {
|
||||||
|
try { cached = JSON.parse(cachedRaw); } catch (e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cached && cached.devMode === dm && cached.versions) {
|
||||||
|
renderVersionsList(cached.versions);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Fetch fresh versions in background (or foreground if no cache)
|
||||||
|
const liveVersions = await fetchVersions(dm);
|
||||||
|
|
||||||
|
// Compare with cache to see if we need to re-render
|
||||||
|
const liveVersionsStr = JSON.stringify(liveVersions);
|
||||||
|
const cachedVersionsStr = cached ? JSON.stringify(cached.versions) : '';
|
||||||
|
|
||||||
|
if (liveVersionsStr !== cachedVersionsStr) {
|
||||||
|
localStorage.setItem('kantine_version_cache', JSON.stringify({
|
||||||
|
timestamp: Date.now(), devMode: dm, versions: liveVersions
|
||||||
|
}));
|
||||||
|
renderVersionsList(liveVersions);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
container.innerHTML = `<p style="color:#e94560;">Fehler: ${e.message}</p>`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v1.4.10
|
v1.4.11
|
||||||
|
|||||||
Reference in New Issue
Block a user