diff --git a/mark.ts b/mark.ts new file mode 100644 index 0000000..6fa4f13 --- /dev/null +++ b/mark.ts @@ -0,0 +1,32 @@ +import { Classifications, StolenDataEntry } from "./stolen-data-entry"; + +export default class Mark { + classification: keyof typeof Classifications; + constructor(public entry: StolenDataEntry, public key: string) { + this.classification = entry.classification; + } + + getParsedValue() { + return this.entry.getParsedValue(this.key); + } + + get shorthost() { + return this.entry.request.shorthost; + } + + get source() { + return this.entry.source; + } + + get name() { + return this.entry.name; + } + + get originalURL() { + return this.entry.request.originalURL; + } + + get valuePreview(): string { + return this.entry.getValuePreview(this.key); + } +} diff --git a/report-window/domain-summary.tsx b/report-window/domain-summary.tsx index a96cb13..274519a 100644 --- a/report-window/domain-summary.tsx +++ b/report-window/domain-summary.tsx @@ -26,22 +26,22 @@ export default function DomainSummary({
{entry.name.trim()}
)
+ {emailClassifications[mark.classification]}{" "}
+ {emailSources[mark.source]} (nazwa: {mark.name},{" "}
+ {mark.key ? (
+ <>
+ pozycja {mark.key}
,
+ >
+ ) : (
+ ""
+ )}
+ wartość: {mark.valuePreview}
)
Dzień dobry, w dniu {getDate()} odwiedziłem stronę{" "} - {marked_entries[0].request.originalURL}. Strona ta wysłała moje dane - osobowe do podmiotów trzecich - bez mojej zgody.{" "} + {marks[0].originalURL}. Strona ta wysłała moje dane osobowe do podmiotów + trzecich - bez mojej zgody.{" "}
{entry.request.shorthost} | +{mark.shorthost} | - {entry.source}:{entry.name} - {entry.markedKeys.join(",")} + {mark.source}:{mark.name} + {mark.key} | - {entry.value} + {mark.valuePreview} + {/* always gonna have + one key, because unwrapEntry is calle above */} |