Merge pull request #310 from plebbit/development

Development
This commit is contained in:
Tom (plebeius.eth)
2024-03-20 07:37:28 +01:00
committed by GitHub
50 changed files with 62 additions and 163 deletions

View File

@@ -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",

View File

@@ -168,7 +168,7 @@
"show_parent": "أظهر المشاركة المشار إليها",
"no_posts": "لا توجد مشاركات",
"media_url": "عنوان وسائط",
"post_locked_info": "هذا المنشور مغلق. لن تتمكن من التعليق.",
"post_locked_info": "هذه المشاركة {{state}}. لن تتمكن من التعليق.",
"no_subscriptions_notice": "لم تنضم إلى أي مجتمع بعد.",
"members_count": "{{count}} أعضاء",
"communities": "مجتمع",

View File

@@ -168,7 +168,7 @@
"show_parent": "সূচিত পোস্ট দেখুন",
"no_posts": "কোন পোস্ট নেই",
"media_url": "মিডিয়া ইউআরএল",
"post_locked_info": "এই পোস্টটি লক হয়েছে। আপনি মন্তব্য করতে পারবেন না।",
"post_locked_info": "এই পোস্ট {{state}}। আপনি মন্তব্য করতে পারবেন না।",
"no_subscriptions_notice": "আপনি এখনো কোনও সম্প্রদানে যোগ দিননি।",
"members_count": "{{count}} সদস্য",
"communities": "সম্প্রদান",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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": "κοινόνια",

View File

@@ -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",

View File

@@ -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",

View File

@@ -168,7 +168,7 @@
"show_parent": "نمایش پست مرجع داده شده",
"no_posts": "بدون پست",
"media_url": "آدرس رسانه",
"post_locked_info": "این پست قفل شده است. نمی‌توانید نظر دهید.",
"post_locked_info": "این پست {{state}} است. شما نمی‌توانید نظر دهید.",
"no_subscriptions_notice": "هنوز به هیچ انجمنی پیوسته نشده‌اید.",
"members_count": "{{count}} عضو",
"communities": "انجمن",

View File

@@ -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ö",

View File

@@ -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",

View File

@@ -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é",

View File

@@ -168,7 +168,7 @@
"show_parent": "הצג את הפוסט המתייחס אליו",
"no_posts": "אין פוסטים",
"media_url": "כתובת מדיה",
"post_locked_info": "הפוסט הזה נעול. אינך יכול להגיב.",
"post_locked_info": "הפוסט הזה הוא {{state}}. לא תוכל להגיב.",
"no_subscriptions_notice": "עדיין לא הצטרפת לאף קהילה.",
"members_count": "{{count}} חברים",
"communities": "קהילה",

View File

@@ -168,7 +168,7 @@
"show_parent": "संदर्भित पोस्ट दिखाएं",
"no_posts": "कोई पोस्ट नहीं",
"media_url": "मीडिया यूआरएल",
"post_locked_info": "यह पोस्ट बंद है। आप टिप्पणी नहीं कर सकेंगे।",
"post_locked_info": "यह पोस्ट {{state}} है। आप टिप्पणी नहीं कर पाएंगे।",
"no_subscriptions_notice": "आपने अब तक किसी समुदाय में शामिल नहीं हुए हैं।",
"members_count": "{{count}} सदस्य",
"communities": "समुदाय",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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à",

View File

@@ -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": "コミュニティ",

View File

@@ -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": "커뮤니티",

View File

@@ -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": "संघा",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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ść",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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": "сообщество",

View File

@@ -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",

View File

@@ -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",

View File

@@ -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": "సమూహం",

View File

@@ -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": "ชุมชน",

View File

@@ -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",

View File

@@ -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": "спільнота",

View File

@@ -168,7 +168,7 @@
"show_parent": "ذکر کردہ پوسٹ دکھائیں",
"no_posts": "کوئی پوسٹ نہیں",
"media_url": "میڈیا یو آر ایل",
"post_locked_info": "یہ پوسٹ بند ہے۔ آپ تبصرہ نہیں کر سکیں گے۔",
"post_locked_info": "یہ پوسٹ {{state}} ہے۔ آپ تبصرہ نہیں کر سکیں گے۔",
"no_subscriptions_notice": "آپ نے ابھی تک کسی بھی کمیونٹی میں شامل نہیں ہوئے۔",
"members_count": "{{count}} رکن",
"communities": "مجتمع",

View File

@@ -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",

View File

@@ -168,7 +168,7 @@
"show_parent": "显示被引用的帖子",
"no_posts": "没有帖子",
"media_url": "媒体链接",
"post_locked_info": "此帖已锁定。您将无法评论。",
"post_locked_info": "此帖子{{state}}。 您将无法发表评论。",
"no_subscriptions_notice": "您尚未加入任何社区。",
"members_count": "{{count}} 成员",
"communities": "社区",

View File

@@ -115,7 +115,7 @@ const App = () => {
<Route path='/p/all/about' element={<About />} />
<Route path='/p/:subplebbitAddress/c/:commentCid' element={<PostPage />} />
<Route path='/p/:subplebbitAddress/c/:commentCid?context=1' element={<PostPage />} />
<Route path='/p/:subplebbitAddress/c/:commentCid?context=3' element={<PostPage />} />
<Route path='/p/:subplebbitAddress/c/:commentCid/about' element={<About />} />
<Route path='/p/:subplebbitAddress/submit' element={<SubmitPage />} />

View File

@@ -168,7 +168,7 @@ const SingleReplyTools = ({
const permalinkButton = cid ? <Link to={cid ? `/p/${subplebbitAddress}/c/${cid}` : `/profile/${index}`}>permalink</Link> : <span>permalink</span>;
const contextButton = cid ? (
<Link to={cid ? (hasContext ? `/p/${subplebbitAddress}/c/${cid}?context=1` : `/p/${subplebbitAddress}/c/${cid}`) : `/profile/${index}`}>{t('context')}</Link>
<Link to={cid ? (hasContext ? `/p/${subplebbitAddress}/c/${cid}?context=3` : `/p/${subplebbitAddress}/c/${cid}`) : `/profile/${index}`}>{t('context')}</Link>
) : (
<span>{t('context')}</span>
);

View File

@@ -56,4 +56,10 @@
.optional {
color: var(--text-info);
}
@supports (-moz-appearance: none) {
.banInput {
width: 3.5em;
}
}

View File

@@ -141,7 +141,7 @@ const ModMenu = ({ cid, isCommentAuthorMod }: ModMenuProps) => {
<Trans
i18nKey='ban_user_for'
shouldUnescape={true}
components={{ 1: <input onChange={onBanDurationChange} type='number' min={1} max={100} defaultValue={banDuration} /> }}
components={{ 1: <input className={styles.banInput} onChange={onBanDurationChange} type='number' min={1} max={100} defaultValue={banDuration} /> }}
/>
</label>
</div>

View File

@@ -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 && <span className={styles.stateString}>{stateString !== 'Failed' ? <LoadingEllipsis string={stateString} /> : ''}</span>;
const authorRole = subplebbit?.roles?.[post.author?.address]?.role;
@@ -283,7 +279,6 @@ const Post = ({ index, post = {} }: PostProps) => {
)}
{pinned && <span className={styles.announcement}> - {t('announcement')}</span>}
</div>
{state === 'pending' && <p className={styles.pending}>{loadingString}</p>}
<CommentTools
author={author}
cid={cid}

View File

@@ -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 = () => {

View File

@@ -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],

View File

@@ -43,13 +43,7 @@ const useReplyStore = create<ReplyState>((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 {

View File

@@ -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],

View File

@@ -8,4 +8,5 @@
text-overflow: ellipsis;
width: calc(100vw - 28px);
width: 100vw;
margin-top: -10px;
}

View File

@@ -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) && (
<div className={styles.lockedInfobar}>
<div className={styles.lockedInfobarText}>{t('post_locked_info')}</div>
<div className={styles.lockedInfobarText}>{t('post_locked_info', { state: deleted ? t('deleted') : locked ? t('locked') : removed ? t('removed') : '' })}</div>
</div>
)}
<PostComponent post={post} />

View File

@@ -305,7 +305,7 @@ const Submit = () => {
<input
className={`${styles.input} ${styles.inputCommunity}`}
type='text'
placeholder={`"community.eth" ${t('or')} "12D3KooW..."`}
placeholder={`"community.eth/.sol" ${t('or')} "12D3KooW..."`}
onFocus={() => setIsInputAddressFocused(true)}
onBlur={() => setTimeout(() => setIsInputAddressFocused(false), 100)}
autoCorrect='off'

View File

@@ -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 = () => {
</div>
)}
{!isReadOnly && (
<button onClick={isInCreateSubplebbitView ? _createSubplebbit : saveSubplebbit} disabled={showSaving || showDeleting}>
<button onClick={() => (isInCreateSubplebbitView ? createSubplebbit() : saveSubplebbit)} disabled={showSaving || showDeleting}>
{isInCreateSubplebbitView ? t('create_community') : t('save_options')}
</button>
)}

View File

@@ -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==