From 070ac4483904dd2a51ef31ae0e840b00150fdae0 Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sun, 7 Nov 2021 19:19:38 +0100 Subject: [PATCH] Human readable entry source --- report-window/report-window.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/report-window/report-window.tsx b/report-window/report-window.tsx index 3eb45a2..aadb76c 100644 --- a/report-window/report-window.tsx +++ b/report-window/report-window.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import ReactDOM from "react-dom"; import { getMemory } from "../memory"; import { RequestCluster } from "../request-cluster"; -import { Classifications } from "../stolen-data-entry"; +import { Classifications, Sources } from "../stolen-data-entry"; import { getDate } from "../util"; const emailClassifications: Record = { @@ -10,6 +10,13 @@ const emailClassifications: Record = { history: "część mojej historii przeglądania", }; +const emailSources: Record = { + header: "w nagłówku HTTP", + cookie: "z pliku Cookie", + pathname: "jako części adresu URL", + queryparams: "jako część adresu URL (query-params)", +}; + type PopupState = "not_clicked" | "clicked_but_invalid"; function DomainSummary({ cluster }: { cluster: RequestCluster }) { @@ -31,7 +38,8 @@ function DomainSummary({ cluster }: { cluster: RequestCluster }) { }, []) .map((entry) => (
  • - {emailClassifications[entry.classification]} w {entry.source} + {emailClassifications[entry.classification]}{" "} + {emailSources[entry.source]}  ({entry.name.trim()})
  • ))}