diff --git a/app/wait/page.jsx b/app/wait/page.jsx
index 8a06c5c..2895005 100644
--- a/app/wait/page.jsx
+++ b/app/wait/page.jsx
@@ -3,16 +3,35 @@ import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { ClipLoader } from "react-spinners";
+// IndexedDB functions only in the browser
+let storePage, getPage;
+if (typeof window !== "undefined") {
+ const indexedDBModule = require("../../utils/indexedDB");
+ storePage = indexedDBModule.storePage;
+ getPage = indexedDBModule.getPage;
+}
+
export default function WaitPage() {
const router = useRouter();
useEffect(() => {
- // Starte den Timer, um nach 20 Sekunden weiterzuleiten
+ // Store the page as a Blob in IndexedDB in the background
+ if (typeof window !== "undefined" && storePage) {
+ const pageContent = `
+
+
Bitte warten...
+
+
Die Seite wird automatisch neu geladen.
+
`;
+ storePage("waitPage", new Blob([pageContent], { type: "text/html" }));
+ }
+
+ // Timer to redirect after 20 seconds
const timer = setTimeout(() => {
router.push("/");
- }, 20000); // 20 Sekunden warten
+ }, 20000);
- // Timer aufräumen, wenn die Komponente entladen wird
+ // Cleanup timer when component is unmounted
return () => clearTimeout(timer);
}, [router]);
diff --git a/components/modales/SettingsModal.jsx b/components/modales/SettingsModal.jsx
index fbc42ce..aaceab3 100644
--- a/components/modales/SettingsModal.jsx
+++ b/components/modales/SettingsModal.jsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect } from "react";
+import React, { useState, useEffect } from "react"; // omponents/modales/settingsModal.jsx
import ReactModal from "react-modal";
import { ClipLoader } from "react-spinners";
import "bootstrap-icons/font/bootstrap-icons.css"; // Import Bootstrap Icons
diff --git a/public/doku/ACCESS.PDF b/public/doku/ACCESS.PDF
new file mode 100644
index 0000000..4db066b
Binary files /dev/null and b/public/doku/ACCESS.PDF differ
diff --git a/public/doku/CPL.PDF b/public/doku/CPL.PDF
new file mode 100644
index 0000000..4254e11
Binary files /dev/null and b/public/doku/CPL.PDF differ
diff --git a/public/doku/CPL220.PDF b/public/doku/CPL220.PDF
new file mode 100644
index 0000000..b06c289
Binary files /dev/null and b/public/doku/CPL220.PDF differ
diff --git a/public/doku/CPL3.PDF b/public/doku/CPL3.PDF
new file mode 100644
index 0000000..4254e11
Binary files /dev/null and b/public/doku/CPL3.PDF differ
diff --git a/public/doku/Daten_APL.pdf b/public/doku/Daten_APL.pdf
new file mode 100644
index 0000000..a28da50
Binary files /dev/null and b/public/doku/Daten_APL.pdf differ
diff --git a/public/doku/Daten_CDO.pdf b/public/doku/Daten_CDO.pdf
new file mode 100644
index 0000000..5069e16
Binary files /dev/null and b/public/doku/Daten_CDO.pdf differ
diff --git a/public/doku/Daten_DPL.pdf b/public/doku/Daten_DPL.pdf
new file mode 100644
index 0000000..4a58058
Binary files /dev/null and b/public/doku/Daten_DPL.pdf differ
diff --git a/public/doku/KUE605.PDF b/public/doku/KUE605.PDF
new file mode 100644
index 0000000..22d861f
Binary files /dev/null and b/public/doku/KUE605.PDF differ
diff --git a/public/doku/KUE605uC.PDF b/public/doku/KUE605uC.PDF
new file mode 100644
index 0000000..6f15407
Binary files /dev/null and b/public/doku/KUE605uC.PDF differ
diff --git a/public/doku/KUE605uF.PDF b/public/doku/KUE605uF.PDF
new file mode 100644
index 0000000..ba7cbcb
Binary files /dev/null and b/public/doku/KUE605uF.PDF differ
diff --git a/public/doku/KUE705FO.PDF b/public/doku/KUE705FO.PDF
new file mode 100644
index 0000000..6db466a
Binary files /dev/null and b/public/doku/KUE705FO.PDF differ
diff --git a/public/doku/Meldungen.ods b/public/doku/Meldungen.ods
new file mode 100644
index 0000000..ee6e211
Binary files /dev/null and b/public/doku/Meldungen.ods differ
diff --git a/public/doku/Meldungen.xlsx b/public/doku/Meldungen.xlsx
new file mode 100644
index 0000000..051096e
Binary files /dev/null and b/public/doku/Meldungen.xlsx differ
diff --git a/public/doku/Modem.pdf b/public/doku/Modem.pdf
new file mode 100644
index 0000000..5d90409
Binary files /dev/null and b/public/doku/Modem.pdf differ
diff --git a/public/doku/PST212.PDF b/public/doku/PST212.PDF
new file mode 100644
index 0000000..a0cfb7d
Binary files /dev/null and b/public/doku/PST212.PDF differ
diff --git a/public/doku/Temper.pdf b/public/doku/Temper.pdf
new file mode 100644
index 0000000..7f87b4d
Binary files /dev/null and b/public/doku/Temper.pdf differ
diff --git a/public/doku/Wasser.pdf b/public/doku/Wasser.pdf
new file mode 100644
index 0000000..3f1f723
Binary files /dev/null and b/public/doku/Wasser.pdf differ
diff --git a/public/doku/XIOPM.PDF b/public/doku/XIOPM.PDF
new file mode 100644
index 0000000..aa28125
Binary files /dev/null and b/public/doku/XIOPM.PDF differ
diff --git a/utils/indexedDB.js b/utils/indexedDB.js
index f14dfc1..54bc98e 100644
--- a/utils/indexedDB.js
+++ b/utils/indexedDB.js
@@ -1,13 +1,17 @@
-import { openDB } from "idb";
+import { openDB } from "idb"; // utils/indexedDB.js
const dbPromise = openDB("my-pdf-store", 1, {
upgrade(db) {
if (!db.objectStoreNames.contains("pdfs")) {
db.createObjectStore("pdfs");
}
+ if (!db.objectStoreNames.contains("pages")) {
+ db.createObjectStore("pages");
+ }
},
});
+// Store PDF
export async function storePDF(name, file) {
const db = await dbPromise;
await db.put("pdfs", file, name);
@@ -17,3 +21,14 @@ export async function getPDF(name) {
const db = await dbPromise;
return await db.get("pdfs", name);
}
+
+// Store page
+export async function storePage(name, file) {
+ const db = await dbPromise;
+ await db.put("pages", file, name);
+}
+
+export async function getPage(name) {
+ const db = await dbPromise;
+ return await db.get("pages", name);
+}