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

@ -662,6 +662,7 @@ export default {
'Automatically replay videos when they end': '视频播放结束后自动重新播放',
'Relays used for searching notes (NIP-50)': '用于搜索笔记的服务器 (NIP-50)',
'Protected event (NIP-70)': '受保护的事件 (NIP-70)',
'Protected': '受保护'
'Protected': '受保护',
'Protected event hint': '受保护的事件NIP-70只能由作者发布。服务器将拒绝来自第三方的这些事件防止他人转播你的内容。 注意:并非所有服务器都支持受保护的事件。'
}
}