Improve server picker scrolling and subscription input layout
Build and Deploy Gateway / build-and-push (push) Successful in 20s
Build and Deploy Gateway / deploy (push) Successful in 6s

This commit is contained in:
2026-08-11 08:10:15 +03:00
parent 444f26c401
commit 396c5d1917
9 changed files with 51 additions and 63 deletions
+3 -6
View File
@@ -22,7 +22,7 @@ type PickerServer = HarborServer & {
const FAVORITES_KEY = 'harbor-server-favorites';
const RECENT_KEY = 'harbor-server-recent';
const AUTO_KEY = 'harbor-server-auto';
const SIMPLE_SERVER_LIMIT = 5;
const INLINE_SERVER_ROWS = 8;
interface PingResult {
id?: string;
@@ -314,9 +314,9 @@ export function ServerPicker({
const simpleServers = [
...(selected && selected.id !== anchorServerId ? [selected] : []),
...servers.filter(({ id }) => id !== selectedServerId && id !== anchorServerId),
].slice(0, SIMPLE_SERVER_LIMIT);
];
return <section className={`client-servers is-scalable${servers.length <= SIMPLE_SERVER_LIMIT ? ' is-short' : ''}`} aria-label="Выберите сервер">
return <section className={`client-servers is-scalable${simpleServers.length <= INLINE_SERVER_ROWS ? ' is-short' : ''}`} aria-label="Выберите сервер">
{prompt && <span className="client-server-prompt">Выберите сервер</span>}
<div className="client-server-toolbar">
<span className="client-server-toolbar-title">Список серверов</span>
@@ -352,9 +352,6 @@ export function ServerPicker({
onSelect={select}
/>)}
</div>
{servers.length > simpleServers.length && <p className="client-server-overflow-note">
Ещё {servers.length - simpleServers.length} доступны через поиск
</p>}
</div>
</div>
</div>