Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions interface/src/components/ui/Listbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,23 @@ export interface ListboxProps {
// the list is fixed to the viewport so a scrolling dialog or section can't clip it
const GAP = 4;
const MARGIN = 8;
const MAX_HEIGHT = 360;
// tall enough for the language list (14 × ~40px) when the trigger is near the top,
// e.g. the sign-in page; still capped so a mid-page select doesn't cover the screen
const MAX_HEIGHT = 600;
const MIN_BELOW = 200;
const MIN_WIDTH = 120;

const placeList = (trigger: HTMLElement): CSSProperties => {
const r = trigger.getBoundingClientRect();
const below = window.innerHeight - r.bottom - GAP - MARGIN;
const above = r.top - GAP - MARGIN;
const up = below < MIN_BELOW && above > below;
const width = Math.max(r.width, MIN_WIDTH);
// keep the menu on-screen when the trigger is on the right (sign-in language select)
const left = Math.min(r.left, window.innerWidth - width - MARGIN);
return {
left: r.left,
width: r.width,
left: Math.max(MARGIN, left),
width,
maxHeight: Math.min(MAX_HEIGHT, up ? above : below),
...(up ? { bottom: window.innerHeight - r.top + GAP } : { top: r.bottom + GAP })
};
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/bg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ const bg: Translation = {
SYS_NO_RESULTS: 'Няма намерени резултати. Опитайте „Всички стойности“ или друга дума.',
SYS_SEARCH_PLACES: 'Страници и модули',
SYS_NOTHING_HERE: 'Няма данни за показване в изглед „Основни“.',
SYS_HIDDEN: 'Скрити: {num}',
SYS_HIDDEN: '{num} скрити',
SYS_SEARCH_RESULTS: 'Резултати от търсенето',
SYS_CHANGED_WAS: 'променено (беше: {0})',
SYS_NO_DEVICES: 'Все още няма открити устройства.',
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/cs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const cs: Translation = {
SYS_NO_RESULTS: 'Nic nenalezeno. Zkuste všechny hodnoty nebo jiný výraz.', // draft, please review
SYS_SEARCH_PLACES: 'Stránky a moduly', // draft, please review
SYS_NOTHING_HERE: 'V úrovni Nezbytné se zde nic nezobrazuje.',
SYS_HIDDEN: 'Skryté: {num}',
SYS_HIDDEN: '{num} skryté',
SYS_SEARCH_RESULTS: 'Výsledky hledání', // draft, please review
SYS_CHANGED_WAS: 'změněno (dříve: {0})', // draft, please review
SYS_NO_DEVICES: 'Zatím nebyla nalezena žádná zařízení.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/de/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const de: Translation = {
SYS_NO_RESULTS: 'Nichts gefunden. Probiere alle Werte oder einen anderen Begriff.', // draft, please review
SYS_SEARCH_PLACES: 'Seiten und Module', // draft, please review
SYS_NOTHING_HERE: 'Hier gibt es in der Stufe Wesentlich nichts anzuzeigen.',
SYS_HIDDEN: 'Verborgen: {num}',
SYS_HIDDEN: '{num} verborgen',
SYS_SEARCH_RESULTS: 'Suchergebnisse', // draft, please review
SYS_CHANGED_WAS: 'geändert (vorher: {0})', // draft, please review
SYS_NO_DEVICES: 'Noch keine Geräte gefunden.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const en: BaseTranslation = {
SYS_NO_RESULTS: 'Nothing found. Try all values or another term.', // draft, please review
SYS_SEARCH_PLACES: 'Pages and Modules', // draft, please review
SYS_NOTHING_HERE: 'There is nothing to show here at the Essential level.',
SYS_HIDDEN: 'Hidden: {num}',
SYS_HIDDEN: '{num} hidden',
SYS_SEARCH_RESULTS: 'Search Results', // draft, please review
SYS_CHANGED_WAS: 'changed (was: {0})', // draft, please review
SYS_NO_DEVICES: 'No devices found yet.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const fr: Translation = {
SYS_NO_RESULTS: 'Aucun résultat. Essayez toutes les valeurs ou un autre terme.', // draft, please review
SYS_SEARCH_PLACES: 'Pages et modules', // draft, please review
SYS_NOTHING_HERE: 'Rien à afficher ici au niveau Essentiel.',
SYS_HIDDEN: 'Masqués : {num}',
SYS_HIDDEN: '{num} masqués',
SYS_SEARCH_RESULTS: 'Résultats de la recherche', // draft, please review
SYS_CHANGED_WAS: 'modifié (avant : {0})', // draft, please review
SYS_NO_DEVICES: 'Aucun appareil trouvé pour l’instant.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/hu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const hu: Translation = {
SYS_NO_RESULTS: 'Nincs találat. Próbáld az összes értéket vagy másik kifejezést.', // draft, please review
SYS_SEARCH_PLACES: 'Oldalak és modulok', // draft, please review
SYS_NOTHING_HERE: 'Lényeges szinten itt nincs megjeleníthető elem.',
SYS_HIDDEN: 'Elrejtve: {num}',
SYS_HIDDEN: '{num} elrejtve',
SYS_SEARCH_RESULTS: 'Keresési találatok', // draft, please review
SYS_CHANGED_WAS: 'módosítva (előtte: {0})', // draft, please review
SYS_NO_DEVICES: 'Még nem található eszköz.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/it/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const it: Translation = {
SYS_NO_RESULTS: 'Nessun risultato. Prova con tutti i valori o un altro termine.', // draft, please review
SYS_SEARCH_PLACES: 'Pagine e moduli', // draft, please review
SYS_NOTHING_HERE: 'Nessun elemento da mostrare qui al livello Essenziale.',
SYS_HIDDEN: 'Nascosti: {num}',
SYS_HIDDEN: '{num} nascosti',
SYS_SEARCH_RESULTS: 'Risultati della ricerca', // draft, please review
SYS_CHANGED_WAS: 'modificato (prima: {0})', // draft, please review
SYS_NO_DEVICES: 'Nessun dispositivo trovato.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/nl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const nl: Translation = {
SYS_NO_RESULTS: 'Niets gevonden. Probeer alle waarden of een andere term.', // draft, please review
SYS_SEARCH_PLACES: 'Pagina\'s en modules', // draft, please review
SYS_NOTHING_HERE: 'Op niveau Essentieel is hier niets te tonen.',
SYS_HIDDEN: 'Verborgen: {num}',
SYS_HIDDEN: '{num} verborgen',
SYS_SEARCH_RESULTS: 'Zoekresultaten', // draft, please review
SYS_CHANGED_WAS: 'gewijzigd (was: {0})', // draft, please review
SYS_NO_DEVICES: 'Nog geen apparaten gevonden.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/no/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const no: Translation = {
SYS_NO_RESULTS: 'Ingen treff. Prøv alle verdier eller et annet søkeord.', // draft, please review
SYS_SEARCH_PLACES: 'Sider og moduler', // draft, please review
SYS_NOTHING_HERE: 'Ingenting å vise her på nivå Essensiell.',
SYS_HIDDEN: 'Skjult: {num}',
SYS_HIDDEN: '{num} skjult',
SYS_SEARCH_RESULTS: 'Søkeresultater', // draft, please review
SYS_CHANGED_WAS: 'endret (var: {0})', // draft, please review
SYS_NO_DEVICES: 'Ingen enheter funnet ennå.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/pl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const pl: Translation = {
SYS_NO_RESULTS: 'Nic nie znaleziono. Spróbuj wszystkich wartości lub innego terminu.', // draft, please review
SYS_SEARCH_PLACES: 'Strony i moduły', // draft, please review
SYS_NOTHING_HERE: 'Na poziomie Istotne nie ma tu nic do pokazania.',
SYS_HIDDEN: 'Ukryte: {num}',
SYS_HIDDEN: '{num} ukryte',
SYS_SEARCH_RESULTS: 'Wyniki wyszukiwania', // draft, please review
SYS_CHANGED_WAS: 'zmieniono (było: {0})', // draft, please review
SYS_NO_DEVICES: 'Nie znaleziono jeszcze urządzeń.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/sk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const sk: Translation = {
SYS_NO_RESULTS: 'Nič sa nenašlo. Skúste všetky hodnoty alebo iný výraz.', // draft, please review
SYS_SEARCH_PLACES: 'Stránky a moduly', // draft, please review
SYS_NOTHING_HERE: 'V úrovni Nevyhnutné sa tu nič nezobrazuje.',
SYS_HIDDEN: 'Skryté: {num}',
SYS_HIDDEN: '{num} skryté',
SYS_SEARCH_RESULTS: 'Výsledky vyhľadávania', // draft, please review
SYS_CHANGED_WAS: 'zmenené (predtým: {0})', // draft, please review
SYS_NO_DEVICES: 'Zatiaľ sa nenašli žiadne zariadenia.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/sv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const sv: Translation = {
SYS_NO_RESULTS: 'Inget hittades. Prova alla värden eller ett annat sökord.', // draft, please review
SYS_SEARCH_PLACES: 'Sidor och moduler', // draft, please review
SYS_NOTHING_HERE: 'Inget att visa här på nivån Väsentligt.',
SYS_HIDDEN: 'Dolda: {num}',
SYS_HIDDEN: '{num} dolda',
SYS_SEARCH_RESULTS: 'Sökresultat', // draft, please review
SYS_CHANGED_WAS: 'ändrat (var: {0})', // draft, please review
SYS_NO_DEVICES: 'Inga enheter hittades ännu.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/tr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const tr: Translation = {
SYS_NO_RESULTS: 'Sonuç bulunamadı. Tüm değerleri veya başka bir terimi deneyin.', // draft, please review
SYS_SEARCH_PLACES: 'Sayfalar ve modüller', // draft, please review
SYS_NOTHING_HERE: 'Temel düzeyinde burada gösterilecek bir şey yok.',
SYS_HIDDEN: 'Gizli: {num}',
SYS_HIDDEN: '{num} gizli',
SYS_SEARCH_RESULTS: 'Arama sonuçları', // draft, please review
SYS_CHANGED_WAS: 'değiştirildi (önceki: {0})', // draft, please review
SYS_NO_DEVICES: 'Henüz cihaz bulunamadı.', // draft, please review
Expand Down
2 changes: 1 addition & 1 deletion interface/src/i18n/zh/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const zh: Translation = {
SYS_NO_RESULTS: '未找到结果。请尝试显示所有数值或更换关键词。', // draft, please review
SYS_SEARCH_PLACES: '页面和模块', // draft, please review
SYS_NOTHING_HERE: '在“必要”级别下此处没有可显示的内容。',
SYS_HIDDEN: '隐藏: {num}',
SYS_HIDDEN: '{num} 隐藏',
SYS_SEARCH_RESULTS: '搜索结果', // draft, please review
SYS_CHANGED_WAS: '已更改(原值:{0})', // draft, please review
SYS_NO_DEVICES: '尚未找到设备。', // draft, please review
Expand Down