From 1abc8410cd09e8d1b79df6809a9fea0241a3ae4c Mon Sep 17 00:00:00 2001 From: plebeius Date: Fri, 2 Jan 2026 17:06:25 +0100 Subject: [PATCH] feat(moderation): add purge action to edit menu --- public/translations/ar/default.json | 6 ++- public/translations/bn/default.json | 6 ++- public/translations/cs/default.json | 6 ++- public/translations/da/default.json | 6 ++- public/translations/de/default.json | 6 ++- public/translations/el/default.json | 6 ++- public/translations/en/default.json | 4 ++ public/translations/es/default.json | 6 ++- public/translations/fa/default.json | 6 ++- public/translations/fi/default.json | 6 ++- public/translations/fil/default.json | 6 ++- public/translations/fr/default.json | 6 ++- public/translations/he/default.json | 6 ++- public/translations/hi/default.json | 6 ++- public/translations/hu/default.json | 6 ++- public/translations/id/default.json | 6 ++- public/translations/it/default.json | 6 ++- public/translations/ja/default.json | 6 ++- public/translations/ko/default.json | 6 ++- public/translations/mr/default.json | 6 ++- public/translations/nl/default.json | 6 ++- public/translations/no/default.json | 6 ++- public/translations/pl/default.json | 6 ++- public/translations/pt/default.json | 6 ++- public/translations/ro/default.json | 6 ++- public/translations/ru/default.json | 6 ++- public/translations/sq/default.json | 6 ++- public/translations/sv/default.json | 6 ++- public/translations/te/default.json | 6 ++- public/translations/th/default.json | 6 ++- public/translations/tr/default.json | 6 ++- public/translations/uk/default.json | 6 ++- public/translations/ur/default.json | 6 ++- public/translations/vi/default.json | 6 ++- public/translations/zh/default.json | 6 ++- src/components/edit-menu/edit-menu.module.css | 4 ++ src/components/edit-menu/edit-menu.tsx | 45 +++++++++++++++++-- 37 files changed, 219 insertions(+), 38 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 7d560bb6..1f432dbf 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "لوحات NSFW فقط", "worksafe_boards_only": "لوحات آمنة للعمل فقط", "bitsocial_account": "حساب Bitsocial", - "p2p_options": "خيارات P2P" + "p2p_options": "خيارات P2P", + "purge": "حذف نهائي", + "purge_confirm": "سيؤدي الحذف النهائي إلى إزالة هذا المحتوى وجميع الردود عليه من قاعدة البيانات بشكل دائم. متابعة؟", + "this_thread_was_purged": "تم حذف هذا الموضوع نهائياً من قاعدة البيانات", + "this_reply_was_purged": "تم حذف هذا الرد نهائياً من قاعدة البيانات" } diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index b44b6761..503ad3e1 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "NSFW বোর্ড শুধুমাত্র", "worksafe_boards_only": "কাজের জন্য নিরাপদ বোর্ড শুধুমাত্র", "bitsocial_account": "Bitsocial অ্যাকাউন্ট", - "p2p_options": "P2P বিকল্প" + "p2p_options": "P2P বিকল্প", + "purge": "সর্বনাশ", + "purge_confirm": "পার্জ করা এই সামগ্রী এবং এর সমস্ত উত্তরকে ডাটাবেস থেকে স্থায়ীভাবে সরিয়ে দেবে। চালিয়ে যান?", + "this_thread_was_purged": "এই থ্রেডটি ডাটাবেস থেকে স্থায়ীভাবে সরানো হয়েছে", + "this_reply_was_purged": "এই উত্তরটি ডাটাবেস থেকে স্থায়ীভাবে সরানো হয়েছে" } diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 50cf5c70..cdd6833e 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Pouze NSFW desky", "worksafe_boards_only": "Pouze bezpečné desky", "bitsocial_account": "Účet Bitsocial", - "p2p_options": "Možnosti P2P" + "p2p_options": "Možnosti P2P", + "purge": "vymazat", + "purge_confirm": "Vymazání trvale odstraní tento obsah a všechny jeho odpovědi z databáze. Pokračovat?", + "this_thread_was_purged": "Toto vlákno bylo trvale vymazáno z databáze", + "this_reply_was_purged": "Tato odpověď byla trvale vymazána z databáze" } diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 17f99e7f..e6369fbb 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Kun NSFW-tavler", "worksafe_boards_only": "Kun arbejdssikre tavler", "bitsocial_account": "Bitsocial-konto", - "p2p_options": "P2P-indstillinger" + "p2p_options": "P2P-indstillinger", + "purge": "slet", + "purge_confirm": "Sletning fjerner permanent dette indhold og alle dets svar fra databasen. Fortsætte?", + "this_thread_was_purged": "Denne tråd blev permanent slettet fra databasen", + "this_reply_was_purged": "Dette svar blev permanent slettet fra databasen" } diff --git a/public/translations/de/default.json b/public/translations/de/default.json index a3a392aa..a9a79f32 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Nur NSFW-Boards", "worksafe_boards_only": "Nur arbeitsplatzsichere Boards", "bitsocial_account": "Bitsocial-Konto", - "p2p_options": "P2P-Optionen" + "p2p_options": "P2P-Optionen", + "purge": "löschen", + "purge_confirm": "Das Löschen entfernt diesen Inhalt und alle Antworten dauerhaft aus der Datenbank. Fortfahren?", + "this_thread_was_purged": "Dieser Thread wurde dauerhaft aus der Datenbank gelöscht", + "this_reply_was_purged": "Diese Antwort wurde dauerhaft aus der Datenbank gelöscht" } diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 1691fa5b..86830bbd 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Μόνο σανίδες NSFW", "worksafe_boards_only": "Μόνο ασφαλείς σανίδες", "bitsocial_account": "Λογαριασμός Bitsocial", - "p2p_options": "Επιλογές P2P" + "p2p_options": "Επιλογές P2P", + "purge": "εκκαθάριση", + "purge_confirm": "Η εκκαθάριση θα αφαιρέσει μόνιμα αυτό το περιεχόμενο και όλες τις απαντήσεις του από τη βάση δεδομένων. Συνέχεια;", + "this_thread_was_purged": "Αυτό το νήμα εκκαθαρίστηκε μόνιμα από τη βάση δεδομένων", + "this_reply_was_purged": "Αυτή η απάντηση εκκαθαρίστηκε μόνιμα από τη βάση δεδομένων" } diff --git a/public/translations/en/default.json b/public/translations/en/default.json index ec5b4675..abeeeac0 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -76,6 +76,10 @@ "challenge_counter": "{{index}} of {{total}}", "embed": "embed", "remove": "remove", + "purge": "purge", + "purge_confirm": "Purging permanently removes this content and all its replies from the database. Continue?", + "this_thread_was_purged": "This thread was permanently purged from the database", + "this_reply_was_purged": "This reply was permanently purged from the database", "download_latest_desktop": "Download the latest desktop version here: {{link}}", "new_stable_version": "New stable version available, 5chan v{{newVersion}}. You are using 5chan v{{oldVersion}}.", "refresh_to_update": "Refresh the page to update", diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 51c9f269..9b637214 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Solo tablas NSFW", "worksafe_boards_only": "Solo tablas seguras para el trabajo", "bitsocial_account": "Cuenta Bitsocial", - "p2p_options": "Opciones P2P" + "p2p_options": "Opciones P2P", + "purge": "purgar", + "purge_confirm": "Purgar eliminará permanentemente este contenido y todas sus respuestas de la base de datos. ¿Continuar?", + "this_thread_was_purged": "Este hilo fue purgado permanentemente de la base de datos", + "this_reply_was_purged": "Esta respuesta fue purgada permanentemente de la base de datos" } diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 85b5d20a..2fece24f 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "فقط تابلوهای NSFW", "worksafe_boards_only": "فقط تابلوهای ایمن برای کار", "bitsocial_account": "حساب Bitsocial", - "p2p_options": "گزینه‌های P2P" + "p2p_options": "گزینه‌های P2P", + "purge": "پاکسازی", + "purge_confirm": "پاکسازی این محتوا و تمام پاسخ‌های آن را به طور دائم از پایگاه داده حذف می‌کند. ادامه دهید؟", + "this_thread_was_purged": "این موضوع به طور دائم از پایگاه داده پاکسازی شد", + "this_reply_was_purged": "این پاسخ به طور دائم از پایگاه داده پاکسازی شد" } diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 3f7f7027..6e439eb3 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Vain NSFW-taulut", "worksafe_boards_only": "Vain työturvalliset taulut", "bitsocial_account": "Bitsocial-tili", - "p2p_options": "P2P-asetukset" + "p2p_options": "P2P-asetukset", + "purge": "poistaa", + "purge_confirm": "Poistaminen poistaa pysyvästi tämän sisällön ja kaikki sen vastaukset tietokannasta. Jatketaanko?", + "this_thread_was_purged": "Tämä ketju poistettiin pysyvästi tietokannasta", + "this_reply_was_purged": "Tämä vastaus poistettiin pysyvästi tietokannasta" } diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 58f43116..8b82aa05 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "NSFW boards lang", "worksafe_boards_only": "Worksafe boards lang", "bitsocial_account": "Account ng Bitsocial", - "p2p_options": "Mga Opsyon ng P2P" + "p2p_options": "Mga Opsyon ng P2P", + "purge": "purga", + "purge_confirm": "Ang pag-purge ay permanenteng mag-aalis ng nilalamang ito at lahat ng mga tugon nito mula sa database. Magpatuloy?", + "this_thread_was_purged": "Ang thread na ito ay permanenteng na-purge mula sa database", + "this_reply_was_purged": "Ang sagot na ito ay permanenteng na-purge mula sa database" } diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index ac9f8f63..4586140f 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Tableaux NSFW uniquement", "worksafe_boards_only": "Tableaux sûrs uniquement", "bitsocial_account": "Compte Bitsocial", - "p2p_options": "Options P2P" + "p2p_options": "Options P2P", + "purge": "purger", + "purge_confirm": "La purge supprime définitivement ce contenu et toutes ses réponses de la base de données. Continuer?", + "this_thread_was_purged": "Ce fil de discussion a été définitivement purgé de la base de données", + "this_reply_was_purged": "Cette réponse a été définitivement purgée de la base de données" } diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 782b2e23..28203b97 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "לוחות NSFW בלבד", "worksafe_boards_only": "לוחות בטוחים לעבודה בלבד", "bitsocial_account": "חשבון Bitsocial", - "p2p_options": "אפשרויות P2P" + "p2p_options": "אפשרויות P2P", + "purge": "למחוק", + "purge_confirm": "מחיקה תסיר לצמיתות את התוכן הזה ואת כל התגובות שלו מהמסד הנתונים. להמשיך?", + "this_thread_was_purged": "האשכול הזה נמחק לצמיתות מהמסד הנתונים", + "this_reply_was_purged": "התגובה הזו נמחקה לצמיתות מהמסד הנתונים" } diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 469f7f3b..2fb10728 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "केवल NSFW बोर्ड", "worksafe_boards_only": "केवल कार्य-सुरक्षित बोर्ड", "bitsocial_account": "Bitsocial खाता", - "p2p_options": "P2P विकल्प" + "p2p_options": "P2P विकल्प", + "purge": "हटाएं", + "purge_confirm": "पर्ज करने से यह सामग्री और इसकी सभी प्रतिक्रियाएं डेटाबेस से स्थायी रूप से हट जाएंगी। जारी रखें?", + "this_thread_was_purged": "यह थ्रेड डेटाबेस से स्थायी रूप से हटा दिया गया था", + "this_reply_was_purged": "यह प्रतिक्रिया डेटाबेस से स्थायी रूप से हटा दी गई थी" } diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index fe66c6e5..c7315195 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Csak NSFW táblák", "worksafe_boards_only": "Csak munkavédelmi táblák", "bitsocial_account": "Bitsocial fiók", - "p2p_options": "P2P beállítások" + "p2p_options": "P2P beállítások", + "purge": "törlés", + "purge_confirm": "A törlés véglegesen eltávolítja ezt a tartalmat és az összes válaszát az adatbázisból. Folytatás?", + "this_thread_was_purged": "Ez a szál véglegesen törölve lett az adatbázisból", + "this_reply_was_purged": "Ez a válasz véglegesen törölve lett az adatbázisból" } diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 3c46e89e..c8ed60f9 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Hanya papan NSFW", "worksafe_boards_only": "Hanya papan aman untuk kerja", "bitsocial_account": "Akun Bitsocial", - "p2p_options": "Opsi P2P" + "p2p_options": "Opsi P2P", + "purge": "hapus", + "purge_confirm": "Menghapus akan menghapus konten ini dan semua balasannya secara permanen dari database. Lanjutkan?", + "this_thread_was_purged": "Thread ini telah dihapus secara permanen dari database", + "this_reply_was_purged": "Balasan ini telah dihapus secara permanen dari database" } diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 9be10737..18b63b2e 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Solo bacheche NSFW", "worksafe_boards_only": "Solo bacheche sicure per il lavoro", "bitsocial_account": "Account Bitsocial", - "p2p_options": "Opzioni P2P" + "p2p_options": "Opzioni P2P", + "purge": "elimina", + "purge_confirm": "L'eliminazione rimuoverà permanentemente questo contenuto e tutte le sue risposte dal database. Continuare?", + "this_thread_was_purged": "Questa discussione è stata eliminata definitivamente dal database", + "this_reply_was_purged": "Questa risposta è stata eliminata definitivamente dal database" } diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index f69a3eb2..734ce3df 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "NSFWボードのみ", "worksafe_boards_only": "職場安全ボードのみ", "bitsocial_account": "Bitsocialアカウント", - "p2p_options": "P2Pオプション" + "p2p_options": "P2Pオプション", + "purge": "削除", + "purge_confirm": "削除すると、このコンテンツとそのすべての返信がデータベースから永続的に削除されます。続行しますか?", + "this_thread_was_purged": "このスレッドはデータベースから永続的に削除されました", + "this_reply_was_purged": "この返信はデータベースから永続的に削除されました" } diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 082e74a1..e1a60e7c 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "NSFW 게시판만", "worksafe_boards_only": "직장 안전 게시판만", "bitsocial_account": "Bitsocial 계정", - "p2p_options": "P2P 옵션" + "p2p_options": "P2P 옵션", + "purge": "삭제", + "purge_confirm": "삭제하면 이 콘텐츠와 모든 답글이 데이터베이스에서 영구적으로 제거됩니다. 계속하시겠습니까?", + "this_thread_was_purged": "이 스레드가 데이터베이스에서 영구적으로 삭제되었습니다", + "this_reply_was_purged": "이 답글이 데이터베이스에서 영구적으로 삭제되었습니다" } diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 5da54442..b184e59e 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "फक्त NSFW बोर्ड", "worksafe_boards_only": "फक्त कामासाठी सुरक्षित बोर्ड", "bitsocial_account": "Bitsocial खाते", - "p2p_options": "P2P पर्याय" + "p2p_options": "P2P पर्याय", + "purge": "हटवा", + "purge_confirm": "पर्ज करणे या सामग्रीला आणि त्याच्या सर्व प्रतिक्रियांना डेटाबेसमधून कायमस्वरूपी काढून टाकेल. पुढे जाऊ?", + "this_thread_was_purged": "हा थ्रेड डेटाबेसमधून कायमस्वरूपी हटवला गेला", + "this_reply_was_purged": "ही प्रतिक्रिया डेटाबेसमधून कायमस्वरूपी हटवली गेली" } diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 53546a88..5f4c69b0 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Alleen NSFW-borden", "worksafe_boards_only": "Alleen werkveilige borden", "bitsocial_account": "Bitsocial-account", - "p2p_options": "P2P-opties" + "p2p_options": "P2P-opties", + "purge": "verwijderen", + "purge_confirm": "Verwijderen verwijdert deze inhoud en alle antwoorden ervan permanent uit de database. Doorgaan?", + "this_thread_was_purged": "Deze thread is permanent verwijderd uit de database", + "this_reply_was_purged": "Dit antwoord is permanent verwijderd uit de database" } diff --git a/public/translations/no/default.json b/public/translations/no/default.json index de061f74..7434455a 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Kun NSFW-tavler", "worksafe_boards_only": "Kun arbeidssikre tavler", "bitsocial_account": "Bitsocial-konto", - "p2p_options": "P2P-alternativer" + "p2p_options": "P2P-alternativer", + "purge": "slette", + "purge_confirm": "Sletting fjerner permanent dette innholdet og alle svarene fra databasen. Fortsette?", + "this_thread_was_purged": "Denne tråden ble permanent slettet fra databasen", + "this_reply_was_purged": "Dette svaret ble permanent slettet fra databasen" } diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 1253c1bd..e51aea40 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Tylko tablice NSFW", "worksafe_boards_only": "Tylko bezpieczne tablice", "bitsocial_account": "Konto Bitsocial", - "p2p_options": "Opcje P2P" + "p2p_options": "Opcje P2P", + "purge": "usuń", + "purge_confirm": "Usunięcie trwale usunie tę zawartość i wszystkie odpowiedzi z bazy danych. Kontynuować?", + "this_thread_was_purged": "Ten wątek został trwale usunięty z bazy danych", + "this_reply_was_purged": "Ta odpowiedź została trwale usunięta z bazy danych" } diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 79562058..73af2fdf 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Apenas quadros NSFW", "worksafe_boards_only": "Apenas quadros seguros para o trabalho", "bitsocial_account": "Conta Bitsocial", - "p2p_options": "Opções P2P" + "p2p_options": "Opções P2P", + "purge": "purgar", + "purge_confirm": "Purgar removerá permanentemente este conteúdo e todas as suas respostas do banco de dados. Continuar?", + "this_thread_was_purged": "Este tópico foi purgado permanentemente do banco de dados", + "this_reply_was_purged": "Esta resposta foi purgada permanentemente do banco de dados" } diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index ec742dd6..ebfa6b13 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Doar panouri NSFW", "worksafe_boards_only": "Doar panouri sigure pentru muncă", "bitsocial_account": "Cont Bitsocial", - "p2p_options": "Opțiuni P2P" + "p2p_options": "Opțiuni P2P", + "purge": "șterge", + "purge_confirm": "Ștergerea va elimina permanent acest conținut și toate răspunsurile sale din baza de date. Continuați?", + "this_thread_was_purged": "Acest fir a fost șters permanent din baza de date", + "this_reply_was_purged": "Acest răspuns a fost șters permanent din baza de date" } diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 5dede959..889db241 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Только доски NSFW", "worksafe_boards_only": "Только безопасные для работы доски", "bitsocial_account": "Аккаунт Bitsocial", - "p2p_options": "Опции P2P" + "p2p_options": "Опции P2P", + "purge": "удалить", + "purge_confirm": "Удаление навсегда удалит этот контент и все ответы на него из базы данных. Продолжить?", + "this_thread_was_purged": "Эта ветка была окончательно удалена из базы данных", + "this_reply_was_purged": "Этот ответ был окончательно удален из базы данных" } diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 22cc354a..6d734af1 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Vetëm tabelat NSFW", "worksafe_boards_only": "Vetëm tabelat e sigurta për punë", "bitsocial_account": "Llogaria Bitsocial", - "p2p_options": "Opsionet P2P" + "p2p_options": "Opsionet P2P", + "purge": "fshi", + "purge_confirm": "Fshirja do të heqë përgjithmonë këtë përmbajtje dhe të gjitha përgjigjet e saj nga baza e të dhënave. Vazhdo?", + "this_thread_was_purged": "Kjo fije u fshi përgjithmonë nga baza e të dhënave", + "this_reply_was_purged": "Kjo përgjigje u fshi përgjithmonë nga baza e të dhënave" } diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index b56d3d11..6cf857cf 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Endast NSFW-tavlor", "worksafe_boards_only": "Endast arbetsplats-säkra tavlor", "bitsocial_account": "Bitsocial-konto", - "p2p_options": "P2P-alternativ" + "p2p_options": "P2P-alternativ", + "purge": "radera", + "purge_confirm": "Raderande tar permanent bort detta innehåll och alla dess svar från databasen. Fortsätta?", + "this_thread_was_purged": "Denna tråd raderades permanent från databasen", + "this_reply_was_purged": "Detta svar raderades permanent från databasen" } diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 753ec088..33ef8dff 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "NSFW బోర్డులు మాత్రమే", "worksafe_boards_only": "పని కోసం సురక్షితమైన బోర్డులు మాత్రమే", "bitsocial_account": "Bitsocial ఖాతా", - "p2p_options": "P2P ఎంపికలు" + "p2p_options": "P2P ఎంపికలు", + "purge": "తొలగించు", + "purge_confirm": "పర్జ్ చేయడం ఈ కంటెంట్ మరియు దాని అన్ని ప్రతిస్పందనలను డేటాబేస్ నుండి శాశ్వతంగా తొలగిస్తుంది. కొనసాగించాలా?", + "this_thread_was_purged": "ఈ థ్రెడ్ డేటాబేస్ నుండి శాశ్వతంగా తొలగించబడింది", + "this_reply_was_purged": "ఈ ప్రతిస్పందన డేటాబేస్ నుండి శాశ్వతంగా తొలగించబడింది" } diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 2d5ee898..a2e3720d 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "บอร์ด NSFW เท่านั้น", "worksafe_boards_only": "บอร์ดที่ปลอดภัยสำหรับงานเท่านั้น", "bitsocial_account": "บัญชี Bitsocial", - "p2p_options": "ตัวเลือก P2P" + "p2p_options": "ตัวเลือก P2P", + "purge": "ลบ", + "purge_confirm": "การลบจะลบเนื้อหานี้และคำตอบทั้งหมดออกจากฐานข้อมูลอย่างถาวร ดำเนินการต่อหรือไม่?", + "this_thread_was_purged": "กระทู้นี้ถูกลบออกจากฐานข้อมูลอย่างถาวร", + "this_reply_was_purged": "คำตอบนี้ถูกลบออกจากฐานข้อมูลอย่างถาวร" } diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index e23d9b5e..0f359f6c 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Sadece NSFW panoları", "worksafe_boards_only": "Sadece iş için güvenli panolar", "bitsocial_account": "Bitsocial Hesabı", - "p2p_options": "P2P Seçenekleri" + "p2p_options": "P2P Seçenekleri", + "purge": "temizle", + "purge_confirm": "Temizleme, bu içeriği ve tüm yanıtlarını veritabanından kalıcı olarak kaldıracaktır. Devam edilsin mi?", + "this_thread_was_purged": "Bu konu veritabanından kalıcı olarak temizlendi", + "this_reply_was_purged": "Bu yanıt veritabanından kalıcı olarak temizlendi" } diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 54e35d13..2dc1f56d 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Тільки дошки NSFW", "worksafe_boards_only": "Тільки безпечні для роботи дошки", "bitsocial_account": "Обліковий запис Bitsocial", - "p2p_options": "Опції P2P" + "p2p_options": "Опції P2P", + "purge": "видалити", + "purge_confirm": "Видалення назавжди видалить цей контент і всі відповіді на нього з бази даних. Продовжити?", + "this_thread_was_purged": "Ця гілка була остаточно видалена з бази даних", + "this_reply_was_purged": "Ця відповідь була остаточно видалена з бази даних" } diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index a4c3ac32..4effc110 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "صرف NSFW بورڈز", "worksafe_boards_only": "صرف کام کے لیے محفوظ بورڈز", "bitsocial_account": "Bitsocial اکاؤنٹ", - "p2p_options": "P2P اختیارات" + "p2p_options": "P2P اختیارات", + "purge": "ختم کرنا", + "purge_confirm": "پرج کرنا اس مواد اور اس کی تمام جوابات کو ڈیٹا بیس سے مستقل طور پر ہٹا دے گا۔ جاری رکھیں؟", + "this_thread_was_purged": "یہ تھریڈ ڈیٹا بیس سے مستقل طور پر ہٹا دیا گیا تھا", + "this_reply_was_purged": "یہ جواب ڈیٹا بیس سے مستقل طور پر ہٹا دیا گیا تھا" } diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index b38ce22a..b5e6476f 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "Chỉ bảng NSFW", "worksafe_boards_only": "Chỉ bảng an toàn cho công việc", "bitsocial_account": "Tài khoản Bitsocial", - "p2p_options": "Tùy chọn P2P" + "p2p_options": "Tùy chọn P2P", + "purge": "xóa", + "purge_confirm": "Xóa sẽ loại bỏ vĩnh viễn nội dung này và tất cả các phản hồi của nó khỏi cơ sở dữ liệu. Tiếp tục?", + "this_thread_was_purged": "Chủ đề này đã bị xóa vĩnh viễn khỏi cơ sở dữ liệu", + "this_reply_was_purged": "Phản hồi này đã bị xóa vĩnh viễn khỏi cơ sở dữ liệu" } diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 64a4b14e..38041823 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -304,5 +304,9 @@ "nsfw_boards_only": "仅NSFW板块", "worksafe_boards_only": "仅工作安全板块", "bitsocial_account": "Bitsocial账户", - "p2p_options": "P2P选项" + "p2p_options": "P2P选项", + "purge": "清除", + "purge_confirm": "清除将永久删除此内容及其所有回复。继续吗?", + "this_thread_was_purged": "此主题已从数据库中永久清除", + "this_reply_was_purged": "此回复已从数据库中永久清除" } diff --git a/src/components/edit-menu/edit-menu.module.css b/src/components/edit-menu/edit-menu.module.css index cb370f4f..b5c6497c 100644 --- a/src/components/edit-menu/edit-menu.module.css +++ b/src/components/edit-menu/edit-menu.module.css @@ -37,6 +37,10 @@ padding-bottom: 2px; } +.purgeItem { + color: #d00; +} + .menuItem input[type="text"], .editTextarea { padding: 2px; diff --git a/src/components/edit-menu/edit-menu.tsx b/src/components/edit-menu/edit-menu.tsx index 3c46b1ea..ae98ebf7 100644 --- a/src/components/edit-menu/edit-menu.tsx +++ b/src/components/edit-menu/edit-menu.tsx @@ -33,6 +33,7 @@ const EditMenu = ({ post }: { post: Comment }) => { const { t } = useTranslation(); const isMobile = useIsMobile(); const { author, cid, content, deleted, locked, parentCid, pinned, postCid, reason, removed, spoiler, subplebbitAddress } = post || {}; + const purged = post?.commentModeration?.purged ?? false; const [isEditMenuOpen, setIsEditMenuOpen] = useState(false); const [isContentEditorOpen, setIsContentEditorOpen] = useState(false); @@ -63,14 +64,15 @@ const EditMenu = ({ post }: { post: Comment }) => { subplebbitAddress, // Author edit properties content: isAccountCommentAuthor ? content : undefined, - deleted: isAccountCommentAuthor ? deleted ?? false : undefined, - spoiler: isAccountCommentAuthor ? spoiler ?? false : undefined, + deleted: isAccountCommentAuthor ? (deleted ?? false) : undefined, + spoiler: isAccountCommentAuthor ? (spoiler ?? false) : undefined, // Mod edit properties commentModeration: isAccountMod ? { locked: locked ?? false, pinned: pinned ?? false, removed: removed ?? false, + purged: purged ?? false, spoiler: spoiler ?? false, reason, banExpiresAt: post?.commentModeration?.banExpiresAt, @@ -83,7 +85,7 @@ const EditMenu = ({ post }: { post: Comment }) => { alert('Comment edit failed. ' + error.message); }, }; - }, [isAccountMod, isAccountCommentAuthor, cid, content, deleted, locked, pinned, reason, removed, spoiler, subplebbitAddress, post]); + }, [isAccountMod, isAccountCommentAuthor, cid, content, deleted, locked, pinned, reason, removed, purged, spoiler, subplebbitAddress, post]); const [publishCommentEditOptions, setPublishCommentEditOptions] = useState(defaultPublishEditOptions); @@ -115,6 +117,7 @@ const EditMenu = ({ post }: { post: Comment }) => { locked: parentCid === undefined ? publishCommentEditOptions.commentModeration?.locked : undefined, pinned: publishCommentEditOptions.commentModeration?.pinned, removed: publishCommentEditOptions.commentModeration?.removed, + purged: publishCommentEditOptions.commentModeration?.purged, spoiler: publishCommentEditOptions.commentModeration?.spoiler, reason: publishCommentEditOptions.reason, banExpiresAt: publishCommentEditOptions.commentModeration?.banExpiresAt, @@ -171,6 +174,33 @@ const EditMenu = ({ post }: { post: Comment }) => { })); }; + const onPurgeCheckbox = (e: React.ChangeEvent) => { + const { checked } = e.target; + + // Double confirmation for purge action + if (checked) { + const firstConfirm = window.confirm(t('purge_confirm')); + if (!firstConfirm) { + return; + } + const secondConfirm = window.confirm(t('double_confirm')); + if (!secondConfirm) { + return; + } + } + + setPublishCommentEditOptions((state) => { + const newState = { ...state }; + if (isAccountMod) { + newState.commentModeration = { + ...newState.commentModeration, + purged: checked, + }; + } + return newState; + }); + }; + const { refs, floatingStyles, context } = useFloating({ placement: 'bottom-start', open: isEditMenuOpen, @@ -263,7 +293,14 @@ const EditMenu = ({ post }: { post: Comment }) => { [ {_.capitalize(t('remove'))}?] - + {' '} + + + {!parentCid && (