mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 02:12:26 +00:00
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:
1 parent
6794a54fba
commit
71a9eaf288
2 files changed
+12
-5
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user