mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
+2
-2
@@ -8,7 +8,7 @@
|
||||
"dependencies": {
|
||||
"@capacitor/app": "6.0.1",
|
||||
"@floating-ui/react": "0.26.1",
|
||||
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#be1a1f317db7c4096f0d1c79452e13452bf9df78",
|
||||
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#6d35eb3b4dc84f8fdcbb46d95e3b1d78f1750b5f",
|
||||
"@testing-library/jest-dom": "5.14.1",
|
||||
"@testing-library/react": "13.0.0",
|
||||
"@testing-library/user-event": "13.2.1",
|
||||
@@ -35,7 +35,7 @@
|
||||
"react-router-dom": "6.16.0",
|
||||
"react-router-hash-link": "2.4.3",
|
||||
"react-scripts": "5.0.1",
|
||||
"react-virtuoso": "4.7.8",
|
||||
"react-virtuoso": "4.12.3",
|
||||
"rehype-sanitize": "5.0.1",
|
||||
"remark-gfm": "3.0.1",
|
||||
"remark-supersub": "1.0.0",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "جارٍ تحميل subplebbit",
|
||||
"avatar_warning": "لا يمكنك النشر بصورة رمزية أثناء تفعيل وضع المجهول. يمكنك إيقافه في إعدادات حساب Plebbit الخاص بك.",
|
||||
"last_bumped": "آخر رفع",
|
||||
"threads_without_images_tip": "لا تعرض المواضيع بدون صور",
|
||||
"threads_without_images_tip": "عرض فقط المواضيع التي ترتبط بالوسائط القابلة للتضمين",
|
||||
"hide_gore_boards_tip": "لا تعرض المواضيع من المجالس التي تحتوي على وسم \"جور\"",
|
||||
"hide_adult_boards_tip": "لا تعرض المواضيع من المجالس التي تحتوي على وسم \"بالغ\"",
|
||||
"fit_expanded_images_to_screen": "تغيير حجم الصور الموسعة لتناسب الشاشة",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "সাবপ্লেবিট লোড হচ্ছে",
|
||||
"avatar_warning": "অ্যানন মোড চালু থাকা অবস্থায় আপনি অ্যানিমেশন সহ পোস্ট করতে পারেন না। আপনি এটি আপনার Plebbit অ্যাকাউন্টের সেটিংসে বন্ধ করতে পারেন।",
|
||||
"last_bumped": "শেষ.bump",
|
||||
"threads_without_images_tip": "ছবি ছাড়া থ্রেডগুলি প্রদর্শন করবেন না",
|
||||
"threads_without_images_tip": "শুধুমাত্র এমন থ্রেডগুলি প্রদর্শন করুন যেগুলি এমবেডযোগ্য মিডিয়াতে লিঙ্ক করে",
|
||||
"hide_gore_boards_tip": "\"গোর\" ট্যাগযুক্ত বোর্ড থেকে থ্রেডগুলি প্রদর্শন করবেন না",
|
||||
"hide_adult_boards_tip": "\"এডাল্ট\" ট্যাগযুক্ত বোর্ড থেকে থ্রেডগুলি প্রদর্শন করবেন না",
|
||||
"fit_expanded_images_to_screen": "প্রসারিত ছবিগুলি স্ক্রীনে ফিট করুন",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Načítání subplebbit",
|
||||
"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": "Nezobrazovat vlákna bez obrázků",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Nezobrazovat vlákna z fór se značkou \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Přizpůsobit rozšířené obrázky obrazovce",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Indlæser subplebbit",
|
||||
"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 ikke tråde uden billeder",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Vis ikke tråde fra boards med \"adult\" tagget",
|
||||
"fit_expanded_images_to_screen": "Tilpas udvidede billeder til skærmen",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Lade subplebbit",
|
||||
"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": "Keine Threads ohne Bilder anzeigen",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Zeige keine Threads von Boards mit dem \"adult\"-Tag",
|
||||
"fit_expanded_images_to_screen": "Erweiterte Bilder an den Bildschirm anpassen",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Φόρτωση subplebbit",
|
||||
"avatar_warning": "Δεν μπορείτε να δημοσιεύσετε με avatar ενώ είναι ενεργοποιημένη η ανώνυμη λειτουργία. Μπορείτε να το απενεργοποιήσετε στις ρυθμίσεις του λογαριασμού σας Plebbit.",
|
||||
"last_bumped": "Τελευταία ανύψωση",
|
||||
"threads_without_images_tip": "Μην εμφανίζετε θέματα χωρίς εικόνες",
|
||||
"threads_without_images_tip": "Εμφάνιση μόνο θεμάτων που συνδέονται με ενσωματώσιμα μέσα",
|
||||
"hide_gore_boards_tip": "Μην εμφανίζετε θέματα από φόρουμ με την ετικέτα \"gore\"",
|
||||
"hide_adult_boards_tip": "Μην εμφανίζετε θέματα από φόρουμ με την ετικέτα \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Προσαρμόστε τις επεκταμένες εικόνες στην οθόνη",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Loading subplebbit",
|
||||
"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": "Don't display threads without images",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Don't display threads from boards with the \"adult\" tag",
|
||||
"fit_expanded_images_to_screen": "Fit expanded images to screen",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Cargando subplebbit",
|
||||
"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": "No mostrar hilos sin imágenes",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "No mostrar hilos de los foros con la etiqueta \"adulto\"",
|
||||
"fit_expanded_images_to_screen": "Ajustar imágenes ampliadas a la pantalla",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "در حال بارگذاری subplebbit",
|
||||
"avatar_warning": "شما نمیتوانید با آواتار پست بگذارید در حالی که حالت ناشناس فعال است. میتوانید آن را در تنظیمات حساب Plebbit خود خاموش کنید.",
|
||||
"last_bumped": "آخرین افزایش",
|
||||
"threads_without_images_tip": "موضوعات بدون تصویر را نمایش ندهید",
|
||||
"threads_without_images_tip": "فقط موضوعاتی که به رسانههای قابل گنجاندن لینک میدهند را نمایش دهید",
|
||||
"hide_gore_boards_tip": "موضوعات از مجامع با برچسب \"گور\" را نمایش ندهید",
|
||||
"hide_adult_boards_tip": "موضوعات از مجامع با برچسب \"بزرگسال\" را نمایش ندهید",
|
||||
"fit_expanded_images_to_screen": "اندازه تصاویر بزرگ شده را به صفحه نمایش بکنید",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Ladataan subplebbit",
|
||||
"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": "Älä näytä ketjuja ilman kuvia",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Älä näytä ketjuja taulukoista, joissa on \"adult\"-tunniste",
|
||||
"fit_expanded_images_to_screen": "Sovita laajennettuja kuvia näyttöön",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Naglo-load ng subplebbit",
|
||||
"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": "Huwag magpakita ng mga thread na walang mga larawan",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Huwag magpakita ng mga thread mula sa mga board na may \"adult\" na tag",
|
||||
"fit_expanded_images_to_screen": "I-adjust ang mga pinalawak na larawan sa screen",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Chargement de subplebbit",
|
||||
"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": "Ne pas afficher les sujets sans images",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Ne pas afficher les fils des forums avec le tag \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Ajuster les images agrandies à l'écran",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "טוען subplebbit",
|
||||
"avatar_warning": "אין באפשרותך לפרסם עם תמונת פרופיל בזמן שמצב אנונימי מופעל. תוכל לבטל זאת בהגדרות חשבון Plebbit שלך.",
|
||||
"last_bumped": "הבום האחרון",
|
||||
"threads_without_images_tip": "אל תציג נושאים ללא תמונות",
|
||||
"threads_without_images_tip": "הצג רק נושאים שמקשרים למדיה שניתן להטמיע",
|
||||
"hide_gore_boards_tip": "אל תציג נושאים מלוחות עם תג \"גורה\"",
|
||||
"hide_adult_boards_tip": "אל תציג נושאים מלוחות עם תג \"מבוגר\"",
|
||||
"fit_expanded_images_to_screen": "התאם את התמונות המורחבות למסך",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "सबप्लेबिट लोड हो रहा है",
|
||||
"avatar_warning": "जब अज्ञात मोड चालू होता है, तो आप अवतार के साथ पोस्ट नहीं कर सकते। आप इसे अपने Plebbit खाते की सेटिंग में बंद कर सकते हैं।",
|
||||
"last_bumped": "अंतिम बंप",
|
||||
"threads_without_images_tip": "बिना चित्र वाले थ्रेड्स प्रदर्शित न करें",
|
||||
"threads_without_images_tip": "केवल उन थ्रेड्स को दिखाएं जो एम्बेडेबल मीडिया से लिंक करते हैं",
|
||||
"hide_gore_boards_tip": "\"गोर\" टैग वाले बोर्डों से थ्रेड्स न दिखाएं",
|
||||
"hide_adult_boards_tip": "\"एडल्ट\" टैग वाले बोर्डों से थ्रेड्स न दिखाएं",
|
||||
"fit_expanded_images_to_screen": "विस्तृत चित्रों को स्क्रीन के अनुसार ढालें",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Subplebbit 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": "Ne jelenítsd meg a képek nélküli szálakat",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Ne jelenítsd meg a \"adult\" címkével rendelkező fórumok szálait",
|
||||
"fit_expanded_images_to_screen": "Illeszkedjen a kibővített képekhez a képernyőhöz",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Memuat subplebbit",
|
||||
"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": "Jangan tampilkan thread tanpa gambar",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Jangan tampilkan thread dari board dengan tag \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Sesuaikan gambar yang diperluas ke layar",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Caricamento subplebbit",
|
||||
"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": "Non mostrare thread senza immagini",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Non mostrare i thread dei board con il tag \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Adatta le immagini espanse allo schermo",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "subplebbitを読み込んでいます",
|
||||
"avatar_warning": "アバターを使用して投稿することはできません。匿名モードがオンになっている間は、Plebbitアカウントの設定でオフにできます。",
|
||||
"last_bumped": "最後のバンプ",
|
||||
"threads_without_images_tip": "画像のないスレッドを表示しない",
|
||||
"threads_without_images_tip": "埋め込むことができるメディアへのリンクを持つスレッドのみを表示",
|
||||
"hide_gore_boards_tip": "\"gore\"タグのあるボードからスレッドを表示しない",
|
||||
"hide_adult_boards_tip": "\"adult\"タグのあるボードからスレッドを表示しない",
|
||||
"fit_expanded_images_to_screen": "拡張された画像を画面に合わせる",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "subplebbit 로딩 중",
|
||||
"avatar_warning": "익명 모드가 켜져 있는 동안 아바타로 게시할 수 없습니다. Plebbit 계정 설정에서 끌 수 있습니다.",
|
||||
"last_bumped": "마지막 bump",
|
||||
"threads_without_images_tip": "이미지가 없는 스레드는 표시하지 않음",
|
||||
"threads_without_images_tip": "임베드 가능한 미디어로 링크된 스레드만 표시",
|
||||
"hide_gore_boards_tip": "\"gore\" 태그가 있는 게시판에서 스레드를 표시하지 않음",
|
||||
"hide_adult_boards_tip": "\"adult\" 태그가 있는 게시판에서 스레드를 표시하지 않음",
|
||||
"fit_expanded_images_to_screen": "확장된 이미지를 화면에 맞추기",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "subplebbit लोड करीत आहे",
|
||||
"avatar_warning": "आपण अज्ञात मोड चालू असताना अवतारसह पोस्ट करू शकत नाही. आपण ते आपल्या Plebbit खात्याच्या सेटिंग्जमध्ये बंद करू शकता.",
|
||||
"last_bumped": "अंतिम बंप",
|
||||
"threads_without_images_tip": "बिना चित्र असलेले थ्रेड्स दर्शवू नका",
|
||||
"threads_without_images_tip": "फक्त ते थ्रेड्स दाखवा जे एम्बेडेबल मीडियाशी लिंक करतात",
|
||||
"hide_gore_boards_tip": "\"गोर\" टॅग असलेल्या बोर्डमधून थ्रेड्स दाखवू नका",
|
||||
"hide_adult_boards_tip": "\"एडल्ट\" टॅग असलेल्या बोर्डमधून थ्रेड्स दाखवू नका",
|
||||
"fit_expanded_images_to_screen": "विस्तृत प्रतिमा स्क्रीनवर फिट करा",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Subplebbit 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 geen threads zonder afbeeldingen",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Toon geen threads van boards met de \"adult\" tag",
|
||||
"fit_expanded_images_to_screen": "Pas uitgebreide afbeeldingen aan het scherm aan",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Laster subplebbit",
|
||||
"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 ikke tråder uten bilder",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "Vis ikke tråder fra brett med \"adult\"-taggen",
|
||||
"fit_expanded_images_to_screen": "Tilpass utvidede bilder til skjermen",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Ładowanie subplebbit",
|
||||
"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": "Nie wyświetlaj wątków bez obrazów",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Nie wyświetlaj wątków z forów z tagiem \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Dopasuj rozszerzone obrazy do ekranu",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Carregando subplebbit",
|
||||
"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": "Não exibir threads sem imagens",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Não exibir threads de boards com a tag \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Ajustar imagens expandidas à tela",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Se încarcă subplebbit",
|
||||
"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": "Nu afișați subiecte fără imagini",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Nu afișați discuțiile de pe forumuri cu eticheta \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Se potrivesc imaginile extinse pe ecran",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Загрузка subplebbit",
|
||||
"avatar_warning": "Вы не можете публиковать с аватаром, когда режим анонимности включен. Вы можете отключить его в настройках своей учетной записи Plebbit.",
|
||||
"last_bumped": "Последний бамп",
|
||||
"threads_without_images_tip": "Не показывать темы без изображений",
|
||||
"threads_without_images_tip": "Отображать только темы, которые ссылаются на встраиваемые медиа",
|
||||
"hide_gore_boards_tip": "Не показывать темы с форумов с тегом \"gore\"",
|
||||
"hide_adult_boards_tip": "Не показывать темы с форумов с тегом \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Подогнать расширенные изображения под экран",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Po ngarkohet subplebbit",
|
||||
"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": "Mos shfaqni temat pa imazhe",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Mos shfaqni temat nga forumet me etiketën \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Përshtatni imazhet e zgjeruara në ekran",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Laddar subplebbit",
|
||||
"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 inte trådar utan bilder",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Visa inte trådar från forum med taggen \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Anpassa utvidgade bilder till skärmen",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "సబ్ప్లెబిట్లో లోడింగ్",
|
||||
"avatar_warning": "మీరు అను మోడ్ ఆన్ ఉండగా అవతార్తో పోస్ట్ చేయలేరు. మీరు మీ Plebbit ఖాతా సెట్టింగ్స్లో దీన్ని ఆఫ్ చేయవచ్చు.",
|
||||
"last_bumped": "చివరి బంప్",
|
||||
"threads_without_images_tip": "చిత్రాలు లేని థ్రెడ్లు చూపించవద్దు",
|
||||
"threads_without_images_tip": "ఏంబెడబుల్ మీడియాకు లింక్ చేసే థ్రెడ్లను మాత్రమే చూపించండి",
|
||||
"hide_gore_boards_tip": "\"గోర్\" ట్యాగ్తో ఉన్న బోర్డ్స్ నుండి థ్రెడ్లు చూపించవద్దు",
|
||||
"hide_adult_boards_tip": "\"అడల్ట్\" ట్యాగ్తో ఉన్న బోర్డ్స్ నుండి థ్రెడ్లు చూపించవద్దు",
|
||||
"fit_expanded_images_to_screen": "విస్తృత చిత్రాలను స్క్రీన్కు సరిపోల్చండి",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "กำลังโหลด subplebbit",
|
||||
"avatar_warning": "คุณไม่สามารถโพสต์ด้วยอวาตาร์ในขณะที่โหมดอนาโนเป็นเปิดอยู่ คุณสามารถปิดได้ในการตั้งค่าบัญชี Plebbit ของคุณ",
|
||||
"last_bumped": "เพิ่มล่าสุด",
|
||||
"threads_without_images_tip": "ไม่แสดงกระทู้ที่ไม่มีรูปภาพ",
|
||||
"threads_without_images_tip": "แสดงเฉพาะกระทู้ที่เชื่อมโยงไปยังสื่อที่สามารถฝังได้",
|
||||
"hide_gore_boards_tip": "ไม่แสดงกระทู้จากบอร์ดที่มีแท็ก \"gore\"",
|
||||
"hide_adult_boards_tip": "ไม่แสดงกระทู้จากบอร์ดที่มีแท็ก \"adult\"",
|
||||
"fit_expanded_images_to_screen": "ปรับขนาดภาพที่ขยายให้พอดีกับหน้าจอ",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Subplebbit 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": "Resimsiz gönderileri görüntüleme",
|
||||
"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",
|
||||
"hide_adult_boards_tip": "\"adult\" etiketi olan boardlardan gönderileri göstermeyin",
|
||||
"fit_expanded_images_to_screen": "Genişletilmiş resimleri ekrana sığdır",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Завантаження subplebbit",
|
||||
"avatar_warning": "Ви не можете публікувати з аватаром, коли увімкнено анонімний режим. Ви можете вимкнути його в налаштуваннях свого облікового запису Plebbit.",
|
||||
"last_bumped": "Останній бамп",
|
||||
"threads_without_images_tip": "Не показувати теми без зображень",
|
||||
"threads_without_images_tip": "Показувати тільки ті теми, які містять посилання на медіа, що можна вбудувати",
|
||||
"hide_gore_boards_tip": "Не показувати теми з форумів з тегом \"gore\"",
|
||||
"hide_adult_boards_tip": "Не показувати теми з форумів з тегом \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Підлаштувати розширені зображення під екран",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "سب پلبیٹ لوڈ ہو رہا ہے",
|
||||
"avatar_warning": "آپ اَنون موڈ آن ہونے پر اوتار کے ساتھ پوسٹ نہیں کر سکتے۔ آپ اسے اپنے Plebbit اکاؤنٹ کی ترتیبات میں بند کر سکتے ہیں۔",
|
||||
"last_bumped": "آخری بمپر",
|
||||
"threads_without_images_tip": "تصاویر کے بغیر تھریڈز کو نہ دکھائیں",
|
||||
"threads_without_images_tip": "صرف وہ تھریڈز دکھائیں جو ایمبیڈ ایبل میڈیا کے ساتھ لنک کرتے ہیں",
|
||||
"hide_gore_boards_tip": "\"گور\" ٹیگ والے بورڈز سے تھریڈز نہ دکھائیں",
|
||||
"hide_adult_boards_tip": "\"ایڈلٹ\" ٹیگ والے بورڈز سے تھریڈز نہ دکھائیں",
|
||||
"fit_expanded_images_to_screen": "پھیلائی ہوئی تصاویر کو اسکرین پر فٹ کریں",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "Đang tải subplebbit",
|
||||
"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": "Không hiển thị chủ đề không có hình ảnh",
|
||||
"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\"",
|
||||
"hide_adult_boards_tip": "Không hiển thị chủ đề từ các diễn đàn có thẻ \"adult\"",
|
||||
"fit_expanded_images_to_screen": "Phù hợp hình ảnh mở rộng với màn hình",
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
"loading_subplebbit": "加载 subplebbit",
|
||||
"avatar_warning": "在匿名模式开启时,您无法使用头像进行发布。您可以在 Plebbit 账户设置中将其关闭。",
|
||||
"last_bumped": "最后提升",
|
||||
"threads_without_images_tip": "不显示没有图片的帖子",
|
||||
"threads_without_images_tip": "仅显示链接到可嵌入媒体的帖子",
|
||||
"hide_gore_boards_tip": "不显示来自带有“gore”标签的板块的帖子",
|
||||
"hide_adult_boards_tip": "不显示来自带有“adult”标签的板块的帖子",
|
||||
"fit_expanded_images_to_screen": "适应扩展图像到屏幕",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useRef, useState } from 'react';
|
||||
import { useRef, useState, useEffect } from 'react';
|
||||
import Draggable from 'react-draggable';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Challenge as ChallengeType } from '@plebbit/plebbit-react-hooks';
|
||||
@@ -45,6 +45,7 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => {
|
||||
|
||||
const onEnterKey = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key !== 'Enter') return;
|
||||
if (!answers[currentChallengeIndex]) return;
|
||||
if (challenges[currentChallengeIndex + 1]) {
|
||||
setCurrentChallengeIndex((prev) => prev + 1);
|
||||
} else {
|
||||
@@ -52,6 +53,16 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const onEscapeKey = (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') {
|
||||
closeModal();
|
||||
}
|
||||
};
|
||||
document.addEventListener('keydown', onEscapeKey);
|
||||
return () => document.removeEventListener('keydown', onEscapeKey);
|
||||
}, [closeModal]);
|
||||
|
||||
// react-draggable requires a ref to the modal node
|
||||
const nodeRef = useRef(null);
|
||||
const isMobile = useIsMobile();
|
||||
@@ -102,7 +113,11 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => {
|
||||
<div className={styles.challengeFooter}>
|
||||
<div className={styles.counter}>{t('challenge_counter', { index: currentChallengeIndex + 1, total: challenges?.length })}</div>
|
||||
<span className={styles.buttons}>
|
||||
{!challenges[currentChallengeIndex + 1] && <button onClick={onSubmit}>{t('submit')}</button>}
|
||||
{!challenges[currentChallengeIndex + 1] && (
|
||||
<button onClick={onSubmit} disabled={!answers[currentChallengeIndex]}>
|
||||
{t('submit')}
|
||||
</button>
|
||||
)}
|
||||
{challenges.length > 1 && (
|
||||
<button disabled={!challenges[currentChallengeIndex - 1]} onClick={() => setCurrentChallengeIndex((prev) => prev - 1)}>
|
||||
{t('previous')}
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
all: revert;
|
||||
border: none;
|
||||
border-top: 1px solid var(--body-font-color);
|
||||
}
|
||||
|
||||
.markdown ol, .markdown ul {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
@@ -405,12 +405,15 @@ const Reply = ({ openReplyModal, postReplyCount, reply, roles }: PostProps) => {
|
||||
const isRouteLinkToReply = useLocation().pathname.startsWith(`/p/${subplebbitAddress}/c/${cid}`);
|
||||
const { hidden } = useHide({ cid });
|
||||
|
||||
const commentMediaInfo = useCommentMediaInfo(post);
|
||||
const hasThumbnail = getHasThumbnail(commentMediaInfo, link);
|
||||
|
||||
return (
|
||||
<div className={styles.replyDesktop}>
|
||||
<div className={styles.sideArrows}>{'>>'}</div>
|
||||
<div className={`${styles.reply} ${isRouteLinkToReply && styles.highlight}`} data-cid={cid} data-author-address={author?.shortAddress} data-post-cid={postCid}>
|
||||
<PostInfo openReplyModal={openReplyModal} post={post} postReplyCount={postReplyCount} roles={roles} isHidden={hidden} />
|
||||
{link && !hidden && !(deleted || removed) && isValidURL(link) && <PostMedia post={post} />}
|
||||
{link && !hidden && !(deleted || removed) && isValidURL(link) && <PostMedia post={post} hasThumbnail={hasThumbnail} />}
|
||||
{!hidden && (!(removed || deleted) || ((removed || deleted) && reason)) && <PostMessage post={post} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,11 +35,9 @@ const handleQuoteHover = (cid: string, onElementOutOfView: () => void) => {
|
||||
if (isInViewport(htmlElement)) {
|
||||
const hasHighlight = Array.from(htmlElement.classList).some((className) => className.includes('highlight') && !className.includes('double-highlight'));
|
||||
if (hasHighlight) {
|
||||
console.log('contains highlight');
|
||||
htmlElement.classList.remove('highlight');
|
||||
htmlElement.classList.add('double-highlight');
|
||||
} else {
|
||||
console.log("doesn't contain highlight", htmlElement.classList);
|
||||
htmlElement.classList.remove('double-highlight');
|
||||
htmlElement.classList.add('highlight');
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
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';
|
||||
|
||||
@@ -25,10 +26,9 @@ const AnonMode = () => {
|
||||
|
||||
const AccountSettings = () => {
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
const account = useAccount();
|
||||
const { accounts } = useAccounts();
|
||||
const [text, setText] = useState('');
|
||||
const [switchToLastAccount, setSwitchToLastAccount] = useState(false);
|
||||
|
||||
const accountJson = useMemo(
|
||||
() => stringify({ account: { ...account, plebbit: undefined, karma: undefined, plebbitReactOptions: undefined, unreadNotificationCount: undefined } }),
|
||||
@@ -39,16 +39,21 @@ const AccountSettings = () => {
|
||||
setText(accountJson);
|
||||
}, [accountJson]);
|
||||
|
||||
const { accounts } = useAccounts();
|
||||
const switchToNewAccountRef = useRef(false);
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
if (switchToLastAccount && accounts.length > 0) {
|
||||
if (switchToNewAccountRef.current && accounts.length > 0) {
|
||||
const lastAccount = accounts[accounts.length - 1];
|
||||
setActiveAccount(lastAccount.name);
|
||||
setSwitchToLastAccount(false);
|
||||
switchToNewAccountRef.current = false;
|
||||
}
|
||||
}, [accounts, switchToLastAccount]);
|
||||
}, [accounts]);
|
||||
|
||||
const _createAccount = async () => {
|
||||
const handleCreateAccount = async () => {
|
||||
try {
|
||||
switchToNewAccountRef.current = true;
|
||||
await createAccount();
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
@@ -58,7 +63,6 @@ const AccountSettings = () => {
|
||||
console.error('An unknown error occurred:', error);
|
||||
}
|
||||
}
|
||||
setSwitchToLastAccount(true);
|
||||
};
|
||||
|
||||
const _deleteAccount = (accountName: string) => {
|
||||
@@ -89,7 +93,7 @@ const AccountSettings = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const _exportAccount = async () => {
|
||||
const handleExportAccount = async () => {
|
||||
try {
|
||||
const accountString = await exportAccount();
|
||||
const accountObject = JSON.parse(accountString);
|
||||
@@ -123,8 +127,7 @@ const AccountSettings = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const _importAccount = async () => {
|
||||
// Create a file input element
|
||||
const handleImportAccount = async () => {
|
||||
const fileInput = document.createElement('input');
|
||||
fileInput.type = 'file';
|
||||
fileInput.accept = '.json';
|
||||
@@ -141,15 +144,39 @@ const AccountSettings = () => {
|
||||
// Read the file content
|
||||
const reader = new FileReader();
|
||||
reader.onload = async (e) => {
|
||||
const fileContent = e.target!.result; // Non-null assertion
|
||||
if (typeof fileContent !== 'string') {
|
||||
throw new Error('File content is not a string.');
|
||||
try {
|
||||
const fileContent = e.target!.result;
|
||||
if (typeof fileContent !== 'string') {
|
||||
throw new Error('File content is not a string.');
|
||||
}
|
||||
const newAccount = JSON.parse(fileContent);
|
||||
await importAccount(fileContent);
|
||||
|
||||
// Store the imported account's address
|
||||
if (newAccount.account?.author?.address) {
|
||||
localStorage.setItem('importedAccountAddress', newAccount.account.author.address);
|
||||
}
|
||||
|
||||
// Set the new account as active before reloading
|
||||
if (newAccount.account?.name) {
|
||||
await setActiveAccount(newAccount.account.name);
|
||||
}
|
||||
|
||||
alert(`Imported ${newAccount.account?.name}`);
|
||||
|
||||
const currentPath = location.pathname;
|
||||
if (!currentPath.includes('/settings#account-settings')) {
|
||||
navigate(`${currentPath}#account-settings`, { replace: true });
|
||||
}
|
||||
window.location.reload();
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
alert(error.message);
|
||||
console.log(error);
|
||||
} else {
|
||||
console.error('An unknown error occurred:', error);
|
||||
}
|
||||
}
|
||||
const newAccount = JSON.parse(fileContent);
|
||||
await importAccount(fileContent);
|
||||
setSwitchToLastAccount(true);
|
||||
alert(`Imported ${newAccount.account?.name}`);
|
||||
window.location.reload();
|
||||
};
|
||||
reader.readAsText(file);
|
||||
} catch (error) {
|
||||
@@ -178,10 +205,10 @@ const AccountSettings = () => {
|
||||
<select value={account?.name} onChange={(e) => setActiveAccount(e.target.value)}>
|
||||
{accountsOptions}
|
||||
</select>
|
||||
<button className={styles.createAccount} onClick={_createAccount}>
|
||||
<button className={styles.createAccount} onClick={handleCreateAccount}>
|
||||
{t('create')}
|
||||
</button>{' '}
|
||||
<button onClick={_importAccount}>{t('import')}</button> <button onClick={_exportAccount}>{t('export')}</button>
|
||||
<button onClick={handleImportAccount}>{t('import')}</button> <button onClick={handleExportAccount}>{t('export')}</button>
|
||||
<div className={styles.warning}>
|
||||
{t('stored_locally', {
|
||||
location: window.isElectron ? 'this desktop app' : isAndroid ? 'this mobile app' : window.location.hostname,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import styles from './settings-modal.module.css';
|
||||
@@ -14,6 +14,7 @@ const SettingsModal = () => {
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const hash = location.hash.slice(1);
|
||||
|
||||
const closeModal = () => {
|
||||
const newPath = location.pathname.replace(/\/settings$/, '');
|
||||
@@ -29,6 +30,68 @@ const SettingsModal = () => {
|
||||
const [showPlebbitOptionsSettings, setShowPlebbitOptionsSettings] = useState(false);
|
||||
const [expandAll, setExpandAll] = useState(false);
|
||||
|
||||
const getExpandedCount = () => {
|
||||
return (
|
||||
Number(showInterfaceSettings) +
|
||||
Number(showAccountSettings) +
|
||||
Number(showAvatarSettings) +
|
||||
Number(showCryptoAddressSetting) +
|
||||
Number(showCryptoWalletSettings) +
|
||||
Number(showBlockedAddressesSetting) +
|
||||
Number(showPlebbitOptionsSettings)
|
||||
);
|
||||
};
|
||||
|
||||
const getExpandedCategoryId = (excludeCategoryId?: string) => {
|
||||
if (showInterfaceSettings && 'interface-settings' !== excludeCategoryId) return 'interface-settings';
|
||||
if (showAccountSettings && 'account-settings' !== excludeCategoryId) return 'account-settings';
|
||||
if (showAvatarSettings && 'avatar-settings' !== excludeCategoryId) return 'avatar-settings';
|
||||
if (showCryptoAddressSetting && 'crypto-address-settings' !== excludeCategoryId) return 'crypto-address-settings';
|
||||
if (showCryptoWalletSettings && 'crypto-wallet-settings' !== excludeCategoryId) return 'crypto-wallet-settings';
|
||||
if (showBlockedAddressesSetting && 'blocked-addresses-settings' !== excludeCategoryId) return 'blocked-addresses-settings';
|
||||
if (showPlebbitOptionsSettings && 'plebbit-options-settings' !== excludeCategoryId) return 'plebbit-options-settings';
|
||||
return null;
|
||||
};
|
||||
|
||||
const handleCategoryClick = (categoryId: string, isShowing: boolean, setShowing: (value: boolean) => void) => {
|
||||
const newState = !isShowing;
|
||||
setShowing(newState);
|
||||
|
||||
const currentPath = location.pathname;
|
||||
const baseSettingsPath = currentPath.split('#')[0];
|
||||
|
||||
const currentExpandedCount = getExpandedCount();
|
||||
|
||||
if (newState) {
|
||||
if (currentExpandedCount === 0) {
|
||||
navigate(`${baseSettingsPath}#${categoryId}`, { replace: true });
|
||||
} else {
|
||||
navigate(baseSettingsPath, { replace: true });
|
||||
}
|
||||
} else {
|
||||
if (currentExpandedCount === 1) {
|
||||
navigate(baseSettingsPath, { replace: true });
|
||||
} else if (currentExpandedCount === 2) {
|
||||
const remainingCategory = getExpandedCategoryId(categoryId);
|
||||
if (remainingCategory) {
|
||||
navigate(`${baseSettingsPath}#${remainingCategory}`, { replace: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (hash) {
|
||||
setShowInterfaceSettings(hash === 'interface-settings');
|
||||
setShowAccountSettings(hash === 'account-settings');
|
||||
setShowAvatarSettings(hash === 'avatar-settings');
|
||||
setShowCryptoAddressSetting(hash === 'crypto-address-settings');
|
||||
setShowCryptoWalletSettings(hash === 'crypto-wallet-settings');
|
||||
setShowBlockedAddressesSetting(hash === 'blocked-addresses-settings');
|
||||
setShowPlebbitOptionsSettings(hash === 'plebbit-options-settings');
|
||||
}
|
||||
}, [hash]);
|
||||
|
||||
const handleExpandAll = () => {
|
||||
const newExpandState = !expandAll;
|
||||
setExpandAll(newExpandState);
|
||||
@@ -39,6 +102,9 @@ const SettingsModal = () => {
|
||||
setShowCryptoWalletSettings(newExpandState);
|
||||
setShowBlockedAddressesSetting(newExpandState);
|
||||
setShowPlebbitOptionsSettings(newExpandState);
|
||||
|
||||
const baseSettingsPath = location.pathname.split('#')[0];
|
||||
navigate(baseSettingsPath, { replace: true });
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -52,50 +118,50 @@ const SettingsModal = () => {
|
||||
<div className={styles.expandAllSettings}>
|
||||
[<span onClick={handleExpandAll}>{expandAll ? t('collapse_all_settings') : t('expand_all_settings')}</span>]
|
||||
</div>
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowInterfaceSettings(!showInterfaceSettings)}>
|
||||
<div id='interface-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('interface-settings', showInterfaceSettings, setShowInterfaceSettings)}>
|
||||
<span className={showInterfaceSettings ? styles.hideButton : styles.showButton} />
|
||||
{t('interface')}
|
||||
</label>
|
||||
</div>
|
||||
{showInterfaceSettings && <InterfaceSettings />}
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowAccountSettings(!showAccountSettings)}>
|
||||
<div id='account-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('account-settings', showAccountSettings, setShowAccountSettings)}>
|
||||
<span className={showAccountSettings ? styles.hideButton : styles.showButton} />
|
||||
{t('plebbit_account')}
|
||||
</label>
|
||||
</div>
|
||||
{showAccountSettings && <AccountSettings />}
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowAvatarSettings(!showAvatarSettings)}>
|
||||
<div id='avatar-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('avatar-settings', showAvatarSettings, setShowAvatarSettings)}>
|
||||
<span className={showAvatarSettings ? styles.hideButton : styles.showButton} />
|
||||
{t('avatar')}
|
||||
</label>
|
||||
</div>
|
||||
{showAvatarSettings && <AvatarSettings />}
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowCryptoAddressSetting(!showCryptoAddressSetting)}>
|
||||
<div id='crypto-address-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('crypto-address-settings', showCryptoAddressSetting, setShowCryptoAddressSetting)}>
|
||||
<span className={showCryptoAddressSetting ? styles.hideButton : styles.showButton} />
|
||||
{t('crypto_address')}
|
||||
</label>
|
||||
</div>
|
||||
{showCryptoAddressSetting && <CryptoAddressSetting />}
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowCryptoWalletSettings(!showCryptoWalletSettings)}>
|
||||
<div id='crypto-wallet-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('crypto-wallet-settings', showCryptoWalletSettings, setShowCryptoWalletSettings)}>
|
||||
<span className={showCryptoWalletSettings ? styles.hideButton : styles.showButton} />
|
||||
{t('crypto_wallets')}
|
||||
</label>
|
||||
</div>
|
||||
{showCryptoWalletSettings && <CryptoWalletsSetting />}
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowBlockedAddressesSetting(!showBlockedAddressesSetting)}>
|
||||
<div id='blocked-addresses-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('blocked-addresses-settings', showBlockedAddressesSetting, setShowBlockedAddressesSetting)}>
|
||||
<span className={showBlockedAddressesSetting ? styles.hideButton : styles.showButton} />
|
||||
{t('blocked_addresses')}
|
||||
</label>
|
||||
</div>
|
||||
{showBlockedAddressesSetting && <BlockedAddressesSetting />}
|
||||
<div className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => setShowPlebbitOptionsSettings(!showPlebbitOptionsSettings)}>
|
||||
<div id='plebbit-options-settings' className={`${styles.setting} ${styles.category}`}>
|
||||
<label onClick={() => handleCategoryClick('plebbit-options-settings', showPlebbitOptionsSettings, setShowPlebbitOptionsSettings)}>
|
||||
<span className={showPlebbitOptionsSettings ? styles.hideButton : styles.showButton} />
|
||||
{t('plebbit_options')}
|
||||
</label>
|
||||
|
||||
@@ -10,7 +10,7 @@ interface RulesPostProps {
|
||||
|
||||
const SubplebbitRules = ({ subplebbitAddress, createdAt, rules }: RulesPostProps) => {
|
||||
const { t } = useTranslation();
|
||||
const content = rules.map((rule, index) => `${index + 1}. ${rule}`).join('\n');
|
||||
const content = rules?.map((rule, index) => `${index + 1}. ${rule}`).join('\n');
|
||||
const post = {
|
||||
isRules: true,
|
||||
subplebbitAddress,
|
||||
|
||||
@@ -6,11 +6,10 @@ 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();
|
||||
const { anonMode } = useAnonMode(postCid);
|
||||
|
||||
const { author, signer, content, link, spoiler, publishCommentOptions } = usePublishReplyStore((state) => ({
|
||||
author: state.author[parentCid] || (account?.author ? { displayName: account.author.displayName || undefined } : undefined),
|
||||
displayName: state.displayName[parentCid] || account?.author?.displayName,
|
||||
author: state.author[parentCid],
|
||||
signer: state.signer[parentCid] || undefined,
|
||||
content: state.content[parentCid] || undefined,
|
||||
link: state.link[parentCid] || undefined,
|
||||
@@ -21,47 +20,54 @@ const usePublishReply = ({ cid, subplebbitAddress, postCid }: { cid: string; sub
|
||||
const setReplyStore = usePublishReplyStore((state) => state.setReplyStore);
|
||||
const resetReplyStore = usePublishReplyStore((state) => state.resetReplyStore);
|
||||
|
||||
const createBaseOptions = useCallback(() => {
|
||||
const baseOptions: Comment = {
|
||||
subplebbitAddress,
|
||||
parentCid,
|
||||
postCid: postCid ?? parentCid,
|
||||
content,
|
||||
link,
|
||||
spoiler,
|
||||
};
|
||||
|
||||
const authorOptions = {
|
||||
displayName: author?.displayName,
|
||||
address: anonMode ? signer?.address : account?.author?.address,
|
||||
};
|
||||
|
||||
baseOptions.author = authorOptions;
|
||||
|
||||
if (anonMode) {
|
||||
baseOptions.signer = signer;
|
||||
}
|
||||
|
||||
return baseOptions;
|
||||
}, [anonMode, author, content, link, parentCid, postCid, signer, spoiler, subplebbitAddress, account]);
|
||||
|
||||
const setPublishReplyOptions = useCallback(
|
||||
(options: Comment) => {
|
||||
const newOptions: Comment = {
|
||||
subplebbitAddress,
|
||||
parentCid,
|
||||
postCid: postCid ?? parentCid,
|
||||
content: options.content === '' ? undefined : options.content ?? content,
|
||||
link: options.link === '' ? undefined : options.link ?? link,
|
||||
spoiler: options.spoiler ?? spoiler,
|
||||
displayName: options.displayName === '' ? undefined : options.displayName ?? author?.displayName ?? account?.author?.displayName,
|
||||
};
|
||||
|
||||
if ('displayName' in options) {
|
||||
newOptions.displayName = options.displayName === '' ? undefined : options.displayName;
|
||||
}
|
||||
|
||||
if (anonMode) {
|
||||
newOptions.signer = signer || options.signer;
|
||||
newOptions.author = {
|
||||
...(author || {}),
|
||||
address: newOptions.signer?.address,
|
||||
...('displayName' in options && { displayName: options.displayName }),
|
||||
};
|
||||
} else {
|
||||
newOptions.signer = undefined;
|
||||
newOptions.author = {
|
||||
address: account?.author?.address,
|
||||
...('displayName' in options && { displayName: options.displayName }),
|
||||
};
|
||||
}
|
||||
(options: Partial<Comment>) => {
|
||||
const baseOptions = createBaseOptions();
|
||||
const sanitizedOptions = Object.entries(options).reduce((acc, [key, value]) => {
|
||||
acc[key] = value === '' ? undefined : value;
|
||||
return acc;
|
||||
}, {} as Partial<Comment>);
|
||||
|
||||
const newOptions = { ...baseOptions, ...sanitizedOptions };
|
||||
setReplyStore(newOptions);
|
||||
},
|
||||
[subplebbitAddress, parentCid, author, signer, content, link, spoiler, setReplyStore, anonMode, account, postCid],
|
||||
[createBaseOptions, setReplyStore],
|
||||
);
|
||||
|
||||
const resetPublishReplyOptions = useCallback(() => resetReplyStore(parentCid), [parentCid, resetReplyStore]);
|
||||
|
||||
const { index, publishComment } = usePublishComment(publishCommentOptions);
|
||||
|
||||
return { setPublishReplyOptions, resetPublishReplyOptions, replyIndex: index, publishReply: publishComment, setReplyStore };
|
||||
return {
|
||||
setPublishReplyOptions,
|
||||
resetPublishReplyOptions,
|
||||
replyIndex: index,
|
||||
publishReply: publishComment,
|
||||
};
|
||||
};
|
||||
|
||||
export default usePublishReply;
|
||||
|
||||
@@ -28,8 +28,14 @@ const usePublishReplyStore = create<ReplyState>((set) => ({
|
||||
|
||||
setReplyStore: (comment: Comment) =>
|
||||
set((state) => {
|
||||
const { subplebbitAddress, parentCid, author, displayName, content, link, signer, spoiler } = comment;
|
||||
const updatedAuthor = displayName ? { ...author, displayName } : author;
|
||||
const { subplebbitAddress, parentCid, author, content, link, signer, spoiler } = comment;
|
||||
|
||||
const displayName = 'displayName' in comment ? comment.displayName || undefined : author?.displayName;
|
||||
|
||||
const baseAuthor = author ? { ...author } : {};
|
||||
delete baseAuthor.displayName;
|
||||
|
||||
const updatedAuthor = displayName ? { ...baseAuthor, displayName } : baseAuthor;
|
||||
|
||||
const publishCommentOptions: PublishCommentOptions = {
|
||||
subplebbitAddress,
|
||||
@@ -48,7 +54,7 @@ const usePublishReplyStore = create<ReplyState>((set) => ({
|
||||
},
|
||||
};
|
||||
|
||||
if (updatedAuthor) {
|
||||
if (Object.keys(updatedAuthor).length > 0) {
|
||||
publishCommentOptions.author = updatedAuthor;
|
||||
}
|
||||
|
||||
|
||||
@@ -293,12 +293,7 @@ const Board = () => {
|
||||
increaseViewportBy={{ bottom: 1200, top: 1200 }}
|
||||
totalCount={combinedFeed.length}
|
||||
data={combinedFeed}
|
||||
itemContent={(index, post) => {
|
||||
const { deleted, locked, removed } = post || {};
|
||||
const isThreadClosed = deleted || locked || removed;
|
||||
|
||||
return <Post index={index} post={post} openReplyModal={isThreadClosed ? () => alert(t('thread_closed_alert')) : openReplyModal} />;
|
||||
}}
|
||||
itemContent={(index, post) => <Post index={index} post={post} openReplyModal={openReplyModal} />}
|
||||
useWindowScroll={true}
|
||||
components={{ Footer }}
|
||||
endReached={loadMore}
|
||||
|
||||
@@ -30,6 +30,14 @@ export const Post = ({ post, showAllReplies = false, showReplies = true, openRep
|
||||
const subplebbit = useSubplebbit({ subplebbitAddress: post?.subplebbitAddress });
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
const { deleted, locked, removed } = post || {};
|
||||
const isThreadClosed = deleted || locked || removed;
|
||||
|
||||
const { t } = useTranslation();
|
||||
if (isThreadClosed) {
|
||||
openReplyModal = () => alert(t('thread_closed_alert'));
|
||||
}
|
||||
|
||||
let comment = post;
|
||||
|
||||
// handle pending mod or author edit
|
||||
|
||||
Reference in New Issue
Block a user