mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(post-menu): add copy content ID button
This commit is contained in:
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "المنتديات التي تقوم بالإشراف عليها",
|
||||
"more_threads_last_year": "{{count}} مواضيع منذ {{currentTimeFilterName}} — [<1>عرض المزيد من المواضيع من السنة الماضية</1>]",
|
||||
"moderator_of_this_board": "هذا المستخدم هو مشرف على هذا المنتدى",
|
||||
"administrator_of_this_board": "هذا المستخدم هو مسؤول عن هذا المنتدى"
|
||||
"administrator_of_this_board": "هذا المستخدم هو مسؤول عن هذا المنتدى",
|
||||
"copy_content_id": "نسخ معرف المحتوى"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "আপনি যে বোর্ডগুলি পরিচালনা করেন",
|
||||
"more_threads_last_year": "{{count}} থ্রেড {{currentTimeFilterName}} থেকে — [<1>গত বছরের আরও থ্রেড দেখান</1>]",
|
||||
"moderator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন মডারেটর",
|
||||
"administrator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন প্রশাসক"
|
||||
"administrator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন প্রশাসক",
|
||||
"copy_content_id": "কনটেন্ট আইডি কপি করুন"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "Fóra, která moderujete",
|
||||
"more_threads_last_year": "{{count}} příspěvků od {{currentTimeFilterName}} — [<1>Zobrazit více příspěvků z minulého roku</1>]",
|
||||
"moderator_of_this_board": "Tento uživatel je moderátorem tohoto fóra",
|
||||
"administrator_of_this_board": "Tento uživatel je administrátorem tohoto fóra"
|
||||
"administrator_of_this_board": "Tento uživatel je administrátorem tohoto fóra",
|
||||
"copy_content_id": "kopírovat ID obsahu"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "Boards du modererer",
|
||||
"more_threads_last_year": "{{count}} tråde siden {{currentTimeFilterName}} — [<1>Vis flere tråde fra sidste år</1>]",
|
||||
"moderator_of_this_board": "Denne bruger er moderator for dette board",
|
||||
"administrator_of_this_board": "Denne bruger er administrator for dette board"
|
||||
"administrator_of_this_board": "Denne bruger er administrator for dette board",
|
||||
"copy_content_id": "kopier indhold-ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "Boards, die Sie moderieren",
|
||||
"more_threads_last_year": "{{count}} Threads seit {{currentTimeFilterName}} — [<1>Mehr Threads vom letzten Jahr anzeigen</1>]",
|
||||
"moderator_of_this_board": "Dieser Benutzer ist Moderator dieses Boards",
|
||||
"administrator_of_this_board": "Dieser Benutzer ist Administrator dieses Boards"
|
||||
"administrator_of_this_board": "Dieser Benutzer ist Administrator dieses Boards",
|
||||
"copy_content_id": "Inhalts-ID kopieren"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "Boards που διαχειρίζεστε",
|
||||
"more_threads_last_year": "{{count}} νήματα από {{currentTimeFilterName}} — [<1>Προβολή περισσότερων νημάτων από το περασμένο έτος</1>]",
|
||||
"moderator_of_this_board": "Αυτός ο χρήστης είναι συντονιστής αυτού του πίνακα",
|
||||
"administrator_of_this_board": "Αυτός ο χρήστης είναι διαχειριστής αυτού του πίνακα"
|
||||
"administrator_of_this_board": "Αυτός ο χρήστης είναι διαχειριστής αυτού του πίνακα",
|
||||
"copy_content_id": "αντιγραφή ID περιεχομένου"
|
||||
}
|
||||
|
||||
@@ -296,5 +296,6 @@
|
||||
"boards_you_moderate": "boards you moderate",
|
||||
"more_threads_last_year": "{{count}} threads since {{currentTimeFilterName}} — [<1>Show More Threads from Last Year</1>]",
|
||||
"moderator_of_this_board": "This user is a moderator of this board",
|
||||
"administrator_of_this_board": "This user is an administrator of this board"
|
||||
"administrator_of_this_board": "This user is an administrator of this board",
|
||||
"copy_content_id": "Copy content ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "tableros que moderas",
|
||||
"more_threads_last_year": "{{count}} hilos desde {{currentTimeFilterName}} — [<1>Ver más hilos del año pasado</1>]",
|
||||
"moderator_of_this_board": "Este usuario es moderador de este tablero",
|
||||
"administrator_of_this_board": "Este usuario es administrador de este tablero"
|
||||
"administrator_of_this_board": "Este usuario es administrador de este tablero",
|
||||
"copy_content_id": "Copiar ID de contenido"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "تابلوهایی که مدیریت میکنید",
|
||||
"more_threads_last_year": "{{count}} پست از {{currentTimeFilterName}} — [<1>نمایش بیشتر پستهای سال گذشته</1>]",
|
||||
"moderator_of_this_board": "این کاربر مدیر این انجمن است",
|
||||
"administrator_of_this_board": "این کاربر مدیرکل این انجمن است"
|
||||
"administrator_of_this_board": "این کاربر مدیرکل این انجمن است",
|
||||
"copy_content_id": "کپی شناسه محتوا"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "lautakunnat, joita valvot",
|
||||
"more_threads_last_year": "{{count}} ketjua sitten {{currentTimeFilterName}} — [<1>Näytä lisää viime vuoden ketjuja</1>]",
|
||||
"moderator_of_this_board": "Tämä käyttäjä on tämän taulun moderaattori",
|
||||
"administrator_of_this_board": "Tämä käyttäjä on tämän taulun järjestelmänvalvoja"
|
||||
"administrator_of_this_board": "Tämä käyttäjä on tämän taulun järjestelmänvalvoja",
|
||||
"copy_content_id": "kopioi sisältö-ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "mga board na iyong minomoderate",
|
||||
"more_threads_last_year": "{{count}} mga thread mula {{currentTimeFilterName}} — [<1>Ipakita ang higit pang mga thread mula noong nakaraang taon</1>]",
|
||||
"moderator_of_this_board": "Ang user na ito ay moderator ng board na ito",
|
||||
"administrator_of_this_board": "Ang user na ito ay administrator ng board na ito"
|
||||
"administrator_of_this_board": "Ang user na ito ay administrator ng board na ito",
|
||||
"copy_content_id": "kopyahin ang content ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards que vous modérez",
|
||||
"more_threads_last_year": "{{count}} fils depuis {{currentTimeFilterName}} — [<1>Afficher plus de fils de l'année dernière</1>]",
|
||||
"moderator_of_this_board": "Cet utilisateur est modérateur de ce tableau",
|
||||
"administrator_of_this_board": "Cet utilisateur est administrateur de ce tableau"
|
||||
"administrator_of_this_board": "Cet utilisateur est administrateur de ce tableau",
|
||||
"copy_content_id": "Copier l'ID du contenu"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "לוחות שאתה מפקח עליהם",
|
||||
"more_threads_last_year": "{{count}} חוטים מאז {{currentTimeFilterName}} — [<1>הצג עוד חוטים מהשנה שעברה</1>]",
|
||||
"moderator_of_this_board": "משתמש זה הוא מנהל של הלוח הזה",
|
||||
"administrator_of_this_board": "משתמש זה הוא מנהל מערכת של הלוח הזה"
|
||||
"administrator_of_this_board": "משתמש זה הוא מנהל מערכת של הלוח הזה",
|
||||
"copy_content_id": "העתק מזהה תוכן"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "बोर्ड जो आप मॉडरेट करते हैं",
|
||||
"more_threads_last_year": "{{count}} थ्रेड्स {{currentTimeFilterName}} से — [<1>पिछले साल के अधिक थ्रेड्स दिखाएं</1>]",
|
||||
"moderator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का मॉडरेटर है",
|
||||
"administrator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का प्रशासक है"
|
||||
"administrator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का प्रशासक है",
|
||||
"copy_content_id": "कंटेंट ID कॉपी करें"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boardok, amelyeket moderálsz",
|
||||
"more_threads_last_year": "{{count}} szál {{currentTimeFilterName}} óta — [<1>Több szál megjelenítése a múlt évből</1>]",
|
||||
"moderator_of_this_board": "Ez a felhasználó ennek a táblának a moderátora",
|
||||
"administrator_of_this_board": "Ez a felhasználó ennek a táblának a rendszergazdája"
|
||||
"administrator_of_this_board": "Ez a felhasználó ennek a táblának a rendszergazdája",
|
||||
"copy_content_id": "tartalom ID másolása"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "board yang Anda moderasi",
|
||||
"more_threads_last_year": "{{count}} thread sejak {{currentTimeFilterName}} — [<1>Tampilkan lebih banyak thread dari tahun lalu</1>]",
|
||||
"moderator_of_this_board": "Pengguna ini adalah moderator papan ini",
|
||||
"administrator_of_this_board": "Pengguna ini adalah administrator papan ini"
|
||||
"administrator_of_this_board": "Pengguna ini adalah administrator papan ini",
|
||||
"copy_content_id": "salin ID konten"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "board che moderi",
|
||||
"more_threads_last_year": "{{count}} thread da {{currentTimeFilterName}} — [<1>Mostra altri thread dell'anno scorso</1>]",
|
||||
"moderator_of_this_board": "Questo utente è moderatore di questa bacheca",
|
||||
"administrator_of_this_board": "Questo utente è amministratore di questa bacheca"
|
||||
"administrator_of_this_board": "Questo utente è amministratore di questa bacheca",
|
||||
"copy_content_id": "Copia ID contenuto"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "あなたが管理するボード",
|
||||
"more_threads_last_year": "{{count}} スレッド {{currentTimeFilterName}} から — [<1>去年のスレッドをさらに表示</1>]",
|
||||
"moderator_of_this_board": "このユーザーはこのボードのモデレーターです",
|
||||
"administrator_of_this_board": "このユーザーはこのボードの管理者です"
|
||||
"administrator_of_this_board": "このユーザーはこのボードの管理者です",
|
||||
"copy_content_id": "コンテンツIDをコピー"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "당신이 관리하는 게시판",
|
||||
"more_threads_last_year": "{{count}} 스레드 {{currentTimeFilterName}} 이후 — [<1>작년의 스레드 더 보기</1>]",
|
||||
"moderator_of_this_board": "이 사용자는 이 게시판의 관리자입니다",
|
||||
"administrator_of_this_board": "이 사용자는 이 게시판의 관리자입니다"
|
||||
"administrator_of_this_board": "이 사용자는 이 게시판의 관리자입니다",
|
||||
"copy_content_id": "콘텐츠 ID 복사"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "तुम्ही ज्यांचे नियंत्रण करता अशा बोर्ड्स",
|
||||
"more_threads_last_year": "{{count}} ध糀ं {{currentTimeFilterName}} पासून — [<1>गेल्या वर्षातील आणखी थ्रेड्स दाखवा</1>]",
|
||||
"moderator_of_this_board": "हा वापरकर्ता या बोर्डचा मॉडरेटर आहे",
|
||||
"administrator_of_this_board": "हा वापरकर्ता या बोर्डचा प्रशासक आहे"
|
||||
"administrator_of_this_board": "हा वापरकर्ता या बोर्डचा प्रशासक आहे",
|
||||
"copy_content_id": "कंटेंट ID कॉपी करा"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards die je beheert",
|
||||
"more_threads_last_year": "{{count}} threads sinds {{currentTimeFilterName}} — [<1>Meer threads van afgelopen jaar tonen</1>]",
|
||||
"moderator_of_this_board": "Deze gebruiker is moderator van dit bord",
|
||||
"administrator_of_this_board": "Deze gebruiker is beheerder van dit bord"
|
||||
"administrator_of_this_board": "Deze gebruiker is beheerder van dit bord",
|
||||
"copy_content_id": "kopieer inhoud-ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards du modererer",
|
||||
"more_threads_last_year": "{{count}} tråder siden {{currentTimeFilterName}} — [<1>Vis flere tråder fra forrige år</1>]",
|
||||
"moderator_of_this_board": "Denne brukeren er moderator for dette tavlet",
|
||||
"administrator_of_this_board": "Denne brukeren er administrator for dette tavlet"
|
||||
"administrator_of_this_board": "Denne brukeren er administrator for dette tavlet",
|
||||
"copy_content_id": "kopier innhold-ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards, które moderujesz",
|
||||
"more_threads_last_year": "{{count}} wątki od {{currentTimeFilterName}} — [<1>Pokaż więcej wątków z zeszłego roku</1>]",
|
||||
"moderator_of_this_board": "Ten użytkownik jest moderatorem tego forum",
|
||||
"administrator_of_this_board": "Ten użytkownik jest administratorem tego forum"
|
||||
"administrator_of_this_board": "Ten użytkownik jest administratorem tego forum",
|
||||
"copy_content_id": "skopiuj ID treści"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards que você modera",
|
||||
"more_threads_last_year": "{{count}} tópicos desde {{currentTimeFilterName}} — [<1>Mostrar mais tópicos do ano passado</1>]",
|
||||
"moderator_of_this_board": "Este usuário é moderador deste quadro",
|
||||
"administrator_of_this_board": "Este usuário é administrador deste quadro"
|
||||
"administrator_of_this_board": "Este usuário é administrador deste quadro",
|
||||
"copy_content_id": "Copiar ID do conteúdo"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards pe care le moderezi",
|
||||
"more_threads_last_year": "{{count}} subiecte din {{currentTimeFilterName}} — [<1>Afișați mai multe subiecte de anul trecut</1>]",
|
||||
"moderator_of_this_board": "Acest utilizator este moderator al acestui forum",
|
||||
"administrator_of_this_board": "Acest utilizator este administrator al acestui forum"
|
||||
"administrator_of_this_board": "Acest utilizator este administrator al acestui forum",
|
||||
"copy_content_id": "copiați ID-ul conținutului"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards, которые вы модерируете",
|
||||
"more_threads_last_year": "{{count}} темы с {{currentTimeFilterName}} — [<1>Показать больше тем с прошлого года</1>]",
|
||||
"moderator_of_this_board": "Этот пользователь является модератором этого форума",
|
||||
"administrator_of_this_board": "Этот пользователь является администратором этого форума"
|
||||
"administrator_of_this_board": "Этот пользователь является администратором этого форума",
|
||||
"copy_content_id": "копировать ID контента"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards që i moderoni",
|
||||
"more_threads_last_year": "{{count}} tema nga {{currentTimeFilterName}} — [<1>Shfaq më shumë tema nga viti i kaluar</1>]",
|
||||
"moderator_of_this_board": "Ky përdorues është moderator i këtij bordi",
|
||||
"administrator_of_this_board": "Ky përdorues është administrator i këtij bordi"
|
||||
"administrator_of_this_board": "Ky përdorues është administrator i këtij bordi",
|
||||
"copy_content_id": "kopjo ID e përmbajtjes"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards du modererar",
|
||||
"more_threads_last_year": "{{count}} trådar sedan {{currentTimeFilterName}} — [<1>Visa fler trådar från förra året</1>]",
|
||||
"moderator_of_this_board": "Denna användare är moderator för detta forum",
|
||||
"administrator_of_this_board": "Denna användare är administratör för detta forum"
|
||||
"administrator_of_this_board": "Denna användare är administratör för detta forum",
|
||||
"copy_content_id": "kopiera innehålls-ID"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "మీరు మోడరేట్ చేసే బోర్డులు",
|
||||
"more_threads_last_year": "{{count}} థ్రెడ్లు {{currentTimeFilterName}} నుండి — [<1>గత సంవత్సరం నుండి మరిన్ని థ్రెడ్లను చూపించండి</1>]",
|
||||
"moderator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క మోడరేటర్",
|
||||
"administrator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క నిర్వాహకుడు"
|
||||
"administrator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క నిర్వాహకుడు",
|
||||
"copy_content_id": "కంటెంట్ ID కాపీ చేయండి"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "บอร์ดที่คุณดูแล",
|
||||
"more_threads_last_year": "{{count}} กระทู้ตั้งแต่ {{currentTimeFilterName}} — [<1>แสดงกระทู้จากปีที่แล้วเพิ่มเติม</1>]",
|
||||
"moderator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลของบอร์ดนี้",
|
||||
"administrator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลระบบของบอร์ดนี้"
|
||||
"administrator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลระบบของบอร์ดนี้",
|
||||
"copy_content_id": "คัดลอก ID เนื้อหา"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "modere ettiğiniz panolar",
|
||||
"more_threads_last_year": "{{count}} konu {{currentTimeFilterName}} itibariyle — [<1>Geçen yıldan daha fazla konu göster</1>]",
|
||||
"moderator_of_this_board": "Bu kullanıcı bu panonun moderatörüdür",
|
||||
"administrator_of_this_board": "Bu kullanıcı bu panonun yöneticisidir"
|
||||
"administrator_of_this_board": "Bu kullanıcı bu panonun yöneticisidir",
|
||||
"copy_content_id": "içerik ID'sini kopyala"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards, які ви модеруватимете",
|
||||
"more_threads_last_year": "{{count}} тем з {{currentTimeFilterName}} — [<1>Показати більше тем з минулого року</1>]",
|
||||
"moderator_of_this_board": "Цей користувач є модератором цього форуму",
|
||||
"administrator_of_this_board": "Цей користувач є адміністратором цього форуму"
|
||||
"administrator_of_this_board": "Цей користувач є адміністратором цього форуму",
|
||||
"copy_content_id": "копіювати ID контенту"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "وہ بورڈز جن کی آپ نگرانی کرتے ہیں",
|
||||
"more_threads_last_year": "{{count}} تھریڈز {{currentTimeFilterName}} سے — [<1>گزشتہ سال کے مزید تھریڈز دکھائیں</1>]",
|
||||
"moderator_of_this_board": "یہ صارف اس بورڈ کا ماڈریٹر ہے",
|
||||
"administrator_of_this_board": "یہ صارف اس بورڈ کا منتظم ہے"
|
||||
"administrator_of_this_board": "یہ صارف اس بورڈ کا منتظم ہے",
|
||||
"copy_content_id": "مواد کی شناخت کاپی کریں"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "boards bạn điều hành",
|
||||
"more_threads_last_year": "{{count}} chủ đề từ {{currentTimeFilterName}} — [<1>Hiển thị thêm các chủ đề từ năm ngoái</1>]",
|
||||
"moderator_of_this_board": "Người dùng này là người điều hành của bảng này",
|
||||
"administrator_of_this_board": "Người dùng này là quản trị viên của bảng này"
|
||||
"administrator_of_this_board": "Người dùng này là quản trị viên của bảng này",
|
||||
"copy_content_id": "sao chép ID nội dung"
|
||||
}
|
||||
|
||||
@@ -295,5 +295,6 @@
|
||||
"boards_you_moderate": "您管理的板块",
|
||||
"more_threads_last_year": "{{count}} 主题自 {{currentTimeFilterName}} — [<1>显示更多去年的主题</1>]",
|
||||
"moderator_of_this_board": "此用户是此版块的版主",
|
||||
"administrator_of_this_board": "此用户是此版块的管理员"
|
||||
"administrator_of_this_board": "此用户是此版块的管理员",
|
||||
"copy_content_id": "复制内容ID"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useBlock } from '@plebbit/plebbit-react-hooks';
|
||||
import styles from './post-menu-desktop.module.css';
|
||||
import { getCommentMediaInfo } from '../../../lib/utils/media-utils';
|
||||
import { copyShareLinkToClipboard, isValidURL, type ShareLinkType } from '../../../lib/utils/url-utils';
|
||||
import { copyToClipboard } from '../../../lib/utils/clipboard-utils';
|
||||
import { getBoardPath } from '../../../lib/utils/route-utils';
|
||||
import { useDefaultSubplebbits } from '../../../hooks/use-default-subplebbits';
|
||||
import { isAllView, isCatalogView, isPostPageView, isSubscriptionsView } from '../../../lib/utils/view-utils';
|
||||
@@ -30,6 +31,20 @@ const CopyLinkButton = ({ cid, subplebbitAddress, linkType, onClose }: { cid?: s
|
||||
);
|
||||
};
|
||||
|
||||
const CopyContentIdButton = ({ cid, onClose }: { cid: string; onClose: () => void }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div
|
||||
onClick={() => {
|
||||
copyToClipboard(cid);
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
<div className={styles.postMenuItem}>{t('copy_content_id')}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const ImageSearchButton = ({ url, onClose }: { url: string; onClose: () => void }) => {
|
||||
const { t } = useTranslation();
|
||||
const [isImageSearchMenuOpen, setIsImageSearchMenuOpen] = useState(false);
|
||||
@@ -144,6 +159,7 @@ const PostMenuDesktop = ({ postMenu }: PostMenuDesktopProps) => {
|
||||
<FloatingFocusManager context={context} modal={false}>
|
||||
<div className={styles.postMenu} ref={refs.setFloating} style={floatingStyles} aria-labelledby={headingId} {...getFloatingProps()}>
|
||||
{cid && subplebbitAddress && <CopyLinkButton cid={cid} subplebbitAddress={subplebbitAddress} linkType='thread' onClose={handleClose} />}
|
||||
{cid && <CopyContentIdButton cid={cid} onClose={handleClose} />}
|
||||
{!cid && isDescription && subplebbitAddress && <CopyLinkButton subplebbitAddress={subplebbitAddress} linkType='description' onClose={handleClose} />}
|
||||
{!cid && isRules && subplebbitAddress && <CopyLinkButton subplebbitAddress={subplebbitAddress} linkType='rules' onClose={handleClose} />}
|
||||
{!(isInPostPageView && postCid === cid) && !isDescription && !isRules && (
|
||||
|
||||
@@ -6,6 +6,7 @@ import { autoUpdate, flip, FloatingFocusManager, offset, shift, useClick, useDis
|
||||
import styles from './post-menu-mobile.module.css';
|
||||
import { getCommentMediaInfo } from '../../../lib/utils/media-utils';
|
||||
import { copyShareLinkToClipboard, isValidURL, type ShareLinkType } from '../../../lib/utils/url-utils';
|
||||
import { copyToClipboard } from '../../../lib/utils/clipboard-utils';
|
||||
import { getBoardPath } from '../../../lib/utils/route-utils';
|
||||
import { useDefaultSubplebbits } from '../../../hooks/use-default-subplebbits';
|
||||
import useEditCommentPrivileges from '../../../hooks/use-author-privileges';
|
||||
@@ -38,6 +39,20 @@ const CopyLinkButton = ({ cid, subplebbitAddress, linkType, onClose }: { cid?: s
|
||||
);
|
||||
};
|
||||
|
||||
const CopyContentIdButton = ({ cid, onClose }: { cid: string; onClose: () => void }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div
|
||||
onClick={() => {
|
||||
copyToClipboard(cid);
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
<div className={styles.postMenuItem}>{t('copy_content_id')}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const ImageSearchButtons = ({ url, onClose }: { url: string; onClose: () => void }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
@@ -144,6 +159,7 @@ const PostMenuMobile = ({ postMenu, editMenuPost }: PostMenuMobileProps) => {
|
||||
<FloatingFocusManager context={context} modal={false}>
|
||||
<div className={styles.postMenu} ref={refs.setFloating} style={floatingStyles} aria-labelledby={headingId} {...getFloatingProps()}>
|
||||
{cid && subplebbitAddress && <CopyLinkButton cid={cid} subplebbitAddress={subplebbitAddress} linkType='thread' onClose={handleClose} />}
|
||||
{cid && <CopyContentIdButton cid={cid} onClose={handleClose} />}
|
||||
{!cid && isDescription && subplebbitAddress && <CopyLinkButton subplebbitAddress={subplebbitAddress} linkType='description' onClose={handleClose} />}
|
||||
{!cid && isRules && subplebbitAddress && <CopyLinkButton subplebbitAddress={subplebbitAddress} linkType='rules' onClose={handleClose} />}
|
||||
{cid && subplebbitAddress && <HidePostButton cid={cid} isReply={!!parentCid} postCid={postCid} onClose={handleClose} />}
|
||||
|
||||
Reference in New Issue
Block a user