diff --git a/web-nodejs/lang/ar.json b/web-nodejs/lang/ar.json index 4b5ee309..e4eaa663 100644 --- a/web-nodejs/lang/ar.json +++ b/web-nodejs/lang/ar.json @@ -102,7 +102,9 @@ "group_rules": "القواعد والسياسات", "group_server": "الخادم", "group_billing": "الفوترة", - "group_developer": "المطور" + "group_developer": "المطور", + "more": "المزيد", + "fewer": "أقل" }, "auth": { "login": "Login", @@ -773,7 +775,8 @@ "branding_rdclient": "عميل RdClient", "connection_p2p_hint": "محاولة P2P أولاً؛ التحويل إلى relay عند الفشل.", "connection_relay_hint": "توجيه كل حركة العملاء عبر خادم relay.", - "auth_sub_client_sessions": "عملاء RustDesk" + "auth_sub_client_sessions": "عملاء RustDesk", + "search_topic": "{topic} موضوع منفصل" }, "confirm": { "connection_mode_title": "حفظ استراتيجية الاتصال؟", @@ -4829,5 +4832,17 @@ "switched_to_ux36": "تم تفعيل UX 3.6 التجريبية لهذا المتصفح.", "switched_to_ux35": "تمت استعادة UX 3.5 لهذا المتصفح.", "default_hint": "التخطيط الافتراضي. مستقر وبكامل الميزات." + }, + "search": { + "title": "بحث", + "placeholder": "ابحث في الصفحات والأجهزة والأشخاص", + "results": "النتائج", + "group_pages": "الصفحات", + "group_devices": "الأجهزة", + "group_people": "الأشخاص", + "hint": "اكتب صفحة أو معرّف جهاز أو اسمًا أو شخصًا.", + "no_results": "لا يوجد شيء. جرّب كلمات أقل أو مختلفة.", + "count": "{count} نتيجة", + "keys": "الأسهم للتنقل، Enter للفتح، Esc للإغلاق." } } diff --git a/web-nodejs/lang/cs.json b/web-nodejs/lang/cs.json index 0fc29ff7..0da1139e 100644 --- a/web-nodejs/lang/cs.json +++ b/web-nodejs/lang/cs.json @@ -95,7 +95,9 @@ "group_rules": "Pravidla a zásady", "group_server": "Server", "group_billing": "Fakturace", - "group_developer": "Vývojář" + "group_developer": "Vývojář", + "more": "Další", + "fewer": "Méně" }, "auth": { "login": "Přihlášení", @@ -766,7 +768,8 @@ "branding_rdclient": "Klient RdClient", "connection_p2p_hint": "Nejprve P2P; při selhání přepnutí na relay.", "connection_relay_hint": "Veškerý provoz klientů přes relay server.", - "auth_sub_client_sessions": "Klienti RustDesk" + "auth_sub_client_sessions": "Klienti RustDesk", + "search_topic": "{topic} je samostatné téma" }, "confirm": { "connection_mode_title": "Uložit strategii připojení?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "UX 3.6 beta je pro tento prohlížeč zapnuto.", "switched_to_ux35": "UX 3.5 bylo pro tento prohlížeč obnoveno.", "default_hint": "Výchozí rozvržení. Stabilní a plně vybavené." + }, + "search": { + "title": "Hledat", + "placeholder": "Hledat stránky, zařízení a osoby", + "results": "Výsledky", + "group_pages": "Stránky", + "group_devices": "Zařízení", + "group_people": "Osoby", + "hint": "Napište stránku, ID nebo název zařízení, případně osobu.", + "no_results": "Nic nenalezeno. Zkuste méně nebo jiná slova.", + "count": "{count} výsledků", + "keys": "Šipky pro pohyb, Enter otevře, Esc zavře." } } diff --git a/web-nodejs/lang/da.json b/web-nodejs/lang/da.json index 9acd90fb..c6d3274b 100644 --- a/web-nodejs/lang/da.json +++ b/web-nodejs/lang/da.json @@ -101,7 +101,9 @@ "group_rules": "Regler og politikker", "group_server": "Server", "group_billing": "Fakturering", - "group_developer": "Udvikler" + "group_developer": "Udvikler", + "more": "Mere", + "fewer": "Færre" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk-klienter" + "auth_sub_client_sessions": "RustDesk-klienter", + "search_topic": "{topic} er et separat emne" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta er aktiveret for denne browser.", "switched_to_ux35": "UX 3.5 er gendannet for denne browser.", "default_hint": "Standardlayout. Stabil og fuldt funktionsdygtigt." + }, + "search": { + "title": "Søg", + "placeholder": "Søg sider, enheder og personer", + "results": "Resultater", + "group_pages": "Sider", + "group_devices": "Enheder", + "group_people": "Personer", + "hint": "Skriv en side, et enheds-ID eller -navn, eller en person.", + "no_results": "Intet fundet. Prøv færre eller andre ord.", + "count": "{count} resultater", + "keys": "Piletaster flytter, Enter åbner, Esc lukker." } } diff --git a/web-nodejs/lang/de.json b/web-nodejs/lang/de.json index 9f0e206e..ddb8e7d0 100644 --- a/web-nodejs/lang/de.json +++ b/web-nodejs/lang/de.json @@ -95,7 +95,9 @@ "group_rules": "Regeln & Richtlinien", "group_server": "Server", "group_billing": "Abrechnung", - "group_developer": "Entwickler" + "group_developer": "Entwickler", + "more": "Mehr", + "fewer": "Weniger" }, "auth": { "login": "Anmelden", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Zuerst direkte P2P-Verbindung; Relay bei P2P-Fehler.", "connection_relay_hint": "Gesamten Client-Traffic über den Relay-Server leiten.", - "auth_sub_client_sessions": "RustDesk-Clients" + "auth_sub_client_sessions": "RustDesk-Clients", + "search_topic": "{topic} ist ein eigenes Thema" }, "confirm": { "connection_mode_title": "Verbindungsstrategie speichern?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "UX 3.6 Beta ist für diesen Browser aktiviert.", "switched_to_ux35": "UX 3.5 wurde für diesen Browser wiederhergestellt.", "default_hint": "Standardlayout. Stabil, voller Funktionsumfang." + }, + "search": { + "title": "Suchen", + "placeholder": "Seiten, Geräte und Personen durchsuchen", + "results": "Ergebnisse", + "group_pages": "Seiten", + "group_devices": "Geräte", + "group_people": "Personen", + "hint": "Seite, Geräte-ID oder -Name oder eine Person eingeben.", + "no_results": "Nichts gefunden. Weniger oder andere Wörter versuchen.", + "count": "{count} Ergebnisse", + "keys": "Pfeiltasten bewegen, Enter öffnet, Esc schließt." } } diff --git a/web-nodejs/lang/en.json b/web-nodejs/lang/en.json index 639d1f09..b51effee 100644 --- a/web-nodejs/lang/en.json +++ b/web-nodejs/lang/en.json @@ -95,7 +95,9 @@ "group_rules": "Rules & policies", "group_server": "Server", "group_billing": "Billing", - "group_developer": "Developer" + "group_developer": "Developer", + "more": "More", + "fewer": "Fewer" }, "mobile_nav": { "label": "Main navigation", @@ -815,7 +817,8 @@ "auth_sub_oidc": "OIDC / SSO", "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", - "connection_relay_hint": "Route all client traffic through the relay server." + "connection_relay_hint": "Route all client traffic through the relay server.", + "search_topic": "{topic} is a separate topic" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4880,5 +4883,17 @@ "switched_to_ux36": "UX 3.6 beta enabled for this browser.", "switched_to_ux35": "UX 3.5 restored for this browser.", "default_hint": "Default layout. Stable, fully featured." + }, + "search": { + "title": "Search", + "placeholder": "Search pages, devices and people", + "results": "Results", + "group_pages": "Pages", + "group_devices": "Devices", + "group_people": "People", + "hint": "Type a page, a device ID or name, or a person.", + "no_results": "Nothing found. Try fewer or other words.", + "count": "{count} results", + "keys": "Arrow keys to move, Enter to open, Esc to close." } } diff --git a/web-nodejs/lang/es.json b/web-nodejs/lang/es.json index 02ee9944..822307c2 100644 --- a/web-nodejs/lang/es.json +++ b/web-nodejs/lang/es.json @@ -95,7 +95,9 @@ "group_rules": "Reglas y políticas", "group_server": "Servidor", "group_billing": "Facturación", - "group_developer": "Desarrollador" + "group_developer": "Desarrollador", + "more": "Más", + "fewer": "Menos" }, "auth": { "login": "Iniciar sesión", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Clientes RustDesk" + "auth_sub_client_sessions": "Clientes RustDesk", + "search_topic": "{topic} es un tema aparte" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "UX 3.6 beta activada para este navegador.", "switched_to_ux35": "UX 3.5 restaurada para este navegador.", "default_hint": "Diseño predeterminado. Estable y con todas las funciones." + }, + "search": { + "title": "Buscar", + "placeholder": "Buscar páginas, dispositivos y personas", + "results": "Resultados", + "group_pages": "Páginas", + "group_devices": "Dispositivos", + "group_people": "Personas", + "hint": "Escribe una página, un ID o nombre de dispositivo, o una persona.", + "no_results": "No se encontró nada. Prueba con menos palabras o con otras.", + "count": "{count} resultados", + "keys": "Flechas para moverse, Enter para abrir, Esc para cerrar." } } diff --git a/web-nodejs/lang/fi.json b/web-nodejs/lang/fi.json index 8cd6c726..96c5ed62 100644 --- a/web-nodejs/lang/fi.json +++ b/web-nodejs/lang/fi.json @@ -101,7 +101,9 @@ "group_rules": "Säännöt ja käytännöt", "group_server": "Palvelin", "group_billing": "Laskutus", - "group_developer": "Kehittäjä" + "group_developer": "Kehittäjä", + "more": "Lisää", + "fewer": "Vähemmän" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk-asiakkaat" + "auth_sub_client_sessions": "RustDesk-asiakkaat", + "search_topic": "{topic} on oma osio" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta on otettu käyttöön tässä selaimessa.", "switched_to_ux35": "UX 3.5 on palautettu tähän selaimeen.", "default_hint": "Oletusasettelu. vakaa ja täysin varustettu." + }, + "search": { + "title": "Haku", + "placeholder": "Hae sivuja, laitteita ja henkilöitä", + "results": "Tulokset", + "group_pages": "Sivut", + "group_devices": "Laitteet", + "group_people": "Henkilöt", + "hint": "Kirjoita sivu, laitteen tunnus tai nimi, tai henkilö.", + "no_results": "Ei tuloksia. Kokeile vähempiä tai muita sanoja.", + "count": "{count} tulosta", + "keys": "Nuolinäppäimet liikkuvat, Enter avaa, Esc sulkee." } } diff --git a/web-nodejs/lang/fr.json b/web-nodejs/lang/fr.json index 0e59f786..91b90788 100644 --- a/web-nodejs/lang/fr.json +++ b/web-nodejs/lang/fr.json @@ -99,7 +99,9 @@ "group_rules": "Règles et politiques", "group_server": "Serveur", "group_billing": "Facturation", - "group_developer": "Développeur" + "group_developer": "Développeur", + "more": "Plus", + "fewer": "Moins" }, "auth": { "login": "Connexion", @@ -770,7 +772,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Connexion P2P directe en priorité ; relais si P2P échoue.", "connection_relay_hint": "Tout le trafic client via le serveur relais.", - "auth_sub_client_sessions": "Clients RustDesk" + "auth_sub_client_sessions": "Clients RustDesk", + "search_topic": "{topic} est un thème séparé" }, "confirm": { "connection_mode_title": "Enregistrer la stratégie de connexion ?", @@ -4826,5 +4829,17 @@ "switched_to_ux36": "UX 3.6 bêta activée pour ce navigateur.", "switched_to_ux35": "UX 3.5 restaurée pour ce navigateur.", "default_hint": "Disposition par défaut. Stable et complète." + }, + "search": { + "title": "Rechercher", + "placeholder": "Rechercher des pages, appareils et personnes", + "results": "Résultats", + "group_pages": "Pages", + "group_devices": "Appareils", + "group_people": "Personnes", + "hint": "Saisissez une page, un ID ou nom d’appareil, ou une personne.", + "no_results": "Aucun résultat. Essayez moins de mots ou d’autres mots.", + "count": "{count} résultats", + "keys": "Flèches pour se déplacer, Entrée pour ouvrir, Échap pour fermer." } } diff --git a/web-nodejs/lang/hi.json b/web-nodejs/lang/hi.json index ecd5238c..7db9e176 100644 --- a/web-nodejs/lang/hi.json +++ b/web-nodejs/lang/hi.json @@ -101,7 +101,9 @@ "group_rules": "नियम और नीतियाँ", "group_server": "सर्वर", "group_billing": "बिलिंग", - "group_developer": "डेवलपर" + "group_developer": "डेवलपर", + "more": "अधिक", + "fewer": "कम" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk क्लाइंट" + "auth_sub_client_sessions": "RustDesk क्लाइंट", + "search_topic": "{topic} एक अलग विषय है" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "इस ब्राउज़र के लिए UX 3.6 बीटा सक्षम किया गया।", "switched_to_ux35": "इस ब्राउज़र के लिए UX 3.5 बहाल किया गया।", "default_hint": "डिफ़ॉल्ट लेआउट। स्थिर और सभी सुविधाओं सहित।" + }, + "search": { + "title": "खोजें", + "placeholder": "पेज, डिवाइस और लोग खोजें", + "results": "परिणाम", + "group_pages": "पेज", + "group_devices": "डिवाइस", + "group_people": "लोग", + "hint": "कोई पेज, डिवाइस आईडी या नाम, या कोई व्यक्ति लिखें।", + "no_results": "कुछ नहीं मिला। कम या दूसरे शब्द आज़माएँ।", + "count": "{count} परिणाम", + "keys": "एरो कुंजियाँ चलने के लिए, Enter खोलने के लिए, Esc बंद करने के लिए।" } } diff --git a/web-nodejs/lang/hu.json b/web-nodejs/lang/hu.json index 493e490a..3f6c795f 100644 --- a/web-nodejs/lang/hu.json +++ b/web-nodejs/lang/hu.json @@ -101,7 +101,9 @@ "group_rules": "Szabályok és irányelvek", "group_server": "Szerver", "group_billing": "Számlázás", - "group_developer": "Fejlesztő" + "group_developer": "Fejlesztő", + "more": "Több", + "fewer": "Kevesebb" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk kliensek" + "auth_sub_client_sessions": "RustDesk kliensek", + "search_topic": "{topic} külön témakör" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "Az UX 3.6 béta engedélyezve ehhez a böngészőhöz.", "switched_to_ux35": "Az UX 3.5 visszaállítva ehhez a böngészőhöz.", "default_hint": "Alapértelmezett elrendezés. Stabil, teljes funkciókészlet." + }, + "search": { + "title": "Keresés", + "placeholder": "Oldalak, eszközök és személyek keresése", + "results": "Találatok", + "group_pages": "Oldalak", + "group_devices": "Eszközök", + "group_people": "Személyek", + "hint": "Írjon be egy oldalt, eszköz-azonosítót vagy nevet, vagy egy személyt.", + "no_results": "Nincs találat. Próbáljon kevesebb vagy más szót.", + "count": "{count} találat", + "keys": "Nyilak a mozgáshoz, Enter a megnyitáshoz, Esc a bezáráshoz." } } diff --git a/web-nodejs/lang/id.json b/web-nodejs/lang/id.json index a5742360..90593efa 100644 --- a/web-nodejs/lang/id.json +++ b/web-nodejs/lang/id.json @@ -101,7 +101,9 @@ "group_rules": "Aturan & kebijakan", "group_server": "Server", "group_billing": "Penagihan", - "group_developer": "Pengembang" + "group_developer": "Pengembang", + "more": "Lainnya", + "fewer": "Lebih sedikit" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Klien RustDesk" + "auth_sub_client_sessions": "Klien RustDesk", + "search_topic": "{topic} adalah topik terpisah" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta diaktifkan untuk peramban ini.", "switched_to_ux35": "UX 3.5 dipulihkan untuk peramban ini.", "default_hint": "Tata letak default. Stabil dan lengkap." + }, + "search": { + "title": "Cari", + "placeholder": "Cari halaman, perangkat, dan orang", + "results": "Hasil", + "group_pages": "Halaman", + "group_devices": "Perangkat", + "group_people": "Orang", + "hint": "Ketik halaman, ID atau nama perangkat, atau orang.", + "no_results": "Tidak ada hasil. Coba kata yang lebih sedikit atau berbeda.", + "count": "{count} hasil", + "keys": "Tombol panah untuk bergerak, Enter untuk membuka, Esc untuk menutup." } } diff --git a/web-nodejs/lang/it.json b/web-nodejs/lang/it.json index babb2fc7..48a25b7d 100644 --- a/web-nodejs/lang/it.json +++ b/web-nodejs/lang/it.json @@ -95,7 +95,9 @@ "group_rules": "Regole e criteri", "group_server": "Server", "group_billing": "Fatturazione", - "group_developer": "Sviluppatore" + "group_developer": "Sviluppatore", + "more": "Altro", + "fewer": "Meno" }, "auth": { "login": "Accedi", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Client RustDesk" + "auth_sub_client_sessions": "Client RustDesk", + "search_topic": "{topic} è una sezione separata" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "UX 3.6 beta attivata per questo browser.", "switched_to_ux35": "UX 3.5 ripristinata per questo browser.", "default_hint": "Layout predefinito. Stabile e completo." + }, + "search": { + "title": "Cerca", + "placeholder": "Cerca pagine, dispositivi e persone", + "results": "Risultati", + "group_pages": "Pagine", + "group_devices": "Dispositivi", + "group_people": "Persone", + "hint": "Digita una pagina, un ID o nome dispositivo, o una persona.", + "no_results": "Nessun risultato. Prova meno parole o parole diverse.", + "count": "{count} risultati", + "keys": "Frecce per spostarsi, Invio per aprire, Esc per chiudere." } } diff --git a/web-nodejs/lang/ja.json b/web-nodejs/lang/ja.json index b4b967b2..4e577a60 100644 --- a/web-nodejs/lang/ja.json +++ b/web-nodejs/lang/ja.json @@ -95,7 +95,9 @@ "group_rules": "ルールとポリシー", "group_server": "サーバー", "group_billing": "請求", - "group_developer": "開発者" + "group_developer": "開発者", + "more": "その他", + "fewer": "折りたたむ" }, "auth": { "login": "Login", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk クライアント" + "auth_sub_client_sessions": "RustDesk クライアント", + "search_topic": "{topic} は別の項目です" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "このブラウザーで UX 3.6 ベータを有効にしました。", "switched_to_ux35": "このブラウザーで UX 3.5 に戻しました。", "default_hint": "既定のレイアウト。安定しており全機能を利用できます。" + }, + "search": { + "title": "検索", + "placeholder": "ページ、デバイス、ユーザーを検索", + "results": "結果", + "group_pages": "ページ", + "group_devices": "デバイス", + "group_people": "ユーザー", + "hint": "ページ名、デバイス ID または名前、ユーザーを入力してください。", + "no_results": "見つかりませんでした。語を減らすか別の語をお試しください。", + "count": "{count} 件", + "keys": "矢印キーで移動、Enter で開く、Esc で閉じる。" } } diff --git a/web-nodejs/lang/ko.json b/web-nodejs/lang/ko.json index 466f62bf..b5be3ce6 100644 --- a/web-nodejs/lang/ko.json +++ b/web-nodejs/lang/ko.json @@ -95,7 +95,9 @@ "group_rules": "규칙 및 정책", "group_server": "서버", "group_billing": "청구", - "group_developer": "개발자" + "group_developer": "개발자", + "more": "더보기", + "fewer": "접기" }, "auth": { "login": "Login", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk 클라이언트" + "auth_sub_client_sessions": "RustDesk 클라이언트", + "search_topic": "{topic}은(는) 별도 항목입니다" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "이 브라우저에서 UX 3.6 베타를 사용 설정했습니다.", "switched_to_ux35": "이 브라우저에서 UX 3.5를 복원했습니다.", "default_hint": "기본 레이아웃입니다. 안정적이며 모든 기능을 제공합니다." + }, + "search": { + "title": "검색", + "placeholder": "페이지, 장치, 사용자 검색", + "results": "결과", + "group_pages": "페이지", + "group_devices": "장치", + "group_people": "사용자", + "hint": "페이지, 장치 ID 또는 이름, 사용자를 입력하세요.", + "no_results": "결과가 없습니다. 단어를 줄이거나 다르게 입력해 보세요.", + "count": "{count}개 결과", + "keys": "화살표 키로 이동, Enter로 열기, Esc로 닫기." } } diff --git a/web-nodejs/lang/nb.json b/web-nodejs/lang/nb.json index 3dc2cb81..cae906dc 100644 --- a/web-nodejs/lang/nb.json +++ b/web-nodejs/lang/nb.json @@ -101,7 +101,9 @@ "group_rules": "Regler og retningslinjer", "group_server": "Server", "group_billing": "Fakturering", - "group_developer": "Utvikler" + "group_developer": "Utvikler", + "more": "Mer", + "fewer": "Færre" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk-klienter" + "auth_sub_client_sessions": "RustDesk-klienter", + "search_topic": "{topic} er et eget emne" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta er aktivert for denne nettleseren.", "switched_to_ux35": "UX 3.5 er gjenopprettet for denne nettleseren.", "default_hint": "Standardlayout. Stabilt og fullt funksjonssett." + }, + "search": { + "title": "Søk", + "placeholder": "Søk i sider, enheter og personer", + "results": "Resultater", + "group_pages": "Sider", + "group_devices": "Enheter", + "group_people": "Personer", + "hint": "Skriv en side, en enhets-ID eller -navn, eller en person.", + "no_results": "Ingen treff. Prøv færre eller andre ord.", + "count": "{count} treff", + "keys": "Piltaster flytter, Enter åpner, Esc lukker." } } diff --git a/web-nodejs/lang/nl.json b/web-nodejs/lang/nl.json index 05f39f24..af960afa 100644 --- a/web-nodejs/lang/nl.json +++ b/web-nodejs/lang/nl.json @@ -95,7 +95,9 @@ "group_rules": "Regels en beleid", "group_server": "Server", "group_billing": "Facturering", - "group_developer": "Ontwikkelaar" + "group_developer": "Ontwikkelaar", + "more": "Meer", + "fewer": "Minder" }, "auth": { "login": "Inloggen", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk-clients" + "auth_sub_client_sessions": "RustDesk-clients", + "search_topic": "{topic} is een apart onderwerp" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "UX 3.6 bèta is ingeschakeld voor deze browser.", "switched_to_ux35": "UX 3.5 is hersteld voor deze browser.", "default_hint": "Standaardlay-out. Stabiel en volledig." + }, + "search": { + "title": "Zoeken", + "placeholder": "Zoek pagina’s, apparaten en personen", + "results": "Resultaten", + "group_pages": "Pagina’s", + "group_devices": "Apparaten", + "group_people": "Personen", + "hint": "Typ een pagina, een apparaat-ID of -naam, of een persoon.", + "no_results": "Niets gevonden. Probeer minder of andere woorden.", + "count": "{count} resultaten", + "keys": "Pijltjestoetsen om te bewegen, Enter om te openen, Esc om te sluiten." } } diff --git a/web-nodejs/lang/pl.json b/web-nodejs/lang/pl.json index e8345613..abd1e179 100644 --- a/web-nodejs/lang/pl.json +++ b/web-nodejs/lang/pl.json @@ -95,7 +95,9 @@ "group_rules": "Reguły i zasady", "group_server": "Serwer", "group_billing": "Rozliczenia", - "group_developer": "Programista" + "group_developer": "Programista", + "more": "Więcej", + "fewer": "Mniej" }, "auth": { "login": "Zaloguj", @@ -766,7 +768,8 @@ "branding_rdclient": "Klient RdClient", "connection_p2p_hint": "Najpierw połączenie P2P; przełączenie na relay, gdy P2P nie działa.", "connection_relay_hint": "Cały ruch klientów przez serwer relay.", - "auth_sub_client_sessions": "Klienci RustDesk" + "auth_sub_client_sessions": "Klienci RustDesk", + "search_topic": "{topic} to osobna zakładka" }, "confirm": { "connection_mode_title": "Zapisać strategię połączenia?", @@ -4880,5 +4883,17 @@ "switched_to_ux36": "Włączono UX 3.6 beta dla tej przeglądarki.", "switched_to_ux35": "Przywrócono UX 3.5 dla tej przeglądarki.", "default_hint": "Układ domyślny. Stabilny, pełny zestaw funkcji." + }, + "search": { + "title": "Szukaj", + "placeholder": "Szukaj stron, urządzeń i osób", + "results": "Wyniki", + "group_pages": "Strony", + "group_devices": "Urządzenia", + "group_people": "Osoby", + "hint": "Wpisz stronę, identyfikator lub nazwę urządzenia albo osobę.", + "no_results": "Nic nie znaleziono. Spróbuj mniej lub innych słów.", + "count": "Wyniki: {count}", + "keys": "Strzałki — ruch, Enter — otwórz, Esc — zamknij." } } diff --git a/web-nodejs/lang/pt.json b/web-nodejs/lang/pt.json index 383590d8..ac446df1 100644 --- a/web-nodejs/lang/pt.json +++ b/web-nodejs/lang/pt.json @@ -95,7 +95,9 @@ "group_rules": "Regras e políticas", "group_server": "Servidor", "group_billing": "Faturação", - "group_developer": "Programador" + "group_developer": "Programador", + "more": "Mais", + "fewer": "Menos" }, "auth": { "login": "Entrar", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Clientes RustDesk" + "auth_sub_client_sessions": "Clientes RustDesk", + "search_topic": "{topic} é um tópico separado" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "UX 3.6 beta ativado para este navegador.", "switched_to_ux35": "UX 3.5 restaurado para este navegador.", "default_hint": "Layout predefinido. Estável e completo." + }, + "search": { + "title": "Pesquisar", + "placeholder": "Pesquisar páginas, dispositivos e pessoas", + "results": "Resultados", + "group_pages": "Páginas", + "group_devices": "Dispositivos", + "group_people": "Pessoas", + "hint": "Escreva uma página, um ID ou nome de dispositivo, ou uma pessoa.", + "no_results": "Nada encontrado. Tente menos palavras ou outras palavras.", + "count": "{count} resultados", + "keys": "Setas para mover, Enter para abrir, Esc para fechar." } } diff --git a/web-nodejs/lang/ro.json b/web-nodejs/lang/ro.json index b0b1095e..6bcc5838 100644 --- a/web-nodejs/lang/ro.json +++ b/web-nodejs/lang/ro.json @@ -101,7 +101,9 @@ "group_rules": "Reguli și politici", "group_server": "Server", "group_billing": "Facturare", - "group_developer": "Dezvoltator" + "group_developer": "Dezvoltator", + "more": "Mai multe", + "fewer": "Mai puține" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Clienți RustDesk" + "auth_sub_client_sessions": "Clienți RustDesk", + "search_topic": "{topic} este o secțiune separată" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta a fost activat pentru acest browser.", "switched_to_ux35": "UX 3.5 a fost restaurat pentru acest browser.", "default_hint": "Aspect implicit. Stabil și complet funcțional." + }, + "search": { + "title": "Căutare", + "placeholder": "Caută pagini, dispozitive și persoane", + "results": "Rezultate", + "group_pages": "Pagini", + "group_devices": "Dispozitive", + "group_people": "Persoane", + "hint": "Scrie o pagină, un ID sau nume de dispozitiv, sau o persoană.", + "no_results": "Nimic găsit. Încearcă mai puține sau alte cuvinte.", + "count": "{count} rezultate", + "keys": "Săgeți pentru deplasare, Enter pentru deschidere, Esc pentru închidere." } } diff --git a/web-nodejs/lang/sv.json b/web-nodejs/lang/sv.json index 6998ad74..c5b4cce4 100644 --- a/web-nodejs/lang/sv.json +++ b/web-nodejs/lang/sv.json @@ -101,7 +101,9 @@ "group_rules": "Regler och policyer", "group_server": "Server", "group_billing": "Fakturering", - "group_developer": "Utvecklare" + "group_developer": "Utvecklare", + "more": "Mer", + "fewer": "Färre" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk-klienter" + "auth_sub_client_sessions": "RustDesk-klienter", + "search_topic": "{topic} är ett eget avsnitt" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta har aktiverats för den här webbläsaren.", "switched_to_ux35": "UX 3.5 har återställts för den här webbläsaren.", "default_hint": "Standardlayout. Stabil och fullt utrustad." + }, + "search": { + "title": "Sök", + "placeholder": "Sök sidor, enheter och personer", + "results": "Resultat", + "group_pages": "Sidor", + "group_devices": "Enheter", + "group_people": "Personer", + "hint": "Skriv en sida, ett enhets-ID eller -namn, eller en person.", + "no_results": "Inget hittades. Prova färre eller andra ord.", + "count": "{count} träffar", + "keys": "Piltangenter flyttar, Enter öppnar, Esc stänger." } } diff --git a/web-nodejs/lang/th.json b/web-nodejs/lang/th.json index 976c1dcf..5e096c26 100644 --- a/web-nodejs/lang/th.json +++ b/web-nodejs/lang/th.json @@ -101,7 +101,9 @@ "group_rules": "กฎและนโยบาย", "group_server": "เซิร์ฟเวอร์", "group_billing": "การเรียกเก็บเงิน", - "group_developer": "นักพัฒนา" + "group_developer": "นักพัฒนา", + "more": "เพิ่มเติม", + "fewer": "ย่อ" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "ไคลเอนต์ RustDesk" + "auth_sub_client_sessions": "ไคลเอนต์ RustDesk", + "search_topic": "{topic} เป็นหัวข้อแยก" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "เปิดใช้งาน UX 3.6 เบต้าสำหรับเบราว์เซอร์นี้แล้ว", "switched_to_ux35": "คืนค่า UX 3.5 สำหรับเบราว์เซอร์นี้แล้ว", "default_hint": "เลย์เอาต์เริ่มต้น เสถียรและครบทุกฟีเจอร์" + }, + "search": { + "title": "ค้นหา", + "placeholder": "ค้นหาหน้า อุปกรณ์ และบุคคล", + "results": "ผลลัพธ์", + "group_pages": "หน้า", + "group_devices": "อุปกรณ์", + "group_people": "บุคคล", + "hint": "พิมพ์หน้า รหัสหรือชื่ออุปกรณ์ หรือบุคคล", + "no_results": "ไม่พบผลลัพธ์ ลองใช้คำน้อยลงหรือคำอื่น", + "count": "{count} รายการ", + "keys": "ลูกศรเพื่อเลื่อน Enter เพื่อเปิด Esc เพื่อปิด" } } diff --git a/web-nodejs/lang/tr.json b/web-nodejs/lang/tr.json index bfaac064..d0cad43e 100644 --- a/web-nodejs/lang/tr.json +++ b/web-nodejs/lang/tr.json @@ -101,7 +101,9 @@ "group_rules": "Kurallar ve ilkeler", "group_server": "Sunucu", "group_billing": "Faturalama", - "group_developer": "Geliştirici" + "group_developer": "Geliştirici", + "more": "Daha fazla", + "fewer": "Daha az" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk istemcileri" + "auth_sub_client_sessions": "RustDesk istemcileri", + "search_topic": "{topic} ayrı bir bölüm" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "Bu tarayıcı için UX 3.6 beta etkinleştirildi.", "switched_to_ux35": "Bu tarayıcı için UX 3.5 geri yüklendi.", "default_hint": "Varsayılan düzen. Kararlı ve tüm özelliklerle." + }, + "search": { + "title": "Ara", + "placeholder": "Sayfa, cihaz ve kişi ara", + "results": "Sonuçlar", + "group_pages": "Sayfalar", + "group_devices": "Cihazlar", + "group_people": "Kişiler", + "hint": "Bir sayfa, cihaz kimliği veya adı, ya da bir kişi yazın.", + "no_results": "Hiçbir şey bulunamadı. Daha az veya başka sözcükler deneyin.", + "count": "{count} sonuç", + "keys": "Ok tuşları gezinir, Enter açar, Esc kapatır." } } diff --git a/web-nodejs/lang/uk.json b/web-nodejs/lang/uk.json index b5e8755f..c9039910 100644 --- a/web-nodejs/lang/uk.json +++ b/web-nodejs/lang/uk.json @@ -101,7 +101,9 @@ "group_rules": "Правила та політики", "group_server": "Сервер", "group_billing": "Білінг", - "group_developer": "Розробник" + "group_developer": "Розробник", + "more": "Більше", + "fewer": "Менше" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Клієнти RustDesk" + "auth_sub_client_sessions": "Клієнти RustDesk", + "search_topic": "{topic} — окрема вкладка" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "UX 3.6 beta увімкнено для цього браузера.", "switched_to_ux35": "UX 3.5 відновлено для цього браузера.", "default_hint": "Типовий макет. Стабільний, з повним набором функцій." + }, + "search": { + "title": "Пошук", + "placeholder": "Пошук сторінок, пристроїв і людей", + "results": "Результати", + "group_pages": "Сторінки", + "group_devices": "Пристрої", + "group_people": "Люди", + "hint": "Введіть сторінку, ідентифікатор чи назву пристрою або людину.", + "no_results": "Нічого не знайдено. Спробуйте менше або інші слова.", + "count": "Результатів: {count}", + "keys": "Стрілки — рух, Enter — відкрити, Esc — закрити." } } diff --git a/web-nodejs/lang/vi.json b/web-nodejs/lang/vi.json index acc95967..8061a924 100644 --- a/web-nodejs/lang/vi.json +++ b/web-nodejs/lang/vi.json @@ -101,7 +101,9 @@ "group_rules": "Quy tắc và chính sách", "group_server": "Máy chủ", "group_billing": "Thanh toán", - "group_developer": "Nhà phát triển" + "group_developer": "Nhà phát triển", + "more": "Thêm", + "fewer": "Bớt" }, "auth": { "login": "Login", @@ -772,7 +774,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "Client RustDesk" + "auth_sub_client_sessions": "Client RustDesk", + "search_topic": "{topic} là một mục riêng" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4828,5 +4831,17 @@ "switched_to_ux36": "Đã bật UX 3.6 beta cho trình duyệt này.", "switched_to_ux35": "Đã khôi phục UX 3.5 cho trình duyệt này.", "default_hint": "Bố cục mặc định. Ổn định và đầy đủ tính năng." + }, + "search": { + "title": "Tìm kiếm", + "placeholder": "Tìm trang, thiết bị và người", + "results": "Kết quả", + "group_pages": "Trang", + "group_devices": "Thiết bị", + "group_people": "Người", + "hint": "Nhập trang, ID hoặc tên thiết bị, hoặc một người.", + "no_results": "Không tìm thấy. Hãy thử ít từ hơn hoặc từ khác.", + "count": "{count} kết quả", + "keys": "Phím mũi tên để di chuyển, Enter để mở, Esc để đóng." } } diff --git a/web-nodejs/lang/zh-TW.json b/web-nodejs/lang/zh-TW.json index cee540dd..6399bf21 100644 --- a/web-nodejs/lang/zh-TW.json +++ b/web-nodejs/lang/zh-TW.json @@ -99,7 +99,9 @@ "group_rules": "規則與原則", "group_server": "伺服器", "group_billing": "計費", - "group_developer": "開發者" + "group_developer": "開發者", + "more": "更多", + "fewer": "收合" }, "auth": { "login": "登錄", @@ -770,7 +772,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk 用戶端" + "auth_sub_client_sessions": "RustDesk 用戶端", + "search_topic": "{topic} 是另一個分頁" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4826,5 +4829,17 @@ "switched_to_ux36": "已為此瀏覽器啟用 UX 3.6 測試版。", "switched_to_ux35": "已為此瀏覽器還原 UX 3.5。", "default_hint": "預設版面。穩定且功能完整。" + }, + "search": { + "title": "搜尋", + "placeholder": "搜尋頁面、裝置與使用者", + "results": "結果", + "group_pages": "頁面", + "group_devices": "裝置", + "group_people": "使用者", + "hint": "輸入頁面、裝置 ID 或名稱,或使用者。", + "no_results": "找不到結果。請減少或更換關鍵字。", + "count": "共 {count} 個結果", + "keys": "方向鍵移動,Enter 開啟,Esc 關閉。" } } diff --git a/web-nodejs/lang/zh.json b/web-nodejs/lang/zh.json index 032b33ca..02c412fa 100644 --- a/web-nodejs/lang/zh.json +++ b/web-nodejs/lang/zh.json @@ -95,7 +95,9 @@ "group_rules": "规则与策略", "group_server": "服务器", "group_billing": "计费", - "group_developer": "开发者" + "group_developer": "开发者", + "more": "更多", + "fewer": "收起" }, "auth": { "login": "登录", @@ -766,7 +768,8 @@ "branding_rdclient": "RdClient", "connection_p2p_hint": "Try direct peer connection first; fall back to relay when P2P fails.", "connection_relay_hint": "Route all client traffic through the relay server.", - "auth_sub_client_sessions": "RustDesk 客户端" + "auth_sub_client_sessions": "RustDesk 客户端", + "search_topic": "{topic} 是单独的选项卡" }, "confirm": { "connection_mode_title": "Save connection strategy?", @@ -4822,5 +4825,17 @@ "switched_to_ux36": "已为此浏览器启用 UX 3.6 测试版。", "switched_to_ux35": "已为此浏览器恢复 UX 3.5。", "default_hint": "默认布局。稳定且功能完整。" + }, + "search": { + "title": "搜索", + "placeholder": "搜索页面、设备和用户", + "results": "结果", + "group_pages": "页面", + "group_devices": "设备", + "group_people": "用户", + "hint": "输入页面、设备 ID 或名称,或用户。", + "no_results": "未找到结果。请减少或更换关键词。", + "count": "共 {count} 个结果", + "keys": "方向键移动,Enter 打开,Esc 关闭。" } } diff --git a/web-nodejs/lib/consoleNav.js b/web-nodejs/lib/consoleNav.js index 0a11fb3f..d937ad48 100644 --- a/web-nodejs/lib/consoleNav.js +++ b/web-nodejs/lib/consoleNav.js @@ -1,15 +1,19 @@ /** * BetterDesk Console — UX 3.6 navigation model. * - * One list feeds the desktop sidebar, the breadcrumb hints and the mobile - * drawer. The grouping follows the redesign contributed by @rathlinus - * (issue #493 / PR #495), but every entry keeps the route, the RBAC - * permission and the panel-access section used by the current console, so a - * role sees exactly the pages it could open before. + * One list feeds the desktop sidebar, the breadcrumb hints, the mobile + * drawer and the global search (Ctrl+K). The grouping follows the redesign + * contributed by @rathlinus (issue #493 / PR #495), but every entry keeps the + * route, the RBAC permission and the panel-access section used by the current + * console, so a role sees exactly the pages it could open before. * * `section` is the panel access key (routes + middleware/panelAccess.js). * `perm` is the legacy RBAC permission (middleware/auth.js). * `when` can add an extra check (role-based routes). + * `core` marks the pages that stay visible in the sidebar; the rest sit under + * the section's own "More" row, exactly like the redesign. + * `keywords` are extra search words (English, plus the older page names), so + * "keys" or "dataguard" find the page even after it moved into a group. */ 'use strict'; @@ -25,22 +29,23 @@ const SECTIONS = [ label: 'nav.section_devices', icon: 'devices', pages: [ - { page: 'dashboard', section: 'dashboard', href: '/', label: 'nav.dashboard', icon: 'dashboard', core: true }, - { page: 'devices', section: 'devices', href: '/devices', label: 'nav.devices', icon: 'devices', core: true }, + { page: 'dashboard', section: 'dashboard', href: '/', label: 'nav.dashboard', icon: 'dashboard', core: true, keywords: 'home dashboard start overview' }, + { page: 'devices', section: 'devices', href: '/devices', label: 'nav.devices', icon: 'devices', core: true, keywords: 'computers peers machines connect list' }, { page: 'registrations', section: 'registrations', href: '/registrations', label: 'nav.registrations', icon: 'how_to_reg', core: true, badgeId: 'reg-sidebar-badge', + keywords: 'enrollment approve new device registration pending', }, { page: 'activate-agent', section: 'registrations', href: '/?activateAgent=1', label: 'nav.pair_agent', - icon: 'pin', id: 'nav-activate-agent', + icon: 'pin', id: 'nav-activate-agent', keywords: 'qr agent activation pair code', }, - { page: 'remote', section: 'remote', href: '/remote', label: 'nav.remote', icon: 'connected_tv', external: true }, - { page: 'inventory', section: 'devices', perm: 'device.view', href: '/inventory', label: 'nav.inventory', icon: 'inventory_2' }, - { page: 'network', section: 'network', href: '/network', label: 'nav.network', icon: 'lan' }, - { page: 'fleet', section: 'fleet', href: '/fleet', label: 'nav.fleet', icon: 'hub' }, - { page: 'cross-platform', section: 'cross-platform', href: '/cross-platform', label: 'nav.cross_platform', icon: 'devices_other' }, - { page: 'cdap', section: 'cdap', href: '/cdap', label: 'nav.cdap', icon: 'developer_board' }, + { page: 'remote', section: 'remote', href: '/remote', label: 'nav.remote', icon: 'connected_tv', core: true, external: true, keywords: 'web client browser remote control desktop' }, + { page: 'inventory', section: 'devices', perm: 'device.view', href: '/inventory', label: 'nav.inventory', icon: 'inventory_2', keywords: 'hardware software assets' }, + { page: 'network', section: 'network', href: '/network', label: 'nav.network', icon: 'lan', keywords: 'ping monitor latency targets checks' }, + { page: 'fleet', section: 'fleet', href: '/fleet', label: 'nav.fleet', icon: 'hub', keywords: 'fleet bulk tasks workflows compliance' }, + { page: 'cross-platform', section: 'cross-platform', href: '/cross-platform', label: 'nav.cross_platform', icon: 'devices_other', keywords: 'cross-platform matrix features os' }, + { page: 'cdap', section: 'cdap', href: '/cdap', label: 'nav.cdap', icon: 'developer_board', keywords: 'cdap iot scada sensors gateway devices' }, ], }, { @@ -48,10 +53,10 @@ const SECTIONS = [ label: 'nav.section_support', icon: 'support_agent', pages: [ - { page: 'help-requests', section: 'help-requests', href: '/help-requests', label: 'nav.help_requests', icon: 'support_agent', core: true }, - { page: 'tickets', section: 'tickets', href: '/tickets', label: 'nav.tickets', icon: 'confirmation_number', core: true }, - { page: 'chat', section: 'chat', href: '/chat', label: 'nav.chat', icon: 'chat', core: true }, - { page: 'toolkit', section: 'toolkit', href: '/toolkit', label: 'nav.toolkit', icon: 'handyman' }, + { page: 'help-requests', section: 'help-requests', href: '/help-requests', label: 'nav.help_requests', icon: 'support_agent', core: true, keywords: 'help support requests assist' }, + { page: 'tickets', section: 'tickets', href: '/tickets', label: 'nav.tickets', icon: 'confirmation_number', core: true, keywords: 'tickets issues helpdesk cases' }, + { page: 'chat', section: 'chat', href: '/chat', label: 'nav.chat', icon: 'chat', core: true, keywords: 'chat messages conversation' }, + { page: 'toolkit', section: 'toolkit', href: '/toolkit', label: 'nav.toolkit', icon: 'handyman', keywords: 'toolkit ping dns port ssl diagnostics' }, ], }, { @@ -59,9 +64,9 @@ const SECTIONS = [ label: 'nav.section_people', icon: 'group', pages: [ - { page: 'users', section: 'users', href: '/users', label: 'nav.users', icon: 'group', core: true }, - { page: 'organizations', section: 'organizations', href: '/organizations', label: 'nav.organizations', icon: 'corporate_fare' }, - { page: 'permissions', section: 'permissions', href: '/permissions', label: 'nav.permissions', icon: 'admin_panel_settings' }, + { page: 'users', section: 'users', href: '/users', label: 'nav.users', icon: 'group', core: true, keywords: 'users accounts people operators' }, + { page: 'organizations', section: 'organizations', href: '/organizations', label: 'nav.organizations', icon: 'corporate_fare', keywords: 'organizations tenants customers companies' }, + { page: 'permissions', section: 'permissions', href: '/permissions', label: 'nav.permissions', icon: 'admin_panel_settings', keywords: 'permissions roles rights access' }, ], }, { @@ -69,12 +74,13 @@ const SECTIONS = [ label: 'nav.activity', icon: 'history', pages: [ - { page: 'security-audit', section: 'security-audit', href: '/security-audit', label: 'nav.security_audit', icon: 'security', core: true }, - { page: 'activity', section: 'activity', href: '/activity', label: 'activity.title', icon: 'timeline' }, - { page: 'reports', section: 'reports', href: '/reports', label: 'nav.reports', icon: 'assessment' }, + { page: 'security-audit', section: 'security-audit', href: '/security-audit', label: 'nav.security_audit', icon: 'security', core: true, keywords: 'audit log security events who banned' }, + { page: 'activity', section: 'activity', href: '/activity', label: 'activity.title', icon: 'timeline', keywords: 'activity app usage monitoring' }, + { page: 'reports', section: 'reports', href: '/reports', label: 'nav.reports', icon: 'assessment', keywords: 'reports export trends charts' }, { page: 'commercialization:sessions', section: 'commercialization', href: '/commercialization?tab=sessions', label: 'commercialization.tabs.sessions', icon: 'schedule', + keywords: 'sessions billing minutes work reports', }, ], }, @@ -83,54 +89,64 @@ const SECTIONS = [ label: 'nav.settings', icon: 'settings', pages: [ - { page: 'settings:general', section: 'settings', href: '/settings', label: 'settings.tab_general', icon: 'tune', group: 'nav.group_console' }, - { page: 'settings:branding', section: 'settings', href: '/settings?tab=branding', label: 'settings.tab_branding', icon: 'palette', group: 'nav.group_console' }, - { page: 'settings:auth', section: 'settings', href: '/settings?tab=auth', label: 'settings.tab_auth', icon: 'admin_panel_settings', group: 'nav.group_console' }, - { page: 'settings:backup', section: 'settings', perm: 'server.config', href: '/settings?tab=backup', label: 'settings.tab_backup', icon: 'backup', group: 'nav.group_console' }, - { page: 'settings:updates', section: 'settings', perm: 'server.config', href: '/settings?tab=updates', label: 'updates.tab_title', icon: 'system_update', group: 'nav.group_console' }, - { page: 'settings:email', section: 'settings', perm: 'server.config', href: '/settings?tab=email', label: 'settings.tab_email', icon: 'email', group: 'nav.group_console' }, - { page: 'settings:time', section: 'settings', perm: 'server.config', href: '/settings?tab=time', label: 'settings.tab_time', icon: 'schedule', group: 'nav.group_console' }, - { page: 'settings:advanced', section: 'settings', perm: 'server.config', href: '/settings?tab=advanced', label: 'settings.tab_advanced', icon: 'code', group: 'nav.group_console' }, - { page: 'languages', section: 'languages', href: '/languages', label: 'nav.languages', icon: 'translate', group: 'nav.group_console' }, - { page: 'keys', section: 'settings', href: '/keys', label: 'nav.keys', icon: 'vpn_key', group: 'nav.group_clients' }, - { page: 'tokens', section: 'settings', href: '/tokens', label: 'nav.tokens', icon: 'token', group: 'nav.group_clients' }, - { page: 'pairing', section: 'registrations', href: '/pairing', label: 'nav.pairing', icon: 'qr_code_2', group: 'nav.group_clients' }, + { page: 'settings:general', section: 'settings', href: '/settings', label: 'settings.tab_general', icon: 'tune', core: true, group: 'nav.group_console', keywords: 'settings general relay address public endpoints connection strategy meshcentral' }, + { page: 'settings:branding', section: 'settings', href: '/settings?tab=branding', label: 'settings.tab_branding', icon: 'palette', group: 'nav.group_console', keywords: 'branding theme colours colors logo dark light mode' }, + { page: 'settings:auth', section: 'settings', href: '/settings?tab=auth', label: 'settings.tab_auth', icon: 'admin_panel_settings', group: 'nav.group_console', keywords: 'authentication password 2fa two-factor totp ldap sso oidc' }, + { page: 'settings:backup', section: 'settings', perm: 'server.config', href: '/settings?tab=backup', label: 'settings.tab_backup', icon: 'backup', group: 'nav.group_console', keywords: 'backup restore snapshot' }, + { page: 'settings:updates', section: 'settings', perm: 'server.config', href: '/settings?tab=updates', label: 'updates.tab_title', icon: 'system_update', group: 'nav.group_console', keywords: 'updates update version upgrade release channel' }, + { page: 'settings:email', section: 'settings', perm: 'server.config', href: '/settings?tab=email', label: 'settings.tab_email', icon: 'email', group: 'nav.group_console', keywords: 'email smtp mail notifications' }, + { page: 'settings:time', section: 'settings', perm: 'server.config', href: '/settings?tab=time', label: 'settings.tab_time', icon: 'schedule', group: 'nav.group_console', keywords: 'time zone timezone ntp clock' }, + { page: 'settings:advanced', section: 'settings', perm: 'server.config', href: '/settings?tab=advanced', label: 'settings.tab_advanced', icon: 'code', group: 'nav.group_console', keywords: 'advanced environment config files restart' }, + { page: 'languages', section: 'languages', href: '/languages', label: 'nav.languages', icon: 'translate', group: 'nav.group_console', keywords: 'languages translations i18n locale' }, + { page: 'keys', section: 'settings', href: '/keys', label: 'nav.keys', icon: 'vpn_key', core: true, group: 'nav.group_clients', keywords: 'keys public key qr client setup rustdesk config' }, + { page: 'tokens', section: 'settings', href: '/tokens', label: 'nav.tokens', icon: 'token', group: 'nav.group_clients', keywords: 'tokens enrollment mode api access' }, + { page: 'pairing', section: 'registrations', href: '/pairing', label: 'nav.pairing', icon: 'qr_code_2', group: 'nav.group_clients', keywords: 'pairing code enroll agent qr' }, { page: 'agents', section: 'agents', href: '/agents', label: 'nav.agents', icon: 'support_agent', alsoActiveFor: ['generator'], group: 'nav.group_clients', + keywords: 'agents installers downloads builds generator packages', }, - { page: 'client-branding', section: 'settings', href: '/client-branding', label: 'nav.client_branding', icon: 'branding_watermark', group: 'nav.group_clients' }, - { page: 'policies', section: 'settings', href: '/policies', label: 'nav.policies', icon: 'policy', group: 'nav.group_rules' }, - { page: 'automation', section: 'automation', href: '/automation', label: 'nav.automation', icon: 'smart_toy', group: 'nav.group_rules' }, - { page: 'resource-control', section: 'resource-control', href: '/resource-control', label: 'nav.resource_control', icon: 'tune', group: 'nav.group_rules' }, - { page: 'dataguard', section: 'dataguard', href: '/dataguard', label: 'nav.dataguard', icon: 'shield', group: 'nav.group_rules' }, - { page: 'attestation', section: 'server-attestation', href: '/attestation', label: 'nav.attestation', icon: 'fingerprint', group: 'nav.group_rules' }, + { page: 'client-branding', section: 'settings', href: '/client-branding', label: 'nav.client_branding', icon: 'branding_watermark', group: 'nav.group_clients', keywords: 'client branding white label' }, + { page: 'policies', section: 'settings', href: '/policies', label: 'nav.policies', icon: 'policy', group: 'nav.group_rules', keywords: 'policies rules guardrails' }, + { + page: 'strategies', section: 'strategies', href: '/strategies', label: 'devices.strategies_title', + icon: 'policy', group: 'nav.group_rules', + keywords: 'strategies access control rustdesk pro security policy user group device group', + }, + { page: 'automation', section: 'automation', href: '/automation', label: 'nav.automation', icon: 'smart_toy', group: 'nav.group_rules', keywords: 'automation alerts rules commands' }, + { page: 'resource-control', section: 'resource-control', href: '/resource-control', label: 'nav.resource_control', icon: 'tune', group: 'nav.group_rules', keywords: 'resource control limits usb drives disks' }, + { page: 'dataguard', section: 'dataguard', href: '/dataguard', label: 'nav.dataguard', icon: 'shield', group: 'nav.group_rules', keywords: 'dataguard dlp data loss prevention' }, + { page: 'attestation', section: 'server-attestation', href: '/attestation', label: 'nav.attestation', icon: 'fingerprint', group: 'nav.group_rules', keywords: 'attestation fingerprint device identity' }, { page: 'server-management:overview', section: 'server-management', href: '/server-management?tab=overview', - label: 'server_mgmt.tab_overview', icon: 'monitoring', group: 'nav.group_server', + label: 'server_mgmt.tab_overview', icon: 'monitoring', core: true, group: 'nav.group_server', + keywords: 'server status health cpu memory disk uptime overview', }, { page: 'server-management:terminal', section: 'server-management', perm: 'server.config', href: '/server-management?tab=terminal', - label: 'server_mgmt.tab_terminal', icon: 'terminal', group: 'nav.group_server', + label: 'server_mgmt.tab_terminal', icon: 'terminal', group: 'nav.group_server', keywords: 'terminal shell console command line', }, { page: 'server-management:files', section: 'server-management', perm: 'server.config', href: '/server-management?tab=files', - label: 'server_mgmt.tab_files', icon: 'folder_open', group: 'nav.group_server', + label: 'server_mgmt.tab_files', icon: 'folder_open', group: 'nav.group_server', keywords: 'files file browser server filesystem', }, { page: 'server-management:services', section: 'server-management', perm: 'server.config', href: '/server-management?tab=services', label: 'server_mgmt.tab_services', icon: 'home_repair_service', beta: true, group: 'nav.group_server', + keywords: 'services systemd restart unit', }, - { page: 'scaling', section: 'scaling', href: '/scaling', label: 'nav.scaling', icon: 'cell_tower', group: 'nav.group_server' }, + { page: 'scaling', section: 'scaling', href: '/scaling', label: 'nav.scaling', icon: 'cell_tower', group: 'nav.group_server', keywords: 'scaling relays nodes capacity' }, { page: 'server-attestation', section: 'server-attestation', href: '/server-attestation', label: 'nav.server_attestation', icon: 'verified', group: 'nav.group_server', + keywords: 'server attestation benchmark performance badge', }, { page: 'commercialization:packages', section: 'commercialization', href: '/commercialization?tab=packages', label: 'commercialization.tabs.packages', icon: 'inventory_2', group: 'nav.group_billing', + keywords: 'commercialization packages contracts billing pricing', }, - { page: 'cdap-studio', section: 'cdap', href: '/cdap-studio', label: 'nav.sdk_studio', icon: 'account_tree', when: adminRole, group: 'nav.group_developer' }, + { page: 'cdap-studio', section: 'cdap', href: '/cdap-studio', label: 'nav.sdk_studio', icon: 'account_tree', when: adminRole, group: 'nav.group_developer', keywords: 'sdk studio flows widgets developer' }, ], }, ]; @@ -147,6 +163,27 @@ function pageKey(currentPage, currentTab, activateAgentNav) { return currentPage || ''; } +/** Resolve one page entry into the shape views and the search index read. */ +function resolvePage(p, translate, key) { + const active = p.page === key || (p.alsoActiveFor || []).includes(key); + return { + page: p.page, + section: p.section, + href: p.href, + label: translate(p.label), + icon: p.icon, + group: p.group ? translate(p.group) : '', + groupKey: p.group || '', + external: !!p.external, + beta: !!p.beta, + core: !!p.core, + keywords: p.keywords || '', + badgeId: p.badgeId || '', + id: p.id || '', + active, + }; +} + /** * Build the visible navigation for one request. * @@ -173,20 +210,8 @@ function buildNav({ t, allows, can, role, currentPage, currentTab, activateAgent const pages = section.pages .filter((p) => (!p.when || p.when(ctx)) && (!p.perm || canDo(p.perm)) && allow(p)) .map((p) => { - const active = p.page === key || (p.alsoActiveFor || []).includes(key); - const item = { - page: p.page, - href: p.href, - label: translate(p.label), - icon: p.icon, - group: p.group ? translate(p.group) : '', - external: !!p.external, - beta: !!p.beta, - badgeId: p.badgeId || '', - id: p.id || '', - active, - }; - if (active) activePage = item; + const item = resolvePage(p, translate, key); + if (item.active) activePage = item; return item; }); const out = { @@ -203,4 +228,36 @@ function buildNav({ t, allows, can, role, currentPage, currentTab, activateAgent return { sections, activeSection, activePage }; } -module.exports = { SECTIONS, buildNav, pageKey }; +/** + * Flat search index for the global search dialog. + * + * Only pages the current request may open are returned, so the client cannot + * use the index to learn about a page its role cannot reach. `searchPages` is + * rendered into the page as `window.BetterDesk.searchPages`. + */ +function buildSearchPages({ t, allows, can, role }) { + const translate = typeof t === 'function' ? t : (key) => key; + const allow = typeof allows === 'function' ? allows : () => true; + const canDo = typeof can === 'function' ? can : () => true; + const ctx = { role: role || '', can: canDo }; + + const out = []; + SECTIONS.forEach((section) => { + section.pages + .filter((p) => (!p.when || p.when(ctx)) && (!p.perm || canDo(p.perm)) && allow(p)) + .forEach((p) => { + out.push({ + text: translate(p.label), + section: translate(section.label), + group: p.group ? translate(p.group) : '', + keywords: p.keywords || '', + icon: p.icon, + href: p.href, + external: !!p.external, + }); + }); + }); + return out; +} + +module.exports = { SECTIONS, buildNav, buildSearchPages, pageKey }; diff --git a/web-nodejs/public/css/material-icons-local.css b/web-nodejs/public/css/material-icons-local.css index cdf25cc5..55c81fd8 100644 --- a/web-nodejs/public/css/material-icons-local.css +++ b/web-nodejs/public/css/material-icons-local.css @@ -8,14 +8,14 @@ font-style: normal; font-weight: 400; font-display: block; - src: url('/fonts/MaterialSymbolsOutlined.woff2?v=4f6e5bd951a7') format('woff2'); + src: url('/fonts/MaterialSymbolsOutlined.woff2?v=3a490c6af725') format('woff2'); } @font-face { font-family: 'Material Symbols Rounded'; font-style: normal; font-weight: 400; font-display: block; - src: url('/fonts/MaterialSymbolsRounded.woff2?v=b27b06b0c116') format('woff2'); + src: url('/fonts/MaterialSymbolsRounded.woff2?v=0ff333c7c1a7') format('woff2'); } .material-icons, diff --git a/web-nodejs/public/css/ux36/pages.css b/web-nodejs/public/css/ux36/pages.css index e9969a75..f9b02435 100644 --- a/web-nodejs/public/css/ux36/pages.css +++ b/web-nodejs/public/css/ux36/pages.css @@ -53,7 +53,7 @@ } /* ── Rules instead of cards ──────────────────────────────────────────────── */ -.ux36-page .ux35-content :is(.card, .settings-panel, .settings-section, .devices-strategies-card) { +.ux36-page .ux35-content :is(.card, .settings-panel, .settings-section) { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); @@ -204,9 +204,11 @@ display: flex; flex-direction: column; gap: 24px; + /* The content column is the scrollport, so "stuck" is measured from its top + edge — the top bar is already outside it. */ position: sticky; - top: calc(var(--topbar-h) + 16px); - max-height: calc(100vh - var(--topbar-h) - 32px); + top: var(--space-4); + max-height: calc(100dvh - var(--topbar-h) - 3 * var(--space-4)); overflow-y: auto; padding-bottom: 8px; } @@ -266,10 +268,10 @@ font-variant-numeric: tabular-nums; } -.ux36-page .devices-page .devices-strategies-card { +.ux36-page .devices-page .devices-strategies-link { grid-column: 2; grid-row: 3; - margin: 24px 0 0; + margin: 16px 0 0; } /* Toolbar sits above the table in the content column */ @@ -335,7 +337,7 @@ .ux36-page .devices-chip-bars, .ux36-page .devices-toolbar, .ux36-page .devices-table-container, - .ux36-page .devices-page .devices-strategies-card { + .ux36-page .devices-page .devices-strategies-link { grid-column: 1; grid-row: auto; position: static; @@ -399,12 +401,53 @@ } .ux36-page .settings-search { + display: flex; + align-items: center; + gap: var(--space-2); margin: 16px 0; - padding: 0; + padding: 0 0 var(--space-2); border: 0; + border-bottom: 1px solid var(--rule); + border-radius: 0; background: none; } +/* The field sits on the rule as plain text, like the page's other rows */ +.ux36-page .settings-search .form-input { + border: 0; + background: transparent; + min-height: var(--control-h); + padding-inline: 0; + font-size: var(--text-base); +} + +.ux36-page .settings-search > .material-icons { + color: var(--text-muted); +} + +.ux36-page .settings-search-status { + color: var(--text-muted); + font-size: var(--text-sm); +} + +/* The topic row stays under the bar while the topic is scrolled */ +.ux36-page .settings-shell-nav { + position: sticky; + top: 0; + z-index: var(--layer-sticky); + background: var(--bg); +} + +/* Panels inside a topic are ruled sections, not separate cards */ +.ux36-page .settings-tab-content :is( + .settings-panel, .settings-section, .settings-group, .backend-card, + .logo-type-card, .branding-theme-card, .ux36-shell-choice-option +) { + border-color: var(--rule); + background: var(--bg); + box-shadow: none; +} + .ux36-page .settings-stack { display: flex; flex-direction: column; @@ -447,3 +490,256 @@ .ux36-page .ux35-content :is(.data-table, .table) tbody tr:hover td { background: var(--hover); } + +/* ── The rest of the console ─────────────────────────────────────────────── + Pages that keep their UX 3.5 markup get the same rhythm instead of a copy + of every sheet: one content column, ruled sections instead of floating + cards, stat numbers in one ruled row, tabs as a ruled row, hairlines in + tables. Only shared element classes are touched; per-page rules that carry + a page's own meaning (a status colour, a fixed-size preview) still apply. */ + +.ux36-page .ux35-content > :is( + .users-page, .toolkit-page, .activity-page, .reports-page, + .network-page, .pages-page, .keys-page, .languages-page, .pairing-page, + .client-branding-page, .tenants-page, .organizations-page, + .permissions-page, .policies-page, .automation-page, .scaling-page, + .crossplatform-page, .commercialization-page, .tokens-page, + .registrations-page, .agents-page, .help-requests-page, + .server-mgmt-page, .sa-page, .inventory-page, .fleet-page, + .tickets-page, .secaudit-page, .resource-page, .dataguard-page, + .org-page, .policy-page, .secaudit-container, .resource-control-page, + .rc-page, .tokens-shell, .agent-download-page +) { + display: block; + max-width: var(--content-max); +} + +/* Page titles are plain text with one size, wherever the page puts them */ +.ux36-page .ux35-content h1.page-title, +.ux36-page .ux35-content .page-title h1, +.ux36-page .ux35-content .page-header h1 { + margin: 0; + font-size: var(--text-xl); + font-weight: 600; + letter-spacing: -0.01em; + color: var(--text); +} + +/* A page's own header block (when it is not the shared .page-header) */ +.ux36-page .ux35-content :is( + .users-header, .toolkit-header, .activity-header, .reports-header, + .network-header, .keys-header, .tenants-header, .org-header, + .tokens-header, .registrations-header, .agents-header, .fleet-header, + .tickets-header, .secaudit-header, .server-mgmt-header, .inventory-header +) { + padding: 0; + border: 0; + background: none; + box-shadow: none; +} + +/* ── Cards become ruled sections ── */ + +.ux36-page .ux35-content :is( + .key-card, .user-groups-card, .org-card, .policy-card, + .tool-card, .hr-card, .sm-card, .sa-card, .lang-card, .tenant-card, + .scaling-card, .crossplatform-card, .report-type-card, .relay-health-card, + .enrollment-mode-card, .permissions-info-card, .secaudit-panel, + .secaudit-harden-card, .secaudit-tls-card, .secaudit-vuln-card, + .rc-category-card, .cm-card, .fleet-output-panel, .builder-panel, + .detail-section, .tab-panel, .sm-tab-panel, .lang-detail-panel, + .tenant-detail-panel, .org-assignments-section, .comments-section, + .palette-section, .capacity-section, .modal-card, .comp-stat-card, + .att-stat-card, .rc-stat-card, .secaudit-stat-card, .report-stat +) { + border: 1px solid var(--rule); + border-radius: var(--radius); + background: var(--bg); + box-shadow: none; +} + +/* Card heads and bodies share one inset, like the shell's own panels */ +.ux36-page .ux35-content :is( + .key-card-header, .user-groups-card-header, .policy-card-header, + .tool-card-header, .hr-card-header, .sm-card-header, .sa-card-header, + .lang-card-header, .tenant-card-header, .org-card-icon, + .crossplatform-card-header, .secaudit-panel-header +) { + border-bottom: 1px solid var(--rule); +} + +/* ── Numbers: one ruled row, as on the Dashboard ── */ + +.ux36-page .ux35-content :is( + .tickets-stats, .tokens-stats, .inventory-stats, .compliance-stats, + .secaudit-stats-grid, .scaling-summary-grid, .crossplatform-summary-grid, + .attestation-stats, .hr-stats, .lang-stats-row, .report-summary, + .tenant-card-stats, .cp-summary-item, .rc-stats +) { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); + gap: 0; + border-top: 1px solid var(--rule); + border-bottom: 1px solid var(--rule); +} + +.ux36-page .ux35-content :is( + .tickets-stats, .tokens-stats, .inventory-stats, .compliance-stats, + .secaudit-stats-grid, .scaling-summary-grid, .crossplatform-summary-grid, + .attestation-stats, .hr-stats, .lang-stats-row, .report-summary +) > * { + margin: 0; + padding: var(--space-4); + border: 0; + border-radius: 0; + background: none; + box-shadow: none; +} + +.ux36-page .ux35-content :is( + .tickets-stats, .tokens-stats, .inventory-stats, .compliance-stats, + .secaudit-stats-grid, .scaling-summary-grid, .crossplatform-summary-grid, + .attestation-stats, .hr-stats, .lang-stats-row, .report-summary +) > * + * { + border-inline-start: 1px solid var(--rule); +} + +/* The number is the loud part, the label is quiet — same sizes everywhere */ +.ux36-page .ux35-content :is( + .stat-value, .tokens-stat-value, .scaling-card-value, .cp-summary-value, + .att-stat-value, .rc-stat-value, .comp-stat-value, .report-stat-value, + .lang-stat-value, .secaudit-stat-value, .sa-stat-value, .sm-disk-stat strong +) { + font-size: var(--text-xl); + font-weight: 600; + font-variant-numeric: tabular-nums; + color: var(--text); +} + +.ux36-page .ux35-content :is( + .stat-label, .scaling-card-label, .cp-summary-label, .att-stat-label, + .rc-stat-label, .comp-stat-label, .report-stat-label, .lang-stat-label, + .secaudit-stat-label +) { + color: var(--text-muted); + font-size: var(--text-sm); +} + +/* ── Tabs (page-level) use the Settings row, not a second tab style ── */ + +.ux36-page .ux35-content :is( + .fleet-tabs, .tickets-tabs, .commercialization-tabs, .tokens-tabs, + .server-mgmt-tabs, .sm-tabs, .cdap-tabs, .lang-tabs, .activity-tabs +) { + gap: 0; + margin-bottom: var(--space-5); + border-bottom: 1px solid var(--rule); +} + +.ux36-page .ux35-content :is( + .fleet-tab, .tickets-tab, .commercialization-tab, .tokens-tab, + .server-mgmt-tab, .sm-tab, .cdap-tab, .lang-tab, .activity-tab +) { + display: inline-flex; + align-items: center; + gap: var(--space-2); + min-height: 40px; + margin-bottom: -1px; + padding: 0 var(--space-3); + border: 0; + border-bottom: 2px solid transparent; + border-radius: 0; + background: none; + color: var(--text-muted); + font: inherit; + font-size: var(--text-base); + font-weight: 500; + cursor: pointer; +} + +.ux36-page .ux35-content :is( + .fleet-tab, .tickets-tab, .commercialization-tab, .tokens-tab, + .server-mgmt-tab, .sm-tab, .cdap-tab, .lang-tab, .activity-tab +):hover { + color: var(--text); + background: var(--hover); +} + +.ux36-page .ux35-content :is( + .fleet-tab, .tickets-tab, .commercialization-tab, .tokens-tab, + .server-mgmt-tab, .sm-tab, .cdap-tab, .lang-tab, .activity-tab +).active { + border-bottom-color: var(--accent); + color: var(--text); + font-weight: 600; +} + +/* ── Tables keep hairlines and lose their card chrome ── */ + +.ux36-page .ux35-content :is( + .table-wrapper, .table-wrap, .table-scroll, .users-table-container, + .registrations-table-wrapper, .tokens-table-wrapper, .sm-history-wrap, + .fleet-table-wrap, .secaudit-table-wrap, .lang-detail-panel, + .crossplatform-matrix-wrap, .scaling-table-wrap, .sm-files-table-wrapper +) { + border-color: var(--rule); + background: var(--bg); + box-shadow: none; +} + +/* ── Chat and Remote are workspaces: full bleed, one rule between columns ── */ + +/* A workspace owns the whole column: the column itself must not scroll, or the + chat page (sized to the viewport) would add a second, empty scroll range. */ +.ux36-page .ux35-content:has(.chat-page) { + overflow: hidden; + padding: 0; +} + +.ux36-page .chat-page { + margin: 0; + width: 100%; + height: 100%; + background: var(--bg); +} + +.ux36-page .chat-sidebar { + border-inline-end: 1px solid var(--rule); + background: var(--bg-subtle); +} + +.ux36-page .chat-conversation-header, +.ux36-page .chat-sidebar-header, +.ux36-page .chat-input-wrap { + border-color: var(--rule); + background: var(--bg); +} + +/* Chips, badges and statuses read as text with a small mark in both themes */ +.ux36-page .ux35-content :is(.status-badge, .ticket-status, .tenant-status) { + border: 1px solid var(--rule); + border-radius: var(--radius-full); + background: var(--bg-subtle); + color: var(--text); + font-weight: 500; +} + +@media (max-width: 767px) { + /* Same rule on a phone: the workspace fills the column, which already ends + above the docked navigation. */ + .ux36-page .chat-page { + margin: 0; + width: 100%; + height: 100%; + } + + /* One ruled row on a phone would scroll sideways; wrap the numbers */ + .ux36-page .ux35-content :is( + .tickets-stats, .tokens-stats, .inventory-stats, .compliance-stats, + .secaudit-stats-grid, .scaling-summary-grid, .crossplatform-summary-grid, + .attestation-stats, .hr-stats, .lang-stats-row, .report-summary + ) { + grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); + } +} + diff --git a/web-nodejs/public/css/ux36/shell.css b/web-nodejs/public/css/ux36/shell.css index 5d1eb151..99225ba6 100644 --- a/web-nodejs/public/css/ux36/shell.css +++ b/web-nodejs/public/css/ux36/shell.css @@ -7,8 +7,13 @@ .ux35-shell { display: flex; flex-direction: column; - min-height: 100vh; - min-height: 100dvh; + height: 100vh; + height: 100dvh; + /* The content column is the scroll box (below). The shell itself must not + scroll: body.app-page already clips overflow, so a min-height-only shell + would grow past the viewport with nothing left to scroll — a long list + such as Devices then cannot be scrolled at all. */ + overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); @@ -16,6 +21,13 @@ line-height: var(--leading); } +/* Embedded windows size to their content instead of the viewport. */ +.ux35-shell.embed-mode { + height: auto; + min-height: 100vh; + overflow: visible; +} + .emergency-banner { padding: var(--space-2) var(--space-4); background: var(--danger); @@ -452,14 +464,15 @@ } .ux35-sidebar { - position: sticky; - top: var(--topbar-h); + /* Not sticky: the shell does not scroll, so the sidebar simply fills its + column. (Sticky here would offset it by the top bar's height, because the + stick constraint starts at the body's top edge.) */ + position: relative; flex-shrink: 0; display: flex; flex-direction: column; width: var(--ux35-sidebar-width, var(--sidebar-w)); - height: calc(100vh - var(--topbar-h)); - height: calc(100dvh - var(--topbar-h)); + height: 100%; border-inline-end: 1px solid var(--rule); background: var(--bg-subtle); } @@ -611,6 +624,53 @@ padding-top: var(--space-1); } +/* ── Menu filter and the section's "More" row ── */ + +.ux36-sidebar-filter { + position: sticky; + top: 0; + z-index: 2; + padding: 0 var(--space-2) var(--space-2); + background: var(--bg-subtle); +} + +.ux36-sidebar-filter .form-input { + width: 100%; + min-height: var(--control-h-sm); + padding-inline: var(--control-pad-x-sm); + font-size: var(--text-sm); +} + +.ux35-sidebar-item.nav-more-toggle { + width: 100%; + border: 0; + border-inline-start: 2px solid transparent; + background: transparent; + color: var(--text-muted); + font: inherit; + cursor: pointer; +} + +.ux35-sidebar-item.nav-more-toggle:hover { + background: var(--hover); + color: var(--text); +} + +.nav-more-toggle .nav-more-chevron { + font-size: 18px; + color: var(--text-muted); +} + +.nav-more-list[hidden] { + display: none; +} + +/* Filtered-out rows disappear instead of leaving gaps */ +.ux36-sidebar-nav .ux35-sidebar-item.is-filter-hidden, +.ux36-sidebar-nav .ux36-nav-section.is-filter-empty { + display: none; +} + .ux35-sidebar-footer { display: flex; flex-direction: column; @@ -761,9 +821,21 @@ .ux35-main { flex: 1; min-width: 0; + display: flex; + flex-direction: column; + /* The page column scrolls inside the shell, never the document: the top bar + and the sidebar stay put, and a long table keeps its own scroll box. */ + overflow: hidden; } .ux35-content { + flex: 1; + min-height: 0; + overflow-y: auto; + overflow-x: hidden; + overscroll-behavior: contain; + scrollbar-gutter: stable; + -webkit-overflow-scrolling: touch; padding: var(--page-pad); padding-bottom: var(--space-7); } @@ -925,15 +997,17 @@ padding: var(--space-4); } -/* Pages still on the old stylesheets: main.css makes .main-content a - fixed-height scroll box under a fixed navbar. The shell scrolls the - document instead. */ +/* The content column is the shell's scroll box, as in UX 3.5. main.css makes + .main-content a fixed-height scroll box under a fixed navbar; the shell + replaces that, but the scrolling itself must stay here — body.app-page clips + overflow, so a document-level scroll would never happen. */ .ux35-content.main-content { - flex: none; + flex: 1; + min-height: 0; width: auto; height: auto; margin-top: 0; - overflow: visible; + overflow-y: auto; } @media (pointer: coarse) { diff --git a/web-nodejs/public/css/ux36/tokens.css b/web-nodejs/public/css/ux36/tokens.css index c948cbc2..5b48710f 100644 --- a/web-nodejs/public/css/ux36/tokens.css +++ b/web-nodejs/public/css/ux36/tokens.css @@ -72,6 +72,7 @@ /* Shape */ --radius: 4px; --radius-sm: 3px; + --radius-full: 999px; /* Only floating things cast a shadow */ --shadow-float: 0 6px 24px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.1); diff --git a/web-nodejs/public/fonts/MATERIAL_SYMBOLS_VERSION.txt b/web-nodejs/public/fonts/MATERIAL_SYMBOLS_VERSION.txt index b06386e0..3545dec1 100644 --- a/web-nodejs/public/fonts/MATERIAL_SYMBOLS_VERSION.txt +++ b/web-nodejs/public/fonts/MATERIAL_SYMBOLS_VERSION.txt @@ -1,21 +1,21 @@ BetterDesk self-hosted Material Symbols (Apache-2.0) Upstream: https://github.com/google/material-design-icons (variablefont / Google Fonts CSS API) License: Apache License 2.0 -Generated: 2026-11-08T22:28:32.507Z -Icon count: 357 +Generated: 2026-11-11T14:12:43.360Z +Icon count: 359 File: MaterialSymbolsOutlined.woff2 - size: 29824 - sha256: 4f6e5bd951a79f462a6930ab22e94d600d0a4db6cba10c80740280b2d1889673 - source: https://fonts.gstatic.com/l/font?kit=kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzaxHMPdY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOejdcdKnn9Nu7Z8-tKa98e7CeA1bzxBAdfoTCPr1rdi3peY56pKAKqF4h7IX-YI-2NWn8SP51l787gNaNMN--WZUGmfNPelbJ5ioSsJ_pADuo0p8YUC7DbB4Toq2x-hFhUGFAwG_zCuOuYUNgktBC7jj2YFc2peT2uS-vJpyyQrHxkf782mW1rMLXfugNPQ_d9CPhIIB_rb1m3fIVoaS746GOZWyFJkhLcUyrObGG1bUN2aIIBsfVS39w2Nqj7iKjU2VkqMbK5szvGLr8oSUvk17OHZE_goiUGXGZXGBUvdswDuqfClx_IlJ95s6jRNbuJxmliIC3O0AicLbsmgkBZQ7YUmbKNUFc8wn1MLpL4qRQNygVpC-BQJaVczrTuOCQ&skey=b8dc2088854b122f&v=v383 + size: 29924 + sha256: 3a490c6af725d3e8ecdf1e9e9d32a0d7d52db48da923319f469324bfb4f8974e + source: https://fonts.gstatic.com/l/font?kit=kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzaxHMPdY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOejdcdKnn9Nu7Z8-tKa98e7CeA1bzxBAdfoTCPr1rdi3peY56pKAKqF4h7IX-YI-2NWn8SP51l787gNaNMN--WZUGmfNPelbJ5ioSsJ_pADuo0p8YUC7DbB4Toq2x-hFhUGFAwG_zCuOuYUNgktBC7jj2YFc2peT2uS-vJpyyQrHxkf782mW1rMLXfugNPQ-d9CPhIIB_rb1m3fIVoaS746GOZWyFJkhLcUyrObGG1bUN2aIIBsfVS39w2Nqj7iKjU2VkqMbK5szvGLr8oSIvk17OHZE_goiUGXGZXGBUvdswDuqfClx_IlJ95s6jRNbuJxmliIC3O0AicLbsmgkBZQ7YUmbKNUFc8wn1MLpN5KSV-3GJafkhEAZQdjMQvYTA&skey=b8dc2088854b122f&v=v383 File: MaterialSymbolsRounded.woff2 - size: 35008 - sha256: b27b06b0c1160fbb0fabc46019e4bb8e512e643f765b076db0d18a97587bdb75 - source: https://fonts.gstatic.com/l/font?kit=syl0-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvDmUSVOK7BDB_Qb9vUSzq3wzLK-P0J-V_Zs-QtQth3-jOcbTCVpeRL2w5rwZu2rIelXxeRMalQRs9o6jIPRyNAGl5B6QXEbj0fWcVeTL5WugaCLdOdoSba51kzAPgs6ajzGnA6nzeZKpMhGwPMXOYPBvaAwADyoa3q_l7HoYKoMrfYT1E1F5XNCmnE_zQBhy0lTsiyC0tmO-nqamsFVrc5VW3dancA5BAv3x3V2YzX9r4-PJ2mbtuuIAkdet61sDQ9WkdChBvQOclrzhd5Unh_RzW-I_89fasehK9UrV6DZ37pKMlfhJbGaxkm1Yfbv5EgUZGsXJGwlmuhDnkTvhLsI0F8Kvb_bg2ofNHQ-WWX3hlMg_koizuJUhehTg766Q6Q3zjoQiK7MbUcq8X9PwpErkwgWbEFiQK7BmoNvChs_9ypYSNHuFRNtplBaIGrMLfQ&skey=70ddea8fe54d532e&v=v384 + size: 35128 + sha256: 0ff333c7c1a7cafd8f5bcf3faab590992ea88e8560da057b4bf4d05f3074ec2a + source: https://fonts.gstatic.com/l/font?kit=syl0-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvDmUSVOK7BDB_Qb9vUSzq3wzLK-P0J-V_Zs-QtQth3-jOcbTCVpeRL2w5rwZu2rIelXxeRMalQRs9o6jIPRyNAGl5B6QXEbj0fWcVeTL5WugaCLdOdoSba51kzAPgs6ajzGnA6nzeZKpMhGwPMXOYPBvaAwADyoa3q_l7HoYKoMrfYT1E1F5XNCmnE_zQBhy0lTsiyC0tmO-nqamsFVrc5VW3dancA5BAv3x3V2YzX9r4-PJ2mbtuuIAkdet61sDQ5WkdChBvQOclrzhd5Unh_RzW-I_89fasehK9UrV6DZ37pKMlfhJbGaxkm1Yfbv5EgUZGsXJGwlmuhDnkTvhKcI0F8Kvb_bg2ofNHQ-WWX3hlMg_koizuJUhehTg766Q6Q3zjoQiK7MbUcq8X9PwpErkwgWbEFiQK7BmoNvChsn7ylPebedIkns5BNONE3AOGV&skey=70ddea8fe54d532e&v=v384 Axes instance: opsz=24, wght=400, FILL=0, GRAD=0 display=block Icons (alphabetical): -ac_unit,access_time,accessibility_new,account_circle,account_tree,add,add_circle,add_link,add_reaction,admin_panel_settings,album,alt_route,api,apps,archive,arrow_back,arrow_downward,arrow_forward,arrow_upward,article,assessment,assignment,attach_file,audiotrack,auto_awesome,auto_fix_high,auto_mode,autorenew,av1,backup,badge,bar_chart,bedtime,block,bolt,bookmarks,branding_watermark,bug_report,build,business,business_center,cable,call_split,category,cell_tower,chat,check,check_box,check_box_outline_blank,check_circle,checklist,chevron_left,chevron_right,cleaning_services,close,cloud,cloud_download,cloud_off,cloud_queue,cloud_upload,code,computer,confirmation_number,connected_tv,contacts,content_copy,content_paste,content_paste_off,contrast,copyright,corporate_fare,create,create_new_folder,crop_free,crop_square,dark_mode,dashboard,data_object,dataset,delete,delete_forever,delete_outline,delete_sweep,description,desktop_access_disabled,desktop_mac,desktop_windows,developer_board,device_hub,devices,devices_other,disc_full,dns,domain,done,done_all,donut_large,download,drag_handle,drive_file_rename_outline,drive_folder_upload,edit,edit_document,edit_note,electrical_services,email,engineering,enhanced_encryption,error,error_outline,event,event_note,expand_less,expand_more,extension,factory,favorite,fiber_manual_record,file_copy,file_download,filter_1,filter_alt,filter_none,fingerprint,fit_screen,flash_on,foggy,folder,folder_off,folder_open,folder_zip,format_align_left,format_color_fill,forum,fullscreen,fullscreen_exit,function,functions,gpp_bad,gpp_maybe,gps_fixed,gradient,grid_on,grid_view,group,group_add,groups,handyman,hd,headphones,help,help_outline,hide_image,history,home,home_repair_service,hourglass_empty,hourglass_top,how_to_reg,http,hub,image,inbox,info,insert_drive_file,integration_instructions,inventory,inventory_2,key,keyboard,keyboard_command_key,label,lan,language,laptop_chromebook,laptop_mac,laptop_windows,launch,light_mode,lightbulb,link,link_off,list,list_alt,local_cafe,lock,lock_clock,lock_open,lock_reset,login,logout,mail,map,maximize,memory,menu,menu_book,merge,message,minimize,monitor,monitor_heart,monitoring,more_vert,mouse,movie,music_note,my_location,network_check,notes,notifications,notifications_active,notifications_none,open_in_full,open_in_new,output,palette,partly_cloudy_day,password,payments,pending,pending_actions,people,person,person_add,person_remove,phone,phone_android,phone_iphone,photo,photo_camera,picture_as_pdf,pie_chart,pin,pip_exit,play_arrow,play_circle,playlist_add,policy,power_off,power_settings_new,precision_manufacturing,priority_high,public,publish,push_pin,qr_code,qr_code_2,qr_code_scanner,radar,radio_button_unchecked,receipt_long,redo,refresh,remove,remove_circle,remove_circle_outline,replay,restart_alt,restore,rocket_launch,route,router,rule,save,save_as,schedule,schedule_send,science,screen_share,screenshot_monitor,search,search_off,security,sell,send,sensors,sentiment_satisfied_alt,settings,settings_backup_restore,settings_ethernet,settings_remote,settings_suggest,share,shield,shield_person,skip_next,slideshow,slow_motion_video,smart_toy,smartphone,speed,star,sticky_note_2,stop,stop_circle,storage,supervisor_account,support_agent,swap_horiz,swap_vert,swipe,sync,sync_alt,system_update,tab_unselected,table_chart,table_view,tablet_mac,tag,task_alt,terminal,text_fields,text_format,thermostat,thunderstorm,timeline,timer,tips_and_updates,title,token,touch_app,translate,travel_explore,tune,undo,update,upload,upload_file,usb,verified,verified_user,vertical_align_bottom,videocam,view_carousel,view_column,view_in_ar,view_list,visibility,visibility_off,volume_off,volume_up,volunteer_activism,vpn_key,wallpaper,warning,warning_amber,water_drop,wb_sunny,web,webhook,widgets,wifi,wifi_off,workspaces,zoom_in,zoom_out +ac_unit,access_time,accessibility_new,account_circle,account_tree,add,add_circle,add_link,add_reaction,admin_panel_settings,album,alt_route,api,apps,archive,arrow_back,arrow_downward,arrow_forward,arrow_upward,article,assessment,assignment,attach_file,audiotrack,auto_awesome,auto_fix_high,auto_mode,autorenew,av1,backup,badge,bar_chart,bedtime,block,bolt,bookmarks,branding_watermark,bug_report,build,business,business_center,cable,call_split,category,cell_tower,chat,check,check_box,check_box_outline_blank,check_circle,checklist,chevron_left,chevron_right,cleaning_services,close,cloud,cloud_download,cloud_off,cloud_queue,cloud_upload,code,computer,confirmation_number,connected_tv,contacts,content_copy,content_paste,content_paste_off,contrast,copyright,corporate_fare,create,create_new_folder,crop_free,crop_square,dark_mode,dashboard,data_object,dataset,delete,delete_forever,delete_outline,delete_sweep,description,desktop_access_disabled,desktop_mac,desktop_windows,developer_board,device_hub,devices,devices_other,disc_full,dns,domain,done,done_all,donut_large,download,drag_handle,drive_file_rename_outline,drive_folder_upload,edit,edit_document,edit_note,electrical_services,email,engineering,enhanced_encryption,error,error_outline,event,event_note,expand_less,expand_more,extension,factory,favorite,fiber_manual_record,file_copy,file_download,filter_1,filter_alt,filter_none,fingerprint,fit_screen,flash_on,foggy,folder,folder_off,folder_open,folder_zip,format_align_left,format_color_fill,forum,fullscreen,fullscreen_exit,function,functions,gpp_bad,gpp_maybe,gps_fixed,gradient,grid_on,grid_view,group,group_add,groups,handyman,hd,headphones,help,help_outline,hide_image,history,home,home_repair_service,hourglass_empty,hourglass_top,how_to_reg,http,hub,image,inbox,info,insert_drive_file,integration_instructions,inventory,inventory_2,key,keyboard,keyboard_command_key,label,lan,language,laptop_chromebook,laptop_mac,laptop_windows,launch,light,light_mode,lightbulb,link,link_off,list,list_alt,local_cafe,lock,lock_clock,lock_open,lock_reset,login,logout,mail,map,maximize,memory,menu,menu_book,merge,message,minimize,monitor,monitor_heart,monitoring,more_horiz,more_vert,mouse,movie,music_note,my_location,network_check,notes,notifications,notifications_active,notifications_none,open_in_full,open_in_new,output,palette,partly_cloudy_day,password,payments,pending,pending_actions,people,person,person_add,person_remove,phone,phone_android,phone_iphone,photo,photo_camera,picture_as_pdf,pie_chart,pin,pip_exit,play_arrow,play_circle,playlist_add,policy,power_off,power_settings_new,precision_manufacturing,priority_high,public,publish,push_pin,qr_code,qr_code_2,qr_code_scanner,radar,radio_button_unchecked,receipt_long,redo,refresh,remove,remove_circle,remove_circle_outline,replay,restart_alt,restore,rocket_launch,route,router,rule,save,save_as,schedule,schedule_send,science,screen_share,screenshot_monitor,search,search_off,security,sell,send,sensors,sentiment_satisfied_alt,settings,settings_backup_restore,settings_ethernet,settings_remote,settings_suggest,share,shield,shield_person,skip_next,slideshow,slow_motion_video,smart_toy,smartphone,speed,star,sticky_note_2,stop,stop_circle,storage,supervisor_account,support_agent,swap_horiz,swap_vert,swipe,sync,sync_alt,system_update,tab_unselected,table_chart,table_view,tablet_mac,tag,task_alt,terminal,text_fields,text_format,thermostat,thunderstorm,timeline,timer,tips_and_updates,title,token,touch_app,translate,travel_explore,tune,undo,update,upload,upload_file,usb,verified,verified_user,vertical_align_bottom,videocam,view_carousel,view_column,view_in_ar,view_list,visibility,visibility_off,volume_off,volume_up,volunteer_activism,vpn_key,wallpaper,warning,warning_amber,water_drop,wb_sunny,web,webhook,widgets,wifi,wifi_off,workspaces,zoom_in,zoom_out diff --git a/web-nodejs/public/fonts/MaterialSymbolsOutlined.woff2 b/web-nodejs/public/fonts/MaterialSymbolsOutlined.woff2 index f875bf2d..617b68a8 100644 Binary files a/web-nodejs/public/fonts/MaterialSymbolsOutlined.woff2 and b/web-nodejs/public/fonts/MaterialSymbolsOutlined.woff2 differ diff --git a/web-nodejs/public/fonts/MaterialSymbolsRounded.woff2 b/web-nodejs/public/fonts/MaterialSymbolsRounded.woff2 index bddfa7d9..0e461c84 100644 Binary files a/web-nodejs/public/fonts/MaterialSymbolsRounded.woff2 and b/web-nodejs/public/fonts/MaterialSymbolsRounded.woff2 differ diff --git a/web-nodejs/public/js/settings.js b/web-nodejs/public/js/settings.js index 5818d674..b9fd6018 100644 --- a/web-nodejs/public/js/settings.js +++ b/web-nodejs/public/js/settings.js @@ -646,6 +646,14 @@ const activeTab = document.querySelector('.settings-tab-content.active'); if (!activeTab) return; + // Topics are settings pages in their own right: when the typed words + // match a topic name and nothing on this one, say which topic has it. + const tabs = Array.from(document.querySelectorAll('.settings-shell-tab, .settings-tab')); + const otherTopic = query ? tabs.find(tab => { + if (tab.classList.contains('active')) return false; + return (tab.textContent || '').toLowerCase().includes(query); + }) : null; + const panels = activeTab.querySelectorAll('.settings-panel, .settings-auth-panel.active .settings-panel'); let visible = 0; panels.forEach(panel => { @@ -661,7 +669,11 @@ }); if (status) { - if (query) { + if (query && !visible && otherTopic) { + status.textContent = tSettings('ui.search_topic', '{topic} is a separate topic') + .replace('{topic}', (otherTopic.textContent || '').trim()); + status.hidden = false; + } else if (query) { const tpl = tSettings('ui.search_results', '{count} matching sections'); status.textContent = tpl.replace('{count}', String(visible)); status.hidden = false; diff --git a/web-nodejs/public/js/ui-search.js b/web-nodejs/public/js/ui-search.js new file mode 100644 index 00000000..4e3e449e --- /dev/null +++ b/web-nodejs/public/js/ui-search.js @@ -0,0 +1,322 @@ +/** + * BetterDesk Console — global search (Ctrl+K / "/"). + * + * One field for pages, devices and people. Modelled on the redesign by + * @rathlinus (issue #493 / PR #495), rebuilt on this console: + * + * - pages come from the navigation the server rendered for this user + * (`window.BetterDesk.searchPages`, built in lib/consoleNav.js and filtered + * by panel access + RBAC, so the index never lists a page the role cannot + * open); + * - devices and people load on first use from the APIs the session may call, + * and are cached for a minute. + * + * Every word typed must match somewhere. Arrow keys move, Enter opens, Escape + * closes and returns focus to whatever opened the dialog. + */ +(function () { + 'use strict'; + + var t = function (key, fallback) { + if (typeof window._ === 'function') { + var v = window._(key); + if (v && v !== key) return v; + } + return fallback; + }; + var caps = (window.BetterDesk && window.BetterDesk.searchCaps) || {}; + var can = function (scope) { + // The server renders which searches this session may run, so the dialog + // never calls an API the role cannot use (and never probes for one). + return caps[scope] === true; + }; + var norm = function (s) { + return String(s == null ? '' : s).toLowerCase() + .normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + }; + + var overlay = null; + var input = null; + var list = null; + var status = null; + var opener = null; + var results = []; + var active = -1; + var cache = { devices: null, users: null, at: 0 }; + + function el(tag, cls, text) { + var n = document.createElement(tag); + if (cls) n.className = cls; + if (text !== undefined && text !== null) n.textContent = text; + return n; + } + + function fill(template, values) { + return String(template).replace(/\{(\w+)\}/g, function (m, k) { + return Object.prototype.hasOwnProperty.call(values, k) ? values[k] : m; + }); + } + + function api(path) { + if (window.Utils && typeof Utils.api === 'function') return Utils.api(path); + return fetch(path, { credentials: 'same-origin' }).then(function (res) { + if (!res.ok) throw new Error('HTTP ' + res.status); + return res.json(); + }); + } + + /* Reads one list out of the several shapes these endpoints use. */ + function listOf(payload, key) { + if (!payload) return []; + if (Array.isArray(payload)) return payload; + if (Array.isArray(payload[key])) return payload[key]; + if (payload.data) { + if (Array.isArray(payload.data)) return payload.data; + if (Array.isArray(payload.data[key])) return payload.data[key]; + } + return []; + } + + function loadData() { + if (cache.at && Date.now() - cache.at < 60000) return Promise.resolve(); + cache.at = Date.now(); + var jobs = []; + if (can('devices')) { + jobs.push(api('/api/devices').then(function (d) { + cache.devices = listOf(d, 'devices'); + }).catch(function () { cache.devices = null; })); + } + if (can('users')) { + jobs.push(api('/api/users').then(function (d) { + cache.users = listOf(d, 'users'); + }).catch(function () { cache.users = null; })); + } + return Promise.all(jobs); + } + + function matches(hay, words) { + var h = norm(hay); + return words.every(function (w) { return h.indexOf(w) !== -1; }); + } + + function search(q) { + var words = norm(q).split(/\s+/).filter(Boolean); + if (!words.length) return []; + var out = []; + + var pages = (window.BetterDesk && window.BetterDesk.searchPages) || []; + pages.filter(function (p) { + return matches([p.text, p.section, p.group, p.keywords].join(' '), words); + }).sort(function (a, b) { + var aStarts = norm(a.text).indexOf(words[0]) === 0 ? 1 : 0; + var bStarts = norm(b.text).indexOf(words[0]) === 0 ? 1 : 0; + return bStarts - aStarts; + }).slice(0, 6).forEach(function (p) { + out.push({ + kind: 'page', + title: p.text, + sub: [p.section, p.group].filter(Boolean).join(' › '), + href: p.href, + external: p.external, + }); + }); + + (cache.devices || []).filter(function (d) { + var tags = Array.isArray(d.tags) ? d.tags.join(' ') : (d.tags || ''); + return matches([d.id, d.hostname, d.display_name, d.alias, d.username, d.user, + d.platform, d.os, tags, d.note].join(' '), words); + }).slice(0, 8).forEach(function (d) { + var state = d.banned + ? t('status.banned', 'Banned') + : (d.online ? t('status.online', 'Online') : t('status.offline', 'Offline')); + out.push({ + kind: 'device', + title: d.display_name || d.hostname || d.id, + sub: [d.id, d.platform || d.os, state].filter(Boolean).join(' · '), + href: '/devices?search=' + encodeURIComponent(d.id) + '&open=' + encodeURIComponent(d.id), + }); + }); + + (cache.users || []).filter(function (u) { + return matches([u.username, u.email, u.role].join(' '), words); + }).slice(0, 5).forEach(function (u) { + out.push({ + kind: 'user', + title: u.username, + sub: [u.email, u.role].filter(Boolean).join(' · '), + href: '/users?search=' + encodeURIComponent(u.username), + }); + }); + + return out; + } + + var GROUP = { + page: function () { return t('search.group_pages', 'Pages'); }, + device: function () { return t('search.group_devices', 'Devices'); }, + user: function () { return t('search.group_people', 'People'); }, + }; + var ICON = { page: 'arrow_forward', device: 'desktop_windows', user: 'person' }; + + function render() { + list.textContent = ''; + var q = input.value.trim(); + results = search(q); + active = results.length ? 0 : -1; + var group = ''; + results.forEach(function (r, i) { + if (r.kind !== group) { + group = r.kind; + var heading = el('li', 'search-group', GROUP[r.kind]()); + heading.setAttribute('role', 'presentation'); + list.appendChild(heading); + } + var li = el('li', 'search-result'); + li.id = 'gs-opt-' + i; + li.setAttribute('role', 'option'); + li.setAttribute('aria-selected', i === active ? 'true' : 'false'); + var ic = el('span', 'material-icons', ICON[r.kind]); + ic.setAttribute('aria-hidden', 'true'); + li.appendChild(ic); + var main = el('span', 'search-result-main'); + main.appendChild(el('span', 'search-result-title', r.title)); + if (r.sub) main.appendChild(el('span', 'search-result-sub', r.sub)); + li.appendChild(main); + li.addEventListener('mousemove', function () { setActive(i); }); + li.addEventListener('click', function () { go(i); }); + list.appendChild(li); + }); + input.setAttribute('aria-activedescendant', active >= 0 ? 'gs-opt-' + active : ''); + if (!q) status.textContent = t('search.hint', 'Type a page, a device ID or name, or a person.'); + else if (!results.length) status.textContent = t('search.no_results', 'Nothing found. Try fewer or other words.'); + else status.textContent = fill(t('search.count', '{count} results'), { count: results.length }); + } + + function setActive(i) { + if (i === active || i < 0 || i >= results.length) return; + var prev = list.querySelector('[aria-selected="true"]'); + if (prev) prev.setAttribute('aria-selected', 'false'); + active = i; + var cur = document.getElementById('gs-opt-' + i); + if (cur) { + cur.setAttribute('aria-selected', 'true'); + if (typeof cur.scrollIntoView === 'function') cur.scrollIntoView({ block: 'nearest' }); + } + input.setAttribute('aria-activedescendant', 'gs-opt-' + i); + } + + function go(i) { + var r = results[i]; + if (!r) return; + close(false); + if (r.external) window.open(r.href, '_blank', 'noopener'); + else window.location.href = r.href; + } + + function build() { + overlay = el('div', 'search-overlay'); + overlay.hidden = true; + var dialog = el('div', 'search-dialog'); + dialog.setAttribute('role', 'dialog'); + dialog.setAttribute('aria-modal', 'true'); + dialog.setAttribute('aria-label', t('search.title', 'Search')); + + var row = el('div', 'search-field'); + var ic = el('span', 'material-icons', 'search'); + ic.setAttribute('aria-hidden', 'true'); + input = el('input', 'form-input'); + input.type = 'text'; + input.setAttribute('role', 'combobox'); + input.setAttribute('aria-expanded', 'true'); + input.setAttribute('aria-controls', 'gs-results'); + input.setAttribute('aria-autocomplete', 'list'); + input.setAttribute('aria-label', t('search.title', 'Search')); + input.placeholder = t('search.placeholder', 'Search pages, devices and people'); + input.autocomplete = 'off'; + input.spellcheck = false; + row.appendChild(ic); + row.appendChild(input); + dialog.appendChild(row); + + list = el('ul', 'search-results'); + list.id = 'gs-results'; + list.setAttribute('role', 'listbox'); + list.setAttribute('aria-label', t('search.results', 'Results')); + dialog.appendChild(list); + + status = el('p', 'search-status'); + status.setAttribute('aria-live', 'polite'); + dialog.appendChild(status); + + dialog.appendChild(el('p', 'search-keys', + t('search.keys', 'Arrow keys to move, Enter to open, Esc to close.'))); + overlay.appendChild(dialog); + document.body.appendChild(overlay); + + overlay.addEventListener('mousedown', function (e) { + if (e.target === overlay) close(true); + }); + input.addEventListener('input', render); + input.addEventListener('keydown', function (e) { + if (e.key === 'ArrowDown') { + e.preventDefault(); + setActive(Math.min(results.length - 1, active + 1)); + } else if (e.key === 'ArrowUp') { + e.preventDefault(); + setActive(Math.max(0, active - 1)); + } else if (e.key === 'Enter') { + e.preventDefault(); + go(active); + } else if (e.key === 'Escape') { + e.preventDefault(); + close(true); + } else if (e.key === 'Tab') { + e.preventDefault(); + } + }); + } + + function open(from) { + if (!overlay) build(); + if (!overlay.hidden) return; + opener = from || document.activeElement; + overlay.hidden = false; + document.documentElement.classList.add('search-open'); + input.value = ''; + render(); + input.focus(); + loadData().then(function () { + if (!overlay.hidden) render(); + }); + } + + function close(returnFocus) { + if (!overlay || overlay.hidden) return; + overlay.hidden = true; + document.documentElement.classList.remove('search-open'); + if (returnFocus && opener && document.contains(opener)) opener.focus(); + } + + document.addEventListener('keydown', function (e) { + var target = e.target; + var typing = target && target.closest + && target.closest('input, textarea, select, [contenteditable="true"]'); + if ((e.ctrlKey || e.metaKey) && (e.key === 'k' || e.key === 'K')) { + e.preventDefault(); + open(document.activeElement); + } else if (e.key === '/' && !typing && !e.ctrlKey && !e.metaKey && !e.altKey) { + e.preventDefault(); + open(document.activeElement); + } + }); + + document.addEventListener('click', function (e) { + var trigger = e.target.closest && e.target.closest('[data-global-search]'); + if (trigger) { + e.preventDefault(); + open(trigger); + } + }); + + window.UiSearch = { open: open, close: close }; +})(); diff --git a/web-nodejs/public/js/ux35-shell.js b/web-nodejs/public/js/ux35-shell.js index 33418511..00b893fe 100644 --- a/web-nodejs/public/js/ux35-shell.js +++ b/web-nodejs/public/js/ux35-shell.js @@ -623,10 +623,27 @@ var items = section.querySelectorAll('.ux35-sidebar-item'); var visible = 0; items.forEach(function (item) { + // The "More" toggle is not a destination: it counts only when + // one of the links it reveals matched (handled below). + var isMoreToggle = item.classList.contains('nav-more-toggle'); var label = (item.textContent || '').toLowerCase(); var match = !q || label.indexOf(q) !== -1; - item.classList.toggle('is-filter-hidden', !match); - if (match) visible++; + item.classList.toggle('is-filter-hidden', match ? false : true); + if (match && !isMoreToggle) visible++; + }); + // A "More" row stays only while it still holds a match, and it + // opens so nothing found can hide behind it. + section.querySelectorAll('.nav-more').forEach(function (row) { + var matches = row.querySelectorAll('.ux35-sidebar-item:not(.nav-more-toggle):not(.is-filter-hidden)').length; + var keep = !q || matches > 0; + row.classList.toggle('is-filter-hidden', !keep); + if (q && keep) { + var list = row.querySelector('.nav-more-list'); + var button = row.querySelector('.nav-more-toggle'); + if (list) list.hidden = false; + if (button) button.setAttribute('aria-expanded', 'true'); + visible += matches; + } }); section.classList.toggle('is-filter-empty', q !== '' && visible === 0); if (q) section.classList.remove('is-collapsed'); diff --git a/web-nodejs/public/js/ux36-shell.js b/web-nodejs/public/js/ux36-shell.js index eb166b3c..432e09be 100644 --- a/web-nodejs/public/js/ux36-shell.js +++ b/web-nodejs/public/js/ux36-shell.js @@ -2,15 +2,16 @@ * BetterDesk Console — UX 3.6 (beta) shell controller. * * Layered on top of ux35-shell.js, which already owns the drawer, the sidebar - * resize handle, the theme toggle, the section collapse toggle and its - * persistence (same element ids and classes are reused on purpose, so there is - * exactly one implementation of each behaviour). + * resize handle, the theme toggle, the section collapse toggle, the menu + * filter and its persistence (same element ids and classes are reused on + * purpose, so there is exactly one implementation of each behaviour). * * This file only adds what the grouped layout needs: * - first-visit default: expand the group that contains the active page and * collapse the others (the redesign's "one open group" model); - * - keep groups open while the menu filter has a query, so matches cannot hide - * behind a collapsed heading. + * - the per-section "More" row, remembered per browser; + * - keep groups open while the menu filter has a query, so matches cannot + * hide behind a collapsed heading. * * The shell switch itself lives in ui-shell.js, because the toggle is rendered * in both shells. @@ -20,18 +21,20 @@ /* Shared with ux35-shell.js — do not introduce a second key. */ var COLLAPSE_KEY = 'bd_ux35_sidebar_collapsed'; + /* "More" rows are a beta affordance; UX 3.5 has no such row. */ + var MORE_KEY = 'bd_ux36_nav_more_open'; - function readCollapsed() { + function readJson(storage, key) { try { - var raw = sessionStorage.getItem(COLLAPSE_KEY); + var raw = storage.getItem(key); return raw ? (JSON.parse(raw) || {}) : null; } catch (e) { return null; } } - function writeCollapsed(state) { - try { sessionStorage.setItem(COLLAPSE_KEY, JSON.stringify(state)); } catch (e) { /* storage blocked */ } + function writeJson(storage, key, value) { + try { storage.setItem(key, JSON.stringify(value)); } catch (e) { /* storage blocked */ } } function setSectionOpen(section, open) { @@ -54,7 +57,7 @@ var sections = Array.prototype.slice.call(nav.querySelectorAll('.ux36-nav-section')); if (!sections.length) return; - var stored = readCollapsed(); + var stored = readJson(sessionStorage, COLLAPSE_KEY); if (stored && Object.keys(stored).length) return; var state = {}; @@ -64,7 +67,53 @@ setSectionOpen(section, isActive); state[id] = !isActive; }); - writeCollapsed(state); + writeJson(sessionStorage, COLLAPSE_KEY, state); + } + + /** "More" rows: one row per section, state kept in this browser. */ + function initMoreRows() { + var nav = document.getElementById('ux35-sidebar-nav'); + if (!nav) return; + + var rows = Array.prototype.slice.call(nav.querySelectorAll('.nav-more')); + if (!rows.length) return; + + var state = readJson(localStorage, MORE_KEY) || {}; + var moreLabel = nav.getAttribute('data-more-label') || ''; + var fewerLabel = nav.getAttribute('data-fewer-label') || ''; + + function setOpen(row, open) { + var list = row.querySelector('.nav-more-list'); + var button = row.querySelector('.nav-more-toggle'); + if (!list || !button) return; + list.hidden = !open; + button.setAttribute('aria-expanded', open ? 'true' : 'false'); + var label = button.querySelector('.nav-label'); + var next = open ? fewerLabel : moreLabel; + if (label && next) label.textContent = next; + var chevron = button.querySelector('.nav-more-chevron'); + if (chevron) chevron.textContent = open ? 'expand_less' : 'expand_more'; + } + + rows.forEach(function (row) { + var id = row.getAttribute('data-more') || ''; + var button = row.querySelector('.nav-more-toggle'); + if (!button) return; + + // The partial already opened the row that holds the active page. + var open = button.getAttribute('aria-expanded') === 'true'; + if (id && Object.prototype.hasOwnProperty.call(state, id)) open = !!state[id]; + setOpen(row, open); + + button.addEventListener('click', function () { + var next = button.getAttribute('aria-expanded') !== 'true'; + setOpen(row, next); + if (!id) return; + if (next) state[id] = true; + else delete state[id]; + writeJson(localStorage, MORE_KEY, state); + }); + }); } function initFilterSync() { @@ -77,12 +126,24 @@ if (section.classList.contains('is-filter-empty')) return; setSectionOpen(section, true); }); + // Every match must be reachable: open the "More" rows as well. + Array.prototype.forEach.call(nav.querySelectorAll('.nav-more'), function (row) { + var list = row.querySelector('.nav-more-list'); + var button = row.querySelector('.nav-more-toggle'); + if (!list || !button) return; + if (row.classList.contains('is-filter-empty')) return; + if (list.hidden) { + list.hidden = false; + button.setAttribute('aria-expanded', 'true'); + } + }); }); } function init() { if (window.BetterDesk && window.BetterDesk.embed) return; initSections(); + initMoreRows(); initFilterSync(); } diff --git a/web-nodejs/tests/ux36-all-pages.render.test.js b/web-nodejs/tests/ux36-all-pages.render.test.js new file mode 100644 index 00000000..4692ec0e --- /dev/null +++ b/web-nodejs/tests/ux36-all-pages.render.test.js @@ -0,0 +1,144 @@ +'use strict'; + +/** + * UX 3.6 beta — every console page renders in both shells. + * + * The focused tests in `ux36-pages.render.test.js` cover the pages the beta + * lays out by hand (dashboard, devices, settings). This suite walks every view + * that uses the main layout, so a new page cannot ship with a broken shell + * branch, a beta-only asset leaking into UX 3.5, or a beta page without its + * own chrome. + * + * Views that need request-specific locals (remote viewer, studio, portal, + * login screens) are out of scope: they do not use the main layout or are + * asserted elsewhere. + */ + +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const ejs = require('ejs'); + +const root = path.join(__dirname, '..'); +const views = path.join(root, 'views'); +const en = JSON.parse(fs.readFileSync(path.join(root, 'lang', 'en.json'), 'utf8')); +const { buildNav } = require('../lib/consoleNav'); + +function translate(key) { + const value = key.split('.').reduce((cur, part) => ( + cur && typeof cur === 'object' && part in cur ? cur[part] : undefined + ), en); + return typeof value === 'string' && value.length ? value : key; +} + +/** Any local a view asks for is present, so only real template errors surface. */ +function locals(shell, page) { + const nav = buildNav({ + t: translate, + allows: () => true, + can: () => true, + role: 'admin', + currentPage: page, + }); + const base = { + _: translate, + t: translate, + req: { t: translate }, + lang: 'en', + title: translate(`nav.${page}`), + appName: 'BetterDesk', + appDescription: 'test', + cacheVersion: 'test', + cspNonce: 'nonce', + csrfToken: 'csrf', + user: { username: 'admin', role: 'admin' }, + branding: {}, + translations: {}, + availableLanguageList: [], + availableLanguages: {}, + themePalettes: {}, + embed: false, + isSuperAdmin: true, + hasPermission: () => true, + hasSectionAccess: () => true, + buildConsoleNav: () => nav, + uiShell: shell, + uiShellBeta: shell === 'ux36', + currentPage: page, + activePage: page, + consoleTab: '', + breadcrumb: [], + canServerConfig: true, + canBrandingEdit: true, + sessionPolicy: null, + appVersion: '3.6.0-test', + consoleSearchPages: [], + // Page-specific detail locals the views read directly. + pageStyles: [], + pageScripts: [], + activeTab: 'overview', + deviceId: '123456789', + orgId: 'org-test', + suggested_host: 'panel.example.test', + escapeHtml: (value) => String(value == null ? '' : value) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"'), + }; + return new Proxy(base, { + has: () => true, + get: (target, prop) => (prop in target ? target[prop] : undefined), + }); +} + +const MAIN_LAYOUT_VIEWS = fs.readdirSync(views) + .filter((file) => file.endsWith('.ejs')) + .filter((file) => fs.readFileSync(path.join(views, file), 'utf8').includes("layouts/main")); + +function render(file, shell) { + const page = file.replace(/\.ejs$/, ''); + const full = path.join(views, file); + return ejs.render(fs.readFileSync(full, 'utf8'), locals(shell, page), { + filename: full, + root: views, + // The console renders these pages with view locals in scope (the + // defaults below), so a view that reads an optional local the test + // does not set must see `undefined` instead of throwing. + _with: true, + }); +} + +describe('UX 3.6 beta — every main-layout page', () => { + it('finds the pages that use the main layout', () => { + assert.ok(MAIN_LAYOUT_VIEWS.length >= 25, `only ${MAIN_LAYOUT_VIEWS.length} views found`); + }); + + MAIN_LAYOUT_VIEWS.forEach((file) => { + describe(file, () => { + it('renders under UX 3.5 without beta chrome or beta assets', () => { + const html = render(file, 'ux35'); + assert.ok(html.length > 500, 'page rendered empty'); + assert.match(html, /data-ui-shell="ux35"/); + assert.doesNotMatch(html, /ux36-sidebar/); + assert.doesNotMatch(html, /\/css\/ux36\/(tokens|base|components|palette|shell|pages)\.css/); + assert.doesNotMatch(html, /\/js\/ui-search\.js/); + assert.doesNotMatch(html, /nav-more-toggle/); + }); + + it('renders under UX 3.6 with the grouped shell', () => { + const html = render(file, 'ux36'); + assert.match(html, /data-ui-shell="ux36"/); + assert.match(html, /class="ux35-shell ux36-shell" id="app"/); + assert.match(html, /class="ux35-sidebar ux36-sidebar"/); + assert.match(html, /\/css\/ux36\/pages\.css/); + // Search and its server-built index load only in the beta. + assert.match(html, /\/js\/ui-search\.js/); + assert.match(html, /searchPages:/); + // UX 3.5 assets stay shared, never forked. + assert.match(html, /\/css\/ux35\.css/); + assert.match(html, /\/js\/ux35-shell\.js/); + }); + }); + }); +}); diff --git a/web-nodejs/tests/ux36-pages.render.test.js b/web-nodejs/tests/ux36-pages.render.test.js index 6df44749..5a47056c 100644 --- a/web-nodejs/tests/ux36-pages.render.test.js +++ b/web-nodejs/tests/ux36-pages.render.test.js @@ -113,6 +113,34 @@ describe('UX 3.6 beta pages render in both shells', () => { assert.match(html, /name="ui-shell" value="ux36" checked>/); }); + it('searches settings inside the beta shell as well', () => { + const html = renderPage('settings.ejs', 'ux36', 'settings'); + // The field the search script binds to is rendered in both shells… + assert.match(html, /id="settings-search-input"/); + assert.match(html, /id="settings-search-status"/); + // …and the beta sheet restyles it as plain text in the page column. + const css = fs.readFileSync(path.join(root, 'public', 'css', 'ux36', 'pages.css'), 'utf8'); + assert.match(css, /\.ux36-page \.settings-search/); + }); + + it('gives every other console page the beta rhythm', () => { + const css = fs.readFileSync(path.join(root, 'public', 'css', 'ux36', 'pages.css'), 'utf8'); + // One content column per page root, whatever the page is called. + ['tickets-page', 'users-page', 'chat-sidebar', 'fleet-tabs', 'tokens-stats'].forEach((name) => { + assert.ok(css.includes(`.${name}`), `pages.css should mention .${name}`); + }); + // Cards become ruled sections; nothing in the beta keeps a float shadow. + const shadows = css.match(/box-shadow:\s*([^;]+);/g) || []; + const odd = shadows.filter((line) => !/box-shadow:\s*none\s*;/.test(line)); + assert.deepStrictEqual(odd, [], `beta sheets should not cast shadows: ${odd.join(' | ')}`); + // Every custom property the beta uses must exist in its own token sheet. + const tokens = fs.readFileSync(path.join(root, 'public', 'css', 'ux36', 'tokens.css'), 'utf8'); + const used = new Set((css.match(/var\(--[a-z0-9-]+/g) || []).map((m) => m.slice(4))); + const defined = new Set([...tokens.matchAll(/(--[a-z0-9-]+)\s*:/g)].map((m) => m[1])); + const missing = [...used].filter((name) => !defined.has(name)); + assert.deepStrictEqual(missing, [], `undefined tokens: ${missing.join(', ')}`); + }); + it('marks the active navigation item and the current crumb for assistive tech', () => { const beta = renderPage('devices.ejs', 'ux36', 'devices'); // One on the sidebar item, one on the breadcrumb's last crumb — the diff --git a/web-nodejs/tests/ux36-scroll-chain.test.js b/web-nodejs/tests/ux36-scroll-chain.test.js new file mode 100644 index 00000000..05448889 --- /dev/null +++ b/web-nodejs/tests/ux36-scroll-chain.test.js @@ -0,0 +1,132 @@ +'use strict'; + +/** + * UX 3.6 shell — the page column scrolls, the shell does not. + * + * A regression shipped here once: the beta shell declared only min-height while + * page sheets (main.css `body.app-page`) clip overflow, so the shell grew past + * the viewport with nothing left to scroll. On Devices (a long table) the list + * could not be scrolled at all, and the floating horizontal scrollbar — which is + * positioned from the table container's bounding box against the content box — + * ended up at the very bottom of the list instead of the bottom of the screen. + * + * These tests pin the scroll chain and the bar's anchoring, because both are + * easy to break by "just removing overflow" in one place. + */ + +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +const root = path.join(__dirname, '..'); +const read = (...parts) => fs.readFileSync(path.join(root, ...parts), 'utf8'); + +const shellCss = read('public', 'css', 'ux36', 'shell.css'); +const mainCss = read('public', 'css', 'main.css'); +const devicesCss = read('public', 'css', 'devices.css'); +const devicesJs = read('public', 'js', 'devices.js'); + +/** Body of one CSS rule, by selector (first match, top-level). */ +function ruleBody(css, selector) { + const escaped = selector.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + const match = css.match(new RegExp(`(^|\\n)\\s*${escaped}\\s*\\{([^}]*)\\}`, 'm')); + return match ? match[2] : null; +} + +describe('UX 3.6 shell scroll chain', () => { + it('gives the shell a viewport height and clips its own overflow', () => { + const body = ruleBody(shellCss, '.ux35-shell'); + assert.ok(body, '.ux35-shell rule missing'); + assert.match(body, /height:\s*100dvh/, 'shell must fill the viewport'); + assert.match(body, /overflow:\s*hidden/, 'the shell itself must not scroll'); + // min-height alone is the bug: it lets the shell grow past the viewport. + assert.doesNotMatch(body, /^\s*min-height:\s*100dvh;\s*$/m, + 'min-height alone leaves nothing to scroll when the body clips overflow'); + }); + + it('keeps embedded windows content-sized', () => { + const body = ruleBody(shellCss, '.ux35-shell.embed-mode'); + assert.ok(body, 'embed-mode rule missing'); + assert.match(body, /height:\s*auto/); + assert.match(body, /overflow:\s*visible/); + }); + + it('makes the page column the single scroll box', () => { + const main = ruleBody(shellCss, '.ux35-main'); + assert.ok(main, '.ux35-main rule missing'); + assert.match(main, /overflow:\s*hidden/, 'main must clip so the content column can scroll'); + + const content = ruleBody(shellCss, '.ux35-content.main-content'); + assert.ok(content, '.ux35-content.main-content rule missing'); + assert.match(content, /overflow-y:\s*auto/, 'the content column is the scrollport'); + assert.doesNotMatch(content, /overflow:\s*visible/, + 'overflow: visible disables scrolling entirely under a clipped body'); + }); + + it('does not offset the sidebar by the top bar', () => { + // Sticky was correct while the document scrolled; inside a fixed shell it + // would push the sidebar down by the top bar's height instead. + const sidebar = ruleBody(shellCss, '.ux35-sidebar'); + assert.ok(sidebar, '.ux35-sidebar rule missing'); + assert.doesNotMatch(sidebar, /position:\s*sticky/, + 'the shell does not scroll, so the sidebar must not be sticky'); + assert.match(sidebar, /height:\s*100%/, 'the sidebar fills its column'); + }); + + it('keeps the drawer fixed below the drawer breakpoint', () => { + // The drawer replaces the in-flow sidebar; it must stay positioned to the + // viewport rather than inherit height: 100% from the desktop rule. + const drawerBlock = shellCss.slice(shellCss.indexOf('@media (max-width: 1099px)')); + assert.match(drawerBlock, /\.ux35-sidebar\s*\{[^}]*position:\s*fixed/); + assert.match(drawerBlock, /\.ux35-sidebar\s*\{[^}]*height:\s*auto/); + }); + + it('matches the reason the body clips overflow in the first place', () => { + // If main.css ever stops clipping the body, this test should be revisited + // rather than silently passing on a stale assumption. + assert.match(mainCss, /body\.app-page\s*\{[^}]*overflow:\s*hidden/); + }); +}); + +describe('Devices horizontal scrollbar anchoring', () => { + it('positions the floating bar from the content box, not the page bottom', () => { + // The bar is fixed and placed relative to the content box's viewport + // rect. If the content box were unconstrained, that rect would end at the + // bottom of the table instead of the bottom of the screen. + assert.match(devicesJs, /getBoundingClientRect\(\)/); + assert.match(devicesJs, /viewportRect\.bottom - barHeight/); + assert.match(devicesJs, /const mainContent = document\.querySelector\('\.main-content'\)/); + }); + + it('listens for scrolling on the element that actually scrolls', () => { + // The beta shell scrolls .main-content (not the window), so the bar has + // to recompute on that element's scroll events. + assert.match(devicesJs, /mainContent\.addEventListener\('scroll', updateTableHScroll/); + assert.match(devicesJs, /window\.addEventListener\('scroll', updateTableHScroll/); + }); + + it('keeps the bar clear of the docked bottom navigation', () => { + // On phones the shell docks a fixed bottom nav; the bar must sit above it + // or the last rows of the table stay unreachable. + assert.match(devicesJs, /querySelector\('\.mobile-bottom-nav'\)/); + assert.match(devicesJs, /reservedBottom/); + assert.match(devicesJs, /viewportRect\.bottom - barHeight - reservedBottom/); + }); + + it('lets a workspace fill the column without a second scroll range', () => { + // Chat is sized to the viewport, so the column must stop scrolling for it; + // otherwise the page gets an empty scroll range of its own. + const pagesCss = read('public', 'css', 'ux36', 'pages.css'); + assert.match(pagesCss, /\.ux36-page \.ux35-content:has\(\.chat-page\)\s*\{[^}]*overflow:\s*hidden/); + assert.match(pagesCss, /\.ux36-page \.chat-page\s*\{[^}]*height:\s*100%/); + }); +}); + +describe('Devices table horizontal scrollport', () => { + it('keeps the native table scrollport but hides its own scrollbar', () => { + const scroll = ruleBody(devicesCss, '.devices-table-scroll'); + assert.ok(scroll, '.devices-table-scroll rule missing'); + assert.match(scroll, /overflow-x:\s*auto/, 'the table still scrolls horizontally'); + assert.match(scroll, /scrollbar-width:\s*none/, 'its own bar is replaced by the floating one'); + }); +}); diff --git a/web-nodejs/tests/ux36-shell.test.js b/web-nodejs/tests/ux36-shell.test.js index 3887d302..4a9b8485 100644 --- a/web-nodejs/tests/ux36-shell.test.js +++ b/web-nodejs/tests/ux36-shell.test.js @@ -100,6 +100,43 @@ describe('UX 3.6 beta shell contract', () => { assert.deepStrictEqual([...missing], []); }); + it('exposes a search index limited to what the role may open', () => { + const { buildSearchPages } = require('../lib/consoleNav'); + const ctx = { + t: translate, + allows: () => true, + can: () => true, + role: 'admin', + }; + const all = buildSearchPages(ctx); + assert.ok(all.length > 30, 'index should cover every visible page'); + assert.ok(all.every((p) => typeof p.href === 'string' && p.href.length > 0)); + // Keywords make old page names findable after the regrouping. + const keys = all.find((p) => p.href === '/keys'); + assert.match(keys.keywords, /rustdesk|keys/i); + + const restricted = buildSearchPages({ ...ctx, can: () => false, allows: () => true }); + const hrefs = restricted.map((p) => p.href); + assert.ok(!hrefs.includes('/settings?tab=backup')); + // Panel access still gates the index: nothing passes when it denies. + assert.strictEqual(buildSearchPages({ ...ctx, allows: () => false }).length, 0); + }); + + it('keeps the search index and the sidebar on the same page list', () => { + const { buildSearchPages } = require('../lib/consoleNav'); + const ctx = { + t: translate, + allows: () => true, + can: () => true, + role: 'admin', + currentPage: 'devices', + }; + const navHrefs = buildNav(ctx).sections + .flatMap((s) => s.pages.map((p) => p.href)).sort(); + const searchHrefs = buildSearchPages(ctx).map((p) => p.href).sort(); + assert.deepStrictEqual(searchHrefs, navHrefs); + }); + it('only points at panel access sections that exist in the catalog', () => { const known = new Set(PANEL_ACCESS_CATALOG.map((entry) => entry.key)); SECTIONS.forEach((section) => { @@ -139,6 +176,41 @@ describe('UX 3.6 beta shell contract', () => { assert.doesNotMatch(sidebar, /hasSectionAccess\(/); }); + it('renders the menu filter, the More row and the pre-paint restore', () => { + const sidebar = read('views', 'partials', 'ux36-sidebar.ejs'); + // The filter input ux35-shell.js already binds to lives in the beta sidebar too. + assert.match(sidebar, /id="ux35-sidebar-filter-input"/); + // Sections split into core links plus their own "More" row. + assert.match(sidebar, /nav-more-toggle/); + assert.match(sidebar, /nav-more-list/); + assert.match(sidebar, /_splitPages\(section\.pages\)/); + // Restored before the first paint, with the keys ux35-shell.js writes. + assert.match(sidebar, / @@ -145,6 +152,7 @@ <% } %> <% if (isBetaShell) { %> + <% } %> diff --git a/web-nodejs/views/partials/ux36-sidebar.ejs b/web-nodejs/views/partials/ux36-sidebar.ejs index 04c4d82b..4e418ec0 100644 --- a/web-nodejs/views/partials/ux36-sidebar.ejs +++ b/web-nodejs/views/partials/ux36-sidebar.ejs @@ -4,9 +4,16 @@ * (issue #493 / PR #495), rebuilt on the current console. * * The model comes from lib/consoleNav.js: five sections (Devices, Support, - * People, Activity, Settings). Each section keeps its pages in a