Formatted fingerprint table

This commit is contained in:
z0ccc 2021-09-28 19:44:44 -04:00
parent 64e30bc855
commit 213220e9fb
3 changed files with 19 additions and 21 deletions

View file

@ -16,8 +16,6 @@ const FingerprintBlock = ({ workerData }) => {
if (signature) {
postSignature(hash, signature);
} else {
console.log(signature);
getSignature(hash, setSignature);
}
}, [signature]);
@ -28,7 +26,9 @@ const FingerprintBlock = ({ workerData }) => {
<h1>Fingerprint</h1>
<>
{signature ? (
<Table data={getFingerprint(signature, hash)} />
<div className="fingerprintTable">
<Table data={getFingerprint(signature, hash)} />
</div>
) : (
<div className="boxWrap">
<div className="hash">{hash}</div>
@ -41,19 +41,15 @@ const FingerprintBlock = ({ workerData }) => {
use private mode the hash will stay the same. Enter your name below and
reload the page in private mode to test it out.
</p>
{signature ? (
<p>Success! Reload page.</p>
) : (
<form onSubmit={(e) => setSignature(e.target[0].value)}>
<input
type="text"
id="name"
name="name"
placeholder="Enter signature"
/>
<input type="submit" id="saveButton" value="Save" maxLength="100" />
</form>
)}
<form onSubmit={(e) => setSignature(e.target[0].value)}>
<input
type="text"
id="name"
name="name"
placeholder="Enter signature"
/>
<input type="submit" id="saveButton" value="Save" maxLength="100" />
</form>
</Block>
);
};

View file

@ -5,7 +5,7 @@ import getScreen from '../utils/screen';
const ScreenBlock = () => (
<Block>
<h1>Screen</h1>
<Table type="screen" data={getScreen()} />
<Table data={getScreen()} />
<p>
<b>Explanation:</b> JavaScript can be used to find information about your
hardware. This information can be used to create a fingerprint.

View file

@ -146,12 +146,14 @@ td {
padding: 12px;
}
td:nth-child(2):first-letter {
text-transform: uppercase;
td:first-child {
width: 150px;
font-weight: 600;
word-break: normal;
}
td:first-child {
width: 180px;
.fingerprintTable td:first-child {
width: 80px;
font-weight: 600;
word-break: normal;
}