From 3f780a54ba64e9aaca563cc53bf7bae21a89eeed Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 17 Mar 2024 10:58:08 +0100 Subject: [PATCH 1/8] fix(mod menu): ban days input was too long on firefox --- .../post/comment-tools/mod-menu/mod-menu.module.css | 6 ++++++ src/components/post/comment-tools/mod-menu/mod-menu.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/post/comment-tools/mod-menu/mod-menu.module.css b/src/components/post/comment-tools/mod-menu/mod-menu.module.css index e92bfe47..ac958dfc 100644 --- a/src/components/post/comment-tools/mod-menu/mod-menu.module.css +++ b/src/components/post/comment-tools/mod-menu/mod-menu.module.css @@ -56,4 +56,10 @@ .optional { color: var(--text-info); +} + +@supports (-moz-appearance: none) { + .banInput { + width: 3.5em; /* Adjust this width as needed */ + } } \ No newline at end of file diff --git a/src/components/post/comment-tools/mod-menu/mod-menu.tsx b/src/components/post/comment-tools/mod-menu/mod-menu.tsx index 8b09e472..36992124 100644 --- a/src/components/post/comment-tools/mod-menu/mod-menu.tsx +++ b/src/components/post/comment-tools/mod-menu/mod-menu.tsx @@ -141,7 +141,7 @@ const ModMenu = ({ cid, isCommentAuthorMod }: ModMenuProps) => { }} + components={{ 1: }} /> From d91cada12e1c471afd1154c3b28f89e6f6e258eb Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 17 Mar 2024 11:02:23 +0100 Subject: [PATCH 2/8] style(search bar): add .sol to placeholder --- src/components/post/comment-tools/mod-menu/mod-menu.module.css | 2 +- src/components/search-bar/search-bar.tsx | 2 +- src/views/submit-page/submit-page.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/post/comment-tools/mod-menu/mod-menu.module.css b/src/components/post/comment-tools/mod-menu/mod-menu.module.css index ac958dfc..b23edf01 100644 --- a/src/components/post/comment-tools/mod-menu/mod-menu.module.css +++ b/src/components/post/comment-tools/mod-menu/mod-menu.module.css @@ -60,6 +60,6 @@ @supports (-moz-appearance: none) { .banInput { - width: 3.5em; /* Adjust this width as needed */ + width: 3.5em; } } \ No newline at end of file diff --git a/src/components/search-bar/search-bar.tsx b/src/components/search-bar/search-bar.tsx index c3cfe76c..da9177e7 100644 --- a/src/components/search-bar/search-bar.tsx +++ b/src/components/search-bar/search-bar.tsx @@ -14,7 +14,7 @@ const SearchBar = ({ isFocused = false }: SearchBarProps) => { const navigate = useNavigate(); const { t } = useTranslation(); const [isInCommunitySearch, setIsInCommunitySearch] = useState(false); - const placeholder = isInCommunitySearch ? t('search') : `"community.eth" ${t('or')} "12D3KooW..."`; + const placeholder = isInCommunitySearch ? t('search') : `"community.eth/.sol" ${t('or')} "12D3KooW..."`; const [showExpando, setShowExpando] = useState(false); const handleInputFocus = () => { diff --git a/src/views/submit-page/submit-page.tsx b/src/views/submit-page/submit-page.tsx index b6607b53..3e9c9b0a 100644 --- a/src/views/submit-page/submit-page.tsx +++ b/src/views/submit-page/submit-page.tsx @@ -305,7 +305,7 @@ const Submit = () => { setIsInputAddressFocused(true)} onBlur={() => setTimeout(() => setIsInputAddressFocused(false), 100)} autoCorrect='off' From 7f6f0dd7fbf86b4736e4607954778ed2c69893b3 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 17 Mar 2024 11:11:01 +0100 Subject: [PATCH 3/8] style(post page): add deleted or removed state to post locked banner --- public/translations/ar/default.json | 2 +- public/translations/bn/default.json | 2 +- public/translations/cs/default.json | 2 +- public/translations/da/default.json | 2 +- public/translations/de/default.json | 2 +- public/translations/el/default.json | 2 +- public/translations/en/default.json | 2 +- public/translations/es/default.json | 2 +- public/translations/fa/default.json | 2 +- public/translations/fi/default.json | 2 +- public/translations/fil/default.json | 2 +- public/translations/fr/default.json | 2 +- public/translations/he/default.json | 2 +- public/translations/hi/default.json | 2 +- public/translations/hu/default.json | 2 +- public/translations/id/default.json | 2 +- public/translations/it/default.json | 2 +- public/translations/ja/default.json | 2 +- public/translations/ko/default.json | 2 +- public/translations/mr/default.json | 2 +- public/translations/nl/default.json | 2 +- public/translations/no/default.json | 2 +- public/translations/pl/default.json | 2 +- public/translations/pt/default.json | 2 +- public/translations/ro/default.json | 2 +- public/translations/ru/default.json | 2 +- public/translations/sq/default.json | 2 +- public/translations/sv/default.json | 2 +- public/translations/te/default.json | 2 +- public/translations/th/default.json | 2 +- public/translations/tr/default.json | 2 +- public/translations/uk/default.json | 2 +- public/translations/ur/default.json | 2 +- public/translations/vi/default.json | 2 +- public/translations/zh/default.json | 2 +- src/views/post-page/post-page.tsx | 6 +++--- 36 files changed, 38 insertions(+), 38 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 7a1a3688..fbdde48d 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -168,7 +168,7 @@ "show_parent": "أظهر المشاركة المشار إليها", "no_posts": "لا توجد مشاركات", "media_url": "عنوان وسائط", - "post_locked_info": "هذا المنشور مغلق. لن تتمكن من التعليق.", + "post_locked_info": "هذه المشاركة {{state}}. لن تتمكن من التعليق.", "no_subscriptions_notice": "لم تنضم إلى أي مجتمع بعد.", "members_count": "{{count}} أعضاء", "communities": "مجتمع", diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 926c4aac..3ff0ba1f 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -168,7 +168,7 @@ "show_parent": "সূচিত পোস্ট দেখুন", "no_posts": "কোন পোস্ট নেই", "media_url": "মিডিয়া ইউআরএল", - "post_locked_info": "এই পোস্টটি লক হয়েছে। আপনি মন্তব্য করতে পারবেন না।", + "post_locked_info": "এই পোস্ট {{state}}। আপনি মন্তব্য করতে পারবেন না।", "no_subscriptions_notice": "আপনি এখনো কোনও সম্প্রদানে যোগ দিননি।", "members_count": "{{count}} সদস্য", "communities": "সম্প্রদান", diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 62c1ba57..032e38ab 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -168,7 +168,7 @@ "show_parent": "zobrazit příspěvek, na který se odkazuje", "no_posts": "žádné příspěvky", "media_url": "URL médií", - "post_locked_info": "Tento příspěvek je uzamčen. Nebudete moci komentovat.", + "post_locked_info": "Tento příspěvek je {{state}}. Nebudete moci komentovat.", "no_subscriptions_notice": "Dosud jste se nepřipojili k žádné komunitě.", "members_count": "{{count}} členů", "communities": "komunita", diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 37a6831f..253e383e 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -168,7 +168,7 @@ "show_parent": "vis den henviste post", "no_posts": "ingen indlæg", "media_url": "medie-URL", - "post_locked_info": "Dette indlæg er låst. Du kan ikke kommentere.", + "post_locked_info": "Dette indlæg er {{state}}. Du vil ikke kunne kommentere.", "no_subscriptions_notice": "Du har endnu ikke tilsluttet dig nogen fællesskab.", "members_count": "{{count}} medlemmer", "communities": "fællesskab", diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 254080c2..a299641a 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -168,7 +168,7 @@ "show_parent": "zeige den verlinkten Beitrag", "no_posts": "keine Beiträge", "media_url": "Medien-URL", - "post_locked_info": "Dieser Beitrag ist gesperrt. Sie können keine Kommentare abgeben.", + "post_locked_info": "Dieser Beitrag ist {{state}}. Sie können keinen Kommentar hinterlassen.", "no_subscriptions_notice": "Du hast dich noch keiner Community angeschlossen.", "members_count": "{{count}} Mitglieder", "communities": "Gemeinschaft", diff --git a/public/translations/el/default.json b/public/translations/el/default.json index f8344b6b..730afccb 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -168,7 +168,7 @@ "show_parent": "εμφάνιση της αναφερόμενης δημοσίευσης", "no_posts": "κανένα άρθρο", "media_url": "URL πολυμέσων", - "post_locked_info": "Αυτή η ανάρτηση είναι κλειδωμένη. Δεν θα μπορείτε να σχολιάσετε.", + "post_locked_info": "Αυτή η ανάρτηση είναι {{state}}. Δεν θα μπορείτε να σχολιάσετε.", "no_subscriptions_notice": "Δεν έχετε εγγραφεί ακόμη σε κοινότητα.", "members_count": "{{count}} μέλη", "communities": "κοινόνια", diff --git a/public/translations/en/default.json b/public/translations/en/default.json index ebb27b45..616fa888 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -168,7 +168,7 @@ "show_parent": "show parent", "no_posts": "no posts", "media_url": "media url", - "post_locked_info": "This post is locked. You won't be able to comment.", + "post_locked_info": "This post is {{state}}. You won't be able to comment.", "no_subscriptions_notice": "You haven't joined any community.", "members_count": "{{count}} members", "communities": "communities", diff --git a/public/translations/es/default.json b/public/translations/es/default.json index eb55c6d0..1d41f85d 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -168,7 +168,7 @@ "show_parent": "mostrar el post al que se hace referencia", "no_posts": "sin publicaciones", "media_url": "URL de medios", - "post_locked_info": "Esta publicación está bloqueada. No podrás comentar.", + "post_locked_info": "Esta publicación está {{state}}. No podrás comentar.", "no_subscriptions_notice": "Todavía no te has unido a ninguna comunidad.", "members_count": "{{count}} miembros", "communities": "comunidades", diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 5741e455..ac56130b 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -168,7 +168,7 @@ "show_parent": "نمایش پست مرجع داده شده", "no_posts": "بدون پست", "media_url": "آدرس رسانه", - "post_locked_info": "این پست قفل شده است. نمی‌توانید نظر دهید.", + "post_locked_info": "این پست {{state}} است. شما نمی‌توانید نظر دهید.", "no_subscriptions_notice": "هنوز به هیچ انجمنی پیوسته نشده‌اید.", "members_count": "{{count}} عضو", "communities": "انجمن", diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index bda57891..96d7c00a 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -168,7 +168,7 @@ "show_parent": "näytä viitattu viesti", "no_posts": "ei viestejä", "media_url": "medialinkki", - "post_locked_info": "Tämä viesti on lukittu. Et voi kommentoida sitä.", + "post_locked_info": "Tämä viesti on {{state}}. Et voi kommentoida.", "no_subscriptions_notice": "Et ole vielä liittynyt mihinkään yhteisöön.", "members_count": "{{count}} jäsentä", "communities": "yhteisö", diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index d198cbbf..eb833cd4 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -168,7 +168,7 @@ "show_parent": "ipakita ang tinutukoy na post", "no_posts": "walang post", "media_url": "media url", - "post_locked_info": "Ang post na ito ay naka-lock. Hindi ka makakapagkomento.", + "post_locked_info": "Ang post na ito ay {{state}}. Hindi ka makakapagkomento.", "no_subscriptions_notice": "Hindi ka pa sumali sa anumang komunidad.", "members_count": "{{count}} miyembro", "communities": "komunidad", diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 703737a3..103d9d79 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -168,7 +168,7 @@ "show_parent": "afficher le post référencé", "no_posts": "pas de publications", "media_url": "URL multimédia", - "post_locked_info": "Ce post est verrouillé. Vous ne pourrez pas commenter.", + "post_locked_info": "Ce post est {{state}}. Vous ne pourrez pas commenter.", "no_subscriptions_notice": "Vous n'avez rejoint aucune communauté.", "members_count": "{{count}} membres", "communities": "communauté", diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 5225cba7..dfe509c4 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -168,7 +168,7 @@ "show_parent": "הצג את הפוסט המתייחס אליו", "no_posts": "אין פוסטים", "media_url": "כתובת מדיה", - "post_locked_info": "הפוסט הזה נעול. אינך יכול להגיב.", + "post_locked_info": "הפוסט הזה הוא {{state}}. לא תוכל להגיב.", "no_subscriptions_notice": "עדיין לא הצטרפת לאף קהילה.", "members_count": "{{count}} חברים", "communities": "קהילה", diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index e29b0386..ce79f2b2 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -168,7 +168,7 @@ "show_parent": "संदर्भित पोस्ट दिखाएं", "no_posts": "कोई पोस्ट नहीं", "media_url": "मीडिया यूआरएल", - "post_locked_info": "यह पोस्ट बंद है। आप टिप्पणी नहीं कर सकेंगे।", + "post_locked_info": "यह पोस्ट {{state}} है। आप टिप्पणी नहीं कर पाएंगे।", "no_subscriptions_notice": "आपने अब तक किसी समुदाय में शामिल नहीं हुए हैं।", "members_count": "{{count}} सदस्य", "communities": "समुदाय", diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 8533e4b9..44984839 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -168,7 +168,7 @@ "show_parent": "mutassa a hivatkozott bejegyzést", "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.", + "post_locked_info": "Ez a bejegyzés {{state}}. Nem fogsz tudni kommentálni.", "no_subscriptions_notice": "Még nem csatlakoztál egyetlen közösséghez sem.", "members_count": "{{count}} tag", "communities": "közösség", diff --git a/public/translations/id/default.json b/public/translations/id/default.json index a047e822..05a53008 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -168,7 +168,7 @@ "show_parent": "tampilkan posting yang dirujuk", "no_posts": "tidak ada posting", "media_url": "URL media", - "post_locked_info": "Pos ini terkunci. Anda tidak akan dapat mengomentari.", + "post_locked_info": "Postingan ini {{state}}. Anda tidak akan dapat berkomentar.", "no_subscriptions_notice": "Anda belum bergabung dengan komunitas mana pun.", "members_count": "{{count}} anggota", "communities": "komunitas", diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 8f8cdb5d..9778b107 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -168,7 +168,7 @@ "show_parent": "mostra il post a cui è riferito", "no_posts": "nessun post", "media_url": "URL media", - "post_locked_info": "Questo post è stato bloccato. Non potrai commentarlo.", + "post_locked_info": "Questo post è stato {{state}}. Non potrai commentarlo.", "no_subscriptions_notice": "Non ti sei ancora unito a nessuna comunità.", "members_count": "{{count}} membri", "communities": "comunità", diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 95aefcda..a9b4fbf1 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -168,7 +168,7 @@ "show_parent": "参照されている投稿を表示", "no_posts": "投稿はありません", "media_url": "メディア URL", - "post_locked_info": "この投稿はロックされています。コメントできません。", + "post_locked_info": "この投稿は{{state}}です。コメントできません。", "no_subscriptions_notice": "まだどのコミュニティにも参加していません。", "members_count": "{{count}} メンバー", "communities": "コミュニティ", diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index c1c60011..58f57fd8 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -168,7 +168,7 @@ "show_parent": "참조된 게시물 표시", "no_posts": "게시물이 없습니다", "media_url": "미디어 URL", - "post_locked_info": "이 게시물은 잠겨 있습니다. 댓글을 남길 수 없습니다.", + "post_locked_info": "이 게시물은 {{state}} 상태입니다. 댓글을 달 수 없습니다.", "no_subscriptions_notice": "아직 어떤 커뮤니티에도 가입하지 않았습니다.", "members_count": "{{count}} 회원", "communities": "커뮤니티", diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 86867b18..d6c64317 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -168,7 +168,7 @@ "show_parent": "संदर्भित पोस्ट दाखवा", "no_posts": "कोणतेही पोस्ट नाहीत", "media_url": "मिडिया URL", - "post_locked_info": "हा पोस्ट लॉक झाला आहे. आपण टिप्पणी करू शकणार नाहीत.", + "post_locked_info": "हा पोस्ट {{state}} आहे. आपण टिप्पणी करू शकणार नाही.", "no_subscriptions_notice": "तुम्ही अद्याप कोणत्याही संघात सामील झालं नाही.", "members_count": "{{count}} सदस्य", "communities": "संघा", diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 4a8982bb..2ac3fa6a 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -168,7 +168,7 @@ "show_parent": "toon de verwezen post", "no_posts": "geen berichten", "media_url": "media-url", - "post_locked_info": "Dit bericht is vergrendeld. Je kunt geen opmerkingen plaatsen.", + "post_locked_info": "Dit bericht is {{state}}. U kunt geen opmerking plaatsen.", "no_subscriptions_notice": "Je hebt je nog niet bij een community aangesloten.", "members_count": "{{count}} leden", "communities": "gemeenschap", diff --git a/public/translations/no/default.json b/public/translations/no/default.json index be8dd7ad..6a2aa7d6 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -168,7 +168,7 @@ "show_parent": "vis den refererte posten", "no_posts": "ingen innlegg", "media_url": "medie-URL", - "post_locked_info": "Dette innlegget er låst. Du kan ikke kommentere.", + "post_locked_info": "Dette innlegget er {{state}}. Du vil ikke kunne kommentere.", "no_subscriptions_notice": "Du har ikke blitt med i noen fellesskap ennå.", "members_count": "{{count}} medlemmer", "communities": "fellesskap", diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 94f51683..33ebd0df 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -168,7 +168,7 @@ "show_parent": "pokaż post, do którego jest odwołanie", "no_posts": "brak postów", "media_url": "URL mediów", - "post_locked_info": "Ten post jest zablokowany. Nie będziesz mógł komentować.", + "post_locked_info": "Ten post jest {{state}}. 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", "communities": "społeczność", diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 97bf716e..e3245c3c 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -168,7 +168,7 @@ "show_parent": "mostrar a postagem referenciada", "no_posts": "sem publicações", "media_url": "URL de mídia", - "post_locked_info": "Esta postagem está bloqueada. Você não poderá comentar.", + "post_locked_info": "Esta postagem está {{state}}. Você não poderá comentar.", "no_subscriptions_notice": "Ainda não se juntou a nenhuma comunidade.", "members_count": "{{count}} membros", "communities": "comunidade", diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 7bc90c57..1eccab3e 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -168,7 +168,7 @@ "show_parent": "afișează postarea referită", "no_posts": "niciun post", "media_url": "URL media", - "post_locked_info": "Acest post este blocat. Nu vei putea comenta.", + "post_locked_info": "Această postare este {{state}}. Nu veți putea comenta.", "no_subscriptions_notice": "Nu te-ai alăturat încă niciunei comunități.", "members_count": "{{count}} membri", "communities": "comunitate", diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 0714b03a..4c499147 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -168,7 +168,7 @@ "show_parent": "показать упомянутый пост", "no_posts": "нет записей", "media_url": "URL медиа", - "post_locked_info": "Этот пост заблокирован. Вы не сможете оставить комментарий.", + "post_locked_info": "Этот пост {{state}}. Вы не сможете оставить комментарий.", "no_subscriptions_notice": "Вы еще не присоединились ни к одному сообществу.", "members_count": "{{count}} участников", "communities": "сообщество", diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 73fce89c..682e5cad 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -168,7 +168,7 @@ "show_parent": "shfaq postën e referuar", "no_posts": "asnjë postim", "media_url": "media url", - "post_locked_info": "Ky post është bllokuar. Nuk do të jeni në gjendje të komentoni.", + "post_locked_info": "Ky post është {{state}}. Nuk do të jeni në gjendje të komentoni.", "no_subscriptions_notice": "Nuk keni bashkuar akoma ndonjë komunitet.", "members_count": "{{count}} anëtarë", "communities": "komunitet", diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index d36d1e71..0cdc0cce 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -168,7 +168,7 @@ "show_parent": "visa den refererade posten", "no_posts": "inga inlägg", "media_url": "media-url", - "post_locked_info": "Detta inlägg är låst. Du kommer inte att kunna kommentera.", + "post_locked_info": "Det här inlägget är {{state}}. Du kommer inte att kunna kommentera.", "no_subscriptions_notice": "Du har ännu inte gått med i någon gemenskap.", "members_count": "{{count}} medlemmar", "communities": "gemenskap", diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 863f5b9a..c18248f9 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -168,7 +168,7 @@ "show_parent": "సూచించబడిన పోస్ట్ చూపించు", "no_posts": "పోస్టులు లేవు", "media_url": "మీడియా URL", - "post_locked_info": "ఈ పోస్టు లాక్ చేయబడింది. మీరు వ్యాఖ్యానించలేరు.", + "post_locked_info": "ఈ పోస్టు {{state}}. మీరు వ్యాఖ్య చేయలేరు.", "no_subscriptions_notice": "మీరు ఇంకా ఏ కమ్యూనిటీలో చేరలేదు.", "members_count": "{{count}} సభ్యులు", "communities": "సమూహం", diff --git a/public/translations/th/default.json b/public/translations/th/default.json index d5fb5f12..a287981b 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -168,7 +168,7 @@ "show_parent": "แสดงโพสต์ที่ถูกอ้างอิง", "no_posts": "ไม่มีโพสต์", "media_url": "URL สื่อ", - "post_locked_info": "โพสต์นี้ถูกล็อก คุณจะไม่สามารถแสดงความคิดเห็นได้", + "post_locked_info": "โพสต์นี้ {{state}} คุณจะไม่สามารถแสดงความคิดเห็นได้", "no_subscriptions_notice": "คุณยังไม่ได้เข้าร่วมชุมชนใด ๆ", "members_count": "{{count}} สมาชิก", "communities": "ชุมชน", diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index c1701e57..af99201a 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -168,7 +168,7 @@ "show_parent": "atıfta bulunulan gönderiyi göster", "no_posts": "gönderi yok", "media_url": "medya URL'si", - "post_locked_info": "Bu gönderi kilitlendi. Yorum yapamayacaksınız.", + "post_locked_info": "Bu gönderi {{state}}. Yorum yapamayacaksınız.", "no_subscriptions_notice": "Henüz herhangi bir topluluğa katılmadınız.", "members_count": "{{count}} üye", "communities": "topluluk", diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index dce4b956..818cbee3 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -168,7 +168,7 @@ "show_parent": "показати зазначений допис", "no_posts": "немає повідомлень", "media_url": "URL медіа", - "post_locked_info": "Цей пост заблокований. Ви не зможете залишити коментар.", + "post_locked_info": "Цей пост {{state}}. Ви не зможете коментувати.", "no_subscriptions_notice": "Ви ще не приєдналися до жодної спільноти.", "members_count": "{{count}} учасників", "communities": "спільнота", diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 04cf62eb..6a6e492b 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -168,7 +168,7 @@ "show_parent": "ذکر کردہ پوسٹ دکھائیں", "no_posts": "کوئی پوسٹ نہیں", "media_url": "میڈیا یو آر ایل", - "post_locked_info": "یہ پوسٹ بند ہے۔ آپ تبصرہ نہیں کر سکیں گے۔", + "post_locked_info": "یہ پوسٹ {{state}} ہے۔ آپ تبصرہ نہیں کر سکیں گے۔", "no_subscriptions_notice": "آپ نے ابھی تک کسی بھی کمیونٹی میں شامل نہیں ہوئے۔", "members_count": "{{count}} رکن", "communities": "مجتمع", diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 7e268d24..4a536f5e 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -168,7 +168,7 @@ "show_parent": "hiển thị bài viết được tham khảo", "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.", + "post_locked_info": "Bài đăng này {{state}}. 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", "communities": "cộng đồng", diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 406faa73..873d57b5 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -168,7 +168,7 @@ "show_parent": "显示被引用的帖子", "no_posts": "没有帖子", "media_url": "媒体链接", - "post_locked_info": "此帖已锁定。您将无法评论。", + "post_locked_info": "此帖子{{state}}。 您将无法发表评论。", "no_subscriptions_notice": "您尚未加入任何社区。", "members_count": "{{count}} 成员", "communities": "社区", diff --git a/src/views/post-page/post-page.tsx b/src/views/post-page/post-page.tsx index 647f4abf..a3808939 100644 --- a/src/views/post-page/post-page.tsx +++ b/src/views/post-page/post-page.tsx @@ -86,7 +86,7 @@ const Post = ({ post }: { post: Comment }) => { const PostWithContext = ({ post }: { post: Comment }) => { const { t } = useTranslation(); - const { postCid, subplebbitAddress } = post || {}; + const { deleted, locked, postCid, removed, subplebbitAddress } = post || {}; const postComment = useComment({ commentCid: post?.postCid }); const topParentCid = findTopParentCidOfReply(post.cid, postComment); @@ -97,9 +97,9 @@ const PostWithContext = ({ post }: { post: Comment }) => { return ( <> - {(post?.locked || post?.removed) && ( + {(deleted || locked || removed) && (
-
{t('post_locked_info')}
+
{t('post_locked_info', { state: deleted ? t('deleted') : locked ? t('locked') : removed ? t('removed') : '' })}
)} From 29891a6e39f7c7dd5f6e930f7f7f041126565fde Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 17 Mar 2024 13:58:39 +0100 Subject: [PATCH 4/8] change context number to 3 --- src/app.tsx | 2 +- src/components/post/comment-tools/comment-tools.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 6b6697b9..fb20a975 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -115,7 +115,7 @@ const App = () => { } /> } /> - } /> + } /> } /> } /> diff --git a/src/components/post/comment-tools/comment-tools.tsx b/src/components/post/comment-tools/comment-tools.tsx index fc793853..2da09501 100644 --- a/src/components/post/comment-tools/comment-tools.tsx +++ b/src/components/post/comment-tools/comment-tools.tsx @@ -168,7 +168,7 @@ const SingleReplyTools = ({ const permalinkButton = cid ? permalink : permalink; const contextButton = cid ? ( - {t('context')} + {t('context')} ) : ( {t('context')} ); From 6df426dac424c7e9a8d83948b93970d68df978dc Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 18 Mar 2024 20:38:33 +0100 Subject: [PATCH 5/8] remove unnecessary custom error --- src/hooks/use-downvote.ts | 8 +------- src/hooks/use-reply.ts | 8 +------- src/hooks/use-upvote.ts | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/hooks/use-downvote.ts b/src/hooks/use-downvote.ts index 6dc64f7d..03629223 100644 --- a/src/hooks/use-downvote.ts +++ b/src/hooks/use-downvote.ts @@ -25,13 +25,7 @@ const useDownvote = (comment: Comment): [boolean, () => void] => { }), onError: (error: Error) => { console.error(error); - // TODO: remove this explanation when pubsub providers uptime is fixed: - let errorMessage = error.message; - if (errorMessage === 'The challenge request has been published over the pubsub topic but no response was received') { - errorMessage += - '. This means seedit web is currently offline, download seedit desktop which is fully peer-to-peer: https://github.com/plebbit/seedit/releases/latest'; - } - alert(errorMessage); + alert(error.message); }, }), [comment, vote, addChallenge], diff --git a/src/hooks/use-reply.ts b/src/hooks/use-reply.ts index ef752022..7d8d52f4 100644 --- a/src/hooks/use-reply.ts +++ b/src/hooks/use-reply.ts @@ -43,13 +43,7 @@ const useReplyStore = create((set) => ({ }, onError: (error: Error) => { console.error(error); - // TODO: remove this explanation when pubsub providers uptime is fixed: - let errorMessage = error.message; - if (errorMessage === 'The challenge request has been published over the pubsub topic but no response was received') { - errorMessage += - '. This means seedit web is currently offline, download seedit desktop which is fully peer-to-peer: https://github.com/plebbit/seedit/releases/latest'; - } - alert(errorMessage); + alert(error.message); }, }; return { diff --git a/src/hooks/use-upvote.ts b/src/hooks/use-upvote.ts index 40d9f9f5..b5abaed9 100644 --- a/src/hooks/use-upvote.ts +++ b/src/hooks/use-upvote.ts @@ -25,13 +25,7 @@ const useUpvote = (comment: Comment): [boolean, () => void] => { }), onError: (error: Error) => { console.error(error); - // TODO: remove this explanation when pubsub providers uptime is fixed: - let errorMessage = error.message; - if (errorMessage === 'The challenge request has been published over the pubsub topic but no response was received') { - errorMessage += - '. This means seedit web is currently offline, download seedit desktop which is fully peer-to-peer: https://github.com/plebbit/seedit/releases/latest'; - } - alert(errorMessage); + alert(error.message); }, }), [comment, vote, addChallenge], From c2403c8bf2100d8a18e87e77c86a64e8e6687e02 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 18 Mar 2024 20:54:48 +0100 Subject: [PATCH 6/8] style(pending post): move state string closer to post, remove redundant one --- src/components/post/post.tsx | 5 ----- src/views/pending-post/pending-post.module.css | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index b07db8d2..1f51648d 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -12,10 +12,8 @@ import ExpandButton from './expand-button'; import Expando from './expando'; import Flair from './flair'; import CommentTools from './comment-tools'; -import LoadingEllipsis from '../loading-ellipsis'; import Thumbnail from './thumbnail'; import useDownvote from '../../hooks/use-downvote'; -import useStateString from '../../hooks/use-state-string'; import useUpvote from '../../hooks/use-upvote'; import _ from 'lodash'; @@ -127,8 +125,6 @@ const Post = ({ index, post = {} }: PostProps) => { const params = useParams(); const location = useLocation(); const subplebbit = useSubplebbit({ subplebbitAddress }); - const stateString = useStateString(post); - const loadingString = stateString && {stateString !== 'Failed' ? : ''}; const authorRole = subplebbit?.roles?.[post.author?.address]?.role; @@ -283,7 +279,6 @@ const Post = ({ index, post = {} }: PostProps) => { )} {pinned && - {t('announcement')}} - {state === 'pending' &&

{loadingString}

} Date: Tue, 19 Mar 2024 12:07:26 +0100 Subject: [PATCH 7/8] fix(subplebbit settings): creating a subplebbit would clear all fields even when failing to create --- .../subplebbit-settings/subplebbit-settings.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx index e8164bdc..0a02e77e 100644 --- a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx @@ -849,11 +849,6 @@ const SubplebbitSettings = () => { } }; - const _createSubplebbit = () => { - createSubplebbit(); - resetSubplebbitSettingsStore(); - }; - const [showDeleting, setShowDeleting] = useState(false); const _deleteSubplebbit = async () => { if (subplebbitAddress && window.confirm(t('delete_confirm', { value: `p/${shortAddress}`, interpolation: { escapeValue: false } }))) { @@ -880,9 +875,10 @@ const SubplebbitSettings = () => { if (createdSubplebbit) { console.log('createdSubplebbit', createdSubplebbit); alert(`community created, address: ${createdSubplebbit?.address}`); + resetSubplebbitSettingsStore(); navigate(`/p/${createdSubplebbit?.address}/`); } - }, [createdSubplebbit, navigate]); + }, [createdSubplebbit, navigate, resetSubplebbitSettingsStore]); useEffect(() => { resetSubplebbitSettingsStore(); @@ -957,7 +953,7 @@ const SubplebbitSettings = () => { )} {!isReadOnly && ( - )} From 80e3474e3cded1a539dcc8ddf6a8e966ea57d3f0 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 20 Mar 2024 07:31:26 +0100 Subject: [PATCH 8/8] chore(package.json): upgrade plebbit-react-hooks, to support .sol domains --- package.json | 2 +- yarn.lock | 91 +++------------------------------------------------- 2 files changed, 6 insertions(+), 87 deletions(-) diff --git a/package.json b/package.json index 003134e4..6629c50a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dependencies": { "@capacitor/app": "1.1.1", "@floating-ui/react": "0.26.1", - "@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#40dfddc6982c85cf07fdfc499cd3787265bc6fe5", + "@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#63833e978ca25f9846544d32b9c67810af0daf19", "@testing-library/jest-dom": "5.14.1", "@testing-library/react": "13.0.0", "@testing-library/user-event": "13.2.1", diff --git a/yarn.lock b/yarn.lock index fa69b416..b7fc1031 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3203,13 +3203,6 @@ progress-events "^1.0.0" uint8arrays "^5.0.2" -"@multiformats/mafmt@^11.0.3": - version "11.1.2" - resolved "https://registry.yarnpkg.com/@multiformats/mafmt/-/mafmt-11.1.2.tgz#c03ef4022c795b7f230b136f2f974fc263eac4f1" - integrity sha512-3n1o5eLU7WzTAPLuz3AodV7Iql6NWf7Ws8fqVaGT7o5nDDabUPYGBm2cZuh3OrqmwyCY61LrNUIsjzivU6UdpQ== - dependencies: - "@multiformats/multiaddr" "^12.0.0" - "@multiformats/mafmt@^12.1.6": version "12.1.6" resolved "https://registry.yarnpkg.com/@multiformats/mafmt/-/mafmt-12.1.6.tgz#e7c1831c1e94c94932621826049afc89f3ad43b7" @@ -3233,7 +3226,7 @@ dependencies: "@multiformats/multiaddr" "^12.0.0" -"@multiformats/multiaddr@^11.0.0", "@multiformats/multiaddr@^11.1.5": +"@multiformats/multiaddr@^11.1.5": version "11.6.1" resolved "https://registry.yarnpkg.com/@multiformats/multiaddr/-/multiaddr-11.6.1.tgz#ec46984a298e715e27a398434c087856db5f3185" integrity sha512-doST0+aB7/3dGK9+U5y3mtF3jq85KGbke1QiH0KE1F5mGQ9y56mFebTeu2D9FNOm+OT6UHb8Ss8vbSnpGjeLNw== @@ -3421,69 +3414,6 @@ uuid "9.0.1" viem "1.5.2" -"@plebbit/plebbit-js@https://github.com/plebbit/plebbit-js.git#2fb1b02830f0cc67cabb54f4361e30e7285b195b": - version "0.0.3" - resolved "https://github.com/plebbit/plebbit-js.git#2fb1b02830f0cc67cabb54f4361e30e7285b195b" - dependencies: - "@bonfida/spl-name-service" "2.3.8" - "@chainsafe/libp2p-gossipsub" "12.0.0" - "@chainsafe/libp2p-noise" "15.0.0" - "@chainsafe/libp2p-yamux" "6.0.2" - "@ensdomains/eth-ens-namehash" "2.0.15" - "@keyv/sqlite" "3.6.7" - "@libp2p/autonat" "1.0.12" - "@libp2p/bootstrap" "10.0.15" - "@libp2p/circuit-relay-v2" "^1.0.15" - "@libp2p/identify" "1.0.14" - "@libp2p/kad-dht" "12.0.7" - "@libp2p/mplex" "10.0.15" - "@libp2p/peer-id-factory" "4.0.6" - "@libp2p/webrtc" "4.0.19" - "@libp2p/webtransport" "4.0.19" - "@plebbit/plebbit-logger" "github:plebbit/plebbit-logger#355a96d7659ed820047980049dfa627d30d83a69" - "@plebbit/proper-lockfile" "github:plebbit/node-proper-lockfile#7fd6332117340c1d3d98dd0afee2d31cc06f72b8" - "@types/proper-lockfile" "4.1.2" - "@types/uuid" "8.3.4" - assert "2.1.0" - better-sqlite3 "9.3.0" - buffer "6.0.3" - captcha-canvas "3.2.1" - cbor "9.0.1" - debounce "1.2.1" - err-code "3.0.1" - ethers "6.10.0" - ext-name "5.0.0" - file-type "16.5.4" - hpagent "1.2.0" - ipfs-only-hash "4.0.0" - is-ipfs "8.0.1" - jose "4.11.0" - js-sha256 "0.9.0" - keyv "4.5.4" - knex "3.1.0" - kubo-rpc-client "3.0.3" - libp2p "1.2.1" - libp2p-crypto "0.21.2" - limiter-es6-compat "2.1.2" - localforage "1.10.0" - lodash-es "4.17.21" - lru-cache "10.1.0" - open-graph-scraper "6.3.3" - p-limit "4.0.0" - p-timeout "6.1.2" - peer-id "0.16.0" - probe-image-size "7.2.3" - retry "0.13.1" - rpc-websockets "7.9.0" - safe-stable-stringify "2.4.3" - sha1-uint8array "0.10.7" - skia-canvas "1.0.0" - tiny-typed-emitter "2.1.0" - tinycache "1.1.2" - ts-custom-error "3.3.1" - uuid "9.0.1" - viem "1.5.2" - "@plebbit/plebbit-logger@github:plebbit/plebbit-logger#355a96d7659ed820047980049dfa627d30d83a69": version "0.0.1" uid "355a96d7659ed820047980049dfa627d30d83a69" @@ -3513,11 +3443,11 @@ uuid "8.3.2" zustand "4.0.0" -"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#a0578ec34971ead21fadbc5b6d51f32833f0a97b": +"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#63833e978ca25f9846544d32b9c67810af0daf19": version "0.0.1" - resolved "https://github.com/plebbit/plebbit-react-hooks.git#a0578ec34971ead21fadbc5b6d51f32833f0a97b" + resolved "https://github.com/plebbit/plebbit-react-hooks.git#63833e978ca25f9846544d32b9c67810af0daf19" dependencies: - "@plebbit/plebbit-js" "https://github.com/plebbit/plebbit-js.git#2fb1b02830f0cc67cabb54f4361e30e7285b195b" + "@plebbit/plebbit-js" "https://github.com/plebbit/plebbit-js.git#073d5f501ccf9521942d93f6522d1125058c196a" "@plebbit/plebbit-logger" "https://github.com/plebbit/plebbit-logger.git" assert "2.0.0" ethers "5.6.9" @@ -10077,17 +10007,6 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-ipfs@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/is-ipfs/-/is-ipfs-8.0.1.tgz#23aefd086d32a7fce7b180bc55bf71313a641415" - integrity sha512-hoBSElmPath3aDdtaOpVZsuCh2SXTqvLML+H75S7iDgKdqNmENJ6tsRucP1HLfpqEyZ/uIlj/+ZBxIC/F8B5Eg== - dependencies: - "@multiformats/mafmt" "^11.0.3" - "@multiformats/multiaddr" "^11.0.0" - iso-url "^1.1.3" - multiformats "^11.0.0" - uint8arrays "^4.0.2" - is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" @@ -10350,7 +10269,7 @@ iso-random-stream@^2.0.0: events "^3.3.0" readable-stream "^3.4.0" -iso-url@^1.1.3, iso-url@^1.1.5: +iso-url@^1.1.5: version "1.2.1" resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==