feat(cmp): Phase 2 — script blocking + cookie tracking

Migration 108: scripts_blocked, scripts_released, cookies_set JSONB columns.
Backend models/schema/service/serializer/routes extended.
Admin detail modal shows released scripts and set cookies with categories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-11 22:52:26 +02:00
parent 051890c370
commit 397de741c1
8 changed files with 73 additions and 0 deletions
@@ -223,6 +223,37 @@ export default function BannerConsentsTab() {
</div>
</div>
{/* Scripts & Cookies */}
{(detail.scripts_released?.length > 0 || detail.cookies_set?.length > 0) && (
<div className="border-t border-gray-100 pt-3">
<p className="text-xs font-semibold text-gray-700 mb-2">Scripts & Cookies</p>
{detail.scripts_released?.length > 0 && (
<div className="mb-2">
<span className="text-gray-500 text-xs">Freigegebene Scripts</span>
{detail.scripts_released.map((s, i) => (
<p key={i} className="text-xs text-gray-600 font-mono truncate">{s.src} <span className={`px-1 rounded ${categoryColors[s.category] || 'bg-gray-100'}`}>{s.category}</span></p>
))}
</div>
)}
{detail.scripts_blocked?.length > 0 && (
<div className="mb-2">
<span className="text-gray-500 text-xs">Blockierte Scripts</span>
{detail.scripts_blocked.map((s, i) => (
<p key={i} className="text-xs text-red-600 font-mono truncate">{s.src} <span className="px-1 rounded bg-red-100 text-red-700">{s.category}</span></p>
))}
</div>
)}
{detail.cookies_set?.length > 0 && (
<div>
<span className="text-gray-500 text-xs">Gesetzte Cookies</span>
{detail.cookies_set.map((c, i) => (
<p key={i} className="text-xs text-gray-600 font-mono">{c.name} <span className="text-gray-400">({c.domain})</span> <span className={`px-1 rounded ${categoryColors[c.category] || 'bg-gray-100'}`}>{c.category}</span></p>
))}
</div>
)}
</div>
)}
{/* Technische Details */}
<div className="border-t border-gray-100 pt-3">
<p className="text-xs font-semibold text-gray-700 mb-2">Technisch</p>