mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp. Backfill `published_at` during edit if missing to preserve original date. Add "(edited)" label to video cards for modified content. Display "Last Edited: [Date]" on video player modal.
This commit is contained in:
1 parent
1ef8459fd6
commit
1d3c827f62
4 files changed
+112
-6
No files matched your search
@@ -951,6 +951,18 @@ export class VideoCard {
|
||||
this.viewCountEl = view;
|
||||
}
|
||||
|
||||
if (
|
||||
this.postedAt !== null &&
|
||||
Number.isFinite(this.video?.created_at) &&
|
||||
this.video.created_at > this.postedAt + 60
|
||||
) {
|
||||
const edited = this.createElement("span", {
|
||||
classNames: ["ml-1"],
|
||||
textContent: "(edited)",
|
||||
});
|
||||
metadata.appendChild(edited);
|
||||
}
|
||||
|
||||
authorMeta.appendChild(authorName);
|
||||
authorMeta.appendChild(metadata);
|
||||
|
||||
|
||||
Reference in new issue
Block a user