refactor: remove broken anon mode feature

- delete the anon mode hook/store and stop wiring publish flows through alternate signers
  - strip the settings UI, avatar warning, reply indicators, and FAQ text that referenced the toggle
  - drop the anon mode translation keys via scripts/update-translations.js
This commit is contained in:
plebeius
2025-11-25 13:13:38 +01:00
parent f6cf6ec4eb
commit f037a669c0
51 changed files with 26 additions and 521 deletions
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF ثابت",
"animated_gif": "GIF متحرك",
"hide_avatars": "إخفاء الصور الرمزية",
"anon_mode": "وضع مجهول",
"anon_mode_description": "استخدم معرف مستخدم فريد لكل موضوع تنشر فيه. لا يمكن تتبع هذه المعرفات إلى حسابك الأصلي.",
"pending": "قيد الانتظار",
"failed": "فشل",
"add": "أضف",
@@ -247,7 +245,6 @@
"crypto_address_yours": "عنوان العملة الرقمية ينتمي إلى هذا الحساب.",
"delete_wallet": "حذف المحفظة",
"loading_board": "تحميل اللوحة",
"avatar_warning": "لا يمكنك النشر بصورة رمزية أثناء تفعيل وضع المجهول. يمكنك إيقافه في إعدادات حساب Plebbit الخاص بك.",
"last_bumped": "آخر رفع",
"threads_without_images_tip": "عرض فقط المواضيع التي ترتبط بالوسائط القابلة للتضمين",
"hide_gore_boards_tip": "لا تعرض المواضيع من المجالس التي تحتوي على وسم \"جور\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "স্ট্যাটিক GIF",
"animated_gif": "অ্যানিমেটেড GIF",
"hide_avatars": "অ্যাভাটার লুকান",
"anon_mode": "অজ্ঞাত মোড",
"anon_mode_description": "আপনি যে থ্রেডে পোস্ট করেন তার জন্য একটি অনন্য ব্যবহারকারী আইডি ব্যবহার করুন। এই আইডিগুলি আপনার মূল অ্যাকাউন্টে ফিরে ট্রেস করা যাবে না।",
"pending": "অপেক্ষমাণ",
"failed": "ব্যর্থ",
"add": "যোগ করুন",
@@ -247,7 +245,6 @@
"crypto_address_yours": "ক্রিপ্টো ঠিকানা এই অ্যাকাউন্টের অংশ।",
"delete_wallet": "ওয়ালেট মুছুন",
"loading_board": "বোর্ড লোড হচ্ছে",
"avatar_warning": "অ্যানন মোড চালু থাকা অবস্থায় আপনি অ্যানিমেশন সহ পোস্ট করতে পারেন না। আপনি এটি আপনার Plebbit অ্যাকাউন্টের সেটিংসে বন্ধ করতে পারেন।",
"last_bumped": "শেষ.bump",
"threads_without_images_tip": "শুধুমাত্র এমন থ্রেডগুলি প্রদর্শন করুন যেগুলি এমবেডযোগ্য মিডিয়াতে লিঙ্ক করে",
"hide_gore_boards_tip": "\"গোর\" ট্যাগযুক্ত বোর্ড থেকে থ্রেডগুলি প্রদর্শন করবেন না",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statický GIF",
"animated_gif": "Animovaný GIF",
"hide_avatars": "Skrýt avatary",
"anon_mode": "Anonymní režim",
"anon_mode_description": "Použijte jedinečné uživatelské ID pro každé vlákno, do kterého přispíváte. Tato ID nelze sledovat zpět k vašemu původnímu účtu.",
"pending": "Čeká na schválení",
"failed": "Nepodařilo se",
"add": "Přidat",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Adresa kryptoměny patří k tomuto účtu.",
"delete_wallet": "Smazat peněženku",
"loading_board": "Načítání desky",
"avatar_warning": "Nemůžete zveřejňovat s avatarem, když je zapnutý anonymní režim. Můžete ho vypnout v nastavení svého účtu Plebbit.",
"last_bumped": "Poslední bump",
"threads_without_images_tip": "Zobrazit pouze vlákna, která odkazují na vložitelné médium",
"hide_gore_boards_tip": "Nezobrazovat vlákna z fór se značkou \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statisk GIF",
"animated_gif": "Animeret GIF",
"hide_avatars": "Skjul avatarer",
"anon_mode": "Anonim tilstand",
"anon_mode_description": "Brug et unikt bruger-ID til hvert indlæg, du poster i. Disse ID'er kan ikke spores tilbage til din oprindelige konto.",
"pending": "Afventer",
"failed": "Mislykkedes",
"add": "Tilføj",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Crypto-adresse tilhører denne konto.",
"delete_wallet": "Slet tegnebog",
"loading_board": "Indlæser tavlen",
"avatar_warning": "Du kan ikke poste med et avatar, mens anonym tilstand er tændt. Du kan slukke det i dine Plebbit-kontoindstillinger.",
"last_bumped": "Sidste bumpet",
"threads_without_images_tip": "Vis kun tråde, der linker til indlejrbare medier",
"hide_gore_boards_tip": "Vis ikke tråde fra boards med \"gore\" tagget",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statisches GIF",
"animated_gif": "Animiertes GIF",
"hide_avatars": "Avatare ausblenden",
"anon_mode": "Anonymer Modus",
"anon_mode_description": "Verwenden Sie eine eindeutige Benutzer-ID für jedes Thema, in dem Sie posten. Diese IDs können nicht auf Ihr ursprüngliches Konto zurückverfolgt werden.",
"pending": "Ausstehend",
"failed": "Fehlgeschlagen",
"add": "Hinzufügen",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Krypto-Adresse gehört zu diesem Konto.",
"delete_wallet": "Wallet löschen",
"loading_board": "Lädt Board",
"avatar_warning": "Sie können nicht mit einem Avatar posten, während der Anonymmodus aktiviert ist. Sie können ihn in den Einstellungen Ihres Plebbit-Kontos deaktivieren.",
"last_bumped": "Zuletzt hochgeladen",
"threads_without_images_tip": "Nur Threads anzeigen, die auf einbettbare Medien verlinken",
"hide_gore_boards_tip": "Zeige keine Threads von Boards mit dem \"gore\"-Tag",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Στατικό GIF",
"animated_gif": "Κινούμενο GIF",
"hide_avatars": "Απόκρυψη avatars",
"anon_mode": "Λειτουργία ανωνυμίας",
"anon_mode_description": "Χρησιμοποιήστε ένα μοναδικό αναγνωριστικό χρήστη για κάθε θέμα στο οποίο δημοσιεύετε. Αυτά τα αναγνωριστικά δεν μπορούν να παρακολουθηθούν πίσω στον αρχικό σας λογαριασμό.",
"pending": "Σε εκκρεμότητα",
"failed": "Απέτυχε",
"add": "Προσθήκη",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Η διεύθυνση κρυπτονομίσματος ανήκει σε αυτόν τον λογαριασμό.",
"delete_wallet": "Διαγραφή πορτοφολιού",
"loading_board": "Φόρτωση πίνακα",
"avatar_warning": "Δεν μπορείτε να δημοσιεύσετε με avatar ενώ είναι ενεργοποιημένη η ανώνυμη λειτουργία. Μπορείτε να το απενεργοποιήσετε στις ρυθμίσεις του λογαριασμού σας Plebbit.",
"last_bumped": "Τελευταία ανύψωση",
"threads_without_images_tip": "Εμφάνιση μόνο θεμάτων που συνδέονται με ενσωματώσιμα μέσα",
"hide_gore_boards_tip": "Μην εμφανίζετε θέματα από φόρουμ με την ετικέτα \"gore\"",
-3
View File
@@ -222,8 +222,6 @@
"static_gif": "Static GIF",
"animated_gif": "Animated GIF",
"hide_avatars": "Hide avatars",
"anon_mode": "Anon mode",
"anon_mode_description": "Use a unique user ID for each thread you post in. These IDs cannot be traced back to your original account.",
"pending": "Pending",
"failed": "Failed",
"add": "Add",
@@ -248,7 +246,6 @@
"crypto_address_yours": "Crypto address belongs to this account.",
"delete_wallet": "Delete Wallet",
"loading_board": "Loading board",
"avatar_warning": "You can't post with an avatar while anon mode is turned on. You can turn it off in your Plebbit Account settings.",
"last_bumped": "Last Bumped",
"threads_without_images_tip": "Only display threads that link to embeddable media",
"hide_gore_boards_tip": "Don't display threads from boards with the \"gore\" tag",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Estático",
"animated_gif": "GIF Animado",
"hide_avatars": "Ocultar avatares",
"anon_mode": "Modo anónimo",
"anon_mode_description": "Utiliza un ID de usuario único para cada hilo en el que publiques. Estas ID no pueden ser rastreadas de vuelta a tu cuenta original.",
"pending": "Pendiente",
"failed": "Fallido",
"add": "Añadir",
@@ -247,7 +245,6 @@
"crypto_address_yours": "La dirección de criptomoneda pertenece a esta cuenta.",
"delete_wallet": "Eliminar billetera",
"loading_board": "Cargando tablero",
"avatar_warning": "No puedes publicar con un avatar mientras el modo anónimo esté activado. Puedes desactivarlo en la configuración de tu cuenta Plebbit.",
"last_bumped": "Último bump",
"threads_without_images_tip": "Solo mostrar hilos que enlacen a medios integrables",
"hide_gore_boards_tip": "No mostrar hilos de los foros con la etiqueta \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF ثابت",
"animated_gif": "GIF متحرک",
"hide_avatars": "پنهان کردن آواتارها",
"anon_mode": "حالت ناشناس",
"anon_mode_description": "از یک شناسه کاربری منحصر به فرد برای هر موضوعی که در آن ارسال می‌کنید استفاده کنید. این شناسه‌ها نمی‌توانند به حساب اصلی شما برگردند.",
"pending": "در انتظار",
"failed": "ناموفق",
"add": "اضافه کردن",
@@ -247,7 +245,6 @@
"crypto_address_yours": "آدرس رمزارز به این حساب تعلق دارد.",
"delete_wallet": "حذف کیف پول",
"loading_board": "در حال بارگذاری تابلو",
"avatar_warning": "شما نمی‌توانید با آواتار پست بگذارید در حالی که حالت ناشناس فعال است. می‌توانید آن را در تنظیمات حساب Plebbit خود خاموش کنید.",
"last_bumped": "آخرین افزایش",
"threads_without_images_tip": "فقط موضوعاتی که به رسانه‌های قابل گنجاندن لینک می‌دهند را نمایش دهید",
"hide_gore_boards_tip": "موضوعات از مجامع با برچسب \"گور\" را نمایش ندهید",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Staattinen GIF",
"animated_gif": "Animoitu GIF",
"hide_avatars": "Piilota avatarit",
"anon_mode": "Anonyymi tila",
"anon_mode_description": "Käytä ainutlaatuista käyttäjä-ID:tä jokaisessa ketjussa, johon julkaiset. Näitä ID:itä ei voida jäljittää takaisin alkuperäiseen tiliisi.",
"pending": "Odottaa",
"failed": "Epäonnistui",
"add": "Lisää",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Krypto-osoite kuuluu tähän tiliin.",
"delete_wallet": "Poista lompakko",
"loading_board": "Ladataan taulua",
"avatar_warning": "Et voi julkaista avatarilla, kun anonyymi tila on päällä. Voit poistaa sen käytöstä Plebbit-tilisi asetuksissa.",
"last_bumped": "Viimeisin bump",
"threads_without_images_tip": "Näytä vain ketjut, jotka linkittävät upotettaviin medioihin",
"hide_gore_boards_tip": "Älä näytä ketjuja taulukoista, joissa on \"gore\"-tunniste",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Static GIF",
"animated_gif": "Animated GIF",
"hide_avatars": "Itago ang mga avatar",
"anon_mode": "Anong mode",
"anon_mode_description": "Gumamit ng natatanging user ID para sa bawat thread na iyong pinapansin. Ang mga ID na ito ay hindi maaring subaybayan pabalik sa iyong orihinal na account.",
"pending": "Naghihintay",
"failed": "Nabigo",
"add": "Idagdag",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Ang crypto address ay nauugnay sa account na ito.",
"delete_wallet": "Tanggalin ang Wallet",
"loading_board": "Naglo-load ang board",
"avatar_warning": "Hindi ka makakapag-post gamit ang avatar habang naka-on ang anon mode. Maaari mo itong i-off sa iyong mga setting ng Plebbit Account.",
"last_bumped": "Huling bump",
"threads_without_images_tip": "Ipakita lamang ang mga thread na nagli-link sa mga embeddable na media",
"hide_gore_boards_tip": "Huwag magpakita ng mga thread mula sa mga board na may \"gore\" na tag",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Statique",
"animated_gif": "GIF Animé",
"hide_avatars": "Masquer les avatars",
"anon_mode": "Mode anonyme",
"anon_mode_description": "Utilisez un identifiant utilisateur unique pour chaque fil dans lequel vous publiez. Ces identifiants ne peuvent pas être retracés jusqu'à votre compte d'origine.",
"pending": "En attente",
"failed": "Échoué",
"add": "Ajouter",
@@ -247,7 +245,6 @@
"crypto_address_yours": "L'adresse crypto appartient à ce compte.",
"delete_wallet": "Supprimer le portefeuille",
"loading_board": "Chargement du tableau",
"avatar_warning": "Vous ne pouvez pas publier avec un avatar pendant que le mode anonyme est activé. Vous pouvez le désactiver dans les paramètres de votre compte Plebbit.",
"last_bumped": "Dernière élévation",
"threads_without_images_tip": "Afficher uniquement les fils qui lient à des médias intégrables",
"hide_gore_boards_tip": "Ne pas afficher les fils des forums avec le tag \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF סטטי",
"animated_gif": "GIF מונפש",
"hide_avatars": "הסתר את התמונות האישיות",
"anon_mode": "מצב אנונימי",
"anon_mode_description": "השתמש במזהה משתמש ייחודי לכל שרשור שאתה מפרסם בו. מזהים אלה לא יכולים להתחקות חזרה לחשבון המקורי שלך.",
"pending": "ממתין",
"failed": "נכשל",
"add": "הוסף",
@@ -247,7 +245,6 @@
"crypto_address_yours": "כתובת המטבע הקריפטוגרפי שייכת לחשבון זה.",
"delete_wallet": "מחק ארנק",
"loading_board": "טוען את הלוח",
"avatar_warning": "אין באפשרותך לפרסם עם תמונת פרופיל בזמן שמצב אנונימי מופעל. תוכל לבטל זאת בהגדרות חשבון Plebbit שלך.",
"last_bumped": "הבום האחרון",
"threads_without_images_tip": "הצג רק נושאים שמקשרים למדיה שניתן להטמיע",
"hide_gore_boards_tip": "אל תציג נושאים מלוחות עם תג \"גורה\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "स्थिर GIF",
"animated_gif": "एनिमेटेड GIF",
"hide_avatars": "अवतार छिपाएँ",
"anon_mode": "अनाम मोड",
"anon_mode_description": "जिस थ्रेड में आप पोस्ट करते हैं, उसके लिए एक अद्वितीय उपयोगकर्ता आईडी का उपयोग करें। इन आईडी को आपके मूल खाते पर वापस नहीं ट्रेस किया जा सकता है।",
"pending": "लंबित",
"failed": "असफल",
"add": "जोड़ें",
@@ -247,7 +245,6 @@
"crypto_address_yours": "क्रिप्टो पता इस खाते से संबंधित है।",
"delete_wallet": "वॉलेट हटाएं",
"loading_board": "बोर्ड लोड हो रहा है",
"avatar_warning": "जब अज्ञात मोड चालू होता है, तो आप अवतार के साथ पोस्ट नहीं कर सकते। आप इसे अपने Plebbit खाते की सेटिंग में बंद कर सकते हैं।",
"last_bumped": "अंतिम बंप",
"threads_without_images_tip": "केवल उन थ्रेड्स को दिखाएं जो एम्बेडेबल मीडिया से लिंक करते हैं",
"hide_gore_boards_tip": "\"गोर\" टैग वाले बोर्डों से थ्रेड्स न दिखाएं",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statikus GIF",
"animated_gif": "Animált GIF",
"hide_avatars": "Avatarok elrejtése",
"anon_mode": "Anonim mód",
"anon_mode_description": "Használjon egyedi felhasználói azonosítót minden szálhoz, amelyre hozzászól. Ezek az azonosítók nem követhetők vissza az eredeti fiókjához.",
"pending": "Függőben",
"failed": "Sikertelen",
"add": "Hozzáad",
@@ -247,7 +245,6 @@
"crypto_address_yours": "A kripto-cím ehhez a fiókhoz tartozik.",
"delete_wallet": "Tárca törlése",
"loading_board": "Tábla betöltése",
"avatar_warning": "Nem posztolhatsz avatarral, míg az anon mód be van kapcsolva. Kikapcsolhatod a Plebbit-fiókod beállításaiban.",
"last_bumped": "Utolsó bump",
"threads_without_images_tip": "Csak azokat a szálakat jelenítse meg, amelyek beágyazható médiára mutatnak",
"hide_gore_boards_tip": "Ne jelenítsd meg a \"gore\" címkével rendelkező fórumok szálait",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Statis",
"animated_gif": "GIF Animasi",
"hide_avatars": "Sembunyikan avatar",
"anon_mode": "Mode anonim",
"anon_mode_description": "Gunakan ID pengguna unik untuk setiap utas yang Anda posting. ID ini tidak dapat dilacak kembali ke akun asli Anda.",
"pending": "Tertunda",
"failed": "Gagal",
"add": "Tambahkan",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Alamat kripto milik akun ini.",
"delete_wallet": "Hapus Dompet",
"loading_board": "Memuat papan",
"avatar_warning": "Anda tidak bisa memposting dengan avatar saat mode anonim diaktifkan. Anda bisa mematikan ini di pengaturan Akun Plebbit Anda.",
"last_bumped": "Terakhir bump",
"threads_without_images_tip": "Hanya tampilkan thread yang menautkan ke media yang dapat disematkan",
"hide_gore_boards_tip": "Jangan tampilkan thread dari board dengan tag \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Statica",
"animated_gif": "GIF Animata",
"hide_avatars": "Nascondi avatar",
"anon_mode": "Modalità anonima",
"anon_mode_description": "Usa un ID utente unico per ogni thread in cui pubblichi. Questi ID non possono essere tracciati fino al tuo account originale.",
"pending": "In attesa",
"failed": "Fallito",
"add": "Aggiungi",
@@ -247,7 +245,6 @@
"crypto_address_yours": "L'indirizzo cripto appartiene a questo account.",
"delete_wallet": "Elimina Wallet",
"loading_board": "Caricamento board",
"avatar_warning": "Non puoi postare con un avatar mentre la modalità anonima è attiva. Puoi disattivarla nelle impostazioni del tuo account Plebbit.",
"last_bumped": "Ultimo Bump",
"threads_without_images_tip": "Mostra solo i thread che linkano a media incorporabili",
"hide_gore_boards_tip": "Non mostrare i thread dei board con il tag \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "静的GIF",
"animated_gif": "アニメーションGIF",
"hide_avatars": "アバターを隠す",
"anon_mode": "匿名モード",
"anon_mode_description": "投稿する各スレッドに一意のユーザーIDを使用してください。これらのIDは、元のアカウントに戻すことはできません。",
"pending": "保留中",
"failed": "失敗",
"add": "追加",
@@ -247,7 +245,6 @@
"crypto_address_yours": "暗号通貨アドレスはこのアカウントに属しています。",
"delete_wallet": "ウォレットを削除",
"loading_board": "ボードを読み込んでいます",
"avatar_warning": "アバターを使用して投稿することはできません。匿名モードがオンになっている間は、Plebbitアカウントの設定でオフにできます。",
"last_bumped": "最後のバンプ",
"threads_without_images_tip": "埋め込むことができるメディアへのリンクを持つスレッドのみを表示",
"hide_gore_boards_tip": "\"gore\"タグのあるボードからスレッドを表示しない",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "정적 GIF",
"animated_gif": "애니메이션 GIF",
"hide_avatars": "아바타 숨기기",
"anon_mode": "익명 모드",
"anon_mode_description": "게시하는 각 스레드에 대해 고유한 사용자 ID를 사용하세요. 이러한 ID는 원래 계정으로 추적할 수 없습니다.",
"pending": "대기 중",
"failed": "실패",
"add": "추가",
@@ -247,7 +245,6 @@
"crypto_address_yours": "암호 주소는이 계정에 속합니다.",
"delete_wallet": "지갑 삭제",
"loading_board": "보드 로딩 중",
"avatar_warning": "익명 모드가 켜져 있는 동안 아바타로 게시할 수 없습니다. Plebbit 계정 설정에서 끌 수 있습니다.",
"last_bumped": "마지막 bump",
"threads_without_images_tip": "임베드 가능한 미디어로 링크된 스레드만 표시",
"hide_gore_boards_tip": "\"gore\" 태그가 있는 게시판에서 스레드를 표시하지 않음",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "स्थिर GIF",
"animated_gif": "एनिमेटेड GIF",
"hide_avatars": "अवतार लपवा",
"anon_mode": "अनाम मोड",
"anon_mode_description": "आपण पोस्ट करणार्‍या प्रत्येक ध糹रेसाठी एक अद्वितीय वापरकर्ता ID वापरा. या ID आपल्या मूळ खात्याकडे मागे ट्रेस करता येत नाही.",
"pending": "प्रलंबित",
"failed": "असफल",
"add": "अॅड करा",
@@ -247,7 +245,6 @@
"crypto_address_yours": "क्रिप्टो पत्ता हा खात्याकडे संबंधित आहे.",
"delete_wallet": "वॉलेट हटवा",
"loading_board": "बोर्ड लोड हो रहा आहे",
"avatar_warning": "आपण अज्ञात मोड चालू असताना अवतारसह पोस्ट करू शकत नाही. आपण ते आपल्या Plebbit खात्याच्या सेटिंग्जमध्ये बंद करू शकता.",
"last_bumped": "अंतिम बंप",
"threads_without_images_tip": "फक्त ते थ्रेड्स दाखवा जे एम्बेडेबल मीडियाशी लिंक करतात",
"hide_gore_boards_tip": "\"गोर\" टॅग असलेल्या बोर्डमधून थ्रेड्स दाखवू नका",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statische GIF",
"animated_gif": "Geanimeerde GIF",
"hide_avatars": "Avatars verbergen",
"anon_mode": "Anoniem modus",
"anon_mode_description": "Gebruik een unieke gebruikers-ID voor elk onderwerp waarin u plaatst. Deze ID's kunnen niet worden teruggevoerd naar uw oorspronkelijke account.",
"pending": "In afwachting",
"failed": "Mislukt",
"add": "Toevoegen",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Crypto-adres behoort tot deze account.",
"delete_wallet": "Verwijder portemonnee",
"loading_board": "Bord laden",
"avatar_warning": "Je kunt niet met een avatar posten terwijl de anonieme modus aan staat. Je kunt het uitschakelen in de instellingen van je Plebbit-account.",
"last_bumped": "Laatste bump",
"threads_without_images_tip": "Toon alleen threads die naar inbedbare media linken",
"hide_gore_boards_tip": "Toon geen threads van boards met de \"gore\" tag",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statisk GIF",
"animated_gif": "Animasjons GIF",
"hide_avatars": "Skjul avatarer",
"anon_mode": "Anonim modus",
"anon_mode_description": "Bruk et unikt bruker-ID for hvert innlegg du legger ut. Disse ID-ene kan ikke spores tilbake til din opprinnelige konto.",
"pending": "Venter",
"failed": "Feilet",
"add": "Legg til",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Crypto-adressen tilhører denne kontoen.",
"delete_wallet": "Slett lommebok",
"loading_board": "Laster tavle",
"avatar_warning": "Du kan ikke poste med en avatar mens anonym modus er aktivert. Du kan slå den av i innstillingene for Plebbit-kontoen din.",
"last_bumped": "Siste bumpet",
"threads_without_images_tip": "Vis kun tråder som lenker til innebyggbare medier",
"hide_gore_boards_tip": "Vis ikke tråder fra brett med \"gore\"-taggen",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statyczny GIF",
"animated_gif": "Animowany GIF",
"hide_avatars": "Ukryj awatary",
"anon_mode": "Tryb anonimowy",
"anon_mode_description": "Użyj unikalnego identyfikatora użytkownika dla każdego wątku, w którym publikujesz. Te identyfikatory nie mogą być śledzone z powrotem do twojego pierwotnego konta.",
"pending": "Oczekujące",
"failed": "Nieudane",
"add": "Dodaj",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Adres kryptowaluty należy do tego konta.",
"delete_wallet": "Usuń portfel",
"loading_board": "Ładowanie tablicy",
"avatar_warning": "Nie możesz publikować z awatarem, gdy tryb anonimowy jest włączony. Możesz go wyłączyć w ustawieniach swojego konta Plebbit.",
"last_bumped": "Ostatni bump",
"threads_without_images_tip": "Wyświetlaj tylko wątki, które linkują do mediów, które można osadzić",
"hide_gore_boards_tip": "Nie wyświetlaj wątków z forów z tagiem \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Estático",
"animated_gif": "GIF Animado",
"hide_avatars": "Ocultar avatares",
"anon_mode": "Modo anônimo",
"anon_mode_description": "Use um ID de usuário exclusivo para cada thread em que você postar. Esses IDs não podem ser rastreados de volta para sua conta original.",
"pending": "Pendente",
"failed": "Falhou",
"add": "Adicionar",
@@ -247,7 +245,6 @@
"crypto_address_yours": "O endereço de criptomoeda pertence a esta conta.",
"delete_wallet": "Excluir carteira",
"loading_board": "Carregando quadro",
"avatar_warning": "Você não pode postar com um avatar enquanto o modo anônimo estiver ativado. Você pode desativá-lo nas configurações da sua Conta Plebbit.",
"last_bumped": "Último bump",
"threads_without_images_tip": "Exibir apenas threads que linkam para mídias embutíveis",
"hide_gore_boards_tip": "Não exibir threads de boards com a tag \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Static",
"animated_gif": "GIF Animat",
"hide_avatars": "Ascunde avatarele",
"anon_mode": "Mod anonim",
"anon_mode_description": "Utilizați un ID de utilizator unic pentru fiecare fir în care postați. Aceste ID-uri nu pot fi urmărite înapoi la contul dvs. original.",
"pending": "În așteptare",
"failed": "Eșuat",
"add": "Adaugă",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Adresa crypto aparține acestui cont.",
"delete_wallet": "Șterge portofelul",
"loading_board": "Se încarcă tabla",
"avatar_warning": "Nu poți publica cu un avatar în timp ce modul anonim este activat. Poți să-l dezactivezi în setările contului tău Plebbit.",
"last_bumped": "Ultima creștere",
"threads_without_images_tip": "Afișați doar discuțiile care sunt legătura către media încorporabilă",
"hide_gore_boards_tip": "Nu afișați discuțiile de pe forumuri cu eticheta \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Статичный GIF",
"animated_gif": "Анимированный GIF",
"hide_avatars": "Скрыть аватары",
"anon_mode": "Анонимный режим",
"anon_mode_description": "Используйте уникальный идентификатор пользователя для каждого потока, в который вы публикуете. Эти идентификаторы не могут быть прослежены обратно к вашей оригинальной учетной записи.",
"pending": "В ожидании",
"failed": "Не удалось",
"add": "Добавить",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Адрес криптовалюты принадлежит этому аккаунту.",
"delete_wallet": "Удалить кошелек",
"loading_board": "Загрузка доски",
"avatar_warning": "Вы не можете публиковать с аватаром, когда режим анонимности включен. Вы можете отключить его в настройках своей учетной записи Plebbit.",
"last_bumped": "Последний бамп",
"threads_without_images_tip": "Отображать только темы, которые ссылаются на встраиваемые медиа",
"hide_gore_boards_tip": "Не показывать темы с форумов с тегом \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Statik",
"animated_gif": "GIF i Animuar",
"hide_avatars": "Fsheh avatarët",
"anon_mode": "Mënyra anonime",
"anon_mode_description": "Përdorni një ID përdoruesi unike për çdo temë në të cilën postoni. Këto ID nuk mund të gjurmohen mbrapsht në llogarinë tuaj origjinale.",
"pending": "Në pritje",
"failed": "Dështuar",
"add": "Shto",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Adresa e kriptovalutës i përket këtij llogarie.",
"delete_wallet": "Fshi portofolin",
"loading_board": "Po ngarkohet tabela",
"avatar_warning": "Nuk mund të postoni me një avatar ndërsa është aktivizuar moda anonime. Mund ta çaktivizoni në cilësimet e llogarisë tuaj Plebbit.",
"last_bumped": "Bumping i fundit",
"threads_without_images_tip": "Shfaqni vetëm temat që lidhin me media të integrueshme",
"hide_gore_boards_tip": "Mos shfaqni temat nga forumet me etiketën \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statisk GIF",
"animated_gif": "Animerad GIF",
"hide_avatars": "Dölj avatarer",
"anon_mode": "Anonymt läge",
"anon_mode_description": "Använd ett unikt användar-ID för varje tråd du publicerar i. Dessa ID:n kan inte spåras tillbaka till ditt ursprungliga konto.",
"pending": "Väntande",
"failed": "Misslyckades",
"add": "Lägg till",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Crypto-adressen tillhör denna konto.",
"delete_wallet": "Ta bort plånbok",
"loading_board": "Laddar tavla",
"avatar_warning": "Du kan inte posta med en avatar när anonym läge är aktiverat. Du kan stänga av det i inställningarna för ditt Plebbit-konto.",
"last_bumped": "Senaste bump",
"threads_without_images_tip": "Visa endast trådar som länkar till inbäddbara medier",
"hide_gore_boards_tip": "Visa inte trådar från forum med taggen \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "స్టాటిక్ GIF",
"animated_gif": "అనిమేటెడ్ GIF",
"hide_avatars": "అవతార్లను దాచు",
"anon_mode": "అనానిమస్ మోడ్",
"anon_mode_description": "మీరు పోస్టు చేసే ప్రతి థ్రెడ్లో ప్రత్యేకమైన యూజర్ ID ఉపయోగించండి. ఈ ID లను మీ మూల ఖాతాకు తిరిగి ట్రేస్ చేయడం సాధ్యం కాదు.",
"pending": "అనుమతించబడాలి",
"failed": "విజయవంతం కాలేదు",
"add": "చేర్చండి",
@@ -247,7 +245,6 @@
"crypto_address_yours": "క్రిప్టో చిరునామా ఈ ఖాతాకు చేరుకుంది.",
"delete_wallet": "వాలెట్ తొలగించండి",
"loading_board": "బోర్డు లోడవుతోంది",
"avatar_warning": "మీరు అను మోడ్ ఆన్ ఉండగా అవతార్‌తో పోస్ట్ చేయలేరు. మీరు మీ Plebbit ఖాతా సెట్టింగ్స్‌లో దీన్ని ఆఫ్ చేయవచ్చు.",
"last_bumped": "చివరి బంప్",
"threads_without_images_tip": "ఏంబెడబుల్ మీడియాకు లింక్ చేసే థ్రెడ్‌లను మాత్రమే చూపించండి",
"hide_gore_boards_tip": "\"గోర్\" ట్యాగ్‌తో ఉన్న బోర్డ్స్ నుండి థ్రెడ్‌లు చూపించవద్దు",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF แบบคงที่",
"animated_gif": "GIF ที่เคลื่อนไหว",
"hide_avatars": "ซ่อนอวาตาร์",
"anon_mode": "โหมดนิรนาม",
"anon_mode_description": "ใช้ ID ผู้ใช้ที่ไม่ซ้ำกันสำหรับแต่ละกระทู้ที่คุณโพสต์ หมายเลขเหล่านี้ไม่สามารถติดตามกลับไปยังบัญชีต้นฉบับของคุณได้",
"pending": "รอดำเนินการ",
"failed": "ล้มเหลว",
"add": "เพิ่ม",
@@ -247,7 +245,6 @@
"crypto_address_yours": "ที่อยู่คริปโตเป็นของบัญชีนี้",
"delete_wallet": "ลบกระเป๋าเงิน",
"loading_board": "กำลังโหลดบอร์ด",
"avatar_warning": "คุณไม่สามารถโพสต์ด้วยอวาตาร์ในขณะที่โหมดอนาโนเป็นเปิดอยู่ คุณสามารถปิดได้ในการตั้งค่าบัญชี Plebbit ของคุณ",
"last_bumped": "เพิ่มล่าสุด",
"threads_without_images_tip": "แสดงเฉพาะกระทู้ที่เชื่อมโยงไปยังสื่อที่สามารถฝังได้",
"hide_gore_boards_tip": "ไม่แสดงกระทู้จากบอร์ดที่มีแท็ก \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Statik GIF",
"animated_gif": "Animasyonlu GIF",
"hide_avatars": "Avatarları gizle",
"anon_mode": "Gizli mod",
"anon_mode_description": "Yayınladığınız her başlık için benzersiz bir kullanıcı ID'si kullanın. Bu ID'ler orijinal hesabınıza geri izlenemez.",
"pending": "Beklemede",
"failed": "Başarısız",
"add": "Ekle",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Kripto adres bu hesaba aittir.",
"delete_wallet": "Cüzdanı Sil",
"loading_board": "Tahta yükleniyor",
"avatar_warning": "Anonim mod açıken avatar ile paylaşım yapamazsınız. Bunu Plebbit Hesap ayarlarınızdan kapatabilirsiniz.",
"last_bumped": "Son bump",
"threads_without_images_tip": "Sadece gömme medya bağlantısı olan gönderileri görüntüle",
"hide_gore_boards_tip": "\"gore\" etiketi olan boardlardan gönderileri göstermeyin",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "Статичний GIF",
"animated_gif": "Анімований GIF",
"hide_avatars": "Сховати аватари",
"anon_mode": "Режим анонімності",
"anon_mode_description": "Використовуйте унікальний ідентифікатор користувача для кожної теми, в якій ви публікуєте. Ці ідентифікатори не можуть бути відслідковані назад до вашого оригінального облікового запису.",
"pending": "Очікує",
"failed": "Не вдалося",
"add": "Додати",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Адреса криптовалюти належить цьому обліковому запису.",
"delete_wallet": "Видалити гаманець",
"loading_board": "Завантаження дошки",
"avatar_warning": "Ви не можете публікувати з аватаром, коли увімкнено анонімний режим. Ви можете вимкнути його в налаштуваннях свого облікового запису Plebbit.",
"last_bumped": "Останній бамп",
"threads_without_images_tip": "Показувати тільки ті теми, які містять посилання на медіа, що можна вбудувати",
"hide_gore_boards_tip": "Не показувати теми з форумів з тегом \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "اسٹیٹک GIF",
"animated_gif": "اینیمیٹڈ GIF",
"hide_avatars": "اوٹار چھپائیں",
"anon_mode": "خفیہ موڈ",
"anon_mode_description": "آپ جس تھریڈ میں پوسٹ کرتے ہیں اس کے لیے منفرد صارف آئی ڈی کا استعمال کریں۔ ان آئی ڈیز کو آپ کے اصل اکاؤنٹ کی طرف واپس نہیں ٹریس کیا جا سکتا۔",
"pending": "منتظر",
"failed": "ناکام",
"add": "شامل کریں",
@@ -247,7 +245,6 @@
"crypto_address_yours": "کرپٹو پتا اس اکاؤنٹ کا حصہ ہے۔",
"delete_wallet": "والٹ حذف کریں",
"loading_board": "بورڈ لوڈ ہو رہا ہے",
"avatar_warning": "آپ اَنون موڈ آن ہونے پر اوتار کے ساتھ پوسٹ نہیں کر سکتے۔ آپ اسے اپنے Plebbit اکاؤنٹ کی ترتیبات میں بند کر سکتے ہیں۔",
"last_bumped": "آخری بمپر",
"threads_without_images_tip": "صرف وہ تھریڈز دکھائیں جو ایمبیڈ ایبل میڈیا کے ساتھ لنک کرتے ہیں",
"hide_gore_boards_tip": "\"گور\" ٹیگ والے بورڈز سے تھریڈز نہ دکھائیں",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "GIF Tĩnh",
"animated_gif": "GIF Hoạt Hình",
"hide_avatars": "Ẩn avatar",
"anon_mode": "Chế độ ẩn danh",
"anon_mode_description": "Sử dụng ID người dùng duy nhất cho mỗi chủ đề bạn đăng. Những ID này không thể được theo dõi lại tài khoản gốc của bạn.",
"pending": "Đang chờ",
"failed": "Thất bại",
"add": "Thêm",
@@ -247,7 +245,6 @@
"crypto_address_yours": "Địa chỉ tiền điện tử thuộc về tài khoản này.",
"delete_wallet": "Xóa ví",
"loading_board": "Đang tải bảng",
"avatar_warning": "Bạn không thể đăng với hình đại diện khi chế độ ẩn danh đang bật. Bạn có thể tắt nó trong cài đặt Tài khoản Plebbit của mình.",
"last_bumped": "Bump gần đây nhất",
"threads_without_images_tip": "Chỉ hiển thị các chủ đề liên kết đến phương tiện có thể nhúng",
"hide_gore_boards_tip": "Không hiển thị chủ đề từ các diễn đàn có thẻ \"gore\"",
-3
View File
@@ -221,8 +221,6 @@
"static_gif": "静态GIF",
"animated_gif": "动画GIF",
"hide_avatars": "隐藏头像",
"anon_mode": "匿名模式",
"anon_mode_description": "为您发布的每个线程使用唯一的用户 ID。这些 ID 无法追溯到您的原始帐户。",
"pending": "待处理",
"failed": "失败",
"add": "添加",
@@ -247,7 +245,6 @@
"crypto_address_yours": "加密地址属于此帐户。",
"delete_wallet": "删除钱包",
"loading_board": "正在加载板块",
"avatar_warning": "在匿名模式开启时,您无法使用头像进行发布。您可以在 Plebbit 账户设置中将其关闭。",
"last_bumped": "最后提升",
"threads_without_images_tip": "仅显示链接到可嵌入媒体的帖子",
"hide_gore_boards_tip": "不显示来自带有“gore”标签的板块的帖子",
+3 -30
View File
@@ -14,9 +14,7 @@ import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-util
import useChallengesStore from '../../stores/use-challenges-store';
import _ from 'lodash';
import useIsMobile from '../../hooks/use-is-mobile';
import useAnonMode from '../../hooks/use-anon-mode';
import useAuthorPrivileges from '../../hooks/use-author-privileges';
import useAnonModeStore from '../../stores/use-anon-mode-store';
const { addChallenge } = useChallengesStore.getState();
@@ -39,9 +37,6 @@ const EditMenu = ({ post }: { post: Comment }) => {
const [isContentEditorOpen, setIsContentEditorOpen] = useState(false);
const account = useAccount();
const { getNewSigner, getExistingSigner } = useAnonMode(post?.postCid);
const { getThreadSigner } = useAnonModeStore();
const [signer, setSigner] = useState<any>(account?.signer);
const { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor } = useAuthorPrivileges({
@@ -50,35 +45,13 @@ const EditMenu = ({ post }: { post: Comment }) => {
postCid,
});
const checkSigner = useCallback(async () => {
const checkSigner = useCallback(() => {
if (isAccountCommentAuthor) {
if (author?.address !== account?.author?.address) {
// Check for existing thread signer first
const threadSigner = getThreadSigner(postCid);
if (threadSigner && threadSigner?.address === author?.address) {
setSigner(threadSigner);
return;
}
// If no thread signer, check for existing address signer
const existingSigner = getExistingSigner(author?.address);
if (existingSigner) {
setSigner(existingSigner);
return;
}
// If no existing signer, create a new one
const newSigner = await getNewSigner();
if (newSigner) {
setSigner(newSigner);
}
} else {
setSigner(account?.signer);
}
setSigner(account?.signer);
} else {
setSigner(null);
}
}, [isAccountCommentAuthor, author?.address, postCid, account?.author?.address, account?.signer, getThreadSigner, getExistingSigner, getNewSigner]);
}, [isAccountCommentAuthor, account?.signer]);
useEffect(() => {
checkSigner();
+1 -84
View File
@@ -1,4 +1,4 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { Comment, setAccount, useAccount, useAccountComment, useAccountSubplebbits, useEditedComment } from '@plebbit/plebbit-react-hooks';
@@ -9,7 +9,6 @@ import { getHasThumbnail, getLinkMediaInfo } from '../../lib/utils/media-utils';
import { formatMarkdown } from '../../lib/utils/post-utils';
import { isValidURL } from '../../lib/utils/url-utils';
import { isAllView, isDescriptionView, isModView, isPostPageView, isRulesView, isSubscriptionsView } from '../../lib/utils/view-utils';
import useAnonMode from '../../hooks/use-anon-mode';
import { useDefaultSubplebbits } from '../../hooks/use-default-subplebbits';
import { useResolvedSubplebbitAddress } from '../../hooks/use-resolved-subplebbit-address';
import useFetchGifFirstFrame from '../../hooks/use-fetch-gif-first-frame';
@@ -64,10 +63,6 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
const { accountSubplebbits } = useAccountSubplebbits();
const accountSubplebbitAddresses = Object.keys(accountSubplebbits);
const { anonMode, getNewSigner, getExistingSigner } = useAnonMode(postCid);
const comment = useSubplebbitsPagesStore((state) => state.comments[postCid]);
const address = comment?.author?.address;
const [lengthError, setLengthError] = useState<string | null>(null);
const checkContentLength = useRef(
@@ -93,27 +88,6 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
}
};
const getAnonAddressForPost = useCallback(async () => {
if (anonMode) {
const newSigner = (await getNewSigner()) || {};
setPublishPostOptions({
signer: newSigner,
author: {
address: newSigner.address,
displayName: displayName || undefined,
},
});
} else {
setPublishPostOptions({
signer: undefined,
author: {
address: account?.author?.address,
displayName: displayName || undefined,
},
});
}
}, [anonMode, getNewSigner, account, setPublishPostOptions, displayName]);
const onPublishPost = () => {
const currentTitle = subjectRef.current?.value.trim() || '';
const currentContent = textRef.current?.value.trim() || '';
@@ -166,57 +140,11 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
}
}, [postIndex, resetPublishPostOptions, navigate]);
useEffect(() => {
if (anonMode) {
setPublishPostOptions({
signer: undefined,
author: {
address: undefined,
displayName: displayName || undefined,
},
});
getAnonAddressForPost();
} else {
setPublishPostOptions({
signer: undefined,
author: {
...account?.author,
displayName: displayName || account?.author?.displayName,
},
});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [anonMode]);
// in post page, publish a reply to the post
const isInPostView = isPostPageView(location.pathname, params);
const cid = params?.commentCid as string;
const { setPublishReplyOptions, resetPublishReplyOptions, replyIndex, publishReply } = usePublishReply({ cid, subplebbitAddress });
const getAnonAddressForReply = useCallback(async () => {
const existingSigner = await getExistingSigner(address);
if (existingSigner) {
setPublishReplyOptions({
signer: existingSigner,
author: {
address: existingSigner.address,
displayName: displayName || undefined,
},
});
} else {
const newSigner = await getNewSigner();
if (newSigner) {
setPublishReplyOptions({
signer: newSigner,
author: {
address: newSigner.address,
displayName: displayName || undefined,
},
});
}
}
}, [address, getExistingSigner, getNewSigner, setPublishReplyOptions, displayName]);
const handleContentChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
const formattedContent = formatMarkdown(e.target.value);
isInPostView ? setPublishReplyOptions({ content: formattedContent }) : setPublishPostOptions({ content: formattedContent });
@@ -256,17 +184,6 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
}
}, [replyIndex, resetPublishReplyOptions, closeForm]);
useEffect(() => {
if (anonMode) {
if (isInPostView) {
getAnonAddressForReply();
} else {
getAnonAddressForPost();
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [anonMode, isInPostView]);
// on android, auto upload file to image hosting sites with open api
const [isUploading, setIsUploading] = useState(false);
const [uploadedFileName, setUploadedFileName] = useState<string | null>(null);
+1 -53
View File
@@ -1,9 +1,8 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { setAccount, useAccount } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import useSubplebbitsPagesStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits-pages';
import Plebbit from '@plebbit/plebbit-js';
import { formatMarkdown } from '../../lib/utils/post-utils';
import { getFormattedTimeAgo } from '../../lib/utils/time-utils';
@@ -15,7 +14,6 @@ import useIsMobile from '../../hooks/use-is-mobile';
import styles from './reply-modal.module.css';
import { LinkTypePreviewer } from '../post-form';
import _ from 'lodash';
import useAnonMode from '../../hooks/use-anon-mode';
import FileUploader from '../../plugins/file-uploader';
import { Capacitor } from '@capacitor/core';
import { useSpring, animated } from '@react-spring/web';
@@ -46,34 +44,6 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, postCid, scrollY, s
const urlRef = useRef<HTMLInputElement>(null);
const { selectedText } = useSelectedTextStore();
const { anonMode, getNewSigner, getExistingSigner } = useAnonMode(postCid);
const comment = useSubplebbitsPagesStore((state) => state.comments[postCid]);
const address = comment?.author?.address;
const getAnonAddressForReply = useCallback(async () => {
const existingSigner = await getExistingSigner(address);
if (existingSigner) {
setPublishReplyOptions({
signer: existingSigner,
author: {
address: existingSigner.address,
displayName: displayName || undefined,
},
});
} else {
const newSigner = await getNewSigner();
if (newSigner) {
setPublishReplyOptions({
signer: newSigner,
author: {
address: newSigner.address,
displayName: displayName || undefined,
},
});
}
}
}, [address, getExistingSigner, getNewSigner, setPublishReplyOptions, displayName]);
const [error, setError] = useState<string | null>(null);
const [lengthError, setLengthError] = useState<string | null>(null);
@@ -115,28 +85,6 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, postCid, scrollY, s
publishReply();
};
useEffect(() => {
if (anonMode) {
setPublishReplyOptions({
signer: undefined,
author: {
address: undefined,
displayName: displayName || undefined,
},
});
getAnonAddressForReply();
} else {
setPublishReplyOptions({
signer: undefined,
author: {
...account?.author,
displayName: displayName || account?.author?.displayName,
},
});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [anonMode]);
useEffect(() => {
if (typeof replyIndex === 'number') {
resetPublishReplyOptions();
@@ -5,7 +5,6 @@ import { Comment, useAccount } from '@plebbit/plebbit-react-hooks';
import { useFloating, offset, shift, size, autoUpdate, Placement } from '@floating-ui/react';
import { useDefaultSubplebbits } from '../../hooks/use-default-subplebbits';
import { getBoardPath } from '../../lib/utils/route-utils';
import useAnonModeStore from '../../stores/use-anon-mode-store';
import useIsMobile from '../../hooks/use-is-mobile';
import styles from '../../views/post/post.module.css';
import { Post } from '../../views/post';
@@ -159,8 +158,6 @@ const DesktopQuotePreview = ({ backlinkReply, quotelinkReply, isBacklinkReply, i
);
const account = useAccount();
const { getThreadSigner } = useAnonModeStore();
const threadSigner = quotelinkReply?.postCid ? getThreadSigner(quotelinkReply?.postCid) : null;
const quotelinkBoardPath = quotelinkReply?.subplebbitAddress ? getBoardPath(quotelinkReply.subplebbitAddress, defaultSubplebbits) : undefined;
const quotelinkRoute = quotelinkReply?.cid ? (quotelinkBoardPath ? `/${quotelinkBoardPath}/thread/${quotelinkReply.cid}` : `/thread/${quotelinkReply.cid}`) : '#';
@@ -176,7 +173,7 @@ const DesktopQuotePreview = ({ backlinkReply, quotelinkReply, isBacklinkReply, i
onClick={(e) => handleClick(e, quotelinkReply?.cid, quotelinkReply?.subplebbitAddress)}
>
{quotelinkReply?.shortCid && `>>${quotelinkReply?.shortCid}`}
{(quotelinkReply?.author?.address === account?.author?.address || quotelinkReply?.author?.address === threadSigner?.address) && ' (You)'}
{quotelinkReply?.author?.address === account?.author?.address && ' (You)'}
</Link>
<br />
{hoveredCid === quotelinkReply?.cid &&
@@ -279,8 +276,6 @@ const MobileQuotePreview = ({ backlinkReply, quotelinkReply, isBacklinkReply, is
);
const account = useAccount();
const { getThreadSigner } = useAnonModeStore();
const threadSigner = quotelinkReply?.postCid ? getThreadSigner(quotelinkReply?.postCid) : null;
const replyQuotelink = (
<>
@@ -291,7 +286,7 @@ const MobileQuotePreview = ({ backlinkReply, quotelinkReply, isBacklinkReply, is
onMouseLeave={() => handleMouseLeave(quotelinkReply?.cid)}
>
{quotelinkReply?.shortCid && `>>${quotelinkReply?.shortCid}`}
{(quotelinkReply?.author?.address === account?.author?.address || quotelinkReply?.author?.address === threadSigner?.address) && ' (You)'}
{quotelinkReply?.author?.address === account?.author?.address && ' (You)'}
</span>
{quotelinkReply?.shortCid &&
(() => {
@@ -54,15 +54,3 @@
margin: 2px 0 10px 0;
padding-left: 19px;
}
.anonMode {
padding: 10px 0;
}
.anonMode label {
text-transform: capitalize;
}
.anonMode input[type="checkbox"] {
margin-right: 3px;
}
@@ -3,27 +3,11 @@ import { useTranslation } from 'react-i18next';
import { createAccount, deleteAccount, exportAccount, importAccount, setAccount, setActiveAccount, useAccount, useAccounts } from '@plebbit/plebbit-react-hooks';
import stringify from 'json-stringify-pretty-compact';
import styles from './account-settings.module.css';
import useAnonModeStore from '../../../stores/use-anon-mode-store';
import { Capacitor } from '@capacitor/core';
import { useLocation, useNavigate } from 'react-router-dom';
const isAndroid = Capacitor.getPlatform() === 'android';
const AnonMode = () => {
const { t } = useTranslation();
const anonMode = useAnonModeStore((state) => state.anonMode);
const setAnonMode = useAnonModeStore((state) => state.setAnonMode);
return (
<div className={styles.anonMode}>
<label>
<input type='checkbox' checked={anonMode} onChange={(e) => setAnonMode(e.target.checked)} /> {t('anon_mode')}
</label>
<span className={styles.settingTip}>{t('anon_mode_description')}</span>
</div>
);
};
const AccountSettings = () => {
const { t } = useTranslation();
const location = useLocation();
@@ -236,7 +220,7 @@ const AccountSettings = () => {
<div></div>
<textarea value={text} onChange={(e) => setText(e.target.value)} autoCorrect='off' autoComplete='off' spellCheck='false' />
<div>
<button onClick={saveAccount}>{t('save_changes')}</button> <button onClick={() => setText(accountJson)}>{t('reset_changes')}</button> <AnonMode />
<button onClick={saveAccount}>{t('save_changes')}</button> <button onClick={() => setText(accountJson)}>{t('reset_changes')}</button>
<button className={styles.deleteAccount} onClick={() => _deleteAccount(account?.name)}>
{t('delete_account')}
</button>
@@ -11,12 +11,6 @@
display: inline-block;
}
.warning {
font-size: 0.8em;
padding: 0 10px 10px 10px;
display: block;
}
.avatar img {
width: 64px;
height: 64px;
@@ -4,7 +4,6 @@ import { setAccount, useAccount, useAuthorAvatar } from '@plebbit/plebbit-react-
import styles from './avatar-settings.module.css';
import { Trans, useTranslation } from 'react-i18next';
import LoadingEllipsis from '../../loading-ellipsis';
import useAnonMode from '../../../hooks/use-anon-mode';
const AvatarPreview = ({ avatar }: any) => {
const { t } = useTranslation();
@@ -115,11 +114,8 @@ const AvatarSettings = () => {
alert(`saved`);
};
const { anonMode } = useAnonMode();
return (
<div className={styles.avatarSettings}>
{anonMode && <span className={styles.warning}>{t('avatar_warning')}</span>}
<AvatarPreview avatar={avatar} />
<div className={styles.avatarSettingsForm}>
<div className={styles.avatarSettingInput}>
-52
View File
@@ -1,52 +0,0 @@
import { useAccount } from '@plebbit/plebbit-react-hooks';
import useAnonModeStore from '../stores/use-anon-mode-store';
import { useCallback } from 'react';
const useAnonMode = (postCid?: string) => {
const { anonMode, getThreadSigner, setThreadSigner, setAddressSigner, getAddressSigner } = useAnonModeStore((state) => ({
anonMode: state.anonMode,
getThreadSigner: state.getThreadSigner,
setThreadSigner: state.setThreadSigner,
setAddressSigner: state.setAddressSigner,
getAddressSigner: state.getAddressSigner,
}));
const account = useAccount();
const getNewSigner = useCallback(async () => {
if (anonMode) {
if (postCid) {
const existingSigner = getThreadSigner(postCid);
if (existingSigner) {
return existingSigner;
}
}
try {
const signer = await account?.plebbit.createSigner();
if (signer) {
if (postCid) {
setThreadSigner(postCid, signer);
} else {
setAddressSigner(signer);
}
}
return signer;
} catch (error) {
console.error('Failed to create anonymous signer:', error);
}
}
return null;
}, [anonMode, postCid, account, getThreadSigner, setThreadSigner, setAddressSigner]);
const getExistingSigner = useCallback(
(address: string) => {
const signer = getAddressSigner(address);
return signer;
},
[getAddressSigner],
);
return { anonMode, getNewSigner, getExistingSigner };
};
export default useAnonMode;
+2 -14
View File
@@ -1,8 +1,6 @@
import { useMemo } from 'react';
import { useAccount } from '@plebbit/plebbit-react-hooks';
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import useAnonModeStore from '../stores/use-anon-mode-store';
import useAnonMode from './use-anon-mode';
interface AuthorPrivilegesProps {
commentAuthorAddress: string;
@@ -15,26 +13,16 @@ const useAuthorPrivileges = ({ commentAuthorAddress, subplebbitAddress, postCid
const accountAuthorAddress = account?.author?.address;
const subplebbit = useSubplebbitsStore((state) => state.subplebbits[subplebbitAddress]);
const { roles } = subplebbit || {};
const { getAddressSigner, getThreadSigner } = useAnonModeStore();
const { anonMode } = useAnonMode(postCid);
const { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole } = useMemo(() => {
const commentAuthorRole = roles?.[commentAuthorAddress]?.role;
const isCommentAuthorMod = commentAuthorRole === 'admin' || commentAuthorRole === 'owner' || commentAuthorRole === 'moderator';
const accountAuthorRole = roles?.[accountAuthorAddress]?.role;
const isAccountMod = accountAuthorRole === 'admin' || accountAuthorRole === 'owner' || accountAuthorRole === 'moderator';
let isAccountCommentAuthor = postCid && accountAuthorAddress === commentAuthorAddress;
if (!isAccountCommentAuthor && anonMode) {
const addressSigner = getAddressSigner(commentAuthorAddress);
const threadSigner = postCid ? getThreadSigner(postCid) : null;
isAccountCommentAuthor = (addressSigner && addressSigner.address === commentAuthorAddress) || (threadSigner && threadSigner.address === commentAuthorAddress);
}
const isAccountCommentAuthor = !!postCid && accountAuthorAddress === commentAuthorAddress;
return { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole };
}, [roles, commentAuthorAddress, accountAuthorAddress, anonMode, getAddressSigner, getThreadSigner, postCid]);
}, [roles, commentAuthorAddress, accountAuthorAddress, postCid]);
return { isCommentAuthorMod, isAccountMod, isAccountCommentAuthor, commentAuthorRole, accountAuthorRole };
};
+6 -17
View File
@@ -1,15 +1,12 @@
import { useCallback } from 'react';
import { Comment, useAccount, usePublishComment } from '@plebbit/plebbit-react-hooks';
import useAnonMode from './use-anon-mode';
import usePublishPostStore from '../stores/use-publish-post-store';
const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) => {
const account = useAccount();
const { anonMode } = useAnonMode();
const { author, signer, title, content, link, spoiler, publishCommentOptions } = usePublishPostStore((state) => ({
const { author, title, content, link, spoiler, publishCommentOptions } = usePublishPostStore((state) => ({
author: state.author,
signer: state.signer,
title: state.title || undefined,
content: state.content || undefined,
link: state.link || undefined,
@@ -29,21 +26,13 @@ const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) =
spoiler,
};
if (anonMode) {
baseOptions.author = {
address: signer?.address,
displayName: author?.displayName,
};
baseOptions.signer = signer;
} else {
baseOptions.author = {
...account?.author,
displayName: author?.displayName || account?.author?.displayName,
};
}
baseOptions.author = {
...account?.author,
displayName: author?.displayName || account?.author?.displayName,
};
return baseOptions;
}, [anonMode, author, content, link, signer, spoiler, subplebbitAddress, title, account]);
}, [author, content, link, spoiler, subplebbitAddress, title, account]);
const setPublishPostOptions = useCallback(
(options: Partial<Comment>) => {
+6 -17
View File
@@ -1,16 +1,13 @@
import { useCallback } from 'react';
import { Comment, useAccount, usePublishComment } from '@plebbit/plebbit-react-hooks';
import useAnonMode from './use-anon-mode';
import usePublishReplyStore from '../stores/use-publish-reply-store';
const usePublishReply = ({ cid, subplebbitAddress, postCid }: { cid: string; subplebbitAddress: string; postCid?: string }) => {
const parentCid = cid;
const account = useAccount();
const { anonMode } = useAnonMode(postCid);
const { author, signer, content, link, spoiler, publishCommentOptions } = usePublishReplyStore((state) => ({
const { author, content, link, spoiler, publishCommentOptions } = usePublishReplyStore((state) => ({
author: state.author[parentCid],
signer: state.signer[parentCid] || undefined,
content: state.content[parentCid] || undefined,
link: state.link[parentCid] || undefined,
spoiler: state.spoiler[parentCid] || false,
@@ -30,21 +27,13 @@ const usePublishReply = ({ cid, subplebbitAddress, postCid }: { cid: string; sub
spoiler,
};
if (anonMode) {
baseOptions.author = {
address: signer?.address,
displayName: author?.displayName,
};
baseOptions.signer = signer;
} else {
baseOptions.author = {
...account?.author,
displayName: author?.displayName || account?.author?.displayName,
};
}
baseOptions.author = {
...account?.author,
displayName: author?.displayName || account?.author?.displayName,
};
return baseOptions;
}, [anonMode, author, content, link, parentCid, postCid, signer, spoiler, subplebbitAddress, account]);
}, [author, content, link, parentCid, postCid, spoiler, subplebbitAddress, account]);
const setPublishReplyOptions = useCallback(
(options: Partial<Comment>) => {
-83
View File
@@ -1,83 +0,0 @@
import { create } from 'zustand';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js';
interface AnonModeState {
anonMode: boolean;
threadSigners: { [key: string]: any };
addressSigners: { [address: string]: any };
setAnonMode: (mode: boolean) => void;
setThreadSigner: (postCid: string, signer: any) => void;
getThreadSigner: (postCid: string) => any | undefined;
setAddressSigner: (signer: any) => void;
getAddressSigner: (address: string) => any | undefined;
}
const anonModeStore = localForageLru.createInstance({
name: 'anonModeStore',
size: 1000,
});
const useAnonModeStore = create<AnonModeState>((set, get) => ({
anonMode: true,
threadSigners: {},
addressSigners: {},
setAnonMode: (mode: boolean) => {
set({ anonMode: mode });
anonModeStore.setItem('anonMode', mode);
},
setThreadSigner: (postCid: string, signer: any) => {
set((state) => ({
threadSigners: { ...state.threadSigners, [postCid]: signer },
}));
anonModeStore.setItem(`threadSigner_${postCid}`, signer);
},
getThreadSigner: (postCid: string) => {
const state = get();
if (state.threadSigners[postCid]) {
return state.threadSigners[postCid];
}
return null;
},
setAddressSigner: (signer: any) => {
set((state) => ({
addressSigners: { ...state.addressSigners, [signer.address]: signer },
}));
anonModeStore.setItem(`addressSigner_${signer.address}`, signer);
},
getAddressSigner: (address: string) => {
const state = get();
if (state.addressSigners[address]) {
return state.addressSigners[address];
}
return null;
},
}));
const initializeAnonModeStore = async () => {
const entries: [string, any][] = await anonModeStore.entries();
const threadSigners: { [key: string]: any } = {};
const addressSigners: { [key: string]: any } = {};
let anonMode = true;
entries.forEach(([key, value]) => {
if (key === 'anonMode') {
anonMode = value;
} else if (key.startsWith('threadSigner_')) {
const postCid = key.replace('threadSigner_', '');
threadSigners[postCid] = value;
} else if (key.startsWith('addressSigner_')) {
const address = key.replace('addressSigner_', '');
addressSigners[address] = value;
}
});
useAnonModeStore.setState({
anonMode,
threadSigners,
addressSigners,
});
};
initializeAnonModeStore();
export default useAnonModeStore;
+1 -9
View File
@@ -6,7 +6,6 @@ import useChallengesStore from './use-challenges-store';
type SubmitState = {
author?: any | undefined;
displayName?: string | undefined;
signer?: any | undefined;
subplebbitAddress: string | undefined;
title: string | undefined;
content: string | undefined;
@@ -22,7 +21,6 @@ const { addChallenge } = useChallengesStore.getState();
const usePublishPostStore = create<SubmitState>((set) => ({
author: undefined,
displayName: undefined,
signer: undefined,
subplebbitAddress: undefined,
title: undefined,
content: undefined,
@@ -31,7 +29,7 @@ const usePublishPostStore = create<SubmitState>((set) => ({
publishCommentOptions: {},
setPublishPostStore: (comment: Comment) =>
set(() => {
const { subplebbitAddress, author, content, link, signer, spoiler, title } = comment;
const { subplebbitAddress, author, content, link, spoiler, title } = comment;
const displayName = 'displayName' in comment ? comment.displayName || undefined : author?.displayName;
@@ -60,14 +58,9 @@ const usePublishPostStore = create<SubmitState>((set) => ({
publishCommentOptions.author = updatedAuthor;
}
if (signer) {
publishCommentOptions.signer = signer;
}
return {
author: updatedAuthor,
displayName,
signer,
subplebbitAddress,
title,
content,
@@ -80,7 +73,6 @@ const usePublishPostStore = create<SubmitState>((set) => ({
set({
author: undefined,
displayName: undefined,
signer: undefined,
subplebbitAddress: undefined,
title: undefined,
content: undefined,
+1 -9
View File
@@ -8,7 +8,6 @@ type ReplyState = {
displayName: { [parentCid: string]: string | undefined };
content: { [parentCid: string]: string | undefined };
link: { [parentCid: string]: string | undefined };
signer: { [parentCid: string]: any | undefined };
spoiler: { [parentCid: string]: boolean | undefined };
publishCommentOptions: { [parentCid: string]: PublishCommentOptions | undefined };
setPublishReplyStore: (comment: Comment) => void;
@@ -22,13 +21,12 @@ const usePublishReplyStore = create<ReplyState>((set) => ({
displayName: {},
content: {},
link: {},
signer: {},
spoiler: {},
publishCommentOptions: {},
setPublishReplyStore: (comment: Comment) =>
set((state) => {
const { subplebbitAddress, parentCid, author, content, link, signer, spoiler } = comment;
const { subplebbitAddress, parentCid, author, content, link, spoiler } = comment;
const displayName = 'displayName' in comment ? comment.displayName || undefined : author?.displayName;
@@ -58,16 +56,11 @@ const usePublishReplyStore = create<ReplyState>((set) => ({
publishCommentOptions.author = updatedAuthor;
}
if (signer) {
publishCommentOptions.signer = signer;
}
return {
author: { ...state.author, [parentCid]: updatedAuthor },
displayName: { ...state.displayName, [parentCid]: displayName },
content: { ...state.content, [parentCid]: content },
link: { ...state.link, [parentCid]: link },
signer: { ...state.signer, [parentCid]: signer },
spoiler: { ...state.spoiler, [parentCid]: spoiler },
publishCommentOptions: { ...state.publishCommentOptions, [parentCid]: publishCommentOptions },
};
@@ -79,7 +72,6 @@ const usePublishReplyStore = create<ReplyState>((set) => ({
displayName: { ...state.displayName, [parentCid]: undefined },
content: { ...state.content, [parentCid]: undefined },
link: { ...state.link, [parentCid]: undefined },
signer: { ...state.signer, [parentCid]: undefined },
spoiler: { ...state.spoiler, [parentCid]: undefined },
publishCommentOptions: { ...state.publishCommentOptions, [parentCid]: undefined },
})),
+2 -2
View File
@@ -117,8 +117,8 @@ const FAQ = () => {
address with it.
<br />
<br />
By default, Anon Mode is enabled in the settings, which automatically generates and enables a new username per thread you visit. These anon mode
usernames stem from the currently active account file, which you can backup.
You can also edit the display name associated with your account at any time in the settings or directly in the post form. The name you choose will be
reused across threads until you change it again.
</dd>
<dt id='howimage'>How do I post an image?</dt>
<dd>