fix vulns

This commit is contained in:
leander committed 2026-08-29 16:47:38 +02:00
1 parent b0e343a390
commit 08bc43942a
6 files changed
+481 -359

No files matched your search

+423 -339
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -17,7 +17,7 @@
"@sanity/image-url": "^1.1.0", "@sanity/image-url": "^1.1.0",
"country-flag-icons": "^1.5.19", "country-flag-icons": "^1.5.19",
"install": "^0.13.0", "install": "^0.13.0",
"next": "^15.5.24", "next": "^16.3.3",
"next-intl": "^4.3.4", "next-intl": "^4.3.4",
"react": "19.1.0", "react": "19.1.0",
"react-dom": "19.1.0", "react-dom": "19.1.0",
+5 -5
View File
@@ -17,18 +17,18 @@ export async function POST(request: NextRequest) {
) )
if (_type === "post") { if (_type === "post") {
revalidateTag("blog-posts") revalidateTag("blog-posts", "max")
if (slug?.current) { if (slug?.current) {
revalidateTag(`post-${slug.current}`) revalidateTag(`post-${slug.current}`, "max")
} }
} else if (_type === "event") { } else if (_type === "event") {
revalidateTag("events") revalidateTag("events", "max")
if (slug?.current) { if (slug?.current) {
revalidateTag(`event-${slug.current}`) revalidateTag(`event-${slug.current}`, "max")
} }
} }
revalidateTag("home") revalidateTag("home", "max")
return NextResponse.json({ return NextResponse.json({
revalidated: true, revalidated: true,
@@ -15,6 +15,13 @@
height: 100% !important; height: 100% !important;
} }
.panoramaFallback {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
}
.pcRoomImage { .pcRoomImage {
width: 100%; width: 100%;
height: auto; height: auto;
+25 -7
View File
@@ -1,5 +1,6 @@
"use client" "use client"
import { useEffect, useState } from "react"
import { useTranslations } from "next-intl" import { useTranslations } from "next-intl"
import Image from "next/image" import Image from "next/image"
import { ReactPhotoSphereViewer } from "react-photo-sphere-viewer" import { ReactPhotoSphereViewer } from "react-photo-sphere-viewer"
@@ -8,6 +9,13 @@ import * as styles from "./office.module.css"
const Office = () => { const Office = () => {
const t = useTranslations("office") const t = useTranslations("office")
const [supportsWebGL2, setSupportsWebGL2] = useState<boolean | null>(null)
useEffect(() => {
const canvas = document.createElement("canvas")
const gl = canvas.getContext("webgl2")
setSupportsWebGL2(Boolean(gl))
}, [])
return ( return (
<section id="office"> <section id="office">
@@ -16,13 +24,23 @@ const Office = () => {
<p>{t("text")}</p> <p>{t("text")}</p>
<p>{t("tip")}</p> <p>{t("tip")}</p>
<div className={styles.panoramaContainer}> <div className={styles.panoramaContainer}>
<ReactPhotoSphereViewer {supportsWebGL2 === true ? (
width={"100%"} <ReactPhotoSphereViewer
height={"100%"} width={"100%"}
src="/3D_office_2025_08_20.jpg" height={"100%"}
defaultZoomLvl={0} src="/3D_office_2025_08_20.jpg"
navbar={true} defaultZoomLvl={0}
/> navbar={true}
/>
) : (
<Image
src="/3D_office_2025_08_20.jpg"
alt={t("title")}
className={styles.panoramaFallback}
width={1200}
height={900}
/>
)}
</div> </div>
<Image <Image
src="/pc_room.jpg" src="/pc_room.jpg"
+20 -7
View File
@@ -1,7 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2017", "target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@@ -11,7 +15,7 @@
"moduleResolution": "bundler", "moduleResolution": "bundler",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "react-jsx",
"incremental": true, "incremental": true,
"plugins": [ "plugins": [
{ {
@@ -19,9 +23,15 @@
} }
], ],
"paths": { "paths": {
"@/*": ["./src/*"], "@/*": [
"@components/*": ["./src/components/*"], "./src/*"
"@lib/*": ["./src/lib/*"] ],
"@components/*": [
"./src/components/*"
],
"@lib/*": [
"./src/lib/*"
]
} }
}, },
"include": [ "include": [
@@ -29,7 +39,10 @@
"**/*.ts", "**/*.ts",
"**/*.tsx", "**/*.tsx",
".next/types/**/*.ts", ".next/types/**/*.ts",
"global.d.ts" "global.d.ts",
".next/dev/types/**/*.ts"
], ],
"exclude": ["node_modules"] "exclude": [
"node_modules"
]
} }