feat: add explicit protected event toggle in post editor

Add a Switch control next to the relay selector for users to explicitly
enable/disable NIP-70 protected events. Auto-enables when relay
conditions suggest it (no optimal relays), but respects user override.
Includes a help popover explaining protected events with a note that
not all relays support them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
codytseng 2026-03-19 23:03:56 +08:00
parent bd6340bbc7
commit 6cca3969ce
20 changed files with 96 additions and 34 deletions

View file

@ -691,6 +691,7 @@ export default {
'Automatically replay videos when they end': 'Reproduzir automaticamente os vídeos quando terminarem',
'Relays used for searching notes (NIP-50)': 'Relés usados para pesquisar notas (NIP-50)',
'Protected event (NIP-70)': 'Evento protegido (NIP-70)',
'Protected': 'Protegido'
'Protected': 'Protegido',
'Protected event hint': 'Eventos protegidos (NIP-70) só podem ser publicados pelo autor. Os relés rejeitarão estes eventos de terceiros, impedindo que outros retransmitam o seu conteúdo. Nota: nem todos os relés suportam eventos protegidos.'
}
}