diff --git a/.env.development b/.env.development index c466eab..4163042 100644 --- a/.env.development +++ b/.env.development @@ -3,3 +3,4 @@ NEXT_PUBLIC_ENCRYPTION_KEY=1 NEXT_PUBLIC_ENCRYPTION_IV=1 NEXT_PUBLIC_USE_MOCK_BACKEND_TDR_START=true NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false +NEXT_PUBLIC_EXPORT_STATIC=false diff --git a/.env.production b/.env.production index 5c6a69c..d6b50a1 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ NEXT_PUBLIC_NODE_ENV=production NEXT_PUBLIC_ENCRYPTION_KEY=1 NEXT_PUBLIC_ENCRYPTION_IV=1 -NEXT_PUBLIC_CPL_API_PATH=/CPL \ No newline at end of file +NEXT_PUBLIC_CPL_API_PATH=/CPL +NEXT_PUBLIC_EXPORT_STATIC=true \ No newline at end of file diff --git a/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx b/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx index ec630ee..8192209 100644 --- a/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx +++ b/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx @@ -1,4 +1,15 @@ "use client"; + +declare global { + interface Window { + win_kueID?: string[]; + win_kueLimit1?: number[]; + win_kueDelay1?: number[]; + win_kueLimit2Low?: number[]; + win_kueLimit2High?: number[]; + win_kueLoopInterval?: number[]; + } +} import { useDispatch, useSelector } from "react-redux"; import type { RootState } from "../../../../../redux/store"; import { setKueData } from "../../../../../redux/slices/kueDataSlice"; diff --git a/config/webVersion.ts b/config/webVersion.ts index 7f08c79..55be412 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.247"; +const webVersion = "1.6.248"; export default webVersion; diff --git a/next.config.mjs b/next.config.mjs index 846ebe0..0996480 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,11 +1,14 @@ /** @type {import('next').NextConfig} */ + +const isExport = process.env.EXPORT_STATIC === "true"; + const nextConfig = { - reactStrictMode: true, // Aktiviert Strict Mode zur Identifizierung potenzieller Probleme in der Anwendung - //output: "export", // Stellt sicher, dass Next.js eine statische Version der Website generiert (SSG) - trailingSlash: false, // Fügt einen Schrägstrich am Ende der URLs hinzu (nützlich für statische Verzeichnisse) + reactStrictMode: true, + trailingSlash: false, images: { - unoptimized: true, // Verzichtet auf Next.js' Bildoptimierung (nützlich für statische Exporte) + unoptimized: true, }, + ...(isExport && { output: "export" }), // ⬅️ dynamisch aktivieren }; export default nextConfig; diff --git a/package-lock.json b/package-lock.json index bfe915c..8ea5ee4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,7 @@ "@types/react-modal": "^3.16.3", "@types/redux-mock-store": "^1.5.0", "@types/testing-library__react": "^10.2.0", + "cross-env": "^7.0.3", "cypress": "^14.0.0", "husky": "^8.0.0", "identity-obj-proxy": "^3.0.0", @@ -3181,6 +3182,24 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", diff --git a/package.json b/package.json index ff41af0..4851cd2 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,13 @@ "scripts": { "dev": "next dev", "clean": "rimraf .next out", - "build": "npm run clean && next build", + "build": "npm run clean && cross-env EXPORT_STATIC=true next build && next export", "postbuild": "copy LICENSE_ICONIFY.txt out\\LICENSE_ICONIFY.txt", "start": "next start", "lint": "next lint", "test": "jest", - "prepare": "husky install" + "prepare": "husky install", + "export": "cross-env EXPORT_STATIC=true next build && next export" }, "dependencies": { "@fontsource/roboto": "^5.1.0", @@ -61,6 +62,7 @@ "@types/react-modal": "^3.16.3", "@types/redux-mock-store": "^1.5.0", "@types/testing-library__react": "^10.2.0", + "cross-env": "^7.0.3", "cypress": "^14.0.0", "husky": "^8.0.0", "identity-obj-proxy": "^3.0.0",