Stabilize Cloudron SQLite and refine planner suggestions

This commit is contained in:
2026-04-12 20:37:57 +02:00
parent 325101da99
commit 35e6a7b56e
7 changed files with 173 additions and 40 deletions
+37 -2
View File
@@ -78,8 +78,8 @@
const applyFilter = () => {
const term = input.value.trim().toLowerCase();
if (!term) {
items.forEach((item) => {
item.hidden = false;
items.forEach((item, index) => {
item.hidden = hasLimit ? index >= resultLimit : false;
});
syncGroups();
return;
@@ -109,8 +109,43 @@
});
};
const initIosPullToRefresh = () => {
const isAppleTouchDevice = /iP(ad|hone|od)/.test(navigator.userAgent)
|| (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
if (!isAppleTouchDevice) return;
let startY = 0;
let maxPull = 0;
let tracking = false;
window.addEventListener("touchstart", (event) => {
if (window.scrollY > 0) {
tracking = false;
return;
}
startY = event.touches[0].clientY;
maxPull = 0;
tracking = true;
}, { passive: true });
window.addEventListener("touchmove", (event) => {
if (!tracking) return;
const currentY = event.touches[0].clientY;
maxPull = Math.max(maxPull, currentY - startY);
}, { passive: true });
window.addEventListener("touchend", () => {
if (tracking && maxPull > 96 && window.scrollY <= 2) {
window.location.reload();
}
tracking = false;
maxPull = 0;
}, { passive: true });
};
document.addEventListener("DOMContentLoaded", () => {
initMobileSheet();
initFilterInputs();
initIosPullToRefresh();
});
})();