Remove video card shim classes

This commit is contained in:
thePR0M3TH3AN committed 2025-10-11 15:14:17 -04:00
1 parent 87d8dd7411
commit 18b1972fd8
7 files changed
+76 -108

No files matched your search

+6 -7
View File
@@ -348,18 +348,17 @@ export class VideoListView {
const shareUrl = this.buildShareUrl(video, shareBase);
const canEdit = this.utils.canEditVideo(video);
const canDelete = this.utils.canDeleteVideo(video);
const highlightClasses = [];
let cardState = "";
if (canEdit && video.isPrivate) {
highlightClasses.push("video-card--owner-private");
cardState = "private";
}
const viewerSeesBlockedNsfw =
!this.allowNsfw && video?.isNsfw === true && canEdit;
if (viewerSeesBlockedNsfw) {
highlightClasses.push("video-card--nsfw-owner");
cardState = "critical";
}
const highlightClass = highlightClasses.join(" ");
const isNewlyRendered = !previouslyRenderedIds.has(video.id);
const animationClass = isNewlyRendered ? "video-card--enter" : "";
const motionState = isNewlyRendered ? "enter" : "";
const knownPostedAt = this.utils.getKnownVideoPostedAt(video);
const normalizedPostedAt = Number.isFinite(knownPostedAt)
? Math.floor(knownPostedAt)
@@ -393,8 +392,8 @@ export class VideoListView {
pointerInfo,
timeAgo,
postedAt: normalizedPostedAt,
highlightClass,
animationClass,
cardState,
motionState,
nsfwContext: {
isNsfw: video?.isNsfw === true,
allowNsfw: this.allowNsfw,