Skip to content

Commit 07958d7

Browse files
committed
feat: add privacy & security trust badges to /hire page
- 4 trust badges: E2E encryption, SOL escrow, stake slashing, on-chain proof - Tracking events now show encryption/security steps - Mobile responsive grid
1 parent 155ebcb commit 07958d7

2 files changed

Lines changed: 81 additions & 5 deletions

File tree

client/src/Hire.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,53 @@
411411
text-align: center;
412412
}
413413

414+
/* ── Trust & Security Section ────────── */
415+
.hire-trust {
416+
display: grid;
417+
grid-template-columns: 1fr 1fr;
418+
gap: 0.8rem;
419+
max-width: 640px;
420+
margin: 2.5rem auto 0;
421+
}
422+
.hire-trust-item {
423+
display: flex;
424+
align-items: flex-start;
425+
gap: 0.7rem;
426+
padding: 0.9rem 1rem;
427+
background: rgba(30, 41, 59, 0.35);
428+
border: 1px solid rgba(52, 211, 153, 0.08);
429+
border-radius: 12px;
430+
transition: border-color 0.3s;
431+
}
432+
.hire-trust-item:hover {
433+
border-color: rgba(52, 211, 153, 0.2);
434+
}
435+
.hire-trust-icon {
436+
font-size: 1.3rem;
437+
flex-shrink: 0;
438+
margin-top: 0.1rem;
439+
}
440+
.hire-trust-item div {
441+
display: flex;
442+
flex-direction: column;
443+
gap: 0.15rem;
444+
}
445+
.hire-trust-item strong {
446+
font-size: 0.78rem;
447+
font-weight: 700;
448+
color: #e2e8f0;
449+
}
450+
.hire-trust-item span {
451+
font-size: 0.68rem;
452+
color: #64748b;
453+
line-height: 1.35;
454+
}
455+
414456
/* ── Responsive ──────────────────────── */
415457
@media (max-width: 640px) {
416458
.hire-hero h1 { font-size: 1.8rem; }
417459
.hire-agent-card { grid-template-columns: 1fr; gap: 0.8rem; }
418460
.hire-agent-cta { flex-direction: row; align-items: center; }
419461
.hire-status-label { font-size: 0.55rem; }
462+
.hire-trust { grid-template-columns: 1fr; }
420463
}

client/src/Hire.tsx

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,14 @@ export default function Hire() {
216216
const addEv = (text: string) => setTrackEvents(prev => [...prev, { time: now(), text }])
217217

218218
// Simulate lifecycle
219-
setTimeout(() => { setTrackingStatus(1); addEv(`Job created — ${agent.price} SOL escrowed`) }, 600)
219+
setTimeout(() => { setTrackingStatus(1); addEv(`Job created — ${agent.price} SOL escrowed in PDA`) }, 600)
220+
setTimeout(() => { addEv('🔐 Task data encrypted (NaCl box) — stored in credential vault') }, 1300)
220221
setTimeout(() => { setTrackingStatus(2); addEv(`${agent.name} matched & accepted`) }, 2000)
221-
setTimeout(() => { setTrackingStatus(3); addEv(`${agent.name} staked 0.05 SOL — working...`) }, 3500)
222-
setTimeout(() => { addEv('Processing input data...') }, 5000)
222+
setTimeout(() => { setTrackingStatus(3); addEv(`${agent.name} staked 0.05 SOL as collateral — working...`) }, 3500)
223+
setTimeout(() => { addEv('🔒 Processing encrypted input data...') }, 5000)
223224
setTimeout(() => { addEv('Generating output...') }, 7000)
224-
setTimeout(() => { setTrackingStatus(4); addEv('Proof submitted on-chain') }, 9000)
225-
setTimeout(() => { setShowApprove(true); addEv('Ready for review — approve to release payment') }, 10000)
225+
setTimeout(() => { setTrackingStatus(4); addEv('🛡️ Proof hash submitted on-chain — verifiable on Solscan') }, 9000)
226+
setTimeout(() => { setShowApprove(true); addEv('Ready for review — approve to release escrowed SOL') }, 10000)
226227
}
227228

228229
function handleApprove() {
@@ -300,6 +301,38 @@ export default function Hire() {
300301
>
301302
Find Agents →
302303
</button>
304+
305+
{/* Trust & Security Badges */}
306+
<div className="hire-trust">
307+
<div className="hire-trust-item">
308+
<span className="hire-trust-icon">🔐</span>
309+
<div>
310+
<strong>End-to-End Encrypted</strong>
311+
<span>Task data encrypted with NaCl box — only you and the agent can read it</span>
312+
</div>
313+
</div>
314+
<div className="hire-trust-item">
315+
<span className="hire-trust-icon">🏦</span>
316+
<div>
317+
<strong>SOL Escrow Protection</strong>
318+
<span>Funds locked in on-chain PDA — released only after verified completion</span>
319+
</div>
320+
</div>
321+
<div className="hire-trust-item">
322+
<span className="hire-trust-icon">⚔️</span>
323+
<div>
324+
<strong>Stake Slashing</strong>
325+
<span>Agents stake SOL as collateral — slashed if work is rejected</span>
326+
</div>
327+
</div>
328+
<div className="hire-trust-item">
329+
<span className="hire-trust-icon">🛡️</span>
330+
<div>
331+
<strong>On-Chain Proof</strong>
332+
<span>Every result is hashed and verified on Solana — no trust required</span>
333+
</div>
334+
</div>
335+
</div>
303336
</section>
304337
</>
305338
)}

0 commit comments

Comments
 (0)