diff --git a/report-window/domain-summary.tsx b/report-window/domain-summary.tsx index 77d03c1..a96cb13 100644 --- a/report-window/domain-summary.tsx +++ b/report-window/domain-summary.tsx @@ -5,6 +5,7 @@ import { Classifications, Sources } from "../stolen-data-entry"; const emailClassifications: Record = { id: "sztucznie nadane mi ID", history: "część mojej historii przeglądania", + location: "informacje na temat mojej lokalizacji geograficznej", }; const emailSources: Record = { diff --git a/report-window/report-window.tsx b/report-window/report-window.tsx index c15fb11..3e55fe8 100644 --- a/report-window/report-window.tsx +++ b/report-window/report-window.tsx @@ -1,6 +1,8 @@ import React from "react"; import ReactDOM from "react-dom"; import { getMemory } from "../memory"; +import { Classifications } from "../stolen-data-entry"; +import { useEmitter } from "../util"; import EmailTemplate from "./email-template"; import HARConverter from "./har-converter"; @@ -8,6 +10,10 @@ function Report() { const origin = new URL(document.location.toString()).searchParams.get( "origin" ); + const [counter, setCounter] = useEmitter(getMemory()); + function refresh() { + setCounter((c) => c + 1); + } const clusters = getMemory().getClustersForOrigin(origin); const marked_entries = Object.values(clusters) .map((cluster) => cluster.getMarkedRequests()) @@ -51,10 +57,18 @@ function Report() { {entry.value} - { + entry.classification = e.target + .value as keyof typeof Classifications; + refresh(); + }} + > {[ ["history", "Historia przeglądania"], ["id", "Sztucznie nadane id"], + ["location", "Informacje na temat mojej lokalizacji"], ].map(([key, name]) => (