Keep the server picker simple by default
This commit is contained in:
@@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user