From 0520629fe06fa37a210121e8d65384f34ce76813 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 31 Dec 2023 00:07:37 +0100 Subject: [PATCH 01/12] typo --- src/components/post/expando/expando.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/post/expando/expando.module.css b/src/components/post/expando/expando.module.css index 2cf23899..48a06fea 100644 --- a/src/components/post/expando/expando.module.css +++ b/src/components/post/expando/expando.module.css @@ -17,7 +17,7 @@ .markdown { background-color: var(--background-markdown); - border: 1px solid var(--grey-light); + border: 1px solid var(--text-primary); border-radius: 7px; padding: 5px 10px; font-weight: 400; From 6f5e45e457a5005ebd1b37575ca4b62e2c881666 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 31 Dec 2023 17:03:36 +0100 Subject: [PATCH 02/12] chore(translations): members count --- public/translations/ar/default.json | 3 ++- public/translations/bn/default.json | 3 ++- public/translations/cs/default.json | 3 ++- public/translations/da/default.json | 3 ++- public/translations/de/default.json | 3 ++- public/translations/el/default.json | 3 ++- public/translations/en/default.json | 3 ++- public/translations/es/default.json | 3 ++- public/translations/fa/default.json | 3 ++- public/translations/fi/default.json | 3 ++- public/translations/fil/default.json | 3 ++- public/translations/fr/default.json | 3 ++- public/translations/he/default.json | 3 ++- public/translations/hi/default.json | 3 ++- public/translations/hu/default.json | 3 ++- public/translations/id/default.json | 3 ++- public/translations/it/default.json | 3 ++- public/translations/ja/default.json | 3 ++- public/translations/ko/default.json | 3 ++- public/translations/mr/default.json | 3 ++- public/translations/nl/default.json | 3 ++- public/translations/no/default.json | 3 ++- public/translations/pl/default.json | 3 ++- public/translations/pt/default.json | 3 ++- public/translations/ro/default.json | 3 ++- public/translations/ru/default.json | 3 ++- public/translations/sq/default.json | 3 ++- public/translations/sv/default.json | 3 ++- public/translations/te/default.json | 3 ++- public/translations/th/default.json | 3 ++- public/translations/tr/default.json | 3 ++- public/translations/uk/default.json | 3 ++- public/translations/ur/default.json | 3 ++- public/translations/vi/default.json | 3 ++- public/translations/zh/default.json | 3 ++- src/components/sidebar/sidebar.tsx | 2 +- 36 files changed, 71 insertions(+), 36 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index cd09cb46..8631f7aa 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -172,5 +172,6 @@ "no_posts": "لا توجد مشاركات", "media_url": "عنوان وسائط", "post_locked_info": "هذا المنشور مغلق. لن تتمكن من التعليق.", - "no_subscriptions_notice": "لم تنضم إلى أي مجتمع بعد." + "no_subscriptions_notice": "لم تنضم إلى أي مجتمع بعد.", + "members_count": "{{count}} أعضاء" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 5e2d0a97..ecebc646 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -172,5 +172,6 @@ "no_posts": "কোন পোস্ট নেই", "media_url": "মিডিয়া ইউআরএল", "post_locked_info": "এই পোস্টটি লক হয়েছে। আপনি মন্তব্য করতে পারবেন না।", - "no_subscriptions_notice": "আপনি এখনো কোনও সম্প্রদানে যোগ দিননি।" + "no_subscriptions_notice": "আপনি এখনো কোনও সম্প্রদানে যোগ দিননি।", + "members_count": "{{count}} সদস্য" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index e9c54d5d..8307760f 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -172,5 +172,6 @@ "no_posts": "žádné příspěvky", "media_url": "URL médií", "post_locked_info": "Tento příspěvek je uzamčen. Nebudete moci komentovat.", - "no_subscriptions_notice": "Dosud jste se nepřipojili k žádné komunitě." + "no_subscriptions_notice": "Dosud jste se nepřipojili k žádné komunitě.", + "members_count": "{{count}} členů" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 3f864352..b01d3c37 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -172,5 +172,6 @@ "no_posts": "ingen indlæg", "media_url": "medie-URL", "post_locked_info": "Dette indlæg er låst. Du kan ikke kommentere.", - "no_subscriptions_notice": "Du har endnu ikke tilsluttet dig nogen fællesskab." + "no_subscriptions_notice": "Du har endnu ikke tilsluttet dig nogen fællesskab.", + "members_count": "{{count}} medlemmer" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 9709e359..f94c4378 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -172,5 +172,6 @@ "no_posts": "keine Beiträge", "media_url": "Medien-URL", "post_locked_info": "Dieser Beitrag ist gesperrt. Sie können keine Kommentare abgeben.", - "no_subscriptions_notice": "Du hast dich noch keiner Community angeschlossen." + "no_subscriptions_notice": "Du hast dich noch keiner Community angeschlossen.", + "members_count": "{{count}} Mitglieder" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index e34051fc..863b9358 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -172,5 +172,6 @@ "no_posts": "κανένα άρθρο", "media_url": "URL πολυμέσων", "post_locked_info": "Αυτή η ανάρτηση είναι κλειδωμένη. Δεν θα μπορείτε να σχολιάσετε.", - "no_subscriptions_notice": "Δεν έχετε εγγραφεί ακόμη σε κοινότητα." + "no_subscriptions_notice": "Δεν έχετε εγγραφεί ακόμη σε κοινότητα.", + "members_count": "{{count}} μέλη" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 420d7e0b..a0ccba20 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -172,5 +172,6 @@ "no_posts": "no posts", "media_url": "media url", "post_locked_info": "This post is locked. You won't be able to comment.", - "no_subscriptions_notice": "You haven't joined any community." + "no_subscriptions_notice": "You haven't joined any community.", + "members_count": "{{count}} members" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index dbd1185f..bed30847 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -172,5 +172,6 @@ "no_posts": "sin publicaciones", "media_url": "URL de medios", "post_locked_info": "Esta publicación está bloqueada. No podrás comentar.", - "no_subscriptions_notice": "Todavía no te has unido a ninguna comunidad." + "no_subscriptions_notice": "Todavía no te has unido a ninguna comunidad.", + "members_count": "{{count}} miembros" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index b41743c0..17473928 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -172,5 +172,6 @@ "no_posts": "بدون پست", "media_url": "آدرس رسانه", "post_locked_info": "این پست قفل شده است. نمی‌توانید نظر دهید.", - "no_subscriptions_notice": "هنوز به هیچ انجمنی پیوسته نشده‌اید." + "no_subscriptions_notice": "هنوز به هیچ انجمنی پیوسته نشده‌اید.", + "members_count": "{{count}} عضو" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index b4069620..c25ab941 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -172,5 +172,6 @@ "no_posts": "ei viestejä", "media_url": "medialinkki", "post_locked_info": "Tämä viesti on lukittu. Et voi kommentoida sitä.", - "no_subscriptions_notice": "Et ole vielä liittynyt mihinkään yhteisöön." + "no_subscriptions_notice": "Et ole vielä liittynyt mihinkään yhteisöön.", + "members_count": "{{count}} jäsentä" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index e1a13ca8..12a08b9f 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -172,5 +172,6 @@ "no_posts": "walang post", "media_url": "media url", "post_locked_info": "Ang post na ito ay naka-lock. Hindi ka makakapagkomento.", - "no_subscriptions_notice": "Hindi ka pa sumali sa anumang komunidad." + "no_subscriptions_notice": "Hindi ka pa sumali sa anumang komunidad.", + "members_count": "{{count}} miyembro" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 04199993..67b1f10b 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -172,5 +172,6 @@ "no_posts": "pas de publications", "media_url": "URL multimédia", "post_locked_info": "Ce post est verrouillé. Vous ne pourrez pas commenter.", - "no_subscriptions_notice": "Vous n'avez rejoint aucune communauté." + "no_subscriptions_notice": "Vous n'avez rejoint aucune communauté.", + "members_count": "{{count}} membres" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index b6b91560..8eec2d66 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -172,5 +172,6 @@ "no_posts": "אין פוסטים", "media_url": "כתובת מדיה", "post_locked_info": "הפוסט הזה נעול. אינך יכול להגיב.", - "no_subscriptions_notice": "עדיין לא הצטרפת לאף קהילה." + "no_subscriptions_notice": "עדיין לא הצטרפת לאף קהילה.", + "members_count": "{{count}} חברים" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 98d30c48..bef6d07a 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -172,5 +172,6 @@ "no_posts": "कोई पोस्ट नहीं", "media_url": "मीडिया यूआरएल", "post_locked_info": "यह पोस्ट बंद है। आप टिप्पणी नहीं कर सकेंगे।", - "no_subscriptions_notice": "आपने अब तक किसी समुदाय में शामिल नहीं हुए हैं।" + "no_subscriptions_notice": "आपने अब तक किसी समुदाय में शामिल नहीं हुए हैं।", + "members_count": "{{count}} सदस्य" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 07f981bf..b25b442b 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -172,5 +172,6 @@ "no_posts": "nincsenek hozzászólások", "media_url": "média URL", "post_locked_info": "Ez a bejegyzés zárolva van. Nem fogsz tudni hozzászólni.", - "no_subscriptions_notice": "Még nem csatlakoztál egyetlen közösséghez sem." + "no_subscriptions_notice": "Még nem csatlakoztál egyetlen közösséghez sem.", + "members_count": "{{count}} tag" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index fb95c30b..bca74b03 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -172,5 +172,6 @@ "no_posts": "tidak ada posting", "media_url": "URL media", "post_locked_info": "Pos ini terkunci. Anda tidak akan dapat mengomentari.", - "no_subscriptions_notice": "Anda belum bergabung dengan komunitas mana pun." + "no_subscriptions_notice": "Anda belum bergabung dengan komunitas mana pun.", + "members_count": "{{count}} anggota" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index d0d0ae60..74c2ade6 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -172,5 +172,6 @@ "no_posts": "nessun post", "media_url": "URL media", "post_locked_info": "Questo post è stato bloccato. Non potrai commentarlo.", - "no_subscriptions_notice": "Non ti sei ancora unito a nessuna comunità." + "no_subscriptions_notice": "Non ti sei ancora unito a nessuna comunità.", + "members_count": "{{count}} membri" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 95e5cce1..7e03603b 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -172,5 +172,6 @@ "no_posts": "投稿はありません", "media_url": "メディア URL", "post_locked_info": "この投稿はロックされています。コメントできません。", - "no_subscriptions_notice": "まだどのコミュニティにも参加していません。" + "no_subscriptions_notice": "まだどのコミュニティにも参加していません。", + "members_count": "{{count}} メンバー" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 6f653fb6..1cf6cebc 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -172,5 +172,6 @@ "no_posts": "게시물이 없습니다", "media_url": "미디어 URL", "post_locked_info": "이 게시물은 잠겨 있습니다. 댓글을 남길 수 없습니다.", - "no_subscriptions_notice": "아직 어떤 커뮤니티에도 가입하지 않았습니다." + "no_subscriptions_notice": "아직 어떤 커뮤니티에도 가입하지 않았습니다.", + "members_count": "{{count}} 회원" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 19078b60..6fb76366 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -172,5 +172,6 @@ "no_posts": "कोणतेही पोस्ट नाहीत", "media_url": "मिडिया URL", "post_locked_info": "हा पोस्ट लॉक झाला आहे. आपण टिप्पणी करू शकणार नाहीत.", - "no_subscriptions_notice": "तुम्ही अद्याप कोणत्याही संघात सामील झालं नाही." + "no_subscriptions_notice": "तुम्ही अद्याप कोणत्याही संघात सामील झालं नाही.", + "members_count": "{{count}} सदस्य" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 31114f33..b590d354 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -172,5 +172,6 @@ "no_posts": "geen berichten", "media_url": "media-url", "post_locked_info": "Dit bericht is vergrendeld. Je kunt geen opmerkingen plaatsen.", - "no_subscriptions_notice": "Je hebt je nog niet bij een community aangesloten." + "no_subscriptions_notice": "Je hebt je nog niet bij een community aangesloten.", + "members_count": "{{count}} leden" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index 717d89e1..39f6ee33 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -172,5 +172,6 @@ "no_posts": "ingen innlegg", "media_url": "medie-URL", "post_locked_info": "Dette innlegget er låst. Du kan ikke kommentere.", - "no_subscriptions_notice": "Du har ikke blitt med i noen fellesskap ennå." + "no_subscriptions_notice": "Du har ikke blitt med i noen fellesskap ennå.", + "members_count": "{{count}} medlemmer" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 7c00a049..64089618 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -172,5 +172,6 @@ "no_posts": "brak postów", "media_url": "URL mediów", "post_locked_info": "Ten post jest zablokowany. Nie będziesz mógł komentować.", - "no_subscriptions_notice": "Nie dołączyłeś jeszcze do żadnej społeczności." + "no_subscriptions_notice": "Nie dołączyłeś jeszcze do żadnej społeczności.", + "members_count": "{{count}} członków" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 069b0640..ecd4c43d 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -172,5 +172,6 @@ "no_posts": "sem publicações", "media_url": "URL de mídia", "post_locked_info": "Esta postagem está bloqueada. Você não poderá comentar.", - "no_subscriptions_notice": "Ainda não se juntou a nenhuma comunidade." + "no_subscriptions_notice": "Ainda não se juntou a nenhuma comunidade.", + "members_count": "{{count}} membros" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index dabc6fe6..42544268 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -172,5 +172,6 @@ "no_posts": "niciun post", "media_url": "URL media", "post_locked_info": "Acest post este blocat. Nu vei putea comenta.", - "no_subscriptions_notice": "Nu te-ai alăturat încă niciunei comunități." + "no_subscriptions_notice": "Nu te-ai alăturat încă niciunei comunități.", + "members_count": "{{count}} membri" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 0f5493c0..d4987458 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -172,5 +172,6 @@ "no_posts": "нет записей", "media_url": "URL медиа", "post_locked_info": "Этот пост заблокирован. Вы не сможете оставить комментарий.", - "no_subscriptions_notice": "Вы еще не присоединились ни к одному сообществу." + "no_subscriptions_notice": "Вы еще не присоединились ни к одному сообществу.", + "members_count": "{{count}} участников" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 4efacf4b..65fc975f 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -172,5 +172,6 @@ "no_posts": "asnjë postim", "media_url": "media url", "post_locked_info": "Ky post është bllokuar. Nuk do të jeni në gjendje të komentoni.", - "no_subscriptions_notice": "Nuk keni bashkuar akoma ndonjë komunitet." + "no_subscriptions_notice": "Nuk keni bashkuar akoma ndonjë komunitet.", + "members_count": "{{count}} anëtarë" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 7d6d51b6..4547b133 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -172,5 +172,6 @@ "no_posts": "inga inlägg", "media_url": "media-url", "post_locked_info": "Detta inlägg är låst. Du kommer inte att kunna kommentera.", - "no_subscriptions_notice": "Du har ännu inte gått med i någon gemenskap." + "no_subscriptions_notice": "Du har ännu inte gått med i någon gemenskap.", + "members_count": "{{count}} medlemmar" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 77202d0d..f8bd50e2 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -172,5 +172,6 @@ "no_posts": "పోస్టులు లేవు", "media_url": "మీడియా URL", "post_locked_info": "ఈ పోస్టు లాక్ చేయబడింది. మీరు వ్యాఖ్యానించలేరు.", - "no_subscriptions_notice": "మీరు ఇంకా ఏ కమ్యూనిటీలో చేరలేదు." + "no_subscriptions_notice": "మీరు ఇంకా ఏ కమ్యూనిటీలో చేరలేదు.", + "members_count": "{{count}} సభ్యులు" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 3e0b63b8..3cfd1a9b 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -172,5 +172,6 @@ "no_posts": "ไม่มีโพสต์", "media_url": "URL สื่อ", "post_locked_info": "โพสต์นี้ถูกล็อก คุณจะไม่สามารถแสดงความคิดเห็นได้", - "no_subscriptions_notice": "คุณยังไม่ได้เข้าร่วมชุมชนใด ๆ" + "no_subscriptions_notice": "คุณยังไม่ได้เข้าร่วมชุมชนใด ๆ", + "members_count": "{{count}} สมาชิก" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 0732a36d..8b515082 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -172,5 +172,6 @@ "no_posts": "gönderi yok", "media_url": "medya URL'si", "post_locked_info": "Bu gönderi kilitlendi. Yorum yapamayacaksınız.", - "no_subscriptions_notice": "Henüz herhangi bir topluluğa katılmadınız." + "no_subscriptions_notice": "Henüz herhangi bir topluluğa katılmadınız.", + "members_count": "{{count}} üye" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index f7e48001..7aa52d3b 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -172,5 +172,6 @@ "no_posts": "немає повідомлень", "media_url": "URL медіа", "post_locked_info": "Цей пост заблокований. Ви не зможете залишити коментар.", - "no_subscriptions_notice": "Ви ще не приєдналися до жодної спільноти." + "no_subscriptions_notice": "Ви ще не приєдналися до жодної спільноти.", + "members_count": "{{count}} учасників" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 3cf7826e..9755c71d 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -172,5 +172,6 @@ "no_posts": "کوئی پوسٹ نہیں", "media_url": "میڈیا یو آر ایل", "post_locked_info": "یہ پوسٹ بند ہے۔ آپ تبصرہ نہیں کر سکیں گے۔", - "no_subscriptions_notice": "آپ نے ابھی تک کسی بھی کمیونٹی میں شامل نہیں ہوئے۔" + "no_subscriptions_notice": "آپ نے ابھی تک کسی بھی کمیونٹی میں شامل نہیں ہوئے۔", + "members_count": "{{count}} رکن" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index ee4c636b..48ca41a5 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -172,5 +172,6 @@ "no_posts": "không có bài viết", "media_url": "URL phương tiện", "post_locked_info": "Bài viết này đã bị khóa. Bạn sẽ không thể bình luận.", - "no_subscriptions_notice": "Bạn chưa tham gia vào bất kỳ cộng đồng nào." + "no_subscriptions_notice": "Bạn chưa tham gia vào bất kỳ cộng đồng nào.", + "members_count": "{{count}} thành viên" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 0029b253..c5322d5a 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -172,5 +172,6 @@ "no_posts": "没有帖子", "media_url": "媒体链接", "post_locked_info": "此帖已锁定。您将无法评论。", - "no_subscriptions_notice": "您尚未加入任何社区。" + "no_subscriptions_notice": "您尚未加入任何社区。", + "members_count": "{{count}} 成员" } \ No newline at end of file diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index 0a350f7d..b5e6f462 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -138,7 +138,7 @@ const Sidebar = ({ address, cid, createdAt, description, downvoteCount = 0, role
- {t('readers_count', { count: allActiveUserCount })} + {t('members_count', { count: allActiveUserCount })}
From b88cdf3a968fcd6335a9953c75bbf9b1d6588bcd Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 31 Dec 2023 17:10:36 +0100 Subject: [PATCH 03/12] chore(translations): communities, edit --- public/translations/ar/default.json | 4 +++- public/translations/bn/default.json | 4 +++- public/translations/cs/default.json | 4 +++- public/translations/da/default.json | 4 +++- public/translations/de/default.json | 4 +++- public/translations/el/default.json | 4 +++- public/translations/en/default.json | 4 +++- public/translations/es/default.json | 4 +++- public/translations/fa/default.json | 4 +++- public/translations/fi/default.json | 4 +++- public/translations/fil/default.json | 4 +++- public/translations/fr/default.json | 4 +++- public/translations/he/default.json | 4 +++- public/translations/hi/default.json | 4 +++- public/translations/hu/default.json | 4 +++- public/translations/id/default.json | 4 +++- public/translations/it/default.json | 4 +++- public/translations/ja/default.json | 4 +++- public/translations/ko/default.json | 4 +++- public/translations/mr/default.json | 4 +++- public/translations/nl/default.json | 4 +++- public/translations/no/default.json | 4 +++- public/translations/pl/default.json | 4 +++- public/translations/pt/default.json | 4 +++- public/translations/ro/default.json | 4 +++- public/translations/ru/default.json | 4 +++- public/translations/sq/default.json | 4 +++- public/translations/sv/default.json | 4 +++- public/translations/te/default.json | 4 +++- public/translations/th/default.json | 4 +++- public/translations/tr/default.json | 4 +++- public/translations/uk/default.json | 4 +++- public/translations/ur/default.json | 4 +++- public/translations/vi/default.json | 4 +++- public/translations/zh/default.json | 4 +++- src/components/header/header.tsx | 2 +- 36 files changed, 106 insertions(+), 36 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 8631f7aa..6d7c4e41 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -173,5 +173,7 @@ "media_url": "عنوان وسائط", "post_locked_info": "هذا المنشور مغلق. لن تتمكن من التعليق.", "no_subscriptions_notice": "لم تنضم إلى أي مجتمع بعد.", - "members_count": "{{count}} أعضاء" + "members_count": "{{count}} أعضاء", + "communities": "مجتمع", + "edit": "تعديل" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index ecebc646..faf53bae 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -173,5 +173,7 @@ "media_url": "মিডিয়া ইউআরএল", "post_locked_info": "এই পোস্টটি লক হয়েছে। আপনি মন্তব্য করতে পারবেন না।", "no_subscriptions_notice": "আপনি এখনো কোনও সম্প্রদানে যোগ দিননি।", - "members_count": "{{count}} সদস্য" + "members_count": "{{count}} সদস্য", + "communities": "সম্প্রদান", + "edit": "সম্পাদনা" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 8307760f..d63a05dd 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -173,5 +173,7 @@ "media_url": "URL médií", "post_locked_info": "Tento příspěvek je uzamčen. Nebudete moci komentovat.", "no_subscriptions_notice": "Dosud jste se nepřipojili k žádné komunitě.", - "members_count": "{{count}} členů" + "members_count": "{{count}} členů", + "communities": "komunita", + "edit": "upravit" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index b01d3c37..66acf9c1 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -173,5 +173,7 @@ "media_url": "medie-URL", "post_locked_info": "Dette indlæg er låst. Du kan ikke kommentere.", "no_subscriptions_notice": "Du har endnu ikke tilsluttet dig nogen fællesskab.", - "members_count": "{{count}} medlemmer" + "members_count": "{{count}} medlemmer", + "communities": "fællesskab", + "edit": "redigere" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index f94c4378..e4bc5c45 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -173,5 +173,7 @@ "media_url": "Medien-URL", "post_locked_info": "Dieser Beitrag ist gesperrt. Sie können keine Kommentare abgeben.", "no_subscriptions_notice": "Du hast dich noch keiner Community angeschlossen.", - "members_count": "{{count}} Mitglieder" + "members_count": "{{count}} Mitglieder", + "communities": "Gemeinschaft", + "edit": "bearbeiten" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 863b9358..e199aa7f 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -173,5 +173,7 @@ "media_url": "URL πολυμέσων", "post_locked_info": "Αυτή η ανάρτηση είναι κλειδωμένη. Δεν θα μπορείτε να σχολιάσετε.", "no_subscriptions_notice": "Δεν έχετε εγγραφεί ακόμη σε κοινότητα.", - "members_count": "{{count}} μέλη" + "members_count": "{{count}} μέλη", + "communities": "κοινόνια", + "edit": "επικοινωνιακό" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index a0ccba20..06142ce5 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -173,5 +173,7 @@ "media_url": "media url", "post_locked_info": "This post is locked. You won't be able to comment.", "no_subscriptions_notice": "You haven't joined any community.", - "members_count": "{{count}} members" + "members_count": "{{count}} members", + "communities": "communities", + "edit": "edit" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index bed30847..43ac7003 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -173,5 +173,7 @@ "media_url": "URL de medios", "post_locked_info": "Esta publicación está bloqueada. No podrás comentar.", "no_subscriptions_notice": "Todavía no te has unido a ninguna comunidad.", - "members_count": "{{count}} miembros" + "members_count": "{{count}} miembros", + "communities": "comunidades", + "edit": "editar" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 17473928..1dd742cd 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -173,5 +173,7 @@ "media_url": "آدرس رسانه", "post_locked_info": "این پست قفل شده است. نمی‌توانید نظر دهید.", "no_subscriptions_notice": "هنوز به هیچ انجمنی پیوسته نشده‌اید.", - "members_count": "{{count}} عضو" + "members_count": "{{count}} عضو", + "communities": "انجمن", + "edit": "ویرایش" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index c25ab941..350340ef 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -173,5 +173,7 @@ "media_url": "medialinkki", "post_locked_info": "Tämä viesti on lukittu. Et voi kommentoida sitä.", "no_subscriptions_notice": "Et ole vielä liittynyt mihinkään yhteisöön.", - "members_count": "{{count}} jäsentä" + "members_count": "{{count}} jäsentä", + "communities": "yhteisö", + "edit": "muokata" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 12a08b9f..64f8e2a3 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -173,5 +173,7 @@ "media_url": "media url", "post_locked_info": "Ang post na ito ay naka-lock. Hindi ka makakapagkomento.", "no_subscriptions_notice": "Hindi ka pa sumali sa anumang komunidad.", - "members_count": "{{count}} miyembro" + "members_count": "{{count}} miyembro", + "communities": "komunidad", + "edit": "ipunin" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 67b1f10b..a639c264 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -173,5 +173,7 @@ "media_url": "URL multimédia", "post_locked_info": "Ce post est verrouillé. Vous ne pourrez pas commenter.", "no_subscriptions_notice": "Vous n'avez rejoint aucune communauté.", - "members_count": "{{count}} membres" + "members_count": "{{count}} membres", + "communities": "communauté", + "edit": "modifier" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 8eec2d66..000fc55d 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -173,5 +173,7 @@ "media_url": "כתובת מדיה", "post_locked_info": "הפוסט הזה נעול. אינך יכול להגיב.", "no_subscriptions_notice": "עדיין לא הצטרפת לאף קהילה.", - "members_count": "{{count}} חברים" + "members_count": "{{count}} חברים", + "communities": "קהילה", + "edit": "עריכה" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index bef6d07a..d5c37fa5 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -173,5 +173,7 @@ "media_url": "मीडिया यूआरएल", "post_locked_info": "यह पोस्ट बंद है। आप टिप्पणी नहीं कर सकेंगे।", "no_subscriptions_notice": "आपने अब तक किसी समुदाय में शामिल नहीं हुए हैं।", - "members_count": "{{count}} सदस्य" + "members_count": "{{count}} सदस्य", + "communities": "समुदाय", + "edit": "संपादित करें" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index b25b442b..18fcddda 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -173,5 +173,7 @@ "media_url": "média URL", "post_locked_info": "Ez a bejegyzés zárolva van. Nem fogsz tudni hozzászólni.", "no_subscriptions_notice": "Még nem csatlakoztál egyetlen közösséghez sem.", - "members_count": "{{count}} tag" + "members_count": "{{count}} tag", + "communities": "közösség", + "edit": "szerkesztés" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index bca74b03..02036e6a 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -173,5 +173,7 @@ "media_url": "URL media", "post_locked_info": "Pos ini terkunci. Anda tidak akan dapat mengomentari.", "no_subscriptions_notice": "Anda belum bergabung dengan komunitas mana pun.", - "members_count": "{{count}} anggota" + "members_count": "{{count}} anggota", + "communities": "komunitas", + "edit": "mengedit" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 74c2ade6..521cbc43 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -173,5 +173,7 @@ "media_url": "URL media", "post_locked_info": "Questo post è stato bloccato. Non potrai commentarlo.", "no_subscriptions_notice": "Non ti sei ancora unito a nessuna comunità.", - "members_count": "{{count}} membri" + "members_count": "{{count}} membri", + "communities": "comunità", + "edit": "modifica" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 7e03603b..7b44bf79 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -173,5 +173,7 @@ "media_url": "メディア URL", "post_locked_info": "この投稿はロックされています。コメントできません。", "no_subscriptions_notice": "まだどのコミュニティにも参加していません。", - "members_count": "{{count}} メンバー" + "members_count": "{{count}} メンバー", + "communities": "コミュニティ", + "edit": "編集" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index 1cf6cebc..ac6d0589 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -173,5 +173,7 @@ "media_url": "미디어 URL", "post_locked_info": "이 게시물은 잠겨 있습니다. 댓글을 남길 수 없습니다.", "no_subscriptions_notice": "아직 어떤 커뮤니티에도 가입하지 않았습니다.", - "members_count": "{{count}} 회원" + "members_count": "{{count}} 회원", + "communities": "커뮤니티", + "edit": "편집" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 6fb76366..cffd7f19 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -173,5 +173,7 @@ "media_url": "मिडिया URL", "post_locked_info": "हा पोस्ट लॉक झाला आहे. आपण टिप्पणी करू शकणार नाहीत.", "no_subscriptions_notice": "तुम्ही अद्याप कोणत्याही संघात सामील झालं नाही.", - "members_count": "{{count}} सदस्य" + "members_count": "{{count}} सदस्य", + "communities": "संघा", + "edit": "संपादन" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index b590d354..faf94180 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -173,5 +173,7 @@ "media_url": "media-url", "post_locked_info": "Dit bericht is vergrendeld. Je kunt geen opmerkingen plaatsen.", "no_subscriptions_notice": "Je hebt je nog niet bij een community aangesloten.", - "members_count": "{{count}} leden" + "members_count": "{{count}} leden", + "communities": "gemeenschap", + "edit": "bewerken" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index 39f6ee33..bd6ff270 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -173,5 +173,7 @@ "media_url": "medie-URL", "post_locked_info": "Dette innlegget er låst. Du kan ikke kommentere.", "no_subscriptions_notice": "Du har ikke blitt med i noen fellesskap ennå.", - "members_count": "{{count}} medlemmer" + "members_count": "{{count}} medlemmer", + "communities": "fellesskap", + "edit": "redigere" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 64089618..3bbc2291 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -173,5 +173,7 @@ "media_url": "URL mediów", "post_locked_info": "Ten post jest zablokowany. Nie będziesz mógł komentować.", "no_subscriptions_notice": "Nie dołączyłeś jeszcze do żadnej społeczności.", - "members_count": "{{count}} członków" + "members_count": "{{count}} członków", + "communities": "społeczność", + "edit": "edytuj" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index ecd4c43d..06949ad0 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -173,5 +173,7 @@ "media_url": "URL de mídia", "post_locked_info": "Esta postagem está bloqueada. Você não poderá comentar.", "no_subscriptions_notice": "Ainda não se juntou a nenhuma comunidade.", - "members_count": "{{count}} membros" + "members_count": "{{count}} membros", + "communities": "comunidade", + "edit": "editar" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 42544268..cdfe383d 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -173,5 +173,7 @@ "media_url": "URL media", "post_locked_info": "Acest post este blocat. Nu vei putea comenta.", "no_subscriptions_notice": "Nu te-ai alăturat încă niciunei comunități.", - "members_count": "{{count}} membri" + "members_count": "{{count}} membri", + "communities": "comunitate", + "edit": "modifica" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index d4987458..05d65965 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -173,5 +173,7 @@ "media_url": "URL медиа", "post_locked_info": "Этот пост заблокирован. Вы не сможете оставить комментарий.", "no_subscriptions_notice": "Вы еще не присоединились ни к одному сообществу.", - "members_count": "{{count}} участников" + "members_count": "{{count}} участников", + "communities": "сообщество", + "edit": "редактировать" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 65fc975f..c090915a 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -173,5 +173,7 @@ "media_url": "media url", "post_locked_info": "Ky post është bllokuar. Nuk do të jeni në gjendje të komentoni.", "no_subscriptions_notice": "Nuk keni bashkuar akoma ndonjë komunitet.", - "members_count": "{{count}} anëtarë" + "members_count": "{{count}} anëtarë", + "communities": "komunitet", + "edit": "modifikohu" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 4547b133..7922b85d 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -173,5 +173,7 @@ "media_url": "media-url", "post_locked_info": "Detta inlägg är låst. Du kommer inte att kunna kommentera.", "no_subscriptions_notice": "Du har ännu inte gått med i någon gemenskap.", - "members_count": "{{count}} medlemmar" + "members_count": "{{count}} medlemmar", + "communities": "gemenskap", + "edit": "redigera" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index f8bd50e2..2d1e56a9 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -173,5 +173,7 @@ "media_url": "మీడియా URL", "post_locked_info": "ఈ పోస్టు లాక్ చేయబడింది. మీరు వ్యాఖ్యానించలేరు.", "no_subscriptions_notice": "మీరు ఇంకా ఏ కమ్యూనిటీలో చేరలేదు.", - "members_count": "{{count}} సభ్యులు" + "members_count": "{{count}} సభ్యులు", + "communities": "సమూహం", + "edit": "సమూహం" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 3cfd1a9b..8329da31 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -173,5 +173,7 @@ "media_url": "URL สื่อ", "post_locked_info": "โพสต์นี้ถูกล็อก คุณจะไม่สามารถแสดงความคิดเห็นได้", "no_subscriptions_notice": "คุณยังไม่ได้เข้าร่วมชุมชนใด ๆ", - "members_count": "{{count}} สมาชิก" + "members_count": "{{count}} สมาชิก", + "communities": "ชุมชน", + "edit": "แก้ไข" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 8b515082..0c4e9e94 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -173,5 +173,7 @@ "media_url": "medya URL'si", "post_locked_info": "Bu gönderi kilitlendi. Yorum yapamayacaksınız.", "no_subscriptions_notice": "Henüz herhangi bir topluluğa katılmadınız.", - "members_count": "{{count}} üye" + "members_count": "{{count}} üye", + "communities": "topluluk", + "edit": "düzenle" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 7aa52d3b..a1476546 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -173,5 +173,7 @@ "media_url": "URL медіа", "post_locked_info": "Цей пост заблокований. Ви не зможете залишити коментар.", "no_subscriptions_notice": "Ви ще не приєдналися до жодної спільноти.", - "members_count": "{{count}} учасників" + "members_count": "{{count}} учасників", + "communities": "спільнота", + "edit": "редагування" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 9755c71d..817f3e9d 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -173,5 +173,7 @@ "media_url": "میڈیا یو آر ایل", "post_locked_info": "یہ پوسٹ بند ہے۔ آپ تبصرہ نہیں کر سکیں گے۔", "no_subscriptions_notice": "آپ نے ابھی تک کسی بھی کمیونٹی میں شامل نہیں ہوئے۔", - "members_count": "{{count}} رکن" + "members_count": "{{count}} رکن", + "communities": "مجتمع", + "edit": "ترمیم کرنا" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 48ca41a5..18013236 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -173,5 +173,7 @@ "media_url": "URL phương tiện", "post_locked_info": "Bài viết này đã bị khóa. Bạn sẽ không thể bình luận.", "no_subscriptions_notice": "Bạn chưa tham gia vào bất kỳ cộng đồng nào.", - "members_count": "{{count}} thành viên" + "members_count": "{{count}} thành viên", + "communities": "cộng đồng", + "edit": "sửa đổi" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index c5322d5a..d2325e97 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -173,5 +173,7 @@ "media_url": "媒体链接", "post_locked_info": "此帖已锁定。您将无法评论。", "no_subscriptions_notice": "您尚未加入任何社区。", - "members_count": "{{count}} 成员" + "members_count": "{{count}} 成员", + "communities": "社区", + "edit": "编辑" } \ No newline at end of file diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 8ad782e8..5ee528b4 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -287,7 +287,7 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str } else if (isInboxPage) { return t('messages'); } else if (isSubplebbitsPage) { - return 'communities'; + return t('communities'); } return null; }; From e1d168297cd891099d51498c86ab82ca9dd901cf Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 1 Jan 2024 13:29:19 +0100 Subject: [PATCH 04/12] feat(subplebbits): add responsive design, vote buttons, preferences button --- src/components/header/header.tsx | 6 +- src/views/subplebbits/subplebbits.module.css | 92 +++++++++++++++++--- src/views/subplebbits/subplebbits.tsx | 34 +++++++- 3 files changed, 115 insertions(+), 17 deletions(-) diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 5ee528b4..9b201362 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -199,8 +199,8 @@ const SubplebbitsHeaderTabs = () => { return ( <>
  • - - {t('home')} + + approved
  • @@ -209,7 +209,7 @@ const SubplebbitsHeaderTabs = () => {
  • - + {t('my_communities')}
  • diff --git a/src/views/subplebbits/subplebbits.module.css b/src/views/subplebbits/subplebbits.module.css index 993538d3..bc98c6bc 100644 --- a/src/views/subplebbits/subplebbits.module.css +++ b/src/views/subplebbits/subplebbits.module.css @@ -1,11 +1,19 @@ @media (max-width: 768px) { .content { - padding: 7px 0px 0px 0px; + padding: 7px 0px 20px 0px; } .sidebar { display: none; } + + .infobar { + margin: 0px 5px; + } + + .subplebbit { + padding-right: 5px; + } } @media (min-width: 768px) { @@ -13,8 +21,8 @@ padding: 7px 5px 0px 5px; } - .stateString { - max-width: calc(100% - 305px); + .stateString, .infobar { + max-width: calc(100% - 327px); } } @@ -24,7 +32,7 @@ border-style: solid; border-width: 1px; font-size: small; - margin: 0 305px 5px 0px; + margin-bottom: 10px; padding: 6px 10px; color: var(--text); word-wrap: break-word; @@ -41,15 +49,51 @@ .subplebbit { margin-bottom: 10px; + height: auto; + overflow: hidden; } .midcol { - margin-right: 5px; - margin-top: 5px; - text-align: right; - width: 12em; + width: 37px; + font-weight: bold; + font-size: small; float: left; - margin-left: 7px; + padding-right: 7px; + background: transparent; + overflow: hidden; +} + +.arrowWrapper { + padding-left: 11px; + padding-top: 2px; +} + +.arrowCommon { + width: 15px; + height: 14px; + display: block; + cursor: pointer; +} + +.arrowUp { + background-image: url("/public/assets/buttons/arrow-up.png"); +} + +.upvoted { + background-image: url("/public/assets/buttons/arrow-upvoted.png") !important; +} + +.arrowDown { + background-image: url("/public/assets/buttons/arrow-down.png"); +} + +.downvoted { + background-image: url("/public/assets/buttons/arrow-downvoted.png") !important; +} + +.score { + text-align: center; + color: var(--icon); } .entry { @@ -58,14 +102,18 @@ } .title { - margin-bottom: 1px; + display: inline-flex; + flex-wrap: wrap; + align-items: center; font-size: medium; - margin-right: 5px; overflow: hidden; unicode-bidi: isolate; + margin-bottom: -2px; } .title a { + margin-right: 10px; + flex-grow: 1; color: var(--link); } @@ -73,8 +121,11 @@ color: var(--link-visited); } */ +.subscribeButton { + margin-top: 2px; +} + .description { - font-size: small; max-width: 60em; unicode-bidi: isolate; background-color: var(--background-markdown); @@ -83,4 +134,21 @@ padding: 2px 5px; border-radius: 7px; margin: 5px 0px; + word-wrap: break-word; + font-size: 14px; +} + +.subplebbitPreferences { + padding: 0 1px; + line-height: 1.6em; +} + +.subplebbitPreferences a { + color: var(--gray-contrast); + font-weight: bold; +} + +.subplebbitPreferences a:hover { + text-decoration: underline; + cursor: pointer; } \ No newline at end of file diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index ed735cb2..781b70f0 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -16,10 +16,26 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { const { address, createdAt, description, shortAddress, title } = subplebbit || {}; const { allActiveUserCount } = useSubplebbitStats({ subplebbitAddress: address }); + // TODO: make arrows functional when token voting is implemented in the API + const upvoted = false; + const downvoted = false; + const upvoteCount = 0; + const downvoteCount = 0; + + const postScore = upvoteCount === 0 && downvoteCount === 0 ? '•' : upvoteCount - downvoteCount || '•'; + return (
    - +
    +
    +
    +
    +
    {postScore}
    +
    +
    +
    +
    @@ -27,11 +43,25 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { p/{address.includes('.') ? address : shortAddress} {title && `: ${title}`} + + +
    {description &&
    {description}
    }
    - {t('readers_count', { count: allActiveUserCount })}, {t('community_for', { date: getFormattedDuration(createdAt) })} + {allActiveUserCount ? ( + <> + {t('members_count', { count: allActiveUserCount })}, {t('community_for', { date: getFormattedDuration(createdAt) })} +
    + e.preventDefault()}> + {t('preferences')} + +
    + + ) : ( + 'this community is offline' + )}
    From 37858667d0f6cce2e311aa66d62755dc6f0343e3 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 1 Jan 2024 16:23:28 +0100 Subject: [PATCH 05/12] chore(translations): moderator --- public/translations/ar/default.json | 3 ++- public/translations/bn/default.json | 3 ++- public/translations/cs/default.json | 3 ++- public/translations/da/default.json | 3 ++- public/translations/de/default.json | 3 ++- public/translations/el/default.json | 3 ++- public/translations/en/default.json | 3 ++- public/translations/es/default.json | 3 ++- public/translations/fa/default.json | 3 ++- public/translations/fi/default.json | 3 ++- public/translations/fil/default.json | 3 ++- public/translations/fr/default.json | 3 ++- public/translations/he/default.json | 3 ++- public/translations/hi/default.json | 3 ++- public/translations/hu/default.json | 3 ++- public/translations/id/default.json | 3 ++- public/translations/it/default.json | 3 ++- public/translations/ja/default.json | 3 ++- public/translations/ko/default.json | 3 ++- public/translations/mr/default.json | 3 ++- public/translations/nl/default.json | 3 ++- public/translations/no/default.json | 3 ++- public/translations/pl/default.json | 3 ++- public/translations/pt/default.json | 3 ++- public/translations/ro/default.json | 3 ++- public/translations/ru/default.json | 3 ++- public/translations/sq/default.json | 3 ++- public/translations/sv/default.json | 3 ++- public/translations/te/default.json | 3 ++- public/translations/th/default.json | 3 ++- public/translations/tr/default.json | 3 ++- public/translations/uk/default.json | 3 ++- public/translations/ur/default.json | 3 ++- public/translations/vi/default.json | 3 ++- public/translations/zh/default.json | 3 ++- 35 files changed, 70 insertions(+), 35 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 6d7c4e41..afca3d2b 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "لم تنضم إلى أي مجتمع بعد.", "members_count": "{{count}} أعضاء", "communities": "مجتمع", - "edit": "تعديل" + "edit": "تعديل", + "moderator": "مشرف" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index faf53bae..6e87b79d 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "আপনি এখনো কোনও সম্প্রদানে যোগ দিননি।", "members_count": "{{count}} সদস্য", "communities": "সম্প্রদান", - "edit": "সম্পাদনা" + "edit": "সম্পাদনা", + "moderator": "মডারেটর" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index d63a05dd..200069e2 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Dosud jste se nepřipojili k žádné komunitě.", "members_count": "{{count}} členů", "communities": "komunita", - "edit": "upravit" + "edit": "upravit", + "moderator": "Moderátor" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 66acf9c1..3f506764 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Du har endnu ikke tilsluttet dig nogen fællesskab.", "members_count": "{{count}} medlemmer", "communities": "fællesskab", - "edit": "redigere" + "edit": "redigere", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index e4bc5c45..463d9cc5 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Du hast dich noch keiner Community angeschlossen.", "members_count": "{{count}} Mitglieder", "communities": "Gemeinschaft", - "edit": "bearbeiten" + "edit": "bearbeiten", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index e199aa7f..0dcee5e0 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Δεν έχετε εγγραφεί ακόμη σε κοινότητα.", "members_count": "{{count}} μέλη", "communities": "κοινόνια", - "edit": "επικοινωνιακό" + "edit": "επικοινωνιακό", + "moderator": "Διαμεσολαβητής" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 06142ce5..0d681201 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "You haven't joined any community.", "members_count": "{{count}} members", "communities": "communities", - "edit": "edit" + "edit": "edit", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 43ac7003..478500e8 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Todavía no te has unido a ninguna comunidad.", "members_count": "{{count}} miembros", "communities": "comunidades", - "edit": "editar" + "edit": "editar", + "moderator": "Moderador" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 1dd742cd..80607614 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "هنوز به هیچ انجمنی پیوسته نشده‌اید.", "members_count": "{{count}} عضو", "communities": "انجمن", - "edit": "ویرایش" + "edit": "ویرایش", + "moderator": "مدیر" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 350340ef..c2178114 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Et ole vielä liittynyt mihinkään yhteisöön.", "members_count": "{{count}} jäsentä", "communities": "yhteisö", - "edit": "muokata" + "edit": "muokata", + "moderator": "Moderaattori" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 64f8e2a3..8d18adcf 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Hindi ka pa sumali sa anumang komunidad.", "members_count": "{{count}} miyembro", "communities": "komunidad", - "edit": "ipunin" + "edit": "ipunin", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index a639c264..5af6f684 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Vous n'avez rejoint aucune communauté.", "members_count": "{{count}} membres", "communities": "communauté", - "edit": "modifier" + "edit": "modifier", + "moderator": "Modérateur" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 000fc55d..48f89c74 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "עדיין לא הצטרפת לאף קהילה.", "members_count": "{{count}} חברים", "communities": "קהילה", - "edit": "עריכה" + "edit": "עריכה", + "moderator": "מנהל" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index d5c37fa5..30232c99 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "आपने अब तक किसी समुदाय में शामिल नहीं हुए हैं।", "members_count": "{{count}} सदस्य", "communities": "समुदाय", - "edit": "संपादित करें" + "edit": "संपादित करें", + "moderator": "मॉडरेटर" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 18fcddda..99b86a03 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Még nem csatlakoztál egyetlen közösséghez sem.", "members_count": "{{count}} tag", "communities": "közösség", - "edit": "szerkesztés" + "edit": "szerkesztés", + "moderator": "Moderátor" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 02036e6a..2b7064ff 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Anda belum bergabung dengan komunitas mana pun.", "members_count": "{{count}} anggota", "communities": "komunitas", - "edit": "mengedit" + "edit": "mengedit", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 521cbc43..8c3e37a7 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Non ti sei ancora unito a nessuna comunità.", "members_count": "{{count}} membri", "communities": "comunità", - "edit": "modifica" + "edit": "modifica", + "moderator": "Moderatore" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 7b44bf79..1609a0e5 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "まだどのコミュニティにも参加していません。", "members_count": "{{count}} メンバー", "communities": "コミュニティ", - "edit": "編集" + "edit": "編集", + "moderator": "モデレーター" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index ac6d0589..e6ae0a4d 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "아직 어떤 커뮤니티에도 가입하지 않았습니다.", "members_count": "{{count}} 회원", "communities": "커뮤니티", - "edit": "편집" + "edit": "편집", + "moderator": "모더레이터" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index cffd7f19..77ef7e1d 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "तुम्ही अद्याप कोणत्याही संघात सामील झालं नाही.", "members_count": "{{count}} सदस्य", "communities": "संघा", - "edit": "संपादन" + "edit": "संपादन", + "moderator": "संचालक" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index faf94180..72eae91a 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Je hebt je nog niet bij een community aangesloten.", "members_count": "{{count}} leden", "communities": "gemeenschap", - "edit": "bewerken" + "edit": "bewerken", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index bd6ff270..c6f87ba8 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Du har ikke blitt med i noen fellesskap ennå.", "members_count": "{{count}} medlemmer", "communities": "fellesskap", - "edit": "redigere" + "edit": "redigere", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 3bbc2291..db1c88e7 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Nie dołączyłeś jeszcze do żadnej społeczności.", "members_count": "{{count}} członków", "communities": "społeczność", - "edit": "edytuj" + "edit": "edytuj", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 06949ad0..256de204 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Ainda não se juntou a nenhuma comunidade.", "members_count": "{{count}} membros", "communities": "comunidade", - "edit": "editar" + "edit": "editar", + "moderator": "Moderador" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index cdfe383d..0232ad75 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Nu te-ai alăturat încă niciunei comunități.", "members_count": "{{count}} membri", "communities": "comunitate", - "edit": "modifica" + "edit": "modifica", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 05d65965..96465b3a 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Вы еще не присоединились ни к одному сообществу.", "members_count": "{{count}} участников", "communities": "сообщество", - "edit": "редактировать" + "edit": "редактировать", + "moderator": "Модератор" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index c090915a..86d23bf2 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Nuk keni bashkuar akoma ndonjë komunitet.", "members_count": "{{count}} anëtarë", "communities": "komunitet", - "edit": "modifikohu" + "edit": "modifikohu", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 7922b85d..7421c262 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Du har ännu inte gått med i någon gemenskap.", "members_count": "{{count}} medlemmar", "communities": "gemenskap", - "edit": "redigera" + "edit": "redigera", + "moderator": "Moderator" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 2d1e56a9..f2961c9f 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "మీరు ఇంకా ఏ కమ్యూనిటీలో చేరలేదు.", "members_count": "{{count}} సభ్యులు", "communities": "సమూహం", - "edit": "సమూహం" + "edit": "సమూహం", + "moderator": "మాడరేటర్" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 8329da31..1f2ff9d9 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "คุณยังไม่ได้เข้าร่วมชุมชนใด ๆ", "members_count": "{{count}} สมาชิก", "communities": "ชุมชน", - "edit": "แก้ไข" + "edit": "แก้ไข", + "moderator": "ผู้ดูแล" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 0c4e9e94..48052970 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Henüz herhangi bir topluluğa katılmadınız.", "members_count": "{{count}} üye", "communities": "topluluk", - "edit": "düzenle" + "edit": "düzenle", + "moderator": "Moderatör" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index a1476546..bdd6685d 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Ви ще не приєдналися до жодної спільноти.", "members_count": "{{count}} учасників", "communities": "спільнота", - "edit": "редагування" + "edit": "редагування", + "moderator": "Модератор" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 817f3e9d..2dcd476e 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "آپ نے ابھی تک کسی بھی کمیونٹی میں شامل نہیں ہوئے۔", "members_count": "{{count}} رکن", "communities": "مجتمع", - "edit": "ترمیم کرنا" + "edit": "ترمیم کرنا", + "moderator": "منتظم" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 18013236..27b8590a 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "Bạn chưa tham gia vào bất kỳ cộng đồng nào.", "members_count": "{{count}} thành viên", "communities": "cộng đồng", - "edit": "sửa đổi" + "edit": "sửa đổi", + "moderator": "Quản trị viên" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index d2325e97..56ad7c29 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -175,5 +175,6 @@ "no_subscriptions_notice": "您尚未加入任何社区。", "members_count": "{{count}} 成员", "communities": "社区", - "edit": "编辑" + "edit": "编辑", + "moderator": "版主" } \ No newline at end of file From 79c86822c337e3a719def664b93d4fd4ce32b350 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 1 Jan 2024 17:44:42 +0100 Subject: [PATCH 06/12] feat(subplebbits): add 'my communities' routes and tabs --- src/app.tsx | 4 + .../author-sidebar/author-sidebar.tsx | 4 +- src/components/sidebar/sidebar.tsx | 4 +- src/components/topbar/topbar.tsx | 2 +- src/lib/utils/time-utils.ts | 2 +- src/lib/utils/view-utils.ts | 16 ++++ src/views/subplebbits/subplebbits.module.css | 35 ++++++++- src/views/subplebbits/subplebbits.tsx | 73 ++++++++++++++++--- 8 files changed, 122 insertions(+), 18 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 9c35224f..e8767012 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -99,6 +99,10 @@ function App() { } /> } /> + } /> + } /> + } /> + } /> diff --git a/src/components/author-sidebar/author-sidebar.tsx b/src/components/author-sidebar/author-sidebar.tsx index bb301c5a..5689c40d 100644 --- a/src/components/author-sidebar/author-sidebar.tsx +++ b/src/components/author-sidebar/author-sidebar.tsx @@ -16,7 +16,7 @@ import { } from '@plebbit/plebbit-react-hooks'; // import { getShortAddress } from '@plebbit/plebbit-js'; import styles from './author-sidebar.module.css'; -import { getFormattedDuration } from '../../lib/utils/time-utils'; +import { getFormattedTimeDuration } from '../../lib/utils/time-utils'; import { isAuthorView, isProfileView } from '../../lib/utils/view-utils'; import { // findAuthorSubplebbits, @@ -141,7 +141,7 @@ const AuthorSidebar = () => { )} - {t('plebbitor_for')} {getFormattedDuration(oldestCommentTimestamp)} + {t('plebbitor_for')} {getFormattedTimeDuration(oldestCommentTimestamp)}
    diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index b5e6f462..31ef23c7 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { getShortAddress } from '@plebbit/plebbit-js'; import { useBlock, Role, useSubplebbitStats, useAccountComment } from '@plebbit/plebbit-react-hooks'; import styles from './sidebar.module.css'; -import { getFormattedDate, getFormattedDuration, getFormattedTimeAgo } from '../../lib/utils/time-utils'; +import { getFormattedDate, getFormattedTimeDuration, getFormattedTimeAgo } from '../../lib/utils/time-utils'; import { findSubplebbitCreator } from '../../lib/utils/user-utils'; import { isAboutView, isAllView, isHomeView, isPendingView, isPostView, isSubplebbitsView } from '../../lib/utils/view-utils'; import SearchBar from '../search-bar'; @@ -158,7 +158,7 @@ const Sidebar = ({ address, cid, createdAt, description, downvoteCount = 0, role
    {t('created_by', { creatorAddress: '' })} e.preventDefault()}>{`u/${creatorAddress}`} - {createdAt && {t('community_for', { date: getFormattedDuration(createdAt) })}} + {createdAt && {t('community_for', { date: getFormattedTimeDuration(createdAt) })}}
    {blocked ? t('unblock_community') : t('block_community')}
    diff --git a/src/components/topbar/topbar.tsx b/src/components/topbar/topbar.tsx index 657e3624..a773cef1 100644 --- a/src/components/topbar/topbar.tsx +++ b/src/components/topbar/topbar.tsx @@ -160,7 +160,7 @@ const TopBar = () => { ))}
    - + {t('edit')} »
    diff --git a/src/lib/utils/time-utils.ts b/src/lib/utils/time-utils.ts index 927becf2..eabc3a59 100644 --- a/src/lib/utils/time-utils.ts +++ b/src/lib/utils/time-utils.ts @@ -35,7 +35,7 @@ export const getFormattedTimeAgo = (unixTimestamp: number): string => { return t('time_x_years_ago', { count: Math.floor(timeDifference / 31104000) }); }; -export const getFormattedDuration = (unixTimestamp: number): string => { +export const getFormattedTimeDuration = (unixTimestamp: number): string => { const currentTime = Date.now() / 1000; const timeDifference = currentTime - unixTimestamp; const t = i18next.t; diff --git a/src/lib/utils/view-utils.ts b/src/lib/utils/view-utils.ts index 40bd1005..30af1a22 100644 --- a/src/lib/utils/view-utils.ts +++ b/src/lib/utils/view-utils.ts @@ -110,6 +110,22 @@ export const isSubplebbitsView = (pathname: string): boolean => { return pathname.startsWith('/communities'); }; +export const isSubplebbitsMineView = (pathname: string): boolean => { + return pathname === '/communities/mine'; +}; + +export const isSubplebbitsMineSubscriberView = (pathname: string): boolean => { + return pathname === '/communities/mine' || pathname === '/communities/mine/subscriber'; +}; + +export const isSubplebbitsMineContributorView = (pathname: string): boolean => { + return pathname === '/communities/mine/contributor'; +}; + +export const isSubplebbitsMineModeratorView = (pathname: string): boolean => { + return pathname === '/communities/mine/moderator'; +}; + export const isUpvotedView = (pathname: string): boolean => { return pathname === '/profile/upvoted'; }; diff --git a/src/views/subplebbits/subplebbits.module.css b/src/views/subplebbits/subplebbits.module.css index bc98c6bc..ba5e3e82 100644 --- a/src/views/subplebbits/subplebbits.module.css +++ b/src/views/subplebbits/subplebbits.module.css @@ -32,7 +32,7 @@ border-style: solid; border-width: 1px; font-size: small; - margin-bottom: 10px; + margin: 3px 0px; padding: 6px 10px; color: var(--text); word-wrap: break-word; @@ -117,6 +117,7 @@ color: var(--link); } +/* TODO: consider to enable this later, when lots of new communities will be proposed */ /* .title a:visited { color: var(--link-visited); } */ @@ -151,4 +152,36 @@ .subplebbitPreferences a:hover { text-decoration: underline; cursor: pointer; +} + +.subplebbitsTabs { + border-bottom: 1px dotted gray; + padding: 5px 10px; + margin-left: 5px; + overflow: hidden; + font-size: larger; + display: inline-block; + margin-right: 15px; + text-transform: lowercase; +} + +.subplebbitsTabs a span { + display: inline; + white-space: nowrap; +} + +.subplebbitsTabs a { + text-decoration: none; + color: var(--text-primary); +} + +.separator { + color: var(--gray); + margin: 0px .7ex 0px .7ex; + cursor: default; +} + +.selected { + color: var(--green) !important; + font-weight: bold; } \ No newline at end of file diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index 781b70f0..9badce05 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -1,19 +1,70 @@ import { useMemo } from 'react'; -import { Subplebbit as SubplebbitType, useAccountSubplebbits, useSubplebbitStats } from '@plebbit/plebbit-react-hooks'; +import { Link, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; +import { Subplebbit as SubplebbitType, useAccountSubplebbits, useSubplebbitStats } from '@plebbit/plebbit-react-hooks'; import styles from './subplebbits.module.css'; import Sidebar from '../../components/sidebar'; import SubscribeButton from '../../components/subscribe-button'; -import { Link } from 'react-router-dom'; -import { getFormattedDuration } from '../../lib/utils/time-utils'; +import { getFormattedTimeDuration, getFormattedTimeAgo } from '../../lib/utils/time-utils'; +import { isSubplebbitsMineContributorView, isSubplebbitsMineSubscriberView, isSubplebbitsMineModeratorView } from '../../lib/utils/view-utils'; interface SubplebbitProps { subplebbit: SubplebbitType; } +const Tabs = () => { + const { t } = useTranslation(); + const location = useLocation(); + const isSubplebbitsMineSubscriberPage = isSubplebbitsMineSubscriberView(location.pathname); + const isSubplebbitsMineContributorPage = isSubplebbitsMineContributorView(location.pathname); + const isSubplebbitsMineModeratorPage = isSubplebbitsMineModeratorView(location.pathname); + + return ( +
    + + subscriber + + | + + approved user + + | + + {t('moderator')} + +
    + ); +}; + +const Infobar = () => { + const { t } = useTranslation(); + const location = useLocation(); + const isSubplebbitsMineSubscriberPage = isSubplebbitsMineSubscriberView(location.pathname); + const isSubplebbitsMineContributorPage = isSubplebbitsMineContributorView(location.pathname); + const isSubplebbitsMineModeratorPage = isSubplebbitsMineModeratorView(location.pathname); + + const infobarText = useMemo(() => { + if (isSubplebbitsMineSubscriberPage) { + return 'below are communities you have subscribed to.'; + } else if (isSubplebbitsMineContributorPage) { + return 'below are the communities that you are an approved user on.'; + } else if (isSubplebbitsMineModeratorPage) { + return 'below are the communities that you have moderator access to.'; + } else { + return ( + <> + click the {t('join')} or {t('leave')} buttons to choose which communities appear on the home feed. + + ); + } + }, [isSubplebbitsMineSubscriberPage, isSubplebbitsMineContributorPage, isSubplebbitsMineModeratorPage, t]); + + return
    {infobarText}
    ; +}; + const Subplebbit = ({ subplebbit }: SubplebbitProps) => { const { t } = useTranslation(); - const { address, createdAt, description, shortAddress, title } = subplebbit || {}; + const { address, createdAt, description, shortAddress, title, updatedAt } = subplebbit || {}; const { allActiveUserCount } = useSubplebbitStats({ subplebbitAddress: address }); // TODO: make arrows functional when token voting is implemented in the API @@ -23,6 +74,8 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { const downvoteCount = 0; const postScore = upvoteCount === 0 && downvoteCount === 0 ? '•' : upvoteCount - downvoteCount || '•'; + const isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 30; + const offlineNotice = updatedAt && t('community_last_seen', { dateAgo: getFormattedTimeAgo(updatedAt) }); return (
    @@ -50,9 +103,9 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { {description &&
    {description}
    }
    - {allActiveUserCount ? ( + {isOnline ? ( <> - {t('members_count', { count: allActiveUserCount })}, {t('community_for', { date: getFormattedDuration(createdAt) })} + {t('members_count', { count: allActiveUserCount })}, {t('community_for', { date: getFormattedTimeDuration(createdAt) })}
    e.preventDefault()}> {t('preferences')} @@ -60,7 +113,7 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => {
    ) : ( - 'this community is offline' + offlineNotice )}
    @@ -70,7 +123,6 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { }; const Subplebbits = () => { - const { t } = useTranslation(); const { accountSubplebbits } = useAccountSubplebbits(); const accountSubplebbitsArray = useMemo(() => Object.values(accountSubplebbits), [accountSubplebbits]); @@ -79,9 +131,8 @@ const Subplebbits = () => {
    -
    - click the {t('join')} or {t('leave')} buttons to choose which communities appear on the home feed. -
    + + {accountSubplebbitsArray?.map((subplebbit) => )}
    ); From e24aa066dac2c232de99451f0e5301ba2607947c Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 1 Jan 2024 20:39:07 +0100 Subject: [PATCH 07/12] feat(subplebbits): add online indicator --- src/views/subplebbits/subplebbits.module.css | 16 ++++++++++++++++ src/views/subplebbits/subplebbits.tsx | 1 + 2 files changed, 17 insertions(+) diff --git a/src/views/subplebbits/subplebbits.module.css b/src/views/subplebbits/subplebbits.module.css index ba5e3e82..aa7490ea 100644 --- a/src/views/subplebbits/subplebbits.module.css +++ b/src/views/subplebbits/subplebbits.module.css @@ -101,6 +101,22 @@ opacity: 1; } +.onlineIndicator { + background-repeat: no-repeat; + display: inline-flex; + height: 13px; + width: 13px; + margin: 2px 5px -2px 2px; +} + +.online { + background-image: url('/public/assets/indicator-online.png'); +} + +.offline { + background-image: url('/public/assets/indicator-offline.png'); +} + .title { display: inline-flex; flex-wrap: wrap; diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index 9badce05..93bf4f08 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -92,6 +92,7 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => {
    + p/{address.includes('.') ? address : shortAddress} {title && `: ${title}`} From 5fa218dc797c7a228e980dc74dd37481e5bf720f Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 1 Jan 2024 21:41:29 +0100 Subject: [PATCH 08/12] refactor(subplebbits): disable links planned for later API implementations --- src/components/header/header.tsx | 6 +++--- src/components/topbar/topbar.tsx | 2 +- src/views/subplebbits/subplebbits.tsx | 12 ++++++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 9b201362..6cb051ec 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -199,17 +199,17 @@ const SubplebbitsHeaderTabs = () => { return ( <>
  • - + e.preventDefault()}> approved
  • - + e.preventDefault()}> proposed
  • - + e.preventDefault()}> {t('my_communities')}
  • diff --git a/src/components/topbar/topbar.tsx b/src/components/topbar/topbar.tsx index a773cef1..7b502e43 100644 --- a/src/components/topbar/topbar.tsx +++ b/src/components/topbar/topbar.tsx @@ -160,7 +160,7 @@ const TopBar = () => { ))}
    - + {t('edit')} »
    diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index 93bf4f08..31d0f976 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -21,11 +21,19 @@ const Tabs = () => { return (
    - + e.preventDefault()} // TODO: enable after useSubplebbits cache is implemented in the API + > subscriber | - + e.preventDefault()} // TODO: enable after approving user is implemented in the API + > approved user | From 91be80f3e5135af244fd0a7a921301c8a786d75d Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 1 Jan 2024 22:26:33 +0100 Subject: [PATCH 09/12] feat(subplebbits): add settings route, header title --- src/app.tsx | 14 ++++++---- src/components/header/header.tsx | 28 +++++++++++++------ src/lib/utils/view-utils.ts | 4 +++ .../subplebbit/subplebbit-settings/index.ts | 1 + .../subplebbit-settings.module.css | 0 .../subplebbit-settings.tsx | 7 +++++ src/views/subplebbits/subplebbits.module.css | 2 +- src/views/subplebbits/subplebbits.tsx | 4 +-- 8 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 src/views/subplebbit/subplebbit-settings/index.ts create mode 100644 src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css create mode 100644 src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx diff --git a/src/app.tsx b/src/app.tsx index e8767012..14f1b7ef 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -13,6 +13,7 @@ import Profile from './views/profile'; import Settings from './views/settings'; import Submit from './views/submit'; import Subplebbit from './views/subplebbit'; +import SubplebbitSettings from './views/subplebbit/subplebbit-settings'; import Subplebbits from './views/subplebbits'; import AccountBar from './components/account-bar/'; import ChallengeModal from './components/challenge-modal'; @@ -73,9 +74,9 @@ function App() { } /> } /> - } /> - } /> - } /> + } /> + } /> + } /> } /> @@ -87,6 +88,7 @@ function App() { } /> } /> + } /> } /> } /> @@ -94,9 +96,9 @@ function App() { } /> } /> - } /> - } /> - } /> + } /> + } /> + } /> } /> } /> diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 6cb051ec..f57cc3e9 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -13,15 +13,16 @@ import { isDownvotedView, isHomeView, isInboxView, - isPostView, - isSettingsView, - isSubplebbitView, - isSubmitView, - isSubplebbitSubmitView, isPendingView, + isPostView, isProfileView, isProfileCommentsView, isProfileSubmittedView, + isSettingsView, + isSubmitView, + isSubplebbitView, + isSubplebbitSettingsView, + isSubplebbitSubmitView, isSubplebbitsView, isUpvotedView, } from '../../lib/utils/view-utils'; @@ -229,12 +230,13 @@ const HeaderTabs = () => { const isPostPage = isPostView(location.pathname, params); const isProfilePage = isProfileView(location.pathname); const isSubplebbitPage = isSubplebbitView(location.pathname, params); + const isSubplebbitSettingsPage = isSubplebbitSettingsView(location.pathname, params); const isSubplebbitSubmitPage = isSubplebbitSubmitView(location.pathname, params); const isSubplebbitsPage = isSubplebbitsView(location.pathname); if (isPostPage) { return ; - } else if (isHomePage || (isSubplebbitPage && !isSubplebbitSubmitPage) || isAllPage) { + } else if (isHomePage || (isSubplebbitPage && !isSubplebbitSubmitPage && !isSubplebbitSettingsPage) || isAllPage) { return ; } else if ((isProfilePage || isAuthorPage) && !isPendingPage) { return ; @@ -261,6 +263,7 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str const isSubmitPage = isSubmitView(location.pathname); const isSubplebbitPage = isSubplebbitView(location.pathname, params); const isSubplebbitSubmitPage = isSubplebbitSubmitView(location.pathname, params); + const isSubplebbitSettingsPage = isSubplebbitSettingsView(location.pathname, params); const isSubplebbitsPage = isSubplebbitsView(location.pathname); const subplebbitTitle = {title || shortAddress}; @@ -274,8 +277,14 @@ const HeaderTitle = ({ title, shortAddress }: { title: string; shortAddress: str {subplebbitTitle}: {submitTitle} ); - } else if (isPostPage || isSubplebbitPage) { + } else if (isPostPage || (isSubplebbitPage && !isSubplebbitSettingsPage)) { return subplebbitTitle; + } else if (isSubplebbitSettingsPage) { + return ( + <> + {subplebbitTitle}: {t('settings')} + + ); } else if (isSubmitPage) { return submitTitle; } else if (isSettingsPage) { @@ -311,16 +320,17 @@ const Header = () => { const isSubplebbitPage = isSubplebbitView(location.pathname, params); const isSubmitPage = isSubmitView(location.pathname); const isSubplebbitSubmitPage = isSubplebbitSubmitView(location.pathname, params); + const isSubplebbitSettingsPage = isSubplebbitSettingsView(location.pathname, params); const account = useAccount(); const authorComment = useComment({ commentCid: params?.commentCid }); const author = isProfilePage ? account?.author : isAuthorPage ? authorComment?.author : null; const { imageUrl } = useAuthorAvatar({ author }); - const hasFewTabs = isPostPage || isSubmitPage || isSubplebbitSubmitPage || isSettingsPage || isInboxPage; + const hasFewTabs = isPostPage || isSubmitPage || isSubplebbitSubmitPage || isSubplebbitSettingsPage || isSettingsPage || isInboxPage; const hasStickyHeader = isHomePage || - (isSubplebbitPage && !isSubplebbitSubmitPage && !isPostPage && !isAboutPage) || + (isSubplebbitPage && !isSubplebbitSubmitPage && !isSubplebbitSettingsPage && !isPostPage && !isAboutPage) || (isProfilePage && !isAboutPage) || isAllPage || (isAuthorPage && !isAboutPage); diff --git a/src/lib/utils/view-utils.ts b/src/lib/utils/view-utils.ts index 30af1a22..b0d320a2 100644 --- a/src/lib/utils/view-utils.ts +++ b/src/lib/utils/view-utils.ts @@ -102,6 +102,10 @@ export const isSubplebbitView = (pathname: string, params: ParamsType): boolean return params.subplebbitAddress ? pathname.startsWith(`/p/${params.subplebbitAddress}`) : false; }; +export const isSubplebbitSettingsView = (pathname: string, params: ParamsType): boolean => { + return params.subplebbitAddress ? pathname === `/p/${params.subplebbitAddress}/settings` : false; +}; + export const isSubplebbitSubmitView = (pathname: string, params: ParamsType): boolean => { return params.subplebbitAddress ? pathname === `/p/${params.subplebbitAddress}/submit` : false; }; diff --git a/src/views/subplebbit/subplebbit-settings/index.ts b/src/views/subplebbit/subplebbit-settings/index.ts new file mode 100644 index 00000000..ed8a6555 --- /dev/null +++ b/src/views/subplebbit/subplebbit-settings/index.ts @@ -0,0 +1 @@ +export { default } from './subplebbit-settings'; diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css new file mode 100644 index 00000000..e69de29b diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx new file mode 100644 index 00000000..aa0ce7f5 --- /dev/null +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx @@ -0,0 +1,7 @@ +import styles from './subplebbit-settings.module.css'; + +const SubplebbitSettings = () => { + return
    community settings
    ; +}; + +export default SubplebbitSettings; diff --git a/src/views/subplebbits/subplebbits.module.css b/src/views/subplebbits/subplebbits.module.css index aa7490ea..711eb640 100644 --- a/src/views/subplebbits/subplebbits.module.css +++ b/src/views/subplebbits/subplebbits.module.css @@ -106,7 +106,7 @@ display: inline-flex; height: 13px; width: 13px; - margin: 2px 5px -2px 2px; + margin: 3px 5px -2px 2px; } .online { diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index 31d0f976..fdcc30d3 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -116,9 +116,7 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { <> {t('members_count', { count: allActiveUserCount })}, {t('community_for', { date: getFormattedTimeDuration(createdAt) })}
    - e.preventDefault()}> - {t('preferences')} - + settings
    ) : ( From 0304b5cde5013d8a3e576226c3fc1864ba0f89c9 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 3 Jan 2024 12:27:46 +0100 Subject: [PATCH 10/12] fix(language settings): trigger page refresh at language change because some strings get stuck --- src/views/settings/language-settings/language-settings.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/settings/language-settings/language-settings.tsx b/src/views/settings/language-settings/language-settings.tsx index 1e94d7ae..8732d1ce 100644 --- a/src/views/settings/language-settings/language-settings.tsx +++ b/src/views/settings/language-settings/language-settings.tsx @@ -9,6 +9,7 @@ const LanguageSettings = () => { const onSelectLanguage = (e: React.ChangeEvent) => { changeLanguage(e.target.value); + window.location.reload(); }; return ( From 1eb75fa92a6e025ecf07bde021fd1a06e9f480bf Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 3 Jan 2024 12:30:00 +0100 Subject: [PATCH 11/12] feat(subplebbits): add page title --- src/views/subplebbits/subplebbits.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/subplebbits/subplebbits.tsx b/src/views/subplebbits/subplebbits.tsx index fdcc30d3..186f904a 100644 --- a/src/views/subplebbits/subplebbits.tsx +++ b/src/views/subplebbits/subplebbits.tsx @@ -1,4 +1,4 @@ -import { useMemo } from 'react'; +import { useEffect, useMemo } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { Subplebbit as SubplebbitType, useAccountSubplebbits, useSubplebbitStats } from '@plebbit/plebbit-react-hooks'; @@ -85,6 +85,10 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => { const isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 30; const offlineNotice = updatedAt && t('community_last_seen', { dateAgo: getFormattedTimeAgo(updatedAt) }); + useEffect(() => { + document.title = `${t('communities')} - seedit`; + }, [t]); + return (
    From f4634b645538e1e4619fcc75140839253067bfdc Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 3 Jan 2024 12:31:38 +0100 Subject: [PATCH 12/12] feat(subplebbit settings): add initial UI --- src/themes.css | 2 + .../subplebbit-settings.module.css | 66 +++++++++++++++++++ .../subplebbit-settings.tsx | 53 ++++++++++++++- 3 files changed, 120 insertions(+), 1 deletion(-) diff --git a/src/themes.css b/src/themes.css index 89b0732f..e263132b 100644 --- a/src/themes.css +++ b/src/themes.css @@ -1,4 +1,5 @@ :root .light { + --blue: blue; --orange: #FF7500; --green: #228822; --yellow: goldenrod; @@ -52,6 +53,7 @@ } :root .dark { + --blue: rgb(47, 125, 255); --orange: #FF7500; --green: #228822; --yellow: rgb(200, 171, 0); diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css index e69de29b..0528396d 100644 --- a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css @@ -0,0 +1,66 @@ +.content { + padding: 7px 5px 50px 5px; + color: var(--text); +} + +.box { + width: 514px; + background-color: var(--background-primary); + padding: 10px 5px; + font-size: large; + margin-bottom: 10px; +} + +.boxTitle { + color: var(--blue); + font-size: 15px; + font-weight: bold; + padding: 0px 10px; + overflow: hidden; + unicode-bidi: isolate; +} + +.boxSubtitle { + font-size: 10px; + color: var(--text-info); + padding-left: 10px; + padding-top: 1px; +} + +.boxInput { + vertical-align: top; + margin-top: 5px; + padding: 2px 0px 2px 8px; + width: 500px; +} + +.boxInput input { + font-size: 100%; + width: 492px; + padding: 3px; + border: 1px solid var(--border-text); + box-shadow: var(--box-shadow-input); +} + +.boxInput textarea { + box-shadow: var(--box-shadow-input); + width: 492px; + padding: 3px; + border: 1px solid gray; + height: 100px; + font-family: verdana, arial, helvetica, sans-serif; + line-height: 20px; + font-size: 14px; +} + +@media (max-width: 768px) { + .box { + width: 100%; + box-sizing: border-box; + } + + .boxInput input, .boxInput textarea { + width: calc(100% - 104px); + box-sizing: border-box; + } +} diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx index aa0ce7f5..50ad995c 100644 --- a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx @@ -1,7 +1,58 @@ import styles from './subplebbit-settings.module.css'; +import { useParams } from 'react-router-dom'; +import { useSubplebbit } from '@plebbit/plebbit-react-hooks'; const SubplebbitSettings = () => { - return
    community settings
    ; + const { subplebbitAddress } = useParams<{ subplebbitAddress: string }>(); + const subplebbit = useSubplebbit({ subplebbitAddress }); + const { description, rules, suggested, roles, title } = subplebbit || {}; + + return ( +
    +
    +
    title
    +
    e.g., books: made from trees or pixels. recommendations, news, or thoughts
    +
    + +
    +
    +
    +
    description
    +
    shown in the sidebar of your community
    +
    +