From 52219b840dc9f01839ca4486a7e6aef46d14f7a4 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 9 Sep 2023 17:49:35 +0200 Subject: [PATCH] update embeds thread, mobile --- src/components/views/Board.jsx | 32 ++++- src/components/views/Thread.jsx | 245 ++++++++++++++++++++------------ 2 files changed, 181 insertions(+), 96 deletions(-) diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index 8d2773f2..e4f25ca7 100755 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -2756,7 +2756,35 @@ const Board = () => { {reply.link ? (
{replyMediaInfo?.url ? ( - replyMediaInfo.type === "webpage" ? ( + replyMediaInfo.type === "iframe" ? ( +
+ + {(isMobileReplyThumbnailClicked[index] && replyMediaInfo.url ? ( +
+ +
+ ) : replyMediaInfo.thumbnail ? ( + thumbnail {handleThumbnailClick(index, 'mobileReply')}} + style={{cursor: "pointer"}} + onError={(e) => e.target.src = fallbackImgUrl} /> + ) : {handleThumbnailClick(index, 'mobileReply')}}>Embed)} + {replyMediaInfo?.type === "video" || replyMediaInfo?.type === "iframe" ? ( + isMobileReplyThumbnailClicked[index] ? ( +
+ {handleThumbnailClick(index, 'mobileReply')}} + >Close +
+ ) : ( +
webpage
+ )) :
webpage
} +
+
+ ) : replyMediaInfo.type === "webpage" ? (
{reply.thumbnailUrl ? ( @@ -2781,7 +2809,7 @@ const Board = () => {
) : replyMediaInfo.type === "video" ? ( - + {isMobileReplyThumbnailClicked[index] ? ( - ) : null} + )}
{commentMediaInfo?.type === 'iframe' && (
- {(isThreadThumbnailClicked[index] || !commentMediaInfo.thumbnail) && commentMediaInfo.embedUrl ? ( -