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:
@@ -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>
|
||||
|
||||
@@ -126,6 +126,10 @@ export interface BannerConsentRecord {
|
||||
os: string | null
|
||||
screen_resolution: string | null
|
||||
session_id: string | null
|
||||
// Script/Cookie-Tracking (Migration 108)
|
||||
scripts_blocked: { src: string; category: string }[]
|
||||
scripts_released: { src: string; category: string }[]
|
||||
cookies_set: { name: string; domain: string; expiry_days: number; category: string }[]
|
||||
expires_at: string | null
|
||||
created_at: string | null
|
||||
updated_at: string | null
|
||||
|
||||
Reference in New Issue
Block a user