update search bar

This commit is contained in:
Tom (plebeius.eth)
2025-02-21 16:26:46 +01:00
parent 6e60360033
commit 03d738468e
38 changed files with 80 additions and 43 deletions
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "إحصائيات العقدة",
"loading_default_boards": "جار تحميل قائمة اللوحات الافتراضية",
"loading_subscriptions": "جارٍ تحميل الاشتراكات",
"create_board": "إنشاء لوحة"
"create_board": "إنشاء لوحة",
"enter_board_address": "أدخل عنوان أي لوحة"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "নোড পরিসংখ্যান",
"loading_default_boards": "ডিফল্ট বোর্ড তালিকা লোড হচ্ছে",
"loading_subscriptions": "সাবস্ক্রিপশন লোড হচ্ছে",
"create_board": "বোর্ড তৈরি করুন"
"create_board": "বোর্ড তৈরি করুন",
"enter_board_address": "যেকোনো বোর্ডের ঠিকানা লিখুন"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statistiky uzlu",
"loading_default_boards": "Načítání seznamu výchozích tabulí",
"loading_subscriptions": "Načítání odběrů",
"create_board": "Vytvořit desku"
"create_board": "Vytvořit desku",
"enter_board_address": "Zadejte adresu libovolné desky"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Node-statistik",
"loading_default_boards": "Indlæser standard tavleliste",
"loading_subscriptions": "Indlæser abonnementer",
"create_board": "Opret tavle"
"create_board": "Opret tavle",
"enter_board_address": "Indtast enhver tavleadresse"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Knotenstatistiken",
"loading_default_boards": "Laden der Standard-Boards-Liste",
"loading_subscriptions": "Lade Abonnements",
"create_board": "Board erstellen"
"create_board": "Board erstellen",
"enter_board_address": "Geben Sie eine beliebige Board-Adresse ein"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Στατιστικά κόμβου",
"loading_default_boards": "Φόρτωση της λίστας προεπιλεγμένων πάνελ",
"loading_subscriptions": "Φορτώνει συνδρομές",
"create_board": "Δημιουργία πίνακα"
"create_board": "Δημιουργία πίνακα",
"enter_board_address": "Εισάγετε οποιαδήποτε διεύθυνση πίνακα"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Node stats",
"loading_default_boards": "Loading default boards list",
"loading_subscriptions": "Loading subscriptions",
"create_board": "Create Board"
"create_board": "Create Board",
"enter_board_address": "Enter any board address"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Estadísticas del nodo",
"loading_default_boards": "Cargando lista de tableros predeterminados",
"loading_subscriptions": "Cargando suscripciones",
"create_board": "Crear tablero"
"create_board": "Crear tablero",
"enter_board_address": "Ingrese cualquier dirección de tablero"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "آمار گره",
"loading_default_boards": "در حال بارگذاری فهرست تخته‌های پیش‌فرض",
"loading_subscriptions": "در حال بارگذاری اشترا‌ک‌ها",
"create_board": "ایجاد تابلو"
"create_board": "ایجاد تابلو",
"enter_board_address": "آدرس هر تابلو را وارد کنید"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Solmun tilastot",
"loading_default_boards": "Ladataan oletuslautalistaa",
"loading_subscriptions": "Ladataan tilauksia",
"create_board": "Luo taulu"
"create_board": "Luo taulu",
"enter_board_address": "Syötä mikä tahansa taulun osoite"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Istatistika ng node",
"loading_default_boards": "Naglo-load ng default na listahan ng mga board",
"loading_subscriptions": "Naglo-load ng mga subscription",
"create_board": "Gumawa ng board"
"create_board": "Gumawa ng board",
"enter_board_address": "Ipasok ang anumang address ng board"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statistiques du nœud",
"loading_default_boards": "Chargement de la liste des panneaux par défaut",
"loading_subscriptions": "Chargement des abonnements",
"create_board": "Créer un tableau"
"create_board": "Créer un tableau",
"enter_board_address": "Entrez n'importe quelle adresse du forum"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "סטטיסטיקות צומת",
"loading_default_boards": "טוען את רשימת הלוחות ברירת המחדל",
"loading_subscriptions": "טוען מנויים",
"create_board": "צור לוח"
"create_board": "צור לוח",
"enter_board_address": "הזן כתובת לוח כלשהי"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "नोड आँकड़े",
"loading_default_boards": "डिफ़ॉल्ट बोर्ड सूची लोड हो रही है",
"loading_subscriptions": "सब्सक्रिप्शन लोड हो रहे हैं",
"create_board": "बोर्ड बनाएं"
"create_board": "बोर्ड बनाएं",
"enter_board_address": "किसी भी बोर्ड का पता दर्ज करें"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Csomópont statisztikák",
"loading_default_boards": "Alapértelmezett táblák listájának betöltése",
"loading_subscriptions": "Előfizetések betöltése",
"create_board": "Hozzon létre táblát"
"create_board": "Hozzon létre táblát",
"enter_board_address": "Adjon meg bármilyen táblázat címet"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statistik node",
"loading_default_boards": "Memuat daftar papan default",
"loading_subscriptions": "Memuat langganan",
"create_board": "Buat papan"
"create_board": "Buat papan",
"enter_board_address": "Masukkan alamat papan apa saja"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statistiche del nodo",
"loading_default_boards": "Caricamento della lista delle board predefinite",
"loading_subscriptions": "Caricamento abbonamenti",
"create_board": "Crea Board"
"create_board": "Crea Board",
"enter_board_address": "Inserisci indirizzo di qualsiasi board"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "ノード統計",
"loading_default_boards": "デフォルトのボードリストを読み込み中",
"loading_subscriptions": "購読を読み込み中",
"create_board": "ボードを作成"
"create_board": "ボードを作成",
"enter_board_address": "任意のボードアドレスを入力してください"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "노드 통계",
"loading_default_boards": "기본 보드 목록을 로드 중",
"loading_subscriptions": "구독 로딩 중",
"create_board": "보드 만들기"
"create_board": "보드 만들기",
"enter_board_address": "어떤 보드 주소든 입력하세요"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "नोड आकडेवारी",
"loading_default_boards": "डीफॉल्ट बोर्ड यादी लोड करत आहे",
"loading_subscriptions": "सदस्यता लोड होत आहे",
"create_board": "बोर्ड तयार करा"
"create_board": "बोर्ड तयार करा",
"enter_board_address": "कोणत्याही बोर्ड पत्त्याची नोंद करा"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Node-statistieken",
"loading_default_boards": "Laden van de standaard boardlijst",
"loading_subscriptions": "Abonnementen laden",
"create_board": "Maak bord"
"create_board": "Maak bord",
"enter_board_address": "Voer een willekeurig bordadres in"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Node-statistikk",
"loading_default_boards": "Laster standard tavleliste",
"loading_subscriptions": "Laster abonnementer",
"create_board": "Lag tavle"
"create_board": "Lag tavle",
"enter_board_address": "Skriv inn hvilken som helst brettadresse"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statystyki węzła",
"loading_default_boards": "Ładowanie domyślnej listy tablic",
"loading_subscriptions": "Ładowanie subskrypcji",
"create_board": "Utwórz tablicę"
"create_board": "Utwórz tablicę",
"enter_board_address": "Wprowadź dowolny adres tablicy"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Estatísticas do nó",
"loading_default_boards": "Carregando lista de quadros padrão",
"loading_subscriptions": "Carregando assinaturas",
"create_board": "Criar quadro"
"create_board": "Criar quadro",
"enter_board_address": "Digite qualquer endereço de quadro"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statistici nod",
"loading_default_boards": "Se încarcă lista de panouri implicite",
"loading_subscriptions": "Încărcarea abonamentelor",
"create_board": "Creați tablou"
"create_board": "Creați tablou",
"enter_board_address": "Introduceți orice adresă de tablă"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Статистика узла",
"loading_default_boards": "Загрузка списка стандартных досок",
"loading_subscriptions": "Загрузка подписок",
"create_board": "Создать доску"
"create_board": "Создать доску",
"enter_board_address": "Введите любой адрес доски"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Statistikat e nyjës",
"loading_default_boards": "Po ngarkohen listat e bordit të parazgjedhur",
"loading_subscriptions": "Po ngarkohen abonimet",
"create_board": "Krijo bord"
"create_board": "Krijo bord",
"enter_board_address": "Shkruani çdo adresë bordi"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Node-statistik",
"loading_default_boards": "Laddar standardlistan för tavlor",
"loading_subscriptions": "Laddar prenumerationer",
"create_board": "Skapa tavla"
"create_board": "Skapa tavla",
"enter_board_address": "Ange vilken som helst brädets adress"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "నోడ్ గణాంకాలు",
"loading_default_boards": "డిఫాల్ట్ బోర్డుల జాబితా లోడవుతోంది",
"loading_subscriptions": "సబ్‌స్క్రిప్షన్‌లు లోడ్ అవుతున్నాయి",
"create_board": "బోర్డ్ రూపొందించండి"
"create_board": "బోర్డ్ రూపొందించండి",
"enter_board_address": "ఏదైనా బోర్డ్ అడ్రస్ నమోదు చేయండి"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "สถิติโหนด",
"loading_default_boards": "กำลังโหลดรายการกระดานเริ่มต้น",
"loading_subscriptions": "กำลังโหลดการสมัครสมาชิก",
"create_board": "สร้างกระดาน"
"create_board": "สร้างกระดาน",
"enter_board_address": "ป้อนที่อยู่บอร์ดใดก็ได้"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Düğüm istatistikleri",
"loading_default_boards": "Varsayılan panolar listesi yükleniyor",
"loading_subscriptions": "Abonelikler yükleniyor",
"create_board": "Tahta oluştur"
"create_board": "Tahta oluştur",
"enter_board_address": "Herhangi bir tahta adresini girin"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Статистика вузла",
"loading_default_boards": "Завантаження списку стандартних дошок",
"loading_subscriptions": "Завантаження підписок",
"create_board": "Створити дошку"
"create_board": "Створити дошку",
"enter_board_address": "Введіть будь-яку адресу дошки"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "نوڈ کے اعدادوشمار",
"loading_default_boards": "ڈिफالٹ بورڈ کی فہرست لوڈ ہو رہی ہے",
"loading_subscriptions": "سبسکرپشن لوڈ ہو رہی ہے",
"create_board": "بورڈ بنائیں"
"create_board": "بورڈ بنائیں",
"enter_board_address": "کسی بھی بورڈ کا پتہ درج کریں"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "Thống kê nút",
"loading_default_boards": "Đang tải danh sách bảng mặc định",
"loading_subscriptions": "Đang tải đăng ký",
"create_board": "Tạo bảng"
"create_board": "Tạo bảng",
"enter_board_address": "Nhập bất kỳ địa chỉ bảng nào"
}
+2 -1
View File
@@ -282,5 +282,6 @@
"node_stats": "节点统计",
"loading_default_boards": "正在加载默认板块列表",
"loading_subscriptions": "加载订阅",
"create_board": "创建板块"
"create_board": "创建板块",
"enter_board_address": "输入任何板块地址"
}
+7 -6
View File
@@ -1,20 +1,21 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { useAccount, useAccountComment } from '@plebbit/plebbit-react-hooks';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import Plebbit from '@plebbit/plebbit-js/dist/browser/index.js';
import { useAccount, useAccountComment } from '@plebbit/plebbit-react-hooks';
import { isAllView, isCatalogView, isSubscriptionsView } from '../../lib/utils/view-utils';
import styles from './topbar.module.css';
import { useDefaultSubplebbitAddresses } from '../../hooks/use-default-subplebbits';
import _, { debounce } from 'lodash';
import { TimeFilter } from '../board-buttons';
import { useAutoSubscribe } from '../../hooks/use-auto-subscribe';
import { TimeFilter } from '../board-buttons';
import styles from './topbar.module.css';
import _, { debounce } from 'lodash';
const SearchBar = ({ setShowSearchBar }: { setShowSearchBar: (show: boolean) => void }) => {
const { t } = useTranslation();
const navigate = useNavigate();
const searchBarRef = useRef<HTMLDivElement>(null);
const searchInputRef = useRef<HTMLInputElement>(null);
const placeholder = `"community.eth/.sol" / "12D3KooW..."`;
const placeholder = _.lowerCase(t('enter_board_address'));
useEffect(() => {
searchInputRef.current?.focus();
+1 -1
View File
@@ -28,9 +28,9 @@ const Board = ({ subplebbit, isMobile }: { subplebbit: Subplebbit; isMobile: boo
<tr className={styles.subplebbit} key={address}>
<td className={styles.boardAddress}>
<p className={styles.boardCell}>
{showOfflineIcon && <span className={`${styles.offlineIcon} ${offlineIconClass}`} title={offlineTitle} />}
<Link to={`/p/${address}`}>{displayAddress}</Link>
{nsfwTag && <span className={styles.nsfw}> ({t(nsfwTag)})</span>}
{showOfflineIcon && <span className={`${styles.offlineIcon} ${offlineIconClass}`} title={offlineTitle} />}
</p>
</td>
<td className={styles.boardTitle}>
+2 -1
View File
@@ -9,6 +9,7 @@ import useSubplebbitsStats from '../../hooks/use-subplebbits-stats';
import PopularThreadsBox from './popular-threads-box';
import BoardsList from './boards-list';
import Version from '../../components/version';
import _ from 'lodash';
// https://github.com/plebbit/temporary-default-subplebbits/blob/master/README.md
// plebchan shouldn't consider 'vulgar' or 'anti' as nsfw tags, unlike more sfw-oriented clients
@@ -35,7 +36,7 @@ const SearchBar = () => {
spellCheck='false'
autoCapitalize='off'
type='text'
placeholder={`"board.eth/.sol" ${t('or')} "12D3KooW..."`}
placeholder={_.lowerCase(t('enter_board_address'))}
ref={searchInputRef}
/>
<button className={styles.searchButton}>{t('go')}</button>