fix: CSP blob: worker fuer MapLibre, MapPin Import, Icon Scale Limits erweitert (v1.0.1)

This commit is contained in:
Pepe Ziberi
2026-02-21 13:11:27 +01:00
parent 28097607b6
commit 10464d34ff
6 changed files with 11 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ services:
- USER_UID=1000 - USER_UID=1000
- USER_GID=1000 - USER_GID=1000
- GITEA__database__DB_TYPE=sqlite3 - GITEA__database__DB_TYPE=sqlite3
- GITEA__server__ROOT_URL=http://192.168.1.183:3100 - GITEA__server__ROOT_URL=https://git.purepixel.ch
- GITEA__server__HTTP_PORT=3000 - GITEA__server__HTTP_PORT=3000
- GITEA__server__LFS_START_SERVER=true - GITEA__server__LFS_START_SERVER=true
volumes: volumes:
@@ -43,3 +43,4 @@ volumes:
networks: networks:
lageplan_lageplan-net: lageplan_lageplan-net:
external: true external: true

View File

@@ -77,7 +77,7 @@ services:
# ─── Lageplan Web App ────────────────────── # ─── Lageplan Web App ──────────────────────
web: web:
image: lageplan-web:latest image: 192.168.1.183:3100/adminpepe/lageplan:latest
restart: unless-stopped restart: unless-stopped
environment: environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-lageplan}:${POSTGRES_PASSWORD:-lageplan_secret}@db:5432/${POSTGRES_DB:-lageplan} DATABASE_URL: postgresql://${POSTGRES_USER:-lageplan}:${POSTGRES_PASSWORD:-lageplan_secret}@db:5432/${POSTGRES_DB:-lageplan}

View File

@@ -35,7 +35,7 @@ const nextConfig = {
key: 'Content-Security-Policy', key: 'Content-Security-Policy',
value: [ value: [
"default-src 'self'", "default-src 'self'",
"script-src 'self' 'unsafe-inline' 'unsafe-eval'", "script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:",
"style-src 'self' 'unsafe-inline'", "style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob: https://*.tile.openstreetmap.org https://api.maptiler.com http://localhost:9000 http://minio:9000", "img-src 'self' data: blob: https://*.tile.openstreetmap.org https://api.maptiler.com http://localhost:9000 http://minio:9000",
"font-src 'self' data:", "font-src 'self' data:",

View File

@@ -1,6 +1,6 @@
{ {
"name": "lageplan", "name": "lageplan",
"version": "1.0.0", "version": "1.0.1",
"description": "Feuerwehr Lageplan - Krokier-App für Einsatzdokumentation", "description": "Feuerwehr Lageplan - Krokier-App für Einsatzdokumentation",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@@ -38,6 +38,7 @@ import {
Key, Key,
Shield, Shield,
Building2, Building2,
MapPin,
} from 'lucide-react' } from 'lucide-react'
import { HoseSettingsDialog } from '@/components/dialogs/hose-settings-dialog' import { HoseSettingsDialog } from '@/components/dialogs/hose-settings-dialog'
import type { Project, DrawFeature } from '@/app/app/page' import type { Project, DrawFeature } from '@/app/app/page'

View File

@@ -718,6 +718,9 @@ export function MapView({
if (!m) return if (!m) return
setIsMapLoaded(true) setIsMapLoaded(true)
// Guard: skip if sources already exist (React strict mode double-mount)
if (m.getSource('draw-features')) return
// Drawing features source // Drawing features source
m.addSource('draw-features', { m.addSource('draw-features', {
type: 'geojson', type: 'geojson',
@@ -2028,14 +2031,14 @@ export function MapView({
const startW = selectedSymbolRef.current.resizeStartWidth || 1 const startW = selectedSymbolRef.current.resizeStartWidth || 1
const startScale = selectedSymbolRef.current.resizeStartScale || 1 const startScale = selectedSymbolRef.current.resizeStartScale || 1
const ratio = width / startW const ratio = width / startW
selectedSymbolRef.current.scale = Math.max(0.5, Math.min(5, startScale * ratio)) selectedSymbolRef.current.scale = Math.max(0.2, Math.min(10, startScale * ratio))
selectedSymbolRef.current.innerEl.style.fontSize = `${baseFontSize * selectedSymbolRef.current.scale}px` selectedSymbolRef.current.innerEl.style.fontSize = `${baseFontSize * selectedSymbolRef.current.scale}px`
} else { } else {
// For symbols: resize wrapper // For symbols: resize wrapper
selectedSymbolRef.current.wrapperEl.style.width = `${width}px` selectedSymbolRef.current.wrapperEl.style.width = `${width}px`
selectedSymbolRef.current.wrapperEl.style.height = `${height}px` selectedSymbolRef.current.wrapperEl.style.height = `${height}px`
const baseSize = 32 const baseSize = 32
selectedSymbolRef.current.scale = Math.max(0.3, Math.min(4, width / baseSize)) selectedSymbolRef.current.scale = Math.max(0.1, Math.min(10, width / baseSize))
} }
} }
}} }}