feat: add event details modal with edit history navigation

- Added `EventDetailsModal` to display raw JSON and metadata.
- Implemented `open-channel` action to navigate to creator profile.
- Fixed profile image loading by checking `creatorPicture` and `creator.picture`.
- Added `hideModal()` to `Application` class to fix crash in `openCreatorChannel`.
- Wired up "Event Details" menu option in video card menu.
- Ensured edit history is sorted Newest First for navigation.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-14 20:55:29 +00:00
1 parent 6794a54fba
commit 71a9eaf288
2 files changed
+12 -5

No files matched your search

+7
View File
@@ -254,6 +254,13 @@ class Application {
}
}
hideModal() {
if (this.videoModal) {
this.videoModal.close();
}
// Also clear the active modal state if tracked elsewhere, though videoModal.close() usually handles it.
}
loadSavedProfilesFromStorage() {
const result = this.authService.loadSavedProfilesFromStorage();
this.renderSavedProfiles();
+5 -5
View File
@@ -273,12 +273,12 @@ export class EventDetailsModal {
if (authorNameEl) {
// If we have profile data attached to the video object (which NostrService usually does)
const name = video.authorName || video.profile?.name || video.profile?.display_name || "Unknown";
const name = video.authorName || video.profile?.name || video.profile?.display_name || video.creatorName || video.creator?.name || "Unknown";
authorNameEl.textContent = name;
}
if (authorPicEl) {
const picCandidate = video.authorPicture || video.profile?.picture || "";
const picCandidate = video.authorPicture || video.profile?.picture || video.creatorPicture || video.creator?.picture || "";
const pic = sanitizeProfileMediaUrl(picCandidate) || DEFAULT_PROFILE_AVATAR;
authorPicEl.src = pic;
}
@@ -340,9 +340,9 @@ export class EventDetailsModal {
const enrichedHistory = history.map(h => ({
...h,
profile,
authorName: video.authorName,
authorPicture: video.authorPicture,
authorNpub: video.authorNpub
authorName: video.authorName || video.creatorName,
authorPicture: video.authorPicture || video.creatorPicture,
authorNpub: video.authorNpub || video.creatorNpub
}));
this.history = enrichedHistory;