diff --git a/package.json b/package.json index a6276fd7..169b463f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dependencies": { "@capacitor/app": "1.1.1", "@floating-ui/react": "0.26.1", - "@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#40dfddc6982c85cf07fdfc499cd3787265bc6fe5", + "@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#63833e978ca25f9846544d32b9c67810af0daf19", "@testing-library/jest-dom": "5.14.1", "@testing-library/react": "13.0.0", "@testing-library/user-event": "13.2.1", @@ -43,7 +43,7 @@ "scripts": { "start": "react-scripts start", "build": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=false react-scripts build", - "build-netlify": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true REACT_APP_COMMIT_REF=$COMMIT_REF react-scripts build", + "build-netlify": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true REACT_APP_COMMIT_REF=$COMMIT_REF CI='' react-scripts build", "test": "react-scripts test", "analyze-bundle": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true react-scripts build && source-map-explorer 'build/static/js/*.js'", "eject": "react-scripts eject", diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index ee2e9c78..663b6bac 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -29,5 +29,11 @@ "catalog": "فهرس", "all": "الكل", "subscriptions": "الاشتراكات", - "board": "منتدى" + "board": "منتدى", + "link_to_post": "الرابط لهذه الرسالة", + "reply_to_post": "الرد على هذه المشاركة", + "sticky": "مثبت", + "closed": "مغلق", + "reply": "رد", + "link": "رابط" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 17134328..e6841dba 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -29,5 +29,11 @@ "catalog": "ক্যাটালগ", "all": "সব", "subscriptions": "সাবস্ক্রিপশন", - "board": "বোর্ড" + "board": "বোর্ড", + "link_to_post": "এই পোস্টে লিংক", + "reply_to_post": "এই পোস্টে প্রতিক্রিয়া", + "sticky": "স্টিকি", + "closed": "বন্ধ", + "reply": "উত্তর", + "link": "লিংক" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index c697a664..eaa23be4 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Vše", "subscriptions": "Předplatné", - "board": "Fórum" + "board": "Fórum", + "link_to_post": "Odkaz na tento příspěvek", + "reply_to_post": "Odpovědět na tento příspěvek", + "sticky": "Připnutý", + "closed": "Zavřeno", + "reply": "Odpovědět", + "link": "Odkaz" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 61711890..d7cec533 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Alle", "subscriptions": "Abonnementer", - "board": "Forum" + "board": "Forum", + "link_to_post": "Link til dette indlæg", + "reply_to_post": "Svar på dette indlæg", + "sticky": "Fikseret", + "closed": "Lukket", + "reply": "Svar", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index a156daa5..ffcd042b 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Alle", "subscriptions": "Abonnements", - "board": "Forum" + "board": "Forum", + "link_to_post": "Link zu diesem Beitrag", + "reply_to_post": "Antworten auf diesen Beitrag", + "sticky": "Angeheftet", + "closed": "Geschlossen", + "reply": "Antworten", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 00aab211..f4da5ddf 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -29,5 +29,11 @@ "catalog": "Κατάλογος", "all": "Όλα", "subscriptions": "Συνδρομές", - "board": "Φόρουμ" + "board": "Φόρουμ", + "link_to_post": "Σύνδεσμος για αυτήν την ανάρτηση", + "reply_to_post": "Απάντηση σε αυτήν την ανάρτηση", + "sticky": "Κολλημένος", + "closed": "Κλειστό", + "reply": "Απάντηση", + "link": "Σύνδεσμος" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index c6f741e2..c71b3ba3 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -29,5 +29,11 @@ "catalog": "Catalog", "all": "All", "subscriptions": "Subscriptions", - "board": "Board" + "board": "Board", + "link_to_post": "Link to this post", + "reply_to_post": "Reply to this post", + "sticky": "Sticky", + "closed": "Closed", + "reply": "Reply", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index d3325175..6d42fd5a 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -29,5 +29,11 @@ "catalog": "Catálogo", "all": "Todo", "subscriptions": "Suscripciones", - "board": "Foro" + "board": "Foro", + "link_to_post": "Enlace a esta publicación", + "reply_to_post": "Responder a esta publicación", + "sticky": "Fijado", + "closed": "Cerrado", + "reply": "Responder", + "link": "Enlace" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index b086dabe..b3939b18 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -29,5 +29,11 @@ "catalog": "کاتالوگ", "all": "همه", "subscriptions": "اشتراک‌ها", - "board": "تالار" + "board": "تالار", + "link_to_post": "پیوند به این پست", + "reply_to_post": "پاسخ به این پست", + "sticky": "چسبیده", + "closed": "بسته", + "reply": "پاسخ", + "link": "لینک" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 3c8dbc8d..260470c1 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -29,5 +29,11 @@ "catalog": "Luettelo", "all": "Kaikki", "subscriptions": "Tilaukset", - "board": "Foorumi" + "board": "Foorumi", + "link_to_post": "Linkki tähän viestiin", + "reply_to_post": "Vastaa tähän viestiin", + "sticky": "Tikki", + "closed": "Suljettu", + "reply": "Vastaa", + "link": "Linkki" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index cf8ebe82..906f3139 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -29,5 +29,11 @@ "catalog": "Katalogo", "all": "Lahat", "subscriptions": "Mga Subscription", - "board": "Board" + "board": "Board", + "link_to_post": "Link sa post na ito", + "reply_to_post": "Tumugon sa post na ito", + "sticky": "Malagkit", + "closed": "Sarado", + "reply": "Tumugon", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 9b91952f..82b809eb 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -29,5 +29,11 @@ "catalog": "Catalogue", "all": "Tous", "subscriptions": "Abonnements", - "board": "Forum" + "board": "Forum", + "link_to_post": "Lien vers ce message", + "reply_to_post": "Répondre à ce message", + "sticky": "Épinglé", + "closed": "Fermé", + "reply": "Répondre", + "link": "Lien" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 3cba6c41..01696c34 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -29,5 +29,11 @@ "catalog": "קטלוג", "all": "הכל", "subscriptions": "מנויים", - "board": "פורום" + "board": "פורום", + "link_to_post": "קישור להודעה זו", + "reply_to_post": "הגבה להודעה זו", + "sticky": "מדבקה", + "closed": "סגור", + "reply": "הגב", + "link": "קישור" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 511f46fd..9a89200f 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -29,5 +29,11 @@ "catalog": "कैटलॉग", "all": "सभी", "subscriptions": "सदस्यता", - "board": "फोरम" + "board": "फोरम", + "link_to_post": "इस पोस्ट का लिंक", + "reply_to_post": "इस पोस्ट का जवाब दें", + "sticky": "चिपकाया", + "closed": "बंद", + "reply": "जवाब दें", + "link": "लिंक" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index e20fafce..a46d051c 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -29,5 +29,11 @@ "catalog": "Katalógus", "all": "Összes", "subscriptions": "Előfizetések", - "board": "Fórum" + "board": "Fórum", + "link_to_post": "Hivatkozás erre a hozzászólásra", + "reply_to_post": "Válasz erre a hozzászólásra", + "sticky": "Rögzített", + "closed": "Zárt", + "reply": "Válaszolás", + "link": "Hivatkozás" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 095fc55b..22eca110 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Semua", "subscriptions": "Langganan", - "board": "Forum" + "board": "Forum", + "link_to_post": "Tautan ke pos ini", + "reply_to_post": "Balas ke pos ini", + "sticky": "Menempel", + "closed": "Tutup", + "reply": "Balas", + "link": "Tautan" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index a56f7cc0..e3a136da 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -29,5 +29,11 @@ "catalog": "Catalogo", "all": "Tutti", "subscriptions": "Iscrizioni", - "board": "Forum" + "board": "Forum", + "link_to_post": "Link per questo post", + "reply_to_post": "Commenta questo post", + "sticky": "Incollato", + "closed": "Chiuso", + "reply": "Commenta", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 363fd386..e768b471 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -29,5 +29,11 @@ "catalog": "カタログ", "all": "すべて", "subscriptions": "購読", - "board": "掲示板" + "board": "掲示板", + "link_to_post": "この投稿へのリンク", + "reply_to_post": "この投稿に返信", + "sticky": "固定", + "closed": "閉鎖", + "reply": "返信", + "link": "リンク" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index a4da215d..169f2a9b 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -29,5 +29,11 @@ "catalog": "카탈로그", "all": "모두", "subscriptions": "구독", - "board": "게시판" + "board": "게시판", + "link_to_post": "이 게시물에 대한 링크", + "reply_to_post": "이 게시물에 답장하기", + "sticky": "고정된", + "closed": "닫힘", + "reply": "답장", + "link": "링크" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index d347dbd7..f07f951a 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -29,5 +29,11 @@ "catalog": "कॅटलॉग", "all": "सर्व", "subscriptions": "सदस्यता", - "board": "फोरम" + "board": "फोरम", + "link_to_post": "ह्या पोस्टचा लिंक", + "reply_to_post": "या पोस्टवर प्रतिसाद द्या", + "sticky": "स्टिकी", + "closed": "बंद", + "reply": "प्रतिसाद", + "link": "लिंक" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 48a55cc7..117211e7 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -29,5 +29,11 @@ "catalog": "Catalogus", "all": "Alles", "subscriptions": "Abonnementen", - "board": "Forum" + "board": "Forum", + "link_to_post": "Link naar dit bericht", + "reply_to_post": "Reageren op dit bericht", + "sticky": "Vastgemaakt", + "closed": "Gesloten", + "reply": "Antwoord", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index ea460141..c7f15acf 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Alle", "subscriptions": "Abonnementer", - "board": "Forum" + "board": "Forum", + "link_to_post": "Lenke til dette innlegget", + "reply_to_post": "Svar på dette innlegget", + "sticky": "Klistret", + "closed": "Stengt", + "reply": "Svar", + "link": "Lenke" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 8386a744..b59d2ed9 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Wszystkie", "subscriptions": "Subskrypcje", - "board": "Forum" + "board": "Forum", + "link_to_post": "Link do tego posta", + "reply_to_post": "Odpowiedz na ten post", + "sticky": "Przyklejony", + "closed": "Zamknięty", + "reply": "Odpowiedz", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 554af3c8..a62cabcd 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -29,5 +29,11 @@ "catalog": "Catálogo", "all": "Todos", "subscriptions": "Inscrições", - "board": "Fórum" + "board": "Fórum", + "link_to_post": "Link para esta postagem", + "reply_to_post": "Responder a esta postagem", + "sticky": "Fixado", + "closed": "Fechado", + "reply": "Responder", + "link": "Link" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index bc8e15fb..bf2bf9b9 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -29,5 +29,11 @@ "catalog": "Catalog", "all": "Toate", "subscriptions": "Abonamente", - "board": "Forum" + "board": "Forum", + "link_to_post": "Link către acest mesaj", + "reply_to_post": "Răspunde la acest mesaj", + "sticky": "Lipit", + "closed": "Închis", + "reply": "Răspunde", + "link": "Legătură" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index ef0c971e..52385ba0 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -29,5 +29,11 @@ "catalog": "Каталог", "all": "Все", "subscriptions": "Подписки", - "board": "Форум" + "board": "Форум", + "link_to_post": "Ссылка на это сообщение", + "reply_to_post": "Ответить на это сообщение", + "sticky": "Прикреплено", + "closed": "Закрыто", + "reply": "Ответить", + "link": "Ссылка" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 4866bfb6..63621971 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Të gjitha", "subscriptions": "Abonimet", - "board": "Forumi" + "board": "Forumi", + "link_to_post": "Link për këtë postim", + "reply_to_post": "Përgjigju në këtë postim", + "sticky": "Ngjitës", + "closed": "Mbyllur", + "reply": "Përgjigju", + "link": "Lidhje" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 03278ceb..6bc0658d 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Allt", "subscriptions": "Prenumerationer", - "board": "Forum" + "board": "Forum", + "link_to_post": "Länk till detta inlägg", + "reply_to_post": "Svara på detta inlägg", + "sticky": "Klistrad", + "closed": "Stängd", + "reply": "Svara", + "link": "Länk" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 1bfdf501..a3e3c396 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -29,5 +29,11 @@ "catalog": "కాటలాగ్", "all": "అన్ని", "subscriptions": "సబ్‌స్క్రిప్షన్‌లు", - "board": "ఫోరం" + "board": "ఫోరం", + "link_to_post": "ఈ పోస్టుకు లింక్", + "reply_to_post": "ఈ పోస్టుకు మరియుని జవాబు ఇవ్వండి", + "sticky": "స్టికీ", + "closed": "మూసివేయబడినది", + "reply": "స్పందించు", + "link": "లింక్" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 1b871f94..0973f222 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -29,5 +29,11 @@ "catalog": "แคตตาล็อก", "all": "ทั้งหมด", "subscriptions": "การสมัครสมาชิก", - "board": "กระดาน" + "board": "กระดาน", + "link_to_post": "ลิงก์ไปยังโพสต์นี้", + "reply_to_post": "ตอบกลับไปยังโพสต์นี้", + "sticky": "ปักหมุด", + "closed": "ปิด", + "reply": "ตอบ", + "link": "ลิงก์" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 2c675e4e..ec66b4cb 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -29,5 +29,11 @@ "catalog": "Katalog", "all": "Tümü", "subscriptions": "Abonelikler", - "board": "Forum" + "board": "Forum", + "link_to_post": "Bu gönderiye bağlantı", + "reply_to_post": "Bu gönderiye yanıtla", + "sticky": "Yapışkan", + "closed": "Kapalı", + "reply": "Yanıtla", + "link": "Bağlantı" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 8265a270..946bfba8 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -29,5 +29,11 @@ "catalog": "Каталог", "all": "Всі", "subscriptions": "Підписки", - "board": "Форум" + "board": "Форум", + "link_to_post": "Посилання на цей допис", + "reply_to_post": "Відповісти на це повідомлення", + "sticky": "Прикріплений", + "closed": "Закрито", + "reply": "Відповісти", + "link": "Посилання" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 000e640c..fe87a666 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -29,5 +29,11 @@ "catalog": "کیٹالوگ", "all": "سب", "subscriptions": "سبسکرپشنز", - "board": "پیغام بورڈ" + "board": "پیغام بورڈ", + "link_to_post": "اس پوسٹ کا لنک", + "reply_to_post": "اس پوسٹ کا جواب دیں", + "sticky": "چسپی", + "closed": "بند", + "reply": "جواب دیں", + "link": "لنک" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 3bd6e6f4..9acc2e8a 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -29,5 +29,11 @@ "catalog": "Catalog", "all": "Tất cả", "subscriptions": "Đăng ký", - "board": "Diễn đàn" + "board": "Diễn đàn", + "link_to_post": "Liên kết đến bài viết này", + "reply_to_post": "Trả lời bài viết này", + "sticky": "Dán", + "closed": "Đóng", + "reply": "Trả lời", + "link": "Liên kết" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index e3069a61..9b9b2398 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -29,5 +29,11 @@ "catalog": "目录", "all": "所有", "subscriptions": "订阅", - "board": "论坛" + "board": "论坛", + "link_to_post": "链接到此帖", + "reply_to_post": "回复此帖", + "sticky": "置顶", + "closed": "关闭", + "reply": "回复", + "link": "链接" } \ No newline at end of file diff --git a/src/app.module.css b/src/app.module.css index 4f8cc954..6c9bae3a 100644 --- a/src/app.module.css +++ b/src/app.module.css @@ -9,3 +9,9 @@ overflow-x: hidden; min-height: 100vh; } + +@media (min-width: 640px) { + .app { + padding: 5px; + } +} \ No newline at end of file diff --git a/src/components/board-banner/board-banner.module.css b/src/components/board-banner/board-banner.module.css index 89b5fb97..9036e4af 100644 --- a/src/components/board-banner/board-banner.module.css +++ b/src/components/board-banner/board-banner.module.css @@ -27,10 +27,6 @@ .content hr { width: 90%; - /* revert to browser styling for burichan and futaba */ - border: var(--hr-border, revert); - border-top: var(--hr-border-top, revert); - height: var(--hr-height, revert); } diff --git a/src/components/board-banner/board-banner.tsx b/src/components/board-banner/board-banner.tsx index 6b4ae795..7887a67e 100644 --- a/src/components/board-banner/board-banner.tsx +++ b/src/components/board-banner/board-banner.tsx @@ -17,14 +17,15 @@ interface BoardBannerProps { address: string | undefined; } -const BoardBanner = ({ title, address }: BoardBannerProps) => { +const BoardBanner = ({ address, title }: BoardBannerProps) => { + const displayAddress = address && address.length > 10 && !address.includes('.') ? address.slice(0, 13).concat('...') : address; return (
-
{title || `p/${address}`}
- {title &&
p/{address}
} +
{title || `p/${displayAddress}`}
+
p/{address}

); diff --git a/src/components/board-buttons/board-buttons.module.css b/src/components/board-buttons/board-buttons.module.css index c3800751..8f4b9363 100644 --- a/src/components/board-buttons/board-buttons.module.css +++ b/src/components/board-buttons/board-buttons.module.css @@ -17,4 +17,8 @@ .mobileBoardButtons { display: none; } + + .subscribeButton { + float: right; + } } \ No newline at end of file diff --git a/src/components/board-buttons/board-buttons.tsx b/src/components/board-buttons/board-buttons.tsx index 3d8dccb6..8dc49364 100644 --- a/src/components/board-buttons/board-buttons.tsx +++ b/src/components/board-buttons/board-buttons.tsx @@ -40,7 +40,15 @@ export const MobileBoardButtons = ({ address }: BoardButtonsProps) => { export const DesktopBoardButtons = ({ address }: BoardButtonsProps) => { return (
- +
+ [ + + ] [ + ] + + [ + ] +
); }; diff --git a/src/components/board-nav/board-nav.module.css b/src/components/board-nav/board-nav.module.css index a423c85e..41e5a8dd 100644 --- a/src/components/board-nav/board-nav.module.css +++ b/src/components/board-nav/board-nav.module.css @@ -1,18 +1,17 @@ .boardNavDesktop { - padding: 5px; font-size: var(--boardnav-font-size); color: var(--boardnav-separator-color); } .boardNavDesktop a { - color: var(--link-internal-text-color); - text-decoration: var(--link-internal-text-decoration); + color: var(--boardnav-desktop-link-text-color); + text-decoration: var(--boardnav-desktop-link-text-decoration); } .boardNavDesktop a:hover { - color: var(--link-internal-text-color-hover); - text-decoration: var(--link-internal-text-decoration-hover); + color: var(--boardnav-desktop-link-text-color-hover); + text-decoration: var(--boardnav-desktop-link-text-decoration-hover); } .navTopRight { @@ -29,10 +28,6 @@ font-size: var(--boardnav-mobile-font-size); } -.boardNavMobile .pageJump a { - color: var(--boardnav-mobile-button-text-color); -} - .boardNavMobile strong { text-transform: capitalize; padding-right: 5px; @@ -54,13 +49,11 @@ padding: 3px 5px 0 0; } -.pageJump span, .pageJump a { +.pageJump a, .mobileSearchButton { padding-right: 5px; -} - -.pageJump a { - color: var(--link-internal-text-color); - text-decoration: var(--link-internal-text-decoration); + color: var(--homepage-box-link-text-color); + text-decoration: var(--homepage-box-link-text-decoration); + text-transform: capitalize; } @media (max-width: 640px) { diff --git a/src/components/board-nav/board-nav.tsx b/src/components/board-nav/board-nav.tsx index 64846563..309ceb7e 100644 --- a/src/components/board-nav/board-nav.tsx +++ b/src/components/board-nav/board-nav.tsx @@ -37,16 +37,24 @@ const BoardNavDesktop = ({ subplebbits }: BoardNavProps) => { const BoardNavMobile = ({ subplebbits, currentSubplebbit }: BoardNavProps) => { const { t } = useTranslation(); const navigate = useNavigate(); + const displaySubplebbitAddress = currentSubplebbit && currentSubplebbit.length > 30 ? currentSubplebbit.slice(0, 30).concat('...') : currentSubplebbit; + + const currentSubplebbitIsInList = subplebbits.some((subplebbit: any) => subplebbit.address === currentSubplebbit); const boardSelect = ( - navigate(`/p/${e.target.value}`)}> + {!currentSubplebbitIsInList && currentSubplebbit && } + + + {subplebbits.map((subplebbit: any, index: number) => { + const { address, title } = subplebbit; + const subplebbitAddress = address.includes('.') ? address : title || address.slice(0, 10).concat('...'); + return ( + + ); + })} ); diff --git a/src/components/board-stats/board-stats.module.css b/src/components/board-stats/board-stats.module.css index 3ef0b558..137eed71 100644 --- a/src/components/board-stats/board-stats.module.css +++ b/src/components/board-stats/board-stats.module.css @@ -2,10 +2,6 @@ min-width: 468px; margin-left: -4px; margin-bottom: 5px; - /* revert to browser styling for burichan and futaba */ - border: var(--hr-border, revert); - border-top: var(--hr-border-top, revert); - height: var(--hr-height, revert); } .blotter { diff --git a/src/components/board-stats/board-stats.tsx b/src/components/board-stats/board-stats.tsx index e51e0e86..2d0f43a8 100644 --- a/src/components/board-stats/board-stats.tsx +++ b/src/components/board-stats/board-stats.tsx @@ -5,7 +5,7 @@ import { Trans, useTranslation } from 'react-i18next'; export interface BoardStatsProps { address: string | undefined; - createdAt: number; + createdAt: number | undefined; } const BoardStats = ({ address, createdAt }: BoardStatsProps) => { @@ -59,7 +59,7 @@ const BoardStats = ({ address, createdAt }: BoardStatsProps) => { - {unixToMMDDYYYY(createdAt)} {t('board_created')} + {createdAt && unixToMMDDYYYY(createdAt)} {t('board_created')} {' / '} { + const parsedUrl = new URL(url); + + if (youtubeHosts.has(parsedUrl.host) || parsedUrl.host.startsWith('yt.')) { + return ; + } + if (xHosts.has(parsedUrl.host)) { + return ; + } + if (redditHosts.has(parsedUrl.host)) { + return ; + } + if (twitchHosts.has(parsedUrl.host)) { + return ; + } + if (tiktokHosts.has(parsedUrl.host)) { + return ; + } + if (instagramHosts.has(parsedUrl.host)) { + return ; + } + if (odyseeHosts.has(parsedUrl.host)) { + return ; + } + if (bitchuteHosts.has(parsedUrl.host)) { + return ; + } + if (streamableHosts.has(parsedUrl.host)) { + return ; + } + if (spotifyHosts.has(parsedUrl.host)) { + return ; + } +}; + +interface EmbedComponentProps { + parsedUrl: URL; +} + +const youtubeHosts = new Set(['youtube.com', 'www.youtube.com', 'youtu.be', 'www.youtu.be', 'm.youtube.com']); + +const YoutubeEmbed = ({ parsedUrl }: EmbedComponentProps) => { + let youtubeId = parsedUrl.searchParams.get('v'); + + if (!youtubeId && parsedUrl.host.includes('youtu.be')) { + youtubeId = parsedUrl.pathname.substring(1); + } + + if (youtubeId) { + return ( +