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

View file

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

View file

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