feat(fof-layer1): Tauri commands + frontend UI for vouches
Node helpers (crates/core/src/node.rs): - vouch_for_peer(target): derives target X25519 pub from NodeId, inserts into own_vouch_targets, republishes bio post so the new VouchGrantBatch propagates to the receiver via CDN. - revoke_vouch_and_rotate(target): per Scott's design, revocation IS the rotation primitive. Marks target current=0, generates new V_me epoch in vouch_keys_own (prior retained, Layer 4 receiver-chain), republishes bio. Revoked persona retains old V_me → grandfathered access to old content; locked out of new content sealed under V_new. - list_vouches_given / list_vouches_received: enriched with display names via resolve_display_name. Tauri commands (crates/tauri-app/src/lib.rs): - vouch_for_peer, revoke_vouch_for_peer (single-action commands) - list_vouches_given, list_vouches_received (DTOs with camelCase) - All registered in the generate_handler! list. Frontend (frontend/index.html + app.js): - New "Vouches" section in Settings tab with side-by-side Given / Received lists. Per-row Revoke button on Given entries with confirm prompt explaining the rotation semantics. - Bio modal gains Vouch / Revoke Vouch button next to Follow/Unfollow. State derived from list_vouches_given on modal open. - loadVouches wired into the settings-tab activation handler. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d1afcec26a
commit
34c5b60686
4 changed files with 291 additions and 1 deletions
|
|
@ -198,6 +198,21 @@
|
|||
<div id="ignored-list" style="text-align:left"></div>
|
||||
</div>
|
||||
|
||||
<div class="section-card" style="text-align:center">
|
||||
<h3 style="margin-bottom:0.25rem">Vouches</h3>
|
||||
<p class="empty-hint" style="margin-bottom:0.5rem">Vouches you've given let those friends read your Friend-of-Friend posts. Vouches you've received unlock the posts of those who vouched for you. Revoking rotates your vouch key — the revoked friend keeps access to your existing posts, but not future ones.</p>
|
||||
<div style="display:flex;gap:1rem;text-align:left">
|
||||
<div style="flex:1;min-width:0">
|
||||
<h4 style="margin:0 0 0.4rem;font-size:0.9rem">Given</h4>
|
||||
<div id="vouches-given-list"></div>
|
||||
</div>
|
||||
<div style="flex:1;min-width:0">
|
||||
<h4 style="margin:0 0 0.4rem;font-size:0.9rem">Received</h4>
|
||||
<div id="vouches-received-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-card" style="text-align:center">
|
||||
<h3 style="margin-bottom:0.25rem">Updates</h3>
|
||||
<p class="empty-hint" style="margin-bottom:0.5rem">Network-wide release announcements are signed by the bootstrap anchor and arrive via the CDN. Choose which channel to follow.</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue