From d88f6e36488b4c966404f17494efc0bd0bfd0b14 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 15 Nov 2023 21:12:58 +0100 Subject: [PATCH 1/4] fix(submit): default selected subplebbit title if not found, add margin --- src/views/submit/submit.module.css | 2 +- src/views/submit/submit.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/submit/submit.module.css b/src/views/submit/submit.module.css index cb507df9..591be849 100644 --- a/src/views/submit/submit.module.css +++ b/src/views/submit/submit.module.css @@ -1,5 +1,5 @@ .content { - margin: 7px 5px 0px 5px; + margin: 7px 5px 50px 5px; color: var(--text); } diff --git a/src/views/submit/submit.tsx b/src/views/submit/submit.tsx index 79cda74a..dbf7cb22 100644 --- a/src/views/submit/submit.tsx +++ b/src/views/submit/submit.tsx @@ -75,7 +75,7 @@ const Submit = () => { const { subscriptions } = account || {}; useEffect(() => { - document.title = t('submit_to_before') + (selectedSubplebbit ? subplebbit?.title || subplebbit?.shortAddress : 'seedit') + t('submit_to_after'); + document.title = t('submit_to_before') + (selectedSubplebbit ? subplebbit?.title || subplebbit?.shortAddress || 'seedit' : 'seedit') + t('submit_to_after'); }, [selectedSubplebbit, subplebbit, t]); const onPublish = () => { @@ -111,7 +111,7 @@ const Submit = () => { const subplebbitHeaderLink = ( e.preventDefault()}> - {subplebbit?.title || subplebbit?.shortAddress} + {subplebbit?.title || subplebbit?.shortAddress || 'seedit'} ); From fe82d0a79c11155f334099be17ea8211685ecbd3 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 15 Nov 2023 21:57:45 +0100 Subject: [PATCH 2/4] feat(submit): typing sub address shows a dropdown with possible matches of default sub addresses --- src/views/submit/submit.module.css | 30 ++++++++++++++++++++++++++++ src/views/submit/submit.tsx | 32 +++++++++++++++++++++++++++--- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/src/views/submit/submit.module.css b/src/views/submit/submit.module.css index 591be849..387a8af6 100644 --- a/src/views/submit/submit.module.css +++ b/src/views/submit/submit.module.css @@ -146,4 +146,34 @@ h1 { font-size: 13px; margin-left: 20px; word-wrap: break-word; +} + +.dropdown { + display: block; + top: 52px; + position: absolute; + width: calc(100% - 8px); + margin: 0; + border: 1px solid var(--border-text); + background: var(--background); + left: 0; + z-index: 10; + list-style: none; +} + +.dropdownItem a { + text-decoration: none; + display: block; + padding: 5px; + cursor: pointer; + color: var(--text); +} + +.dropdownItem:hover { + background-color: var(--text-primary); + color: var(--background); +} + +.dropdownItem a:hover { + color: var(--background); } \ No newline at end of file diff --git a/src/views/submit/submit.tsx b/src/views/submit/submit.tsx index dbf7cb22..3b544722 100644 --- a/src/views/submit/submit.tsx +++ b/src/views/submit/submit.tsx @@ -7,6 +7,7 @@ import { alertChallengeVerificationFailed } from '../../lib/utils/challenge-util import { isValidURL } from '../../lib/utils/url-utils'; import styles from './submit.module.css'; import challengesStore from '../../hooks/use-challenges'; +import useDefaultSubplebbitAddresses from '../../hooks/use-default-subplebbit-addresses'; type SubmitState = { subplebbitAddress: string | undefined; @@ -73,6 +74,7 @@ const Submit = () => { const { subplebbitAddress, publishCommentOptions, setSubmitStore, resetSubmitStore } = useSubmitStore(); const { index, publishComment } = usePublishComment(publishCommentOptions); const { subscriptions } = account || {}; + const defaultSubplebbitAddresses = useDefaultSubplebbitAddresses(); useEffect(() => { document.title = t('submit_to_before') + (selectedSubplebbit ? subplebbit?.title || subplebbit?.shortAddress || 'seedit' : 'seedit') + t('submit_to_after'); @@ -115,7 +117,7 @@ const Submit = () => { ); -// redirect to pending page when pending comment is created + // redirect to pending page when pending comment is created useEffect(() => { if (typeof index === 'number') { resetSubmitStore(); @@ -125,7 +127,7 @@ const Submit = () => { const subsDescription =
{subscriptions.length > 0 ? t('submit_subscriptions') : t('submit_subscriptions_notice')}
; - const subs = ( + const subscriptionsList = (
{subscriptions.map((sub: string) => ( {
); + const defaultSubplebbits = ( + + ); + const handleAddressChange = (e: ChangeEvent) => { setInputAddress(e.target.value); }; @@ -195,8 +220,9 @@ const Submit = () => { ref={subplebbitAddressRef} onChange={handleAddressChange} /> + {inputAddress && defaultSubplebbits} {subsDescription} - {subs} + {subscriptionsList} {subplebbit?.rules && ( From a4a93a8ce3dd815015dac6cf42285288dae75710 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 15 Nov 2023 22:22:41 +0100 Subject: [PATCH 3/4] feat(reply form): add options button to show or hide spoiler and url fields --- 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/reply-form/reply-form.module.css | 10 ++++++++++ src/components/reply-form/reply-form.tsx | 8 +++++--- 37 files changed, 120 insertions(+), 38 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index a85df7ee..cdb2ffaa 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "مجتمعاتك المشتركة", "rules_for": "قواعد لـ", "no_communities_found": "لا توجد مجتمعات على <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "للاتصال بمجتمع، استخدم 🔎 في أعلى اليمين" + "connect_community_notice": "للاتصال بمجتمع، استخدم 🔎 في أعلى اليمين", + "options": "خيارات", + "hide_options": "إخفاء الخيارات" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 5a9d1039..55cd2075 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "আপনার সাবস্ক্রাইব করা কমিউনিটিগুলি", "rules_for": "এর নিয়মাবলী", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbits এ কোনো সম্প্রদায় পাওয়া যায়নি", - "connect_community_notice": "একটি সম্প্রদায়ের সাথে যুক্ত হতে, ডান উপরে 🔎 ব্যবহার করুন" + "connect_community_notice": "একটি সম্প্রদায়ের সাথে যুক্ত হতে, ডান উপরে 🔎 ব্যবহার করুন", + "options": "অপশনস", + "hide_options": "অপশনগুলি লুকান" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 0c076b25..9d5ea780 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "vaše odběratelské komunity", "rules_for": "pravidla pro", "no_communities_found": "Na <1>https://github.com/plebbit/temporary-default-subplebbits nebyly nalezeny žádné komunity", - "connect_community_notice": "Chcete-li se připojit ke komunitě, použijte 🔎 vpravo nahoře" + "connect_community_notice": "Chcete-li se připojit ke komunitě, použijte 🔎 vpravo nahoře", + "options": "možnosti", + "hide_options": "skrýt možnosti" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index bad02928..bf2209ab 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "dine abonnerede fællesskaber", "rules_for": "regler for", "no_communities_found": "Ingen samfund fundet på <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "For at oprette forbindelse til et fællesskab, brug 🔎 øverst til højre" + "connect_community_notice": "For at oprette forbindelse til et fællesskab, brug 🔎 øverst til højre", + "options": "muligheder", + "hide_options": "skjul muligheder" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 878e12c6..11e861b2 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "Ihre abonnierten Gemeinschaften", "rules_for": "Regeln für", "no_communities_found": "Keine Gemeinschaften gefunden auf <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Um eine Verbindung zu einer Gemeinschaft herzustellen, verwenden Sie 🔎 oben rechts" + "connect_community_notice": "Um eine Verbindung zu einer Gemeinschaft herzustellen, verwenden Sie 🔎 oben rechts", + "options": "Optionen", + "hide_options": "Optionen ausblenden" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index dd03d904..f38884b8 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "οι κοινότητες στις οποίες έχετε συνδρομή", "rules_for": "κανόνες για", "no_communities_found": "Δεν βρέθηκαν κοινότητες στο <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Για να συνδεθείτε με μια κοινότητα, χρησιμοποιήστε το 🔎 στην επάνω δεξιά γωνία" + "connect_community_notice": "Για να συνδεθείτε με μια κοινότητα, χρησιμοποιήστε το 🔎 στην επάνω δεξιά γωνία", + "options": "επιλογές", + "hide_options": "απόκρυψη επιλογών" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 07cb2894..04414ad0 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "your subscribed communities", "rules_for": "rules for", "no_communities_found": "No communities found on <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "To connect to a community, use 🔎 in the top right" + "connect_community_notice": "To connect to a community, use 🔎 in the top right", + "options": "options", + "hide_options": "hide options" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index a76ffa15..d61cd496 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "tus comunidades suscritas", "rules_for": "reglas para", "no_communities_found": "No se encontraron comunidades en <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Para conectarte a una comunidad, usa 🔎 en la parte superior derecha" + "connect_community_notice": "Para conectarte a una comunidad, usa 🔎 en la parte superior derecha", + "options": "opciones", + "hide_options": "ocultar opciones" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index e60cf627..8f3d0e1c 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "جوامع مشترک شده شما", "rules_for": "قوانین برای", "no_communities_found": "هیچ انجمنی در <1>https://github.com/plebbit/temporary-default-subplebbits یافت نشد", - "connect_community_notice": "برای اتصال به یک انجمن، از 🔎 در بالا سمت راست استفاده کنید" + "connect_community_notice": "برای اتصال به یک انجمن، از 🔎 در بالا سمت راست استفاده کنید", + "options": "گزینه‌ها", + "hide_options": "مخفی کردن گزینه‌ها" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 09fa3332..71119958 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "tilaamasi yhteisöt", "rules_for": "säännöt", "no_communities_found": "Yhteisöjä ei löytynyt osoitteesta <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Yhteisöön liittymiseksi käytä 🔎 oikeassa yläkulmassa" + "connect_community_notice": "Yhteisöön liittymiseksi käytä 🔎 oikeassa yläkulmassa", + "options": "vaihtoehdot", + "hide_options": "piilota vaihtoehdot" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 767800ca..f8cfd4af 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "iyong mga sinubskribang komunidad", "rules_for": "mga patakaran para sa", "no_communities_found": "Walang natagpuang mga komunidad sa <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Upang kumonekta sa isang komunidad, gamitin ang 🔎 sa itaas na kanan" + "connect_community_notice": "Upang kumonekta sa isang komunidad, gamitin ang 🔎 sa itaas na kanan", + "options": "mga opsyon", + "hide_options": "itago ang mga opsyon" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index c07c44f3..a66346b1 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "vos communautés abonnées", "rules_for": "règles pour", "no_communities_found": "Aucune communauté trouvée sur <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Pour vous connecter à une communauté, utilisez 🔎 en haut à droite" + "connect_community_notice": "Pour vous connecter à une communauté, utilisez 🔎 en haut à droite", + "options": "options", + "hide_options": "cacher les options" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 80df2806..fbf5522e 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "הקהילות שאתה מנוי עליהן", "rules_for": "כללים עבור", "no_communities_found": "לא נמצאו קהילות ב-<1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "לקישור לקהילה, השתמש ב-🔎 בפינה הימנית העליונה" + "connect_community_notice": "לקישור לקהילה, השתמש ב-🔎 בפינה הימנית העליונה", + "options": "אפשרויות", + "hide_options": "הסתר אפשרויות" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index b3322f68..d649cb1a 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "आपके सब्सक्राइब किए गए समुदाय", "rules_for": "के लिए नियम", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbits पर कोई समुदाय नहीं मिला", - "connect_community_notice": "किसी समुदाय से जुड़ने के लिए, ऊपर दाईं ओर 🔎 का उपयोग करें" + "connect_community_notice": "किसी समुदाय से जुड़ने के लिए, ऊपर दाईं ओर 🔎 का उपयोग करें", + "options": "विकल्प", + "hide_options": "विकल्प छुपाएँ" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index c271fd18..638e2e6e 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "az Ön által feliratkozott közösségek", "rules_for": "szabályok a", "no_communities_found": "Nem található közösségek a <1>https://github.com/plebbit/temporary-default-subplebbits-en", - "connect_community_notice": "Közösséghez való csatlakozáshoz használja a 🔎 gombot a jobb felső sarokban" + "connect_community_notice": "Közösséghez való csatlakozáshoz használja a 🔎 gombot a jobb felső sarokban", + "options": "opciók", + "hide_options": "opciók elrejtése" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 416075e4..e91387e9 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "komunitas yang Anda langgani", "rules_for": "aturan untuk", "no_communities_found": "Tidak ada komunitas yang ditemukan di <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Untuk terhubung ke komunitas, gunakan 🔎 di kanan atas" + "connect_community_notice": "Untuk terhubung ke komunitas, gunakan 🔎 di kanan atas", + "options": "opsi", + "hide_options": "sembunyikan opsi" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 6973697f..4eabdf1c 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "le tue comunità sottoscritte", "rules_for": "regole per", "no_communities_found": "nessuna comunità trovata su <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Per connetterti a una comunità, utilizza 🔎 in alto a destra" + "connect_community_notice": "Per connetterti a una comunità, utilizza 🔎 in alto a destra", + "options": "opzioni", + "hide_options": "nascondi opzioni" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 74c36cc1..ff96d2de 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "購読しているコミュニティ", "rules_for": "のルール", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbitsにコミュニティは見つかりませんでした", - "connect_community_notice": "コミュニティに接続するには、右上の🔎を使用してください" + "connect_community_notice": "コミュニティに接続するには、右上の🔎を使用してください", + "options": "オプション", + "hide_options": "オプションを隠す" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index a84d754f..51335d2d 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "구독한 커뮤니티", "rules_for": "규칙", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbits에 커뮤니티를 찾을 수 없습니다", - "connect_community_notice": "커뮤니티에 연결하려면 오른쪽 상단의 🔎를 사용하세요" + "connect_community_notice": "커뮤니티에 연결하려면 오른쪽 상단의 🔎를 사용하세요", + "options": "옵션", + "hide_options": "옵션 숨기기" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 66b597c2..3eadeed4 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "आपण सदस्यता घेतलेली समुदाय", "rules_for": "साठीचे नियम", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbits वर कोणत्याही समुदायाचा शोध लागलेला नाही", - "connect_community_notice": "समुदायाशी जोडण्यासाठी, उजव्या वरील कोपर्यात 🔎 वापरा" + "connect_community_notice": "समुदायाशी जोडण्यासाठी, उजव्या वरील कोपर्यात 🔎 वापरा", + "options": "पर्याय", + "hide_options": "पर्याय लपवा" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 7a44725d..369cda3b 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "uw geabonneerde gemeenschappen", "rules_for": "regels voor", "no_communities_found": "Geen gemeenschappen gevonden op <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Gebruik 🔎 rechtsboven om verbinding te maken met een gemeenschap" + "connect_community_notice": "Gebruik 🔎 rechtsboven om verbinding te maken met een gemeenschap", + "options": "opties", + "hide_options": "opties verbergen" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index 37d1c9f9..d50ac2af 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "dine abonnerte samfunn", "rules_for": "regler for", "no_communities_found": "Ingen samfunn funnet på <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "For å koble til et samfunn, bruk 🔎 øverst til høyre" + "connect_community_notice": "For å koble til et samfunn, bruk 🔎 øverst til høyre", + "options": "alternativer", + "hide_options": "skjul alternativer" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 4c93ea05..1c1c9ff5 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "twoje subskrybowane społeczności", "rules_for": "zasady dla", "no_communities_found": "Nie znaleziono społeczności na <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Aby połączyć się ze społecznością, użyj 🔎 w prawym górnym rogu" + "connect_community_notice": "Aby połączyć się ze społecznością, użyj 🔎 w prawym górnym rogu", + "options": "opcje", + "hide_options": "ukryj opcje" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index a5e64d05..72c5ec9d 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "suas comunidades inscritas", "rules_for": "regras para", "no_communities_found": "Nenhuma comunidade encontrada em <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Para se conectar a uma comunidade, use 🔎 no canto superior direito" + "connect_community_notice": "Para se conectar a uma comunidade, use 🔎 no canto superior direito", + "options": "opções", + "hide_options": "ocultar opções" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index ed2f0e1b..8b69d759 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "comunitățile dvs. abonate", "rules_for": "reguli pentru", "no_communities_found": "Nicio comunitate găsită pe <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Pentru a vă conecta la o comunitate, folosiți 🔎 în partea dreaptă sus" + "connect_community_notice": "Pentru a vă conecta la o comunitate, folosiți 🔎 în partea dreaptă sus", + "options": "opțiuni", + "hide_options": "ascunde opțiuni" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 67350517..be733f7e 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "ваши подписанные сообщества", "rules_for": "правила для", "no_communities_found": "Сообщества не найдены на <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Чтобы подключиться к сообществу, используйте 🔎 в правом верхнем углу" + "connect_community_notice": "Чтобы подключиться к сообществу, используйте 🔎 в правом верхнем углу", + "options": "опции", + "hide_options": "скрыть опции" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 4380616d..abc8aa44 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "komunitetet tuaja të abonuara", "rules_for": "rregullat për", "no_communities_found": "Nuk u gjetën komunitete në <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Për të lidhur me një komunitet, përdorni 🔎 në këndin e djathtë lart" + "connect_community_notice": "Për të lidhur me një komunitet, përdorni 🔎 në këndin e djathtë lart", + "options": "opsione", + "hide_options": "fsheh opsionet" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index c3567999..ed13d619 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "dina prenumererade samhällen", "rules_for": "regler för", "no_communities_found": "Inga samhällen hittades på <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "För att ansluta till en gemenskap, använd 🔎 i övre högra hörnet" + "connect_community_notice": "För att ansluta till en gemenskap, använd 🔎 i övre högra hörnet", + "options": "alternativ", + "hide_options": "dölj alternativ" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 10e002b9..c61bc5ae 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "మీరు చందా చేసుకున్న సముదాయాలు", "rules_for": "కోసం నియమాలు", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbitsలో సమూహాలు కనిపించలేదు", - "connect_community_notice": "ఒక సముదాయానికి కనెక్ట్ అవ్వడానికి, పైన కుడి వైపున 🔎 ఉపయోగించండి" + "connect_community_notice": "ఒక సముదాయానికి కనెక్ట్ అవ్వడానికి, పైన కుడి వైపున 🔎 ఉపయోగించండి", + "options": "ఎంపికలు", + "hide_options": "ఎంపికలను దాచు" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index 55a0e138..f6a72453 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "ชุมชนที่คุณติดตาม", "rules_for": "กฎสำหรับ", "no_communities_found": "ไม่พบชุมชนใด ๆ บน <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "เพื่อเชื่อมต่อกับชุมชน ใช้ 🔎 ที่มุมขวาบน" + "connect_community_notice": "เพื่อเชื่อมต่อกับชุมชน ใช้ 🔎 ที่มุมขวาบน", + "options": "ตัวเลือก", + "hide_options": "ซ่อนตัวเลือก" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index a65bc100..8a60f7a5 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "abone olduğunuz topluluklar", "rules_for": "için kurallar", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbits üzerinde hiçbir topluluk bulunamadı", - "connect_community_notice": "Bir topluluğa bağlanmak için, sağ üst köşede 🔎 kullanın" + "connect_community_notice": "Bir topluluğa bağlanmak için, sağ üst köşede 🔎 kullanın", + "options": "seçenekler", + "hide_options": "seçenekleri gizle" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index e5f16e19..dd6d79d3 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "ваші підписані спільноти", "rules_for": "правила для", "no_communities_found": "Спільноти не знайдені на <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Щоб підключитися до спільноти, використовуйте 🔎 у верхньому правому куті" + "connect_community_notice": "Щоб підключитися до спільноти, використовуйте 🔎 у верхньому правому куті", + "options": "опції", + "hide_options": "приховати опції" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 1a80cea4..c4723c91 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "آپ کی سبسکرائب شدہ کمیونٹیز", "rules_for": "کے قواعد", "no_communities_found": "<1>https://github.com/plebbit/temporary-default-subplebbits پر کوئی کمیونٹیز نہیں ملی", - "connect_community_notice": "کمیونٹی سے جڑنے کے لئے، دائیں اوپر 🔎 استعمال کریں" + "connect_community_notice": "کمیونٹی سے جڑنے کے لئے، دائیں اوپر 🔎 استعمال کریں", + "options": "اختیارات", + "hide_options": "اختیارات چھپائیں" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 1828c192..7cf41034 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "các cộng đồng bạn đã đăng ký", "rules_for": "quy tắc cho", "no_communities_found": "Không tìm thấy cộng đồng nào trên <1>https://github.com/plebbit/temporary-default-subplebbits", - "connect_community_notice": "Để kết nối với cộng đồng, sử dụng 🔎 ở góc trên bên phải" + "connect_community_notice": "Để kết nối với cộng đồng, sử dụng 🔎 ở góc trên bên phải", + "options": "tùy chọn", + "hide_options": "ẩn tùy chọn" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 333df898..b0aa03c7 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -74,5 +74,7 @@ "submit_subscriptions": "您订阅的社区", "rules_for": "规则适用于", "no_communities_found": "在<1>https://github.com/plebbit/temporary-default-subplebbits上未找到任何社区", - "connect_community_notice": "要连接到社区,请在右上角使用 🔎" + "connect_community_notice": "要连接到社区,请在右上角使用 🔎", + "options": "选项", + "hide_options": "隐藏选项" } \ No newline at end of file diff --git a/src/components/reply-form/reply-form.module.css b/src/components/reply-form/reply-form.module.css index 4d480d0c..4e7ea3ed 100644 --- a/src/components/reply-form/reply-form.module.css +++ b/src/components/reply-form/reply-form.module.css @@ -42,4 +42,14 @@ cursor: pointer; padding: 2px 6px 3px; text-transform: lowercase; +} + +.options { + font-size: smaller; + float: right; + margin-top: 5px; + margin-left: 10px; + margin-right: 5px; + color: var(--text-primary); + cursor: pointer; } \ No newline at end of file diff --git a/src/components/reply-form/reply-form.tsx b/src/components/reply-form/reply-form.tsx index 479a145d..add84899 100644 --- a/src/components/reply-form/reply-form.tsx +++ b/src/components/reply-form/reply-form.tsx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; +import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import styles from './reply-form.module.css'; @@ -13,6 +14,7 @@ type ReplyFormProps = { const ReplyForm = ({ isReplyingToReply, onPublish, hideReplyForm, spoilerRef, textRef, urlRef }: ReplyFormProps) => { const { t } = useTranslation(); + const [showOptions, setShowOptions] = useState(false); useEffect(() => { if (isReplyingToReply && textRef.current) { @@ -23,9 +25,8 @@ const ReplyForm = ({ isReplyingToReply, onPublish, hideReplyForm, spoilerRef, te return (
- {/* TODO: move url and spoiler to some options dropdown, they shouldn't be visible right away*/} - - + + @@ -41,6 +42,7 @@ const ReplyForm = ({ isReplyingToReply, onPublish, hideReplyForm, spoilerRef, te {t('cancel')} )} + setShowOptions(!showOptions)}>options
); From 764708f83c53f58f4809a20573f209ea40a04240 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 15 Nov 2023 22:23:26 +0100 Subject: [PATCH 4/4] Update reply-form.tsx --- src/components/reply-form/reply-form.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/reply-form/reply-form.tsx b/src/components/reply-form/reply-form.tsx index add84899..39fa47be 100644 --- a/src/components/reply-form/reply-form.tsx +++ b/src/components/reply-form/reply-form.tsx @@ -42,7 +42,9 @@ const ReplyForm = ({ isReplyingToReply, onPublish, hideReplyForm, spoilerRef, te {t('cancel')} )} - setShowOptions(!showOptions)}>options + setShowOptions(!showOptions)}> + {showOptions ? t('hide_options') : t('options')} + );