Keep the server picker simple by default
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 15s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-07-12 16:30:53 +03:00
parent 9a539409f0
commit d551d41b71
5 changed files with 32 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ import {
const FAVORITES_KEY = 'harbor-server-favorites';
const RECENT_KEY = 'harbor-server-recent';
const AUTO_KEY = 'harbor-server-auto';
const SIMPLE_SERVER_LIMIT = 5;
function readList(key) {
try {
@@ -188,7 +189,7 @@ export function ServerPicker({
const simpleServers = [
...(selected ? [selected] : []),
...servers.filter(({ id }) => id !== selectedServerId),
].slice(0, SERVER_RESULT_WINDOW);
].slice(0, SIMPLE_SERVER_LIMIT);
return <section className="client-servers is-scalable" aria-label="Выберите сервер">
{prompt && <span className="client-server-prompt">Выберите сервер</span>}
@@ -274,7 +275,7 @@ export function ServerPicker({
{autoActive ? serverHealthText(pings[selectedServerId]) : 'Первый стабильный сервер'}
</small>
</button>
{selected && !autoActive && <ServerRow
{selected && <ServerRow
server={selected}
selected
favorite={favorites.includes(selected.id)}