Human readable entry source
This commit is contained in:
parent
e989d6d33d
commit
070ac44839
@ -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<keyof typeof Classifications, string> = {
|
||||
@ -10,6 +10,13 @@ const emailClassifications: Record<keyof typeof Classifications, string> = {
|
||||
history: "część mojej historii przeglądania",
|
||||
};
|
||||
|
||||
const emailSources: Record<Sources, string> = {
|
||||
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) => (
|
||||
<li>
|
||||
{emailClassifications[entry.classification]} w {entry.source}
|
||||
{emailClassifications[entry.classification]}{" "}
|
||||
{emailSources[entry.source]}
|
||||
(<code>{entry.name.trim()}</code>)
|
||||
</li>
|
||||
))}
|
||||
|
Loading…
Reference in New Issue
Block a user