feat: add offline highlight creation with local relay tracking

- Add relay tracking to Highlight type (publishedRelays, isLocalOnly fields)
- Create utility functions to identify local relays (localhost/127.0.0.1)
- Update highlight creation service to track which relays received the event
- Detect when highlights are only on local relays and mark accordingly
- Add visual indicator in UI for local-only highlights with amber badge
- Enable immediate display of highlights created offline
- Ensure highlights work even when only local relay is available
This commit is contained in:
Gigi
2025-10-09 12:40:04 +01:00
parent aa8332831f
commit 6636d540aa
6 changed files with 86 additions and 10 deletions

View File

@@ -15,5 +15,8 @@ export interface Highlight {
comment?: string // optional comment about the highlight
// Level classification (computed based on user's context)
level?: HighlightLevel
// Relay tracking for offline/local-only highlights
publishedRelays?: string[] // URLs of relays that acknowledged this event
isLocalOnly?: boolean // true if only published to local relays
}