feat(boards list): add PPH column

This commit is contained in:
Tom (plebeius.eth)
2025-02-05 12:46:37 +01:00
parent abd11c48c9
commit d858b5398d
37 changed files with 177 additions and 48 deletions
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "الحقل طويل جدًا.",
"title": "عنوان",
"tags": "علامات",
"load_more": "تحميل المزيد"
"load_more": "تحميل المزيد",
"displaying_boards": "عرض {{filteredBoardsCount}} من {{totalBoardCount}} المجالس",
"displaying_boards_with_tag": "عرض {{filteredBoardsCount}} من {{totalBoardCount}} المجالس الموسومة بـ {{currentTag}}",
"pph": "Posts Per Hour (منشورات في الساعة)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "ফিল্ডটি খুব লম্বা।",
"title": "শিরোনাম",
"tags": "ট্যাগ",
"load_more": "আরো লোড করুন"
"load_more": "আরো লোড করুন",
"displaying_boards": "প্রদর্শন করা হচ্ছে {{filteredBoardsCount}} এর মধ্যে {{totalBoardCount}} বোর্ড",
"displaying_boards_with_tag": "প্রদর্শন করা হচ্ছে {{filteredBoardsCount}} এর মধ্যে {{totalBoardCount}} বোর্ড যা {{currentTag}} ট্যাগযুক্ত",
"pph": "Posts Per Hour (পোস্ট প্রতি ঘণ্টা)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Pole je příliš dlouhé.",
"title": "Název",
"tags": "Štítky",
"load_more": "Načíst více"
"load_more": "Načíst více",
"displaying_boards": "Zobrazuji {{filteredBoardsCount}} z {{totalBoardCount}} fór",
"displaying_boards_with_tag": "Zobrazuji {{filteredBoardsCount}} z {{totalBoardCount}} fór označených {{currentTag}}",
"pph": "Posts Per Hour (Příspěvky za hodinu)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Feltene er for lange.",
"title": "Titel",
"tags": "Tags",
"load_more": "Indlæs mere"
"load_more": "Indlæs mere",
"displaying_boards": "Viser {{filteredBoardsCount}} af {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Viser {{filteredBoardsCount}} af {{totalBoardCount}} boards mærket {{currentTag}}",
"pph": "Posts Per Hour (Indlæg Per Time)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Das Feld ist zu lang.",
"title": "Titel",
"tags": "Tags",
"load_more": "Mehr laden"
"load_more": "Mehr laden",
"displaying_boards": "Zeige {{filteredBoardsCount}} von {{totalBoardCount}} Boards",
"displaying_boards_with_tag": "Zeige {{filteredBoardsCount}} von {{totalBoardCount}} Boards mit dem Tag {{currentTag}}",
"pph": "Posts Per Hour (Beiträge pro Stunde)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Το πεδίο είναι πολύ μεγάλο.",
"title": "Τίτλος",
"tags": "Ετικέτες",
"load_more": "Φορτώστε περισσότερα"
"load_more": "Φορτώστε περισσότερα",
"displaying_boards": "Εμφάνιση {{filteredBoardsCount}} από τα {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Εμφάνιση {{filteredBoardsCount}} από τα {{totalBoardCount}} boards με την ετικέτα {{currentTag}}",
"pph": "Posts Per Hour (Αναρτήσεις ανά ώρα)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Field too long.",
"title": "Title",
"tags": "Tags",
"load_more": "Load More"
"load_more": "Load More",
"displaying_boards": "Displaying {{filteredBoardsCount}} of {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Displaying {{filteredBoardsCount}} of {{totalBoardCount}} boards tagged {{currentTag}}",
"pph": "Posts Per Hour"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Campo demasiado largo.",
"title": "Título",
"tags": "Etiquetas",
"load_more": "Cargar más"
"load_more": "Cargar más",
"displaying_boards": "Mostrando {{filteredBoardsCount}} de {{totalBoardCount}} foros",
"displaying_boards_with_tag": "Mostrando {{filteredBoardsCount}} de {{totalBoardCount}} foros etiquetados con {{currentTag}}",
"pph": "Posts Per Hour (Publicaciones Por Hora)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "فیلد خیلی طولانی است.",
"title": "عنوان",
"tags": "برچسب‌ها",
"load_more": "بارگذاری بیشتر"
"load_more": "بارگذاری بیشتر",
"displaying_boards": "نمایش {{filteredBoardsCount}} از {{totalBoardCount}} انجمن",
"displaying_boards_with_tag": "نمایش {{filteredBoardsCount}} از {{totalBoardCount}} انجمن با برچسب {{currentTag}}",
"pph": "Posts Per Hour (پست در ساعت)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Kenttä liian pitkä.",
"title": "Otsikko",
"tags": "Tunnisteet",
"load_more": "Lataa lisää"
"load_more": "Lataa lisää",
"displaying_boards": "Näytetään {{filteredBoardsCount}} {{totalBoardCount}} foorumista",
"displaying_boards_with_tag": "Näytetään {{filteredBoardsCount}} {{totalBoardCount}} foorumista, joissa on tagi {{currentTag}}",
"pph": "Posts Per Hour (Viestit tunnissa)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Ang field ay masyadong mahaba.",
"title": "Pamagat",
"tags": "Mga tag",
"load_more": "Mag-load ng higit pa"
"load_more": "Mag-load ng higit pa",
"displaying_boards": "Ipinapakita {{filteredBoardsCount}} mula sa {{totalBoardCount}} na mga board",
"displaying_boards_with_tag": "Ipinapakita {{filteredBoardsCount}} mula sa {{totalBoardCount}} na mga board na may tag na {{currentTag}}",
"pph": "Posts Per Hour (Mga Post Bawat Oras)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Champ trop long.",
"title": "Titre",
"tags": "Tags",
"load_more": "Charger plus"
"load_more": "Charger plus",
"displaying_boards": "Affichage de {{filteredBoardsCount}} sur {{totalBoardCount}} forums",
"displaying_boards_with_tag": "Affichage de {{filteredBoardsCount}} sur {{totalBoardCount}} forums étiquetés {{currentTag}}",
"pph": "Posts Per Hour (Publications Par Heure)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "המשדה ארוך מדי.",
"title": "כותרת",
"tags": "תגיות",
"load_more": "טען עוד"
"load_more": "טען עוד",
"displaying_boards": "מציג {{filteredBoardsCount}} מתוך {{totalBoardCount}} פורומים",
"displaying_boards_with_tag": "מציג {{filteredBoardsCount}} מתוך {{totalBoardCount}} פורומים עם התג {{currentTag}}",
"pph": "Posts Per Hour (פוסטים לשעה)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "क्षेत्र बहुत लंबा है।",
"title": "शीर्षक",
"tags": "टैग",
"load_more": "अधिक लोड करें"
"load_more": "अधिक लोड करें",
"displaying_boards": "प्रदर्शित {{filteredBoardsCount}} में से {{totalBoardCount}} बोर्ड",
"displaying_boards_with_tag": "प्रदर्शित {{filteredBoardsCount}} में से {{totalBoardCount}} बोर्ड जो {{currentTag}} टैग से जुड़े हैं",
"pph": "Posts Per Hour (पोस्ट प्रति घंटे)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "A mező túl hosszú.",
"title": "Cím",
"tags": "Címkék",
"load_more": "Töltsön be többet"
"load_more": "Töltsön be többet",
"displaying_boards": "Képernyőn {{filteredBoardsCount}} a(z) {{totalBoardCount}} fórumokból",
"displaying_boards_with_tag": "Képernyőn {{filteredBoardsCount}} a(z) {{totalBoardCount}} fórumok közül, amelyek tartalmazzák a(z) {{currentTag}} címkét",
"pph": "Posts Per Hour (Bejegyzések óránként)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Kolom terlalu panjang.",
"title": "Judul",
"tags": "Tag",
"load_more": "Muat lebih banyak"
"load_more": "Muat lebih banyak",
"displaying_boards": "Menampilkan {{filteredBoardsCount}} dari {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Menampilkan {{filteredBoardsCount}} dari {{totalBoardCount}} boards dengan tag {{currentTag}}",
"pph": "Posts Per Hour (Posting Per Jam)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Campo troppo lungo.",
"title": "Titolo",
"tags": "Tag",
"load_more": "Carica altro"
"load_more": "Carica altro",
"displaying_boards": "Visualizzazione di {{filteredBoardsCount}} su {{totalBoardCount}} board",
"displaying_boards_with_tag": "Visualizzazione di {{filteredBoardsCount}} su {{totalBoardCount}} board con tag {{currentTag}}",
"pph": "Posts Per Hour (Post Per Ora)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "フィールドが長すぎます。",
"title": "タイトル",
"tags": "タグ",
"load_more": "もっと読み込む"
"load_more": "もっと読み込む",
"displaying_boards": "表示中 {{filteredBoardsCount}} 件のうち {{totalBoardCount}} 件の掲示板",
"displaying_boards_with_tag": "表示中 {{filteredBoardsCount}} 件のうち {{totalBoardCount}} 件の掲示板、タグ {{currentTag}}",
"pph": "Posts Per Hour (時間あたりの投稿)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "필드가 너무 깁니다.",
"title": "제목",
"tags": "태그",
"load_more": "더 보기"
"load_more": "더 보기",
"displaying_boards": "총 {{totalBoardCount}}개의 게시판 중 {{filteredBoardsCount}}개 게시판 표시",
"displaying_boards_with_tag": "총 {{totalBoardCount}}개의 게시판 중 {{filteredBoardsCount}}개 게시판, 태그 {{currentTag}}",
"pph": "Posts Per Hour (시간당 게시물)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "फील्ड खूप लांब आहे.",
"title": "सिरसक",
"tags": "टॅग",
"load_more": "अधिक लोड करा"
"load_more": "अधिक लोड करा",
"displaying_boards": "प्रदर्शित करणे {{filteredBoardsCount}} मध्ये {{totalBoardCount}} बोर्ड",
"displaying_boards_with_tag": "प्रदर्शित करणे {{filteredBoardsCount}} मध्ये {{totalBoardCount}} बोर्ड्स ज्यात {{currentTag}} टॅग आहे",
"pph": "Posts Per Hour (पोस्ट प्रति तास)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Veld te lang.",
"title": "Titel",
"tags": "Tags",
"load_more": "Laad meer"
"load_more": "Laad meer",
"displaying_boards": "Weergave {{filteredBoardsCount}} van {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Weergave {{filteredBoardsCount}} van {{totalBoardCount}} boards met de tag {{currentTag}}",
"pph": "Posts Per Hour (Berichten Per Uur)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Feltet er for langt.",
"title": "Tittel",
"tags": "Tags",
"load_more": "Last inn mer"
"load_more": "Last inn mer",
"displaying_boards": "Viser {{filteredBoardsCount}} av {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Viser {{filteredBoardsCount}} av {{totalBoardCount}} boards merket med {{currentTag}}",
"pph": "Posts Per Hour (Innhold Per Time)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Pole jest za długie.",
"title": "Tytuł",
"tags": "Tagi",
"load_more": "Załaduj więcej"
"load_more": "Załaduj więcej",
"displaying_boards": "Wyświetlanie {{filteredBoardsCount}} z {{totalBoardCount}} forów",
"displaying_boards_with_tag": "Wyświetlanie {{filteredBoardsCount}} z {{totalBoardCount}} forów oznaczonych tagiem {{currentTag}}",
"pph": "Posts Per Hour (Posty na Godzinę)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Campo muito longo.",
"title": "Título",
"tags": "Tags",
"load_more": "Carregar mais"
"load_more": "Carregar mais",
"displaying_boards": "Exibindo {{filteredBoardsCount}} de {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Exibindo {{filteredBoardsCount}} de {{totalBoardCount}} boards com a tag {{currentTag}}",
"pph": "Posts Per Hour (Postagens Por Hora)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Câmp prea lung.",
"title": "Titlu",
"tags": "Etichete",
"load_more": "Încarcă mai mult"
"load_more": "Încarcă mai mult",
"displaying_boards": "Afișare {{filteredBoardsCount}} din {{totalBoardCount}} forumuri",
"displaying_boards_with_tag": "Afișare {{filteredBoardsCount}} din {{totalBoardCount}} forumuri etichetate cu {{currentTag}}",
"pph": "Posts Per Hour (Postări Pe Oră)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Поле слишком длинное.",
"title": "Заголовок",
"tags": "Теги",
"load_more": "Загрузить больше"
"load_more": "Загрузить больше",
"displaying_boards": "Отображение {{filteredBoardsCount}} из {{totalBoardCount}} форумов",
"displaying_boards_with_tag": "Отображение {{filteredBoardsCount}} из {{totalBoardCount}} форумов с тегом {{currentTag}}",
"pph": "Posts Per Hour (Посты в Час)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Fusha është shumë e gjatë.",
"title": "Titulli",
"tags": "Etiketa",
"load_more": "Ngarko më shumë"
"load_more": "Ngarko më shumë",
"displaying_boards": "Po shfaq {{filteredBoardsCount}} nga {{totalBoardCount}} forume",
"displaying_boards_with_tag": "Po shfaq {{filteredBoardsCount}} nga {{totalBoardCount}} forume me etiketën {{currentTag}}",
"pph": "Posts Per Hour (Postime Në Orë)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Fältet är för långt.",
"title": "Titel",
"tags": "Taggar",
"load_more": "Läs mer"
"load_more": "Läs mer",
"displaying_boards": "Visar {{filteredBoardsCount}} av {{totalBoardCount}} boards",
"displaying_boards_with_tag": "Visar {{filteredBoardsCount}} av {{totalBoardCount}} boards taggade med {{currentTag}}",
"pph": "Posts Per Hour (Inlägg Per Timme)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "ఫీల్డ్ చాలా పొడుగ్గా ఉంది.",
"title": "శీర్షిక",
"tags": "ట్యాగ్స్",
"load_more": "మరింత లోడ్ చేయండి"
"load_more": "మరింత లోడ్ చేయండి",
"displaying_boards": "ప్రదర్శన {{filteredBoardsCount}} నుండి {{totalBoardCount}} బోర్డ్స్",
"displaying_boards_with_tag": "ప్రదర్శన {{filteredBoardsCount}} నుండి {{totalBoardCount}} బోర్డ్స్ ట్యాగ్ {{currentTag}}",
"pph": "Posts Per Hour (ప్రతి గంటలో పోస్ట్‌లు)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "ฟิลด์ยาวเกินไป",
"title": "ชื่อเรื่อง",
"tags": "แท็ก",
"load_more": "โหลดเพิ่มเติม"
"load_more": "โหลดเพิ่มเติม",
"displaying_boards": "แสดง {{filteredBoardsCount}} จาก {{totalBoardCount}} บอร์ด",
"displaying_boards_with_tag": "แสดง {{filteredBoardsCount}} จาก {{totalBoardCount}} บอร์ดที่มีแท็ก {{currentTag}}",
"pph": "Posts Per Hour (โพสต์ต่อชั่วโมง)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Alan çok uzun.",
"title": "Başlık",
"tags": "Etiketler",
"load_more": "Daha fazla yükle"
"load_more": "Daha fazla yükle",
"displaying_boards": "{{filteredBoardsCount}}/{{totalBoardCount}} boardları görüntüleme",
"displaying_boards_with_tag": "{{currentTag}} etiketiyle işaretlenen {{totalBoardCount}} boardtan {{filteredBoardsCount}} görüntüleniyor",
"pph": "Posts Per Hour (Saat Başına Paylaşımlar)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Поле занадто довге.",
"title": "Заголовок",
"tags": "Теги",
"load_more": "Завантажити більше"
"load_more": "Завантажити більше",
"displaying_boards": "Відображення {{filteredBoardsCount}} з {{totalBoardCount}} форумів",
"displaying_boards_with_tag": "Відображення {{filteredBoardsCount}} з {{totalBoardCount}} форумів, помічених тегом {{currentTag}}",
"pph": "Posts Per Hour (Пости за Годину)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "فیلڈ بہت طویل ہے۔",
"title": "عنوان",
"tags": "ٹٰیگ",
"load_more": "مزید لوڈ کریں"
"load_more": "مزید لوڈ کریں",
"displaying_boards": "ظاہر ہو رہے ہیں {{filteredBoardsCount}} میں سے {{totalBoardCount}} بورڈز",
"displaying_boards_with_tag": "ظاہر ہو رہے ہیں {{filteredBoardsCount}} میں سے {{totalBoardCount}} بورڈز جو {{currentTag}} ٹیگ کے ساتھ ہیں",
"pph": "Posts Per Hour (ہر گھنٹے میں پوسٹس)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "Trường quá dài.",
"title": "Tiêu đề",
"tags": "Thẻ",
"load_more": "Tải thêm"
"load_more": "Tải thêm",
"displaying_boards": "Hiển thị {{filteredBoardsCount}} trong {{totalBoardCount}} diễn đàn",
"displaying_boards_with_tag": "Hiển thị {{filteredBoardsCount}} trong {{totalBoardCount}} diễn đàn có thẻ {{currentTag}}",
"pph": "Posts Per Hour (Bài Viết Mỗi Giờ)"
}
+4 -1
View File
@@ -267,5 +267,8 @@
"field_too_long": "字段太长。",
"title": "标题",
"tags": "标签",
"load_more": "加载更多"
"load_more": "加载更多",
"displaying_boards": "显示 {{filteredBoardsCount}} 个板块,共 {{totalBoardCount}} 个板块",
"displaying_boards_with_tag": "显示 {{filteredBoardsCount}} 个板块,共 {{totalBoardCount}} 个板块,标签为 {{currentTag}}",
"pph": "Posts Per Hour (每小时帖子)"
}
+31 -13
View File
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import { Subplebbit, useSubplebbit } from '@plebbit/plebbit-react-hooks';
import { Subplebbit, useSubplebbit, useSubplebbitStats } from '@plebbit/plebbit-react-hooks';
import { useDefaultSubplebbitTags } from '../../../hooks/use-default-subplebbits-tags';
import useIsMobile from '../../../hooks/use-is-mobile';
import useIsSubplebbitOffline from '../../../hooks/use-is-subplebbit-offline';
@@ -14,6 +14,8 @@ const Board = ({ subplebbit, isMobile }: { subplebbit: Subplebbit; isMobile: boo
const { address, title, tags } = subplebbit || {};
const nsfwTag = tags?.find((tag: string) => nsfwTags.includes(tag));
let stats = useSubplebbitStats({ subplebbitAddress: address });
const subplebbitData = useSubplebbit({ subplebbitAddress: address });
const { isOffline, isOnlineStatusLoading, offlineIconClass, offlineTitle } = useIsSubplebbitOffline(subplebbitData);
@@ -33,16 +35,21 @@ const Board = ({ subplebbit, isMobile }: { subplebbit: Subplebbit; isMobile: boo
<p className={styles.boardCell}>{title || displayAddress}</p>
</td>
{!isMobile && (
<td className={styles.boardTags}>
<p className={styles.boardCell}>
{tags.map((tag: string, index: number) => (
<span key={tag}>
<Link to={`/${tag}`}>{tag}</Link>
{index < tags.length - 1 && ', '}
</span>
))}
</p>
</td>
<>
<td className={styles.boardPPH}>
<p className={styles.boardCell}>{stats.hourPostCount ?? '?'}</p>
</td>
<td className={styles.boardTags}>
<p className={styles.boardCell}>
{tags.map((tag: string, index: number) => (
<span key={tag}>
<Link to={`/${tag}`}>{tag}</Link>
{index < tags.length - 1 && ', '}
</span>
))}
</p>
</td>
</>
)}
</tr>
);
@@ -79,6 +86,11 @@ const BoardsList = ({ multisub }: { multisub: Subplebbit[] }) => {
<tr>
<th>{t('board')}</th>
<th>{t('title')}</th>
{!isMobile && (
<th className={styles.boardPPH} title={t('pph')}>
PPH
</th>
)}
{!isMobile && <th>{t('tags')}</th>}
</tr>
</thead>
@@ -89,8 +101,14 @@ const BoardsList = ({ multisub }: { multisub: Subplebbit[] }) => {
</tbody>
</table>
<div className={styles.displayCount}>
displaying {filteredBoards.length} of {totalBoardCount} boards
{currentTag && tags.includes(currentTag) && ` tagged "${currentTag}"`}
{currentTag && tags.includes(currentTag)
? t('displaying_boards_with_tag', {
filteredBoardsCount: filteredBoards.length,
totalBoardCount: totalBoardCount,
currentTag: `"${currentTag}"`,
interpolation: { escapeValue: false },
})
: t('displaying_boards', { filteredBoardsCount: filteredBoards.length, totalBoardCount: totalBoardCount, interpolation: { escapeValue: false } })}
</div>
{hasMoreBoards && (
<div className={styles.loadMoreButton}>
+6
View File
@@ -63,6 +63,7 @@
padding: 4px 15px 5px 5px;
text-align: left;
white-space: nowrap;
text-transform: capitalize;
}
.boardsBox table tbody td {
@@ -99,6 +100,7 @@
font-size: 12px;
text-align: center;
margin-bottom: 10px;
text-transform: lowercase;
}
.loadMoreButton span {
@@ -328,6 +330,10 @@
text-transform: capitalize;
}
.boardPPH {
width: 33px;
}
@media (max-width: 640px) {
.content {
min-width: 0;