diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index f4709908..5f92bc10 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -297,5 +297,7 @@ "link_to_file": "رابط للملف", "support_5chan": "دعم 5chan", "images": "صور", - "load_more": "تحميل المزيد" + "load_more": "تحميل المزيد", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index d80e12d2..cc91f65e 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -297,5 +297,7 @@ "link_to_file": "ফাইলের লিংক", "support_5chan": "5chan সমর্থন করুন", "images": "ছবি", - "load_more": "আরও লোড করুন" + "load_more": "আরও লোড করুন", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index a553dbac..eb773273 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -297,5 +297,7 @@ "link_to_file": "Odkaz na soubor", "support_5chan": "Podpořte 5chan", "images": "obrázky", - "load_more": "Načíst více" + "load_more": "Načíst více", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/da/default.json b/public/translations/da/default.json index f17e1c51..3ba23a9d 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link til fil", "support_5chan": "Støt 5chan", "images": "billeder", - "load_more": "Indlæs mere" + "load_more": "Indlæs mere", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/de/default.json b/public/translations/de/default.json index b5a6aab3..1fc40ccb 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link zur Datei", "support_5chan": "5chan unterstützen", "images": "Bilder", - "load_more": "Mehr laden" + "load_more": "Mehr laden", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 190721b2..f02b9182 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -297,5 +297,7 @@ "link_to_file": "Σύνδεσμος προς αρχείο", "support_5chan": "Υποστηρίξτε το 5chan", "images": "εικόνες", - "load_more": "Φόρτωση περισσότερων" + "load_more": "Φόρτωση περισσότερων", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/en/default.json b/public/translations/en/default.json index b8f959f2..a7bd9f24 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -228,6 +228,8 @@ "bitsocial_account": "Bitsocial Account", "purge": "purge", "purge_confirm": "Purging permanently removes this content and all its replies from the database. Continue?", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible.", "mod_queue": "Mod Queue", "moderation_queue": "Moderation Queue", "queue_is_empty": "Queue is empty", diff --git a/public/translations/es/default.json b/public/translations/es/default.json index f6358d5e..e33fde9a 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -297,5 +297,7 @@ "link_to_file": "Enlace al archivo", "support_5chan": "Apoyar 5chan", "images": "imágenes", - "load_more": "Cargar más" + "load_more": "Cargar más", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 5dc0d85c..9f9215ab 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -297,5 +297,7 @@ "link_to_file": "لینک به فایل", "support_5chan": "از 5chan پشتیبانی کنید", "images": "تصاویر", - "load_more": "بارگذاری بیشتر" + "load_more": "بارگذاری بیشتر", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 6e5af732..dc149e31 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -297,5 +297,7 @@ "link_to_file": "Linkki tiedostoon", "support_5chan": "Tue 5chan", "images": "kuvat", - "load_more": "Lataa lisää" + "load_more": "Lataa lisää", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 35f6181c..4f81dde7 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link sa File", "support_5chan": "Suportahan ang 5chan", "images": "mga larawan", - "load_more": "Mag-load ng higit pa" + "load_more": "Mag-load ng higit pa", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index feaabafe..b753237b 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -297,5 +297,7 @@ "link_to_file": "Lien vers le fichier", "support_5chan": "Soutenir 5chan", "images": "images", - "load_more": "Charger plus" + "load_more": "Charger plus", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 53a4a99e..33301fa7 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -297,5 +297,7 @@ "link_to_file": "קישור לקובץ", "support_5chan": "תמוך ב-5chan", "images": "תמונות", - "load_more": "טען עוד" + "load_more": "טען עוד", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 31b5368d..3350c6a3 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -297,5 +297,7 @@ "link_to_file": "फ़ाइल का लिंक", "support_5chan": "5chan का समर्थन करें", "images": "छवियाँ", - "load_more": "और लोड करें" + "load_more": "और लोड करें", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 9f3d3ce8..9e59e9fb 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link a fájlhoz", "support_5chan": "5chan támogatása", "images": "képek", - "load_more": "További betöltése" + "load_more": "További betöltése", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 44e812cd..2f7a0fb8 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -297,5 +297,7 @@ "link_to_file": "Tautan ke File", "support_5chan": "Dukung 5chan", "images": "gambar", - "load_more": "Muat lebih banyak" + "load_more": "Muat lebih banyak", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 104cdbcf..576982a4 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link al file", "support_5chan": "Supporta 5chan", "images": "immagini", - "load_more": "Carica altro" + "load_more": "Carica altro", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index e574f2e4..d85e5980 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -297,5 +297,7 @@ "link_to_file": "ファイルへのリンク", "support_5chan": "5chanをサポート", "images": "画像", - "load_more": "さらに読み込む" + "load_more": "さらに読み込む", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 38db9b2c..805d153d 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -297,5 +297,7 @@ "link_to_file": "파일 링크", "support_5chan": "5chan 지원", "images": "이미지", - "load_more": "더 보기" + "load_more": "더 보기", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index bcf2dbc1..300b93fb 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -297,5 +297,7 @@ "link_to_file": "फाइलची लिंक", "support_5chan": "5chan चे समर्थन करा", "images": "प्रतिमा", - "load_more": "अधिक लोड करा" + "load_more": "अधिक लोड करा", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 4a0cbdcc..ff0e635e 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link naar bestand", "support_5chan": "Steun 5chan", "images": "afbeeldingen", - "load_more": "Meer laden" + "load_more": "Meer laden", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/no/default.json b/public/translations/no/default.json index de8d48ee..8d7772c6 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -297,5 +297,7 @@ "link_to_file": "Lenke til fil", "support_5chan": "Støtt 5chan", "images": "bilder", - "load_more": "Last inn mer" + "load_more": "Last inn mer", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 593fd2e9..99f2106a 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link do pliku", "support_5chan": "Wspieraj 5chan", "images": "obrazy", - "load_more": "Załaduj więcej" + "load_more": "Załaduj więcej", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 89e601ab..68ed4625 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link para o arquivo", "support_5chan": "Apoiar 5chan", "images": "imagens", - "load_more": "Carregar mais" + "load_more": "Carregar mais", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 9a2858c6..114a7db4 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -297,5 +297,7 @@ "link_to_file": "Link către fișier", "support_5chan": "Sprijiniți 5chan", "images": "imagini", - "load_more": "Încarcă mai mult" + "load_more": "Încarcă mai mult", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 95c81fc1..6aaf2dc3 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -297,5 +297,7 @@ "link_to_file": "Ссылка на файл", "support_5chan": "Поддержать 5chan", "images": "изображения", - "load_more": "Загрузить ещё" + "load_more": "Загрузить ещё", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index e49c7218..e0f57c87 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -297,5 +297,7 @@ "link_to_file": "Lidhje me skedarin", "support_5chan": "Mbështetni 5chan", "images": "imazhe", - "load_more": "Ngarko më shumë" + "load_more": "Ngarko më shumë", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index fa89c8bc..82acf314 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -297,5 +297,7 @@ "link_to_file": "Länk till fil", "support_5chan": "Stöd 5chan", "images": "bilder", - "load_more": "Ladda mer" + "load_more": "Ladda mer", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/te/default.json b/public/translations/te/default.json index fe0c9722..4222b055 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -297,5 +297,7 @@ "link_to_file": "ఫైల్కు లింక్", "support_5chan": "5chanకు మద్దతు ఇవ్వండి", "images": "చిత్రాలు", - "load_more": "మరింత లోడ్ చేయండి" + "load_more": "మరింత లోడ్ చేయండి", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 1ab00f2e..a6bd6e41 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -297,5 +297,7 @@ "link_to_file": "ลิงก์ไปยังไฟล์", "support_5chan": "สนับสนุน 5chan", "images": "รูปภาพ", - "load_more": "โหลดเพิ่มเติม" + "load_more": "โหลดเพิ่มเติม", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 5b97218d..4df9f35c 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -297,5 +297,7 @@ "link_to_file": "Dosyaya bağlantı", "support_5chan": "5chan'ı Destekle", "images": "görseller", - "load_more": "Daha fazla yükle" + "load_more": "Daha fazla yükle", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 07ad6144..6869d4a4 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -297,5 +297,7 @@ "link_to_file": "Посилання на файл", "support_5chan": "Підтримати 5chan", "images": "зображення", - "load_more": "Завантажити ще" + "load_more": "Завантажити ще", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 470e7d03..e3795b5d 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -297,5 +297,7 @@ "link_to_file": "فائل کا لنک", "support_5chan": "5chan کی حمایت کریں", "images": "تصاویر", - "load_more": "مزید لوڈ کریں" + "load_more": "مزید لوڈ کریں", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 0a345bfa..b1e19345 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -297,5 +297,7 @@ "link_to_file": "Liên kết đến tệp", "support_5chan": "Hỗ trợ 5chan", "images": "hình ảnh", - "load_more": "Tải thêm" + "load_more": "Tải thêm", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 9c91aa60..c4af4f73 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -297,5 +297,7 @@ "link_to_file": "链接到文件", "support_5chan": "支持 5chan", "images": "图片", - "load_more": "加载更多" + "load_more": "加载更多", + "purged": "purged", + "this_post_was_purged": "Purging from board database — this process is irreversible." } diff --git a/src/components/comment-content/comment-content.tsx b/src/components/comment-content/comment-content.tsx index 38145f0e..b44ea9e4 100644 --- a/src/components/comment-content/comment-content.tsx +++ b/src/components/comment-content/comment-content.tsx @@ -71,6 +71,7 @@ const CommentContent = ({ comment: post }: { comment: Comment }) => { const isMobile = useIsMobile(); const { cid, content, deleted, edit, original, parentCid, postCid, pendingApproval, quotedCids, reason, removed, state, subplebbitAddress } = post || {}; + const purged = post?.commentModeration?.purged; const banned = !!post?.author?.subplebbit?.banExpiresAt; const [showFullComment, setShowFullComment] = useState(false); @@ -127,11 +128,13 @@ const CommentContent = ({ comment: post }: { comment: Comment }) => {
{isReply && !hasFailedState && - !(deleted || removed) && + !(deleted || removed || purged) && (filteredQuotedCids.length > 0 ? filteredQuotedCids.map((cid: string) =>) : shouldShowReplyingToReply && )} - {removed ? ( + {purged ? ( + {capitalize(t('this_post_was_purged'))} + ) : removed ? ( reason ? ( <> ({t('this_post_was_removed')}) diff --git a/src/components/comment-media/comment-media.tsx b/src/components/comment-media/comment-media.tsx index 5ec52d13..30b7ed6d 100644 --- a/src/components/comment-media/comment-media.tsx +++ b/src/components/comment-media/comment-media.tsx @@ -20,13 +20,26 @@ interface MediaProps { linkHeight?: number; linkWidth?: number; parentCid?: string; + purged?: boolean; removed?: boolean; spoiler?: boolean; showThumbnail?: boolean; setShowThumbnail: (showThumbnail: boolean) => void; } -const Thumbnail = ({ commentMediaInfo, deleted, displayHeight, displayWidth, isFloatingEmbed, isOutOfFeed, isReply, removed, spoiler, setShowThumbnail }: MediaProps) => { +const Thumbnail = ({ + commentMediaInfo, + deleted, + displayHeight, + displayWidth, + isFloatingEmbed, + isOutOfFeed, + isReply, + purged, + removed, + spoiler, + setShowThumbnail, +}: MediaProps) => { const isMobile = useIsMobile(); const { patternThumbnailUrl, thumbnail, type, url } = commentMediaInfo || {}; @@ -133,7 +146,7 @@ const Thumbnail = ({ commentMediaInfo, deleted, displayHeight, displayWidth, isF ) ) : null; - return deleted || removed ? ( + return deleted || removed || purged ? ( ) : spoiler ? (
}) => { const { t } = useTranslation(); const { author, cid, deleted, locked, pinned, parentCid, postCid, reason, removed, state, subplebbitAddress, timestamp } = post || {}; + const purged = post?.commentModeration?.purged; const title = post?.title?.trim(); const { address, shortAddress } = author || {}; const displayName = author?.displayName?.trim(); @@ -222,7 +223,7 @@ const PostInfo = ({ const handleUserAddressClick = useAuthorAddressClick(); const numberOfPostsByAuthor = (() => { - if (!showUserID || deleted || removed || !shortAddress || !postCid || typeof document === 'undefined') { + if (!showUserID || deleted || removed || purged || !shortAddress || !postCid || typeof document === 'undefined') { return 0; } @@ -239,7 +240,7 @@ const PostInfo = ({ ? isReply ? alert(t('this_reply_was_deleted')) : alert(t('this_thread_was_deleted')) - : removed + : removed || purged ? isReply ? alert(t('this_reply_was_removed')) : alert(t('this_thread_was_removed')) @@ -266,7 +267,7 @@ const PostInfo = ({ return (
{isHidden ? parentCid && :); @@ -763,6 +773,7 @@ const PostDesktop = ({ }: PostProps) => { const { t } = useTranslation(); const { author, cid, content, deleted, link, linkHeight, linkWidth, pinned, postCid, removed, spoiler, state, subplebbitAddress, thumbnailUrl, parentCid } = post || {}; + const purged = post?.commentModeration?.purged; const params = useParams(); const location = useLocation(); const navigationType = useNavigationType(); @@ -969,12 +980,13 @@ const PostDesktop = ({ )} - {link && !isHidden && !(deleted || removed) && isValidURL(link) && ( + {link && !isHidden && !(deleted || removed || purged) && isValidURL(link) && (} - + {title && (title.length <= 75 ? ( {title} @@ -276,11 +277,13 @@ const PostInfo = ({ ))} - + {deleted ? ( capitalize(t('deleted')) ) : removed ? ( capitalize(t('removed')) + ) : purged ? ( + capitalize(t('purged')) ) : displayName ? ( displayName.length <= 20 ? ( displayName @@ -292,7 +295,7 @@ const PostInfo = ({ ) : ( capitalize(t('anonymous')) )} - {!(deleted || removed) && authorRole && ( + {!(deleted || removed || purged) && authorRole && ( {' '} ## Board {authorRole}{' '} @@ -310,6 +313,8 @@ const PostInfo = ({ t('deleted') ) : removed ? ( t('removed') + ) : purged ? ( + t('purged') ) : !cid && pseudonymityMode ? ( {hasFailedState ? capitalize(t('failed')) : capitalize(t('pending'))} ) : ( @@ -481,7 +486,7 @@ const PostInfo = ({ )} - {!(removed || deleted) && !isModQueue && } + {!(removed || deleted || purged) && !isModQueue && } {cid && parentCid && } {cid && !parentCid && } @@ -544,6 +549,7 @@ interface PostMediaProps { hasThumbnail: boolean; spoiler: boolean; deleted: boolean; + purged: boolean; removed: boolean; linkHeight: number; linkWidth: number; @@ -559,6 +565,7 @@ const PostMedia = ({ hasThumbnail, spoiler, deleted, + purged, removed, linkHeight, linkWidth, @@ -663,6 +670,7 @@ const PostMedia = ({ - {link && !hidden && !(deleted || removed) && isValidURL(link) && ( + {link && !hidden && !(deleted || removed || purged) && isValidURL(link) && ( )} - {!hidden && (!(removed || deleted) || ((removed || deleted) && reason)) && } + {!hidden && (!(removed || deleted || purged) || ((removed || deleted) && reason)) && } - {!isHidden && !content && !(deleted || removed) && } + {!isHidden && !content && !(deleted || removed || purged) && } {!isHidden && } {!isHidden && !isInPendingPostView && showReplies && repliesCount > 0 && !isInPostPageView && ( diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index 5032efd8..c62efbd6 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -59,6 +59,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos const directories = useDirectories(); const { author, cid, deleted, link, linkHeight, linkWidth, locked, parentCid, pinned, postCid, reason, removed, state, subplebbitAddress, timestamp, thumbnailUrl } = post || {}; + const purged = post?.commentModeration?.purged; const boardPath = subplebbitAddress ? getBoardPath(subplebbitAddress, directories) : undefined; const displayBoardPath = boardPath && subplebbitAddress @@ -217,7 +218,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos ? isReply ? alert(t('this_reply_was_deleted')) : alert(t('this_thread_was_deleted')) - : removed + : removed || purged ? isReply ? alert(t('this_reply_was_removed')) : alert(t('this_thread_was_removed')) @@ -246,13 +247,15 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos <> - {(hasThumbnail || link) && !(deleted || removed) &&- + - + {removed ? ( capitalize(t('removed')) ) : deleted ? ( capitalize(t('deleted')) + ) : purged ? ( + capitalize(t('purged')) ) : displayName ? ( displayName.length <= 20 ? ( displayName @@ -264,7 +267,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos ) : ( capitalize(t('anonymous')) )}{' '} - {!(deleted || removed) && authorRole && ( + {!(deleted || removed || purged) && authorRole && ( {' '} ## Board {authorRole}{' '} @@ -285,6 +288,8 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos lowerCase(t('removed')) ) : deleted ? ( lowerCase(t('deleted')) + ) : purged ? ( + lowerCase(t('purged')) ) : !cid && pseudonymityMode ? ( {hasFailedState ? capitalize(t('failed')) : capitalize(t('pending'))} ) : ( @@ -423,7 +428,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos )} } + {(hasThumbnail || link) && !(deleted || removed || purged) && } > ); }; @@ -431,6 +436,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles, threadNumber }: Pos const PostMediaContent = ({ post, link }: { post: any; link: string }) => { const [showThumbnail, setShowThumbnail] = useState(true); const { thumbnailUrl, linkWidth, linkHeight, spoiler, deleted, removed, parentCid } = post || {}; + const purged = post?.commentModeration?.purged; const commentMediaInfo = useCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight); return ( @@ -438,6 +444,7 @@ const PostMediaContent = ({ post, link }: { post: any; link: string }) => { - {!hidden && (!(removed || deleted) || ((removed || deleted) && reason)) && } + {!hidden && (!(removed || deleted || purged) || ((removed || deleted) && reason)) && } diff --git a/src/views/post/post.tsx b/src/views/post/post.tsx index d22bbe75..e124021a 100644 --- a/src/views/post/post.tsx +++ b/src/views/post/post.tsx @@ -110,6 +110,7 @@ export const Post = memo( prev?.pinned === next?.pinned && prev?.removed === next?.removed && prev?.deleted === next?.deleted && + prev?.commentModeration?.purged === next?.commentModeration?.purged && prevProps.showAllReplies === nextProps.showAllReplies && prevProps.showReplies === nextProps.showReplies && prevProps.targetReplyCid === nextProps.targetReplyCid &&