From 5de2587cf4dbec906acd7a5b2b2332cc7ef04276 Mon Sep 17 00:00:00 2001 From: plebeius Date: Fri, 28 Nov 2025 13:29:31 +0100 Subject: [PATCH] feat(post): add moderator and administrator role indicators --- 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/post-desktop/post-desktop.tsx | 17 +++++++--- src/components/post-mobile/post-mobile.tsx | 20 +++++++++--- .../subplebbit-description.tsx | 3 +- .../subplebbit-rules/subplebbit-rules.tsx | 2 +- src/views/post/post.module.css | 32 +++++++++++++++++++ 40 files changed, 169 insertions(+), 45 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 24c640ef..e56a340b 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "مساعدة الفلاتر والإبرازات", "filter_and_highlights": "التصفية والتسليط الضوء", "boards_you_moderate": "المنتديات التي تقوم بالإشراف عليها", - "more_threads_last_year": "{{count}} مواضيع منذ {{currentTimeFilterName}} — [<1>عرض المزيد من المواضيع من السنة الماضية]" + "more_threads_last_year": "{{count}} مواضيع منذ {{currentTimeFilterName}} — [<1>عرض المزيد من المواضيع من السنة الماضية]", + "moderator_of_this_board": "هذا المستخدم هو مشرف على هذا المنتدى", + "administrator_of_this_board": "هذا المستخدم هو مسؤول عن هذا المنتدى" } diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 19029159..fc37522d 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "ফিল্টার এবং হাইলাইট সাহায্য", "filter_and_highlights": "ফিল্টার এবং হাইলাইট", "boards_you_moderate": "আপনি যে বোর্ডগুলি পরিচালনা করেন", - "more_threads_last_year": "{{count}} থ্রেড {{currentTimeFilterName}} থেকে — [<1>গত বছরের আরও থ্রেড দেখান]" + "more_threads_last_year": "{{count}} থ্রেড {{currentTimeFilterName}} থেকে — [<1>গত বছরের আরও থ্রেড দেখান]", + "moderator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন মডারেটর", + "administrator_of_this_board": "এই ব্যবহারকারী এই বোর্ডের একজন প্রশাসক" } diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 31b1d613..90fbf6a1 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Pomoc s filtry a zvýrazněním", "filter_and_highlights": "Filtry a zvýraznění", "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]" + "more_threads_last_year": "{{count}} příspěvků od {{currentTimeFilterName}} — [<1>Zobrazit více příspěvků z minulého roku]", + "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" } diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 04d27a2c..f2fa04d2 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Filtre og fremhævelser Hjælp", "filter_and_highlights": "Filtre og fremhævninger", "boards_you_moderate": "Boards du modererer", - "more_threads_last_year": "{{count}} tråde siden {{currentTimeFilterName}} — [<1>Vis flere tråde fra sidste år]" + "more_threads_last_year": "{{count}} tråde siden {{currentTimeFilterName}} — [<1>Vis flere tråde fra sidste år]", + "moderator_of_this_board": "Denne bruger er moderator for dette board", + "administrator_of_this_board": "Denne bruger er administrator for dette board" } diff --git a/public/translations/de/default.json b/public/translations/de/default.json index c98f961d..093ccb45 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Filter- und Markierungs-Hilfe", "filter_and_highlights": "Filter und Hervorhebungen", "boards_you_moderate": "Boards, die Sie moderieren", - "more_threads_last_year": "{{count}} Threads seit {{currentTimeFilterName}} — [<1>Mehr Threads vom letzten Jahr anzeigen]" + "more_threads_last_year": "{{count}} Threads seit {{currentTimeFilterName}} — [<1>Mehr Threads vom letzten Jahr anzeigen]", + "moderator_of_this_board": "Dieser Benutzer ist Moderator dieses Boards", + "administrator_of_this_board": "Dieser Benutzer ist Administrator dieses Boards" } diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 555858ef..2891a27d 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Βοήθεια φίλτρων και επισήμανσης", "filter_and_highlights": "Φίλτρα και Επισημάνσεις", "boards_you_moderate": "Boards που διαχειρίζεστε", - "more_threads_last_year": "{{count}} νήματα από {{currentTimeFilterName}} — [<1>Προβολή περισσότερων νημάτων από το περασμένο έτος]" + "more_threads_last_year": "{{count}} νήματα από {{currentTimeFilterName}} — [<1>Προβολή περισσότερων νημάτων από το περασμένο έτος]", + "moderator_of_this_board": "Αυτός ο χρήστης είναι συντονιστής αυτού του πίνακα", + "administrator_of_this_board": "Αυτός ο χρήστης είναι διαχειριστής αυτού του πίνακα" } diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 368db118..8d89dea4 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -294,5 +294,7 @@ "filter_and_highlights_help": "Filters & Highlights Help", "filter_and_highlights": "Filters & Highlights", "boards_you_moderate": "boards you moderate", - "more_threads_last_year": "{{count}} threads since {{currentTimeFilterName}} — [<1>Show More Threads from Last Year]" + "more_threads_last_year": "{{count}} threads since {{currentTimeFilterName}} — [<1>Show More Threads from Last Year]", + "moderator_of_this_board": "This user is a moderator of this board", + "administrator_of_this_board": "This user is an administrator of this board" } diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 6294d976..40bed6fa 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Ayuda de filtros y resaltes", "filter_and_highlights": "Filtros y resaltados", "boards_you_moderate": "tableros que moderas", - "more_threads_last_year": "{{count}} hilos desde {{currentTimeFilterName}} — [<1>Ver más hilos del año pasado]" + "more_threads_last_year": "{{count}} hilos desde {{currentTimeFilterName}} — [<1>Ver más hilos del año pasado]", + "moderator_of_this_board": "Este usuario es moderador de este tablero", + "administrator_of_this_board": "Este usuario es administrador de este tablero" } diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 66c21f31..bf1750f2 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "کمک فیلترها و برجسته‌ها", "filter_and_highlights": "فیلترها و برجسته‌ها", "boards_you_moderate": "تابلوهایی که مدیریت می‌کنید", - "more_threads_last_year": "{{count}} پست از {{currentTimeFilterName}} — [<1>نمایش بیشتر پست‌های سال گذشته]" + "more_threads_last_year": "{{count}} پست از {{currentTimeFilterName}} — [<1>نمایش بیشتر پست‌های سال گذشته]", + "moderator_of_this_board": "این کاربر مدیر این انجمن است", + "administrator_of_this_board": "این کاربر مدیرکل این انجمن است" } diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index 24a83ba9..a7331be5 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Suodattimet ja korostukset -apu", "filter_and_highlights": "Suodattimet ja korostukset", "boards_you_moderate": "lautakunnat, joita valvot", - "more_threads_last_year": "{{count}} ketjua sitten {{currentTimeFilterName}} — [<1>Näytä lisää viime vuoden ketjuja]" + "more_threads_last_year": "{{count}} ketjua sitten {{currentTimeFilterName}} — [<1>Näytä lisää viime vuoden ketjuja]", + "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" } diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index c1f28b45..44caa9fc 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Tulong sa mga filter at highlight", "filter_and_highlights": "Mga filter at highlight", "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]" + "more_threads_last_year": "{{count}} mga thread mula {{currentTimeFilterName}} — [<1>Ipakita ang higit pang mga thread mula noong nakaraang taon]", + "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" } diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 7cd43e9f..2d40dbfa 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Aide sur les filtres et surlignages", "filter_and_highlights": "Filtres et surlignages", "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]" + "more_threads_last_year": "{{count}} fils depuis {{currentTimeFilterName}} — [<1>Afficher plus de fils de l'année dernière]", + "moderator_of_this_board": "Cet utilisateur est modérateur de ce tableau", + "administrator_of_this_board": "Cet utilisateur est administrateur de ce tableau" } diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 2de2d04e..3df2c535 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "עזרה במסננים והדגשות", "filter_and_highlights": "מסננים והדגשות", "boards_you_moderate": "לוחות שאתה מפקח עליהם", - "more_threads_last_year": "{{count}} חוטים מאז {{currentTimeFilterName}} — [<1>הצג עוד חוטים מהשנה שעברה]" + "more_threads_last_year": "{{count}} חוטים מאז {{currentTimeFilterName}} — [<1>הצג עוד חוטים מהשנה שעברה]", + "moderator_of_this_board": "משתמש זה הוא מנהל של הלוח הזה", + "administrator_of_this_board": "משתמש זה הוא מנהל מערכת של הלוח הזה" } diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index b5e0ed21..6e928097 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "फ़िल्टर और हाइलाइट्स सहायता", "filter_and_highlights": "फ़िल्टर और हाइलाइट्स", "boards_you_moderate": "बोर्ड जो आप मॉडरेट करते हैं", - "more_threads_last_year": "{{count}} थ्रेड्स {{currentTimeFilterName}} से — [<1>पिछले साल के अधिक थ्रेड्स दिखाएं]" + "more_threads_last_year": "{{count}} थ्रेड्स {{currentTimeFilterName}} से — [<1>पिछले साल के अधिक थ्रेड्स दिखाएं]", + "moderator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का मॉडरेटर है", + "administrator_of_this_board": "यह उपयोगकर्ता इस बोर्ड का प्रशासक है" } diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index 90ade5c5..cb312722 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Szűrők és kiemelések súgó", "filter_and_highlights": "Szűrők és kiemelések", "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]" + "more_threads_last_year": "{{count}} szál {{currentTimeFilterName}} óta — [<1>Több szál megjelenítése a múlt évből]", + "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" } diff --git a/public/translations/id/default.json b/public/translations/id/default.json index bfb982f6..667a8b49 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Bantuan Filter dan Sorotan", "filter_and_highlights": "Filter dan Sorotan", "boards_you_moderate": "board yang Anda moderasi", - "more_threads_last_year": "{{count}} thread sejak {{currentTimeFilterName}} — [<1>Tampilkan lebih banyak thread dari tahun lalu]" + "more_threads_last_year": "{{count}} thread sejak {{currentTimeFilterName}} — [<1>Tampilkan lebih banyak thread dari tahun lalu]", + "moderator_of_this_board": "Pengguna ini adalah moderator papan ini", + "administrator_of_this_board": "Pengguna ini adalah administrator papan ini" } diff --git a/public/translations/it/default.json b/public/translations/it/default.json index e58674f2..56403309 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Aiuto su Filtri e Evidenziazioni", "filter_and_highlights": "Filtri e Evidenziazioni", "boards_you_moderate": "board che moderi", - "more_threads_last_year": "{{count}} thread da {{currentTimeFilterName}} — [<1>Mostra altri thread dell'anno scorso]" + "more_threads_last_year": "{{count}} thread da {{currentTimeFilterName}} — [<1>Mostra altri thread dell'anno scorso]", + "moderator_of_this_board": "Questo utente è moderatore di questa bacheca", + "administrator_of_this_board": "Questo utente è amministratore di questa bacheca" } diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index ed8dec37..7c2ce43b 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "フィルターとハイライトのヘルプ", "filter_and_highlights": "フィルターとハイライト", "boards_you_moderate": "あなたが管理するボード", - "more_threads_last_year": "{{count}} スレッド {{currentTimeFilterName}} から — [<1>去年のスレッドをさらに表示]" + "more_threads_last_year": "{{count}} スレッド {{currentTimeFilterName}} から — [<1>去年のスレッドをさらに表示]", + "moderator_of_this_board": "このユーザーはこのボードのモデレーターです", + "administrator_of_this_board": "このユーザーはこのボードの管理者です" } diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index fc9bc841..defb7881 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "필터 및 하이라이트 도움말", "filter_and_highlights": "필터 및 하이라이트", "boards_you_moderate": "당신이 관리하는 게시판", - "more_threads_last_year": "{{count}} 스레드 {{currentTimeFilterName}} 이후 — [<1>작년의 스레드 더 보기]" + "more_threads_last_year": "{{count}} 스레드 {{currentTimeFilterName}} 이후 — [<1>작년의 스레드 더 보기]", + "moderator_of_this_board": "이 사용자는 이 게시판의 관리자입니다", + "administrator_of_this_board": "이 사용자는 이 게시판의 관리자입니다" } diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index ee5ce079..d6cf0b71 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "फिल्टर आणि हायलाइट्स सहाय्य", "filter_and_highlights": "फिल्टर आणि हायलाइट्स", "boards_you_moderate": "तुम्ही ज्यांचे नियंत्रण करता अशा बोर्ड्स", - "more_threads_last_year": "{{count}} ध糀ं {{currentTimeFilterName}} पासून — [<1>गेल्या वर्षातील आणखी थ्रेड्स दाखवा]" + "more_threads_last_year": "{{count}} ध糀ं {{currentTimeFilterName}} पासून — [<1>गेल्या वर्षातील आणखी थ्रेड्स दाखवा]", + "moderator_of_this_board": "हा वापरकर्ता या बोर्डचा मॉडरेटर आहे", + "administrator_of_this_board": "हा वापरकर्ता या बोर्डचा प्रशासक आहे" } diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 2507a155..4589533a 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Filters en Markeringen Help", "filter_and_highlights": "Filters en markeringen", "boards_you_moderate": "boards die je beheert", - "more_threads_last_year": "{{count}} threads sinds {{currentTimeFilterName}} — [<1>Meer threads van afgelopen jaar tonen]" + "more_threads_last_year": "{{count}} threads sinds {{currentTimeFilterName}} — [<1>Meer threads van afgelopen jaar tonen]", + "moderator_of_this_board": "Deze gebruiker is moderator van dit bord", + "administrator_of_this_board": "Deze gebruiker is beheerder van dit bord" } diff --git a/public/translations/no/default.json b/public/translations/no/default.json index f8e1001f..1328437f 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Filtre og fremhevinger Hjelp", "filter_and_highlights": "Filtre og uthevinger", "boards_you_moderate": "boards du modererer", - "more_threads_last_year": "{{count}} tråder siden {{currentTimeFilterName}} — [<1>Vis flere tråder fra forrige år]" + "more_threads_last_year": "{{count}} tråder siden {{currentTimeFilterName}} — [<1>Vis flere tråder fra forrige år]", + "moderator_of_this_board": "Denne brukeren er moderator for dette tavlet", + "administrator_of_this_board": "Denne brukeren er administrator for dette tavlet" } diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index b779c8a7..c6f46331 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Pomoc dotycząca filtrów i wyróżnień", "filter_and_highlights": "Filtry i wyróżnienia", "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]" + "more_threads_last_year": "{{count}} wątki od {{currentTimeFilterName}} — [<1>Pokaż więcej wątków z zeszłego roku]", + "moderator_of_this_board": "Ten użytkownik jest moderatorem tego forum", + "administrator_of_this_board": "Ten użytkownik jest administratorem tego forum" } diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index d90cda07..8bc42dba 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Ajuda de Filtros e Realces", "filter_and_highlights": "Filtros e Destaques", "boards_you_moderate": "boards que você modera", - "more_threads_last_year": "{{count}} tópicos desde {{currentTimeFilterName}} — [<1>Mostrar mais tópicos do ano passado]" + "more_threads_last_year": "{{count}} tópicos desde {{currentTimeFilterName}} — [<1>Mostrar mais tópicos do ano passado]", + "moderator_of_this_board": "Este usuário é moderador deste quadro", + "administrator_of_this_board": "Este usuário é administrador deste quadro" } diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index a84413f7..4b49f6ae 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Ajutor pentru filtre și evidențieri", "filter_and_highlights": "Filtre și evidențieri", "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]" + "more_threads_last_year": "{{count}} subiecte din {{currentTimeFilterName}} — [<1>Afișați mai multe subiecte de anul trecut]", + "moderator_of_this_board": "Acest utilizator este moderator al acestui forum", + "administrator_of_this_board": "Acest utilizator este administrator al acestui forum" } diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 7d2f5c26..35807a87 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Помощь с фильтрами и выделениями", "filter_and_highlights": "Фильтры и выделения", "boards_you_moderate": "boards, которые вы модерируете", - "more_threads_last_year": "{{count}} темы с {{currentTimeFilterName}} — [<1>Показать больше тем с прошлого года]" + "more_threads_last_year": "{{count}} темы с {{currentTimeFilterName}} — [<1>Показать больше тем с прошлого года]", + "moderator_of_this_board": "Этот пользователь является модератором этого форума", + "administrator_of_this_board": "Этот пользователь является администратором этого форума" } diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 0f4569ef..68d5b71b 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Ndihma për Filtro & Thekso", "filter_and_highlights": "Filtra dhe thekson", "boards_you_moderate": "boards që i moderoni", - "more_threads_last_year": "{{count}} tema nga {{currentTimeFilterName}} — [<1>Shfaq më shumë tema nga viti i kaluar]" + "more_threads_last_year": "{{count}} tema nga {{currentTimeFilterName}} — [<1>Shfaq më shumë tema nga viti i kaluar]", + "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" } diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 9ff4e008..63f51e35 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Filter och markeringar Hjälp", "filter_and_highlights": "Filter och markeringar", "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]" + "more_threads_last_year": "{{count}} trådar sedan {{currentTimeFilterName}} — [<1>Visa fler trådar från förra året]", + "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" } diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 02a081b0..703f6c34 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "ఫిల్టర్లు మరియు హైలైట్ సహాయం", "filter_and_highlights": "ఫిల్టర్లు మరియు హైలైట్స్", "boards_you_moderate": "మీరు మోడరేట్ చేసే బోర్డులు", - "more_threads_last_year": "{{count}} థ్రెడ్‌లు {{currentTimeFilterName}} నుండి — [<1>గత సంవత్సరం నుండి మరిన్ని థ్రెడ్‌లను చూపించండి]" + "more_threads_last_year": "{{count}} థ్రెడ్‌లు {{currentTimeFilterName}} నుండి — [<1>గత సంవత్సరం నుండి మరిన్ని థ్రెడ్‌లను చూపించండి]", + "moderator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క మోడరేటర్", + "administrator_of_this_board": "ఈ వినియోగదారు ఈ బోర్డ్ యొక్క నిర్వాహకుడు" } diff --git a/public/translations/th/default.json b/public/translations/th/default.json index b1ecd3b6..bf847efd 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "ตัวกรองและการเน้นความช่วยเหลือ", "filter_and_highlights": "ตัวกรองและไฮไลท์", "boards_you_moderate": "บอร์ดที่คุณดูแล", - "more_threads_last_year": "{{count}} กระทู้ตั้งแต่ {{currentTimeFilterName}} — [<1>แสดงกระทู้จากปีที่แล้วเพิ่มเติม]" + "more_threads_last_year": "{{count}} กระทู้ตั้งแต่ {{currentTimeFilterName}} — [<1>แสดงกระทู้จากปีที่แล้วเพิ่มเติม]", + "moderator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลของบอร์ดนี้", + "administrator_of_this_board": "ผู้ใช้รายนี้เป็นผู้ดูแลระบบของบอร์ดนี้" } diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index c9aa98be..59ff603a 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Filtreler ve Vurgular Yardımı", "filter_and_highlights": "Filtreler ve Vurgular", "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]" + "more_threads_last_year": "{{count}} konu {{currentTimeFilterName}} itibariyle — [<1>Geçen yıldan daha fazla konu göster]", + "moderator_of_this_board": "Bu kullanıcı bu panonun moderatörüdür", + "administrator_of_this_board": "Bu kullanıcı bu panonun yöneticisidir" } diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 017a4971..89de9c18 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Допомога з фільтрами та підсвічуваннями", "filter_and_highlights": "Фільтри та виділення", "boards_you_moderate": "boards, які ви модеруватимете", - "more_threads_last_year": "{{count}} тем з {{currentTimeFilterName}} — [<1>Показати більше тем з минулого року]" + "more_threads_last_year": "{{count}} тем з {{currentTimeFilterName}} — [<1>Показати більше тем з минулого року]", + "moderator_of_this_board": "Цей користувач є модератором цього форуму", + "administrator_of_this_board": "Цей користувач є адміністратором цього форуму" } diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index f028a1fb..8cf794e9 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "فلٹرز اور ہائی لائٹس کی مدد", "filter_and_highlights": "فلٹرز اور ہائلाइटس", "boards_you_moderate": "وہ بورڈز جن کی آپ نگرانی کرتے ہیں", - "more_threads_last_year": "{{count}} تھریڈز {{currentTimeFilterName}} سے — [<1>گزشتہ سال کے مزید تھریڈز دکھائیں]" + "more_threads_last_year": "{{count}} تھریڈز {{currentTimeFilterName}} سے — [<1>گزشتہ سال کے مزید تھریڈز دکھائیں]", + "moderator_of_this_board": "یہ صارف اس بورڈ کا ماڈریٹر ہے", + "administrator_of_this_board": "یہ صارف اس بورڈ کا منتظم ہے" } diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 6aa757aa..f80e4f77 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "Trợ giúp bộ lọc và đánh dấu", "filter_and_highlights": "Bộ lọc và Nổi bật", "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]" + "more_threads_last_year": "{{count}} chủ đề từ {{currentTimeFilterName}} — [<1>Hiển thị thêm các chủ đề từ năm ngoái]", + "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" } diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 68772724..717ef31f 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -293,5 +293,7 @@ "filter_and_highlights_help": "过滤器和高亮帮助", "filter_and_highlights": "筛选器与高亮", "boards_you_moderate": "您管理的板块", - "more_threads_last_year": "{{count}} 主题自 {{currentTimeFilterName}} — [<1>显示更多去年的主题]" + "more_threads_last_year": "{{count}} 主题自 {{currentTimeFilterName}} — [<1>显示更多去年的主题]", + "moderator_of_this_board": "此用户是此版块的版主", + "administrator_of_this_board": "此用户是此版块的管理员" } diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index 81d0d870..fac937ec 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -57,8 +57,8 @@ const PostInfo = ({ post, postReplyCount = 0, roles, isHidden }: PostProps) => { const replies = useReplies(post); const { address, shortAddress } = author || {}; const displayName = author?.displayName?.trim(); - const authorRole = roles?.[address]?.role; const { isDescription, isRules } = post || {}; // custom properties, not from api + const authorRole = roles?.[address]?.role.replace('moderator', 'mod') || (isDescription || isRules ? 'mod' : undefined); const stateString = useStateString(post); const isReply = parentCid; const { showOmittedReplies } = useShowOmittedReplies(); @@ -109,7 +109,7 @@ const PostInfo = ({ post, postReplyCount = 0, roles, isHidden }: PostProps) => { /> ))} - + {deleted ? ( _.capitalize(t('deleted')) ) : removed ? ( @@ -126,7 +126,16 @@ const PostInfo = ({ post, postReplyCount = 0, roles, isHidden }: PostProps) => { ) : ( _.capitalize(t('anonymous')) )} - {!(deleted || removed) && {authorRole && ` ## Board ${authorRole}`} } + {!(deleted || removed) && authorRole && ( + + {' '} + ## Board {authorRole}{' '} + {' '} + + )} {!(isDescription || isRules) && ( <> @@ -422,7 +431,7 @@ const PostDesktop = ({ post, roles, showAllReplies, showReplies = true }: PostPr isRules: true, subplebbitAddress, timestamp: subplebbit?.createdAt, - author: { displayName: `## ${t('board_mods')}` }, + author: { displayName: _.capitalize(t('anonymous')) }, content: `${subplebbit?.rules?.map((rule: string, index: number) => `${index + 1}. ${rule}`).join('\n')}`, replyCount: 0, }; diff --git a/src/components/post-mobile/post-mobile.tsx b/src/components/post-mobile/post-mobile.tsx index be1fbb91..e158758a 100644 --- a/src/components/post-mobile/post-mobile.tsx +++ b/src/components/post-mobile/post-mobile.tsx @@ -57,7 +57,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles }: PostProps) => { const { isDescription, isRules } = post || {}; // custom properties, not from api const { address, shortAddress } = author || {}; const displayName = author?.displayName?.trim(); - const authorRole = roles?.[address]?.role; + const authorRole = roles?.[address]?.role.replace('moderator', 'mod') || (isDescription || isRules ? 'mod' : undefined); const { imageUrl: avatarImageUrl } = useAuthorAvatar({ author }); const { hideAvatars } = useAvatarVisibilityStore(); @@ -101,7 +101,7 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles }: PostProps) => { - + {removed ? ( _.capitalize(t('removed')) ) : deleted ? ( @@ -118,7 +118,19 @@ const PostInfoAndMedia = ({ post, postReplyCount = 0, roles }: PostProps) => { ) : ( _.capitalize(t('anonymous')) )} - {!(deleted || removed) && {authorRole && ` ## Board ${authorRole}`} } + {!(deleted || removed) && authorRole && ( + + {' '} + ## Board {authorRole}{' '} + + + +   + + )} {!(isDescription || isRules) && ( <> @@ -318,7 +330,7 @@ const PostMobile = ({ post, roles, showAllReplies, showReplies = true }: PostPro isRules: true, subplebbitAddress, timestamp: subplebbit?.createdAt, - author: { displayName: `## ${t('board_mods')}` }, + author: { displayName: _.capitalize(t('anonymous')) }, content: `${subplebbit?.rules?.map((rule: string, index: number) => `${index + 1}. ${rule}`).join('\n')}`, replyCount: 0, }; diff --git a/src/components/subplebbit-description/subplebbit-description.tsx b/src/components/subplebbit-description/subplebbit-description.tsx index 3879055a..041d86eb 100644 --- a/src/components/subplebbit-description/subplebbit-description.tsx +++ b/src/components/subplebbit-description/subplebbit-description.tsx @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'; import { isAllView } from '../../lib/utils/view-utils'; import { useMultisubMetadata } from '../../hooks/use-default-subplebbits'; import { useLocation } from 'react-router-dom'; +import _ from 'lodash'; interface DescriptionPostProps { avatarUrl?: string; @@ -24,7 +25,7 @@ const SubplebbitDescription = ({ avatarUrl, createdAt, description, replyCount, isDescription: true, subplebbitAddress, timestamp: isInAllView ? multisubMetadata?.createdAt : createdAt, - author: { displayName: `## ${t('board_mods')}` }, + author: { displayName: _.capitalize(t('anonymous')) }, content: isInAllView ? multisubMetadata?.description : description, link: avatarUrl, replyCount, diff --git a/src/components/subplebbit-rules/subplebbit-rules.tsx b/src/components/subplebbit-rules/subplebbit-rules.tsx index f54e97c3..2ca89860 100644 --- a/src/components/subplebbit-rules/subplebbit-rules.tsx +++ b/src/components/subplebbit-rules/subplebbit-rules.tsx @@ -15,7 +15,7 @@ const SubplebbitRules = ({ subplebbitAddress, createdAt, rules }: RulesPostProps isRules: true, subplebbitAddress, timestamp: createdAt, - author: { displayName: `## ${t('board_mods')}` }, + author: { displayName: _.capitalize(t('anonymous')) }, content, replyCount: 0, title: _.capitalize(t('rules')), diff --git a/src/views/post/post.module.css b/src/views/post/post.module.css index 19ca4464..faa4bbf6 100644 --- a/src/views/post/post.module.css +++ b/src/views/post/post.module.css @@ -470,6 +470,38 @@ color: var(--post-capcode-mod-text-color) !important; } +.capcodeAdmin { + color: #F00 !important; +} + +.capcodeIcon { + width: 16px; + height: 16px; + display: inline-block; + image-rendering: pixelated; + transform: translateY(2px); +} + +.capcodeIconMobileWrapper { + padding-right: 15px; +} + +.capcodeIconMobile { + position: absolute; + width: 16px; + height: 16px; + image-rendering: pixelated; + transform: translateY(-1px); +} + +.capcodeModIcon { + background-image: url('assets/icons/board-mod.png'); +} + +.capcodeAdminIcon { + background-image: url('assets/icons/board-admin.png'); +} + .pendingCid { color: red !important; font-weight: 700 !important;