Clarify failover messaging and bump Harbor versions
Build and Deploy Gateway / build-and-push (push) Successful in 26s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-21 13:00:54 +03:00
parent 12f2f30212
commit 64462d3639
5 changed files with 83 additions and 80 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
export const HARBOR_VERSIONS = Object.freeze({ export const HARBOR_VERSIONS = Object.freeze({
macClient: '0.30.3', macClient: '0.30.4',
gatewayClient: '0.31.3', gatewayClient: '0.31.4',
gatewayBackend: '0.31.0', gatewayBackend: '0.31.0',
}); });
+34 -34
View File
@@ -119,11 +119,11 @@ const reasonLabel = (reason: string | null) => ({
'primary-healthy': 'Основной канал работает', 'primary-healthy': 'Основной канал работает',
'health-unknown': 'Ждём первую проверку', 'health-unknown': 'Ждём первую проверку',
'checking-channels': 'Проверяем оба канала', 'checking-channels': 'Проверяем оба канала',
'failure-window': 'Убеждаемся, что основной не работает', 'failure-window': 'Убеждаемся, что основной канал не работает',
'reserve-not-healthy': 'Проверяем резервный канал', 'reserve-not-healthy': 'Ждём, пока резервный канал начнёт работать',
'both-unhealthy': 'Оба канала недоступны', 'both-unhealthy': 'Оба канала недоступны',
'primary-not-recovered': 'Основной ещё не восстановился', 'primary-not-recovered': 'Основной канал ещё не восстановился',
'recovery-hold': 'Убеждаемся, что основной работает без сбоев', 'recovery-hold': 'Убеждаемся, что основной канал работает без сбоев',
'activity-unknown': 'Не удалось проверить передачу данных', 'activity-unknown': 'Не удалось проверить передачу данных',
'active-traffic': 'Ждём паузу в передаче данных', 'active-traffic': 'Ждём паузу в передаче данных',
'quiet-window': 'Проверяем, что передача данных остановилась', 'quiet-window': 'Проверяем, что передача данных остановилась',
@@ -448,10 +448,10 @@ export function FailoverPanel({
}} }}
/> />
</div> </div>
<p>Если основной канал перестанет работать, новые подключения пойдут через резервный. Уже открытые подключения продолжат работать.</p> <p>Если основной канал перестанет работать, Harbor направит новые подключения через резервный канал. Уже открытые подключения продолжат работать через прежний канал.</p>
{snapshot.enabled && <div className="client-failover-global-actions"> {snapshot.enabled && <div className="client-failover-global-actions">
<button type="button" disabled={blocked} onClick={() => void onPause(!snapshot.paused)}>{snapshot.paused ? 'Продолжить автоматику' : 'Приостановить автоматику'}</button> <button type="button" disabled={blocked} onClick={() => void onPause(!snapshot.paused)}>{snapshot.paused ? 'Продолжить автоматическое переключение' : 'Приостановить автоматическое переключение'}</button>
<small>{snapshot.paused ? 'Новые подключения остаются на текущем канале.' : 'Harbor следит, работают ли оба канала.'}</small> <small>{snapshot.paused ? 'Новые подключения продолжают идти через текущий канал.' : 'Harbor проверяет оба канала и при необходимости переключает новые подключения.'}</small>
</div>} </div>}
</header> </header>
@@ -469,13 +469,13 @@ export function FailoverPanel({
const healthLabel = missing const healthLabel = missing
? 'Сервер не найден' ? 'Сервер не найден'
: !draft.enabled : !draft.enabled
? 'Выключен' ? 'Канал выключен'
: snapshot.reason === 'vpn-stopped' || snapshot.activation === 'inactive' : snapshot.reason === 'vpn-stopped' || snapshot.activation === 'inactive'
? 'VPN выключен' ? 'VPN выключен'
: snapshot.activation === 'pending' : snapshot.activation === 'pending'
? 'Запустится вместе с VPN' ? 'Проверим после запуска VPN'
: channel === 'primary' && snapshot.reason === 'failure-window' : channel === 'primary' && snapshot.reason === 'failure-window'
? `Проверяем сбой · ${seconds(Math.max(0, Date.now() - Date.parse(snapshot.primary.stateSince || new Date().toISOString())))} из ${seconds(draft.failureWindowMs)} с` ? `Проверяем основной канал · ${seconds(Math.max(0, Date.now() - Date.parse(snapshot.primary.stateSince || new Date().toISOString())))} из ${seconds(draft.failureWindowMs)} с`
: channel === 'primary' && snapshot.currentRole === 'reserve' && health === 'healthy' && snapshot.reason === 'recovery-hold' : channel === 'primary' && snapshot.currentRole === 'reserve' && health === 'healthy' && snapshot.reason === 'recovery-hold'
? 'Проверяем восстановление' ? 'Проверяем восстановление'
: health === 'healthy' ? 'Работает' : health === 'unhealthy' ? 'Недоступен' : health === 'not-monitoring' ? 'Проверка выключена' : 'Ждёт проверки'; : health === 'healthy' ? 'Работает' : health === 'unhealthy' ? 'Недоступен' : health === 'not-monitoring' ? 'Проверка выключена' : 'Ждёт проверки';
@@ -502,7 +502,7 @@ export function FailoverPanel({
</section> </section>
<fieldset className="client-failover-services"> <fieldset className="client-failover-services">
<legend><span className="client-failover-section-header"><strong>Что проверять</strong><small>По этим сайтам Harbor понимает, работает канал или нет.</small></span></legend> <legend><span className="client-failover-section-header"><strong>Что проверять</strong><small>Harbor проверяет эти сайты через оба канала, чтобы понять, какой канал работает.</small></span></legend>
{draft.checks.map((check) => { {draft.checks.map((check) => {
const service = services.find(({ id }) => check.serviceId === id); const service = services.find(({ id }) => check.serviceId === id);
const removing = removingCheckId === check.serviceId; const removing = removingCheckId === check.serviceId;
@@ -517,7 +517,7 @@ export function FailoverPanel({
> >
<span className="client-failover-service-name">{service?.label || 'Сайт не найден'}</span> <span className="client-failover-service-name">{service?.label || 'Сайт не найден'}</span>
<FailoverNumberSetting <FailoverNumberSetting
before="Ждать ответ не дольше" before="Ждать ответа не дольше"
after="секунд" after="секунд"
min={2} min={2}
max={30} max={30}
@@ -570,17 +570,17 @@ export function FailoverPanel({
<section className="client-failover-timing" aria-label="Пороги переключения"> <section className="client-failover-timing" aria-label="Пороги переключения">
<header className="client-failover-section-header"> <header className="client-failover-section-header">
<h3>Когда включать резервный</h3> <h3>Когда переключаться на резервный канал</h3>
<p>Harbor включит резервный, только если основной не отвечает, а резервный работает.</p> <p>Harbor направит новые подключения через резервный канал, если основной канал не отвечает, а резервный канал работает.</p>
</header> </header>
<FailoverNumberSetting before="Проверять каналы каждые" after="секунд" min={15} max={900} ariaLabel="Интервал проверки каналов" value={seconds(draft.intervalMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ intervalMs: value * 1_000 })} /> <FailoverNumberSetting before="Проверять оба канала каждые" after="секунд" min={15} max={900} ariaLabel="Интервал проверки каналов" value={seconds(draft.intervalMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ intervalMs: value * 1_000 })} />
<FailoverNumberSetting before="Считать основной неработающим, если он не отвечает" after="секунд" min={seconds(draft.intervalMs * 2)} max={1800} ariaLabel="Длительность сбоя основного канала" value={seconds(draft.failureWindowMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ failureWindowMs: value * 1_000 })} /> <FailoverNumberSetting before="Считать основной канал недоступным, если он не отвечает" after="секунд" min={seconds(draft.intervalMs * 2)} max={1800} ariaLabel="Длительность сбоя основного канала" value={seconds(draft.failureWindowMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ failureWindowMs: value * 1_000 })} />
<FailoverNumberSetting before="Вернуться на основной после" after="секунд работы без сбоев" min={60} max={86400} ariaLabel="Время стабильной работы основного канала" value={seconds(draft.recoveryWindowMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ recoveryWindowMs: value * 1_000 })} /> <FailoverNumberSetting before="Вернуться на основной канал после" after="секунд без сбоев" min={60} max={86400} ariaLabel="Время стабильной работы основного канала" value={seconds(draft.recoveryWindowMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ recoveryWindowMs: value * 1_000 })} />
<div className="client-failover-traffic-switch"> <div className="client-failover-traffic-switch">
<span><strong>Дождаться паузы в передаче данных</strong><small>{draft.trafficGuard.enabled ? 'Harbor подождёт, пока передача данных почти остановится.' : 'Новые подключения переключатся сразу после подтверждённого сбоя.'}</small></span> <span><strong>Дождаться паузы в передаче данных</strong><small>{draft.trafficGuard.enabled ? 'Harbor подождёт, пока передача данных почти остановится, и только потом переключит новые подключения.' : 'Harbor переключит новые подключения сразу после того, как убедится, что основной канал не работает.'}</small></span>
<HarborSwitch <HarborSwitch
checked={draft.trafficGuard.enabled} checked={draft.trafficGuard.enabled}
label={draft.trafficGuard.enabled ? 'Разрешить переключение во время активной работы' : 'Не переключать во время активной работы'} label={draft.trafficGuard.enabled ? 'Переключать без ожидания паузы' : 'Ждать паузу перед переключением'}
disabled={blocked || !draft.enabled} disabled={blocked || !draft.enabled}
onChange={(enabled) => update({ trafficGuard: { ...draft.trafficGuard, enabled } })} onChange={(enabled) => update({ trafficGuard: { ...draft.trafficGuard, enabled } })}
/> />
@@ -591,31 +591,31 @@ export function FailoverPanel({
<section className="client-failover-protection" aria-labelledby="client-failover-protection-title"> <section className="client-failover-protection" aria-labelledby="client-failover-protection-title">
<header className="client-failover-section-header"> <header className="client-failover-section-header">
<h3 id="client-failover-protection-title">Если основной снова не работает</h3> <h3 id="client-failover-protection-title">Повторные сбои основного канала</h3>
<p>После нескольких повторных сбоев Harbor дольше использует резервный канал.</p> <p>Если основной канал снова перестаёт работать, Harbor дольше оставляет новые подключения на резервном канале.</p>
</header> </header>
<div className="client-failover-protection-options"> <div className="client-failover-protection-options">
<FailoverNumberSetting before="Оставаться на резервном минимум" after="секунд" min={60} max={86400} ariaLabel="Минимальное время на резервном канале" value={seconds(draft.minimumReserveMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ minimumReserveMs: value * 1_000 })} /> <FailoverNumberSetting before="Оставаться на резервном канале не меньше" after="секунд" min={60} max={86400} ariaLabel="Минимальное время на резервном канале" value={seconds(draft.minimumReserveMs)} disabled={blocked || !draft.enabled} onChange={(value) => update({ minimumReserveMs: value * 1_000 })} />
<FailoverNumberSetting before="Считать основной нестабильным после" after="повторных сбоев" min={2} max={10} step={1} ariaLabel="Количество повторных сбоев" value={draft.flapProtection.count} disabled={blocked || !draft.enabled} onChange={(value) => update({ flapProtection: { ...draft.flapProtection, count: value } })} /> <FailoverNumberSetting before="Считать основной канал нестабильным после" after="повторных сбоев" min={2} max={10} step={1} ariaLabel="Количество повторных сбоев" value={draft.flapProtection.count} disabled={blocked || !draft.enabled} onChange={(value) => update({ flapProtection: { ...draft.flapProtection, count: value } })} />
<FailoverNumberSetting before="Учитывать сбои за последние" after=асов" min={1} max={72} step={1} ariaLabel="Период повторных сбоев" value={Math.round(draft.flapProtection.windowMs / 3_600_000)} disabled={blocked || !draft.enabled} onChange={(value) => update({ flapProtection: { ...draft.flapProtection, windowMs: value * 3_600_000 } })} /> <FailoverNumberSetting before="Учитывать сбои, случившиеся не более" after= назад" min={1} max={72} step={1} ariaLabel="Период повторных сбоев" value={Math.round(draft.flapProtection.windowMs / 3_600_000)} disabled={blocked || !draft.enabled} onChange={(value) => update({ flapProtection: { ...draft.flapProtection, windowMs: value * 3_600_000 } })} />
<FailoverNumberSetting before="После повторных сбоев не возвращаться на основной" after="минут" min={10} max={10080} ariaLabel="Длительность карантина основного канала" value={Math.round(draft.flapProtection.quarantineMs / 60_000)} disabled={blocked || !draft.enabled} onChange={(value) => update({ flapProtection: { ...draft.flapProtection, quarantineMs: value * 60_000 } })} /> <FailoverNumberSetting before="После повторных сбоев не возвращаться на основной канал" after="минут" min={10} max={10080} ariaLabel="Длительность карантина основного канала" value={Math.round(draft.flapProtection.quarantineMs / 60_000)} disabled={blocked || !draft.enabled} onChange={(value) => update({ flapProtection: { ...draft.flapProtection, quarantineMs: value * 60_000 } })} />
</div> </div>
</section> </section>
<div className="client-failover-runtime"> <div className="client-failover-runtime">
<strong role="status" aria-live="polite">{blocked ? 'Harbor выполняет действие…' : snapshot.activation === 'pending' ? 'Включится при следующем запуске VPN' : reasonLabel(snapshot.reason)}</strong> <strong role="status" aria-live="polite">{blocked ? 'Подождите, Harbor завершает текущее действие…' : snapshot.activation === 'pending' ? 'Резервный канал включится при следующем запуске VPN' : reasonLabel(snapshot.reason)}</strong>
<span>{role <span>{role
? `Новые соединения: ${targetLabel(profiles, snapshot[role].target)}` ? `Новые подключения: ${targetLabel(profiles, snapshot[role].target)}`
: snapshot.reason === 'vpn-stopped' : snapshot.reason === 'vpn-stopped'
? `При запуске VPN: ${targetLabel(profiles, draft.primary)}` ? `При запуске VPN будет выбран: ${targetLabel(profiles, draft.primary)}`
: `После перезапуска VPN: ${targetLabel(profiles, draft.primary)}`}</span> : `После перезапуска VPN будет выбран: ${targetLabel(profiles, draft.primary)}`}</span>
{snapshot.nextDecisionAt && <span>Следующее решение не раньше чем через {seconds(Math.max(0, Date.parse(snapshot.nextDecisionAt) - Date.now()))} с</span>} {snapshot.nextDecisionAt && <span>Проверим каналы снова через {seconds(Math.max(0, Date.parse(snapshot.nextDecisionAt) - Date.now()))} с</span>}
{activity && <span>{activity.state === 'active' ? `Идёт передача данных · ${Math.round(activity.totalBytesPerSecond / 1024)} КБ/с · подключений: ${activity.transmittingConnections}` : activity.state === 'quiet' ? `Передачи данных нет · ${Math.min(seconds(quietElapsed), seconds(draft.trafficGuard.quietWindowMs))} из ${seconds(draft.trafficGuard.quietWindowMs)} с` : 'Не удалось проверить передачу данных · автоматическое переключение остановлено'}</span>} {activity && <span>{activity.state === 'active' ? `Сейчас передаётся ${Math.round(activity.totalBytesPerSecond / 1024)} КБ/с. Активных подключений: ${activity.transmittingConnections}` : activity.state === 'quiet' ? `Передачи данных нет: ${Math.min(seconds(quietElapsed), seconds(draft.trafficGuard.quietWindowMs))} из ${seconds(draft.trafficGuard.quietWindowMs)} с` : 'Не удалось проверить передачу данных. Автоматическое переключение остановлено'}</span>}
{activity?.blockers.slice(0, 2).map((blocker) => <small key={`${blocker.device}:${blocker.service}`}>{blocker.device} · {blocker.service} · {Math.round((blocker.uploadBytesPerSecond + blocker.downloadBytesPerSecond) / 1024)} КБ/с</small>)} {activity?.blockers.slice(0, 2).map((blocker) => <small key={`${blocker.device}:${blocker.service}`}>{blocker.device} · {blocker.service} · {Math.round((blocker.uploadBytesPerSecond + blocker.downloadBytesPerSecond) / 1024)} КБ/с</small>)}
{activity && activity.blockers.length > 2 && <small>Ещё {activity.blockers.length - 2}</small>} {activity && activity.blockers.length > 2 && <small>Ещё {activity.blockers.length - 2}</small>}
</div> </div>
{!draftValid && <p className="client-failover-validation">Выберите разные основной и резервный серверы и хотя бы один сайт для проверки.</p>} {!draftValid && <p className="client-failover-validation">Выберите разные серверы для основного и резервного каналов и хотя бы один сайт для проверки.</p>}
{confirmDiscard && <div className="client-failover-discard" role="alert"> {confirmDiscard && <div className="client-failover-discard" role="alert">
<span>Отменить несохранённые изменения?</span> <span>Отменить несохранённые изменения?</span>
<button type="button" onClick={() => { setDraft(snapshot.policy); setDirty(false); setConfirmDiscard(false); feature.beforeCloseRef.current = () => true; feature.close(); }}>Отменить изменения</button> <button type="button" onClick={() => { setDraft(snapshot.policy); setDirty(false); setConfirmDiscard(false); feature.beforeCloseRef.current = () => true; feature.close(); }}>Отменить изменения</button>
@@ -628,8 +628,8 @@ export function FailoverPanel({
void onCheck().finally(() => setManualChecking(false)); void onCheck().finally(() => setManualChecking(false));
}}>Проверить оба канала</button> }}>Проверить оба канала</button>
<button type="submit" disabled={blocked || !dirty || !draftValid}>Сохранить</button> <button type="submit" disabled={blocked || !dirty || !draftValid}>Сохранить</button>
{switchRole && snapshot.enabled && snapshot.activation === 'active' && <button type="button" disabled={blocked} onClick={() => void onSwitch(switchRole)}>Направить новые подключения через {switchRole === 'reserve' ? 'резервный' : 'основной'}</button>} {switchRole && snapshot.enabled && snapshot.activation === 'active' && <button type="button" disabled={blocked} onClick={() => void onSwitch(switchRole)}>Переключить новые подключения на {switchRole === 'reserve' ? 'резервный канал' : 'основной канал'}</button>}
{(snapshot.currentRole === 'primary' || snapshot.currentRole === 'reserve') && <small>Открытые соединения продолжат работать через прежний канал.</small>} {(snapshot.currentRole === 'primary' || snapshot.currentRole === 'reserve') && <small>Открытые подключения останутся на прежнем канале.</small>}
</div> </div>
</form> </form>
</Drawer>; </Drawer>;
+22 -22
View File
@@ -2,10 +2,10 @@
.client-failover-header > span { color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-header > span { color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); }
.client-failover-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; } .client-failover-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.client-failover-header h2 { margin: 0; font: var(--type-drawer-title); letter-spacing: var(--type-drawer-title-tracking); text-transform: var(--type-drawer-title-transform); } .client-failover-header h2 { margin: 0; font: var(--type-drawer-title); letter-spacing: var(--type-drawer-title-tracking); text-transform: var(--type-drawer-title-transform); }
.client-failover-header p { margin: 0; color: var(--client-muted); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); } .client-failover-header p { margin: 0; color: var(--client-muted); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); }
.client-failover-global-actions { min-height: 30px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; } .client-failover-global-actions { min-height: 30px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; }
.client-failover-global-actions > button { padding: 6px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; } .client-failover-global-actions > button { padding: 6px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; }
.client-failover-global-actions > small { color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-global-actions > small { color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-form { display: grid; gap: 24px; margin: 0 8px; } .client-failover-form { display: grid; gap: 24px; margin: 0 8px; }
.client-failover-switch { position: relative; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--client-muted); cursor: pointer; } .client-failover-switch { position: relative; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--client-muted); cursor: pointer; }
.client-failover-switch::before { content: ''; position: absolute; inset: 11px 1px; border-radius: 999px; background: color-mix(in oklch, var(--client-muted) 24%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--client-muted) 24%, transparent); transition: background 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1); } .client-failover-switch::before { content: ''; position: absolute; inset: 11px 1px; border-radius: 999px; background: color-mix(in oklch, var(--client-muted) 24%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--client-muted) 24%, transparent); transition: background 240ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1); }
@@ -17,16 +17,16 @@
.client-failover-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; } .client-failover-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.client-failover-channel { position: relative; display: grid; align-content: start; gap: 7px; min-width: 0; } .client-failover-channel { position: relative; display: grid; align-content: start; gap: 7px; min-width: 0; }
.client-failover-channel-title { min-height: 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; } .client-failover-channel-title { min-height: 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.client-failover-channel-title h3 { margin: 0; font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); } .client-failover-channel-title h3 { margin: 0; font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); }
.client-failover-channel[data-channel='primary'] .client-failover-channel-title h3 { color: var(--harbor-connect); text-shadow: 0 0 9px color-mix(in oklch, var(--harbor-connect) 30%, transparent); } .client-failover-channel[data-channel='primary'] .client-failover-channel-title h3 { color: var(--harbor-connect); text-shadow: 0 0 9px color-mix(in oklch, var(--harbor-connect) 30%, transparent); }
.client-failover-channel[data-channel='reserve'] .client-failover-channel-title h3 { color: var(--harbor-gateway); text-shadow: 0 0 9px color-mix(in oklch, var(--harbor-gateway) 30%, transparent); } .client-failover-channel[data-channel='reserve'] .client-failover-channel-title h3 { color: var(--harbor-gateway); text-shadow: 0 0 9px color-mix(in oklch, var(--harbor-gateway) 30%, transparent); }
.client-failover-channel-title strong { min-width: 0; color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); text-align: right; white-space: nowrap; transition: color 600ms ease, filter 600ms ease; } .client-failover-channel-title strong { min-width: 0; color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); text-align: right; white-space: nowrap; transition: color 600ms ease, filter 600ms ease; }
.client-failover-channel-title strong.is-healthy { color: var(--client-accent); } .client-failover-channel-title strong.is-healthy { color: var(--client-accent); }
.client-failover-channel-title strong.is-unhealthy { color: oklch(0.68 0.15 28); } .client-failover-channel-title strong.is-unhealthy { color: oklch(0.68 0.15 28); }
.client-failover-picker { position: relative; min-width: 0; z-index: 1; } .client-failover-picker { position: relative; min-width: 0; z-index: 1; }
.client-failover-checking { grid-column: 1 / -1; min-height: 22px; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-checking { grid-column: 1 / -1; min-height: 22px; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-picker.is-open { z-index: 6; } .client-failover-picker.is-open { z-index: 6; }
.client-failover-picker-trigger { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--client-border); background: transparent; color: var(--client-text); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); text-align: left; box-shadow: 0 1px 0 transparent; cursor: pointer; transition: color 220ms ease, box-shadow 300ms ease, text-shadow 300ms ease; } .client-failover-picker-trigger { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--client-border); background: transparent; color: var(--client-text); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); text-align: left; box-shadow: 0 1px 0 transparent; cursor: pointer; transition: color 220ms ease, box-shadow 300ms ease, text-shadow 300ms ease; }
.client-failover-picker-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .client-failover-picker-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-failover-picker-trigger svg { flex: 0 0 auto; width: 9px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1); } .client-failover-picker-trigger svg { flex: 0 0 auto; width: 9px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1); }
.client-failover-picker.is-open .client-failover-picker-trigger { color: var(--client-accent); box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 64%, transparent); text-shadow: 0 0 10px color-mix(in oklch, var(--client-accent) 34%, transparent); } .client-failover-picker.is-open .client-failover-picker-trigger { color: var(--client-accent); box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 64%, transparent); text-shadow: 0 0 10px color-mix(in oklch, var(--client-accent) 34%, transparent); }
@@ -35,27 +35,27 @@
.client-failover-picker-trigger:focus-visible { outline: 0; color: var(--client-accent); box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 72%, transparent); text-shadow: 0 0 10px color-mix(in oklch, var(--client-accent) 34%, transparent); } .client-failover-picker-trigger:focus-visible { outline: 0; color: var(--client-accent); box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 72%, transparent); text-shadow: 0 0 10px color-mix(in oklch, var(--client-accent) 34%, transparent); }
.client-failover-picker-list { position: absolute; top: calc(100% + 3px); left: -8px; z-index: 5; width: calc(100% + 16px); max-height: min(320px, 48vh); display: grid; gap: 1px; padding: 7px 8px; overflow-y: auto; background: color-mix(in oklch, var(--client-bg) 92%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; filter: blur(6px); transform: translateY(-6px); pointer-events: none; transition: opacity 180ms ease, filter 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 180ms; } .client-failover-picker-list { position: absolute; top: calc(100% + 3px); left: -8px; z-index: 5; width: calc(100% + 16px); max-height: min(320px, 48vh); display: grid; gap: 1px; padding: 7px 8px; overflow-y: auto; background: color-mix(in oklch, var(--client-bg) 92%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; filter: blur(6px); transform: translateY(-6px); pointer-events: none; transition: opacity 180ms ease, filter 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 180ms; }
.client-failover-picker.is-open .client-failover-picker-list { opacity: 1; visibility: visible; filter: blur(0); transform: translateY(0); pointer-events: auto; transition: opacity 240ms ease, filter 240ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s; } .client-failover-picker.is-open .client-failover-picker-list { opacity: 1; visibility: visible; filter: blur(0); transform: translateY(0); pointer-events: auto; transition: opacity 240ms ease, filter 240ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s; }
.client-failover-picker-list button { min-height: 34px; padding: 6px; border: 0; background: transparent; color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); text-align: left; cursor: pointer; opacity: 0; filter: blur(5px); transform: translateY(-4px); transition: color 180ms ease, opacity 180ms ease, filter 180ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1); } .client-failover-picker-list button { min-height: 34px; padding: 6px; border: 0; background: transparent; color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); text-align: left; cursor: pointer; opacity: 0; filter: blur(5px); transform: translateY(-4px); transition: color 180ms ease, opacity 180ms ease, filter 180ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1); }
.client-failover-picker.is-open .client-failover-picker-list button { opacity: 1; filter: blur(0); transform: translateY(0); transition-delay: calc(var(--picker-index) * 30ms); } .client-failover-picker.is-open .client-failover-picker-list button { opacity: 1; filter: blur(0); transform: translateY(0); transition-delay: calc(var(--picker-index) * 30ms); }
.client-failover-picker-list button:hover, .client-failover-picker-list button:focus-visible, .client-failover-picker-list button[aria-selected='true'] { outline: 0; color: var(--client-accent); text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 38%, transparent); } .client-failover-picker-list button:hover, .client-failover-picker-list button:focus-visible, .client-failover-picker-list button[aria-selected='true'] { outline: 0; color: var(--client-accent); text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 38%, transparent); }
.client-failover-picker-list button[aria-disabled='true'] { color: color-mix(in oklch, var(--client-muted) 58%, transparent); cursor: default; text-shadow: none; } .client-failover-picker-list button[aria-disabled='true'] { color: color-mix(in oklch, var(--client-muted) 58%, transparent); cursor: default; text-shadow: none; }
.client-failover-number-setting { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .45ch; min-height: 38px; color: var(--client-muted); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); cursor: text; } .client-failover-number-setting { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .45ch; min-height: 38px; color: var(--client-muted); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); cursor: text; }
.client-failover-number-control { position: relative; flex: 0 0 auto; min-width: 44px; display: inline-grid; justify-items: center; padding-bottom: 18px; } .client-failover-number-control { position: relative; flex: 0 0 auto; min-width: 44px; display: inline-grid; justify-items: center; padding-bottom: 18px; }
.client-failover-number-setting input { flex: 0 0 auto; min-width: 2ch; min-height: 1.35em; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--client-text); font: var(--type-item-title); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-item-title-tracking); text-align: center; text-transform: var(--type-item-title-transform); appearance: textfield; transition: color 220ms ease, text-shadow 220ms ease; } .client-failover-number-setting input { flex: 0 0 auto; min-width: 2ch; min-height: 1.35em; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--client-text); font: var(--type-item-title); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-item-title-tracking); text-align: center; text-transform: var(--type-item-title-transform); appearance: textfield; transition: color 220ms ease, text-shadow 220ms ease; }
.client-failover-number-setting input::-webkit-inner-spin-button, .client-failover-number-setting input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; } .client-failover-number-setting input::-webkit-inner-spin-button, .client-failover-number-setting input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.client-failover-number-setting input:disabled { color: var(--client-muted); opacity: .45; } .client-failover-number-setting input:disabled { color: var(--client-muted); opacity: .45; }
.client-failover-number-steps { position: absolute; left: 50%; bottom: 0; width: 44px; display: flex; justify-content: space-between; opacity: 0; filter: blur(3px); transform: translate(-50%, -2px); pointer-events: none; transition: opacity 180ms ease, filter 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1); } .client-failover-number-steps { position: absolute; left: 50%; bottom: 0; width: 44px; display: flex; justify-content: space-between; opacity: 0; filter: blur(3px); transform: translate(-50%, -2px); pointer-events: none; transition: opacity 260ms ease 80ms, filter 260ms ease 80ms, transform 260ms cubic-bezier(0.16, 1, 0.3, 1) 80ms; }
.client-failover-number-control:hover .client-failover-number-steps, .client-failover-number-control:focus-within .client-failover-number-steps { opacity: 1; filter: blur(0); transform: translate(-50%, 0); pointer-events: auto; } .client-failover-number-control:hover .client-failover-number-steps, .client-failover-number-control:focus-within .client-failover-number-steps { opacity: 1; filter: blur(0); transform: translate(-50%, 0); pointer-events: auto; transition: opacity 180ms ease, filter 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.client-failover-number-steps button { width: 20px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; } .client-failover-number-steps button { width: 20px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; }
.client-failover-number-steps button:disabled, .client-failover-global-actions > button:disabled { color: var(--client-muted); cursor: default; opacity: .42; } .client-failover-number-steps button:disabled, .client-failover-global-actions > button:disabled { color: var(--client-muted); cursor: default; opacity: .42; }
.client-failover-services { display: grid; gap: 5px; margin: 0; padding: 0; border: 0; } .client-failover-services { display: grid; gap: 5px; margin: 0; padding: 0; border: 0; }
.client-failover-services legend { width: 100%; margin-bottom: 14px; padding: 0; } .client-failover-services legend { width: 100%; margin-bottom: 14px; padding: 0; }
.client-failover-section-header { display: grid; gap: 4px; margin-bottom: 12px; } .client-failover-section-header { display: grid; gap: 4px; margin-bottom: 12px; }
.client-failover-section-header h3, .client-failover-section-header strong { margin: 0; color: var(--client-text); font: var(--type-item-title); letter-spacing: var(--type-item-title-tracking); text-transform: var(--type-item-title-transform); } .client-failover-section-header h3, .client-failover-section-header strong { margin: 0; color: var(--client-text); font: var(--type-item-title); letter-spacing: var(--type-item-title-tracking); text-transform: var(--type-item-title-transform); }
.client-failover-section-header p, .client-failover-section-header small { margin: 0; color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-section-header p, .client-failover-section-header small { margin: 0; color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-service { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr) 32px; align-items: center; gap: 12px; min-height: 38px; animation: failover-service-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both; } .client-failover-service { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr) 32px; align-items: center; gap: 12px; min-height: 38px; animation: failover-service-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.client-failover-service.is-removing { animation: failover-service-out 300ms ease both; pointer-events: none; } .client-failover-service.is-removing { animation: failover-service-out 300ms ease both; pointer-events: none; }
.client-failover-service-name { min-width: 0; overflow: hidden; color: var(--client-text); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-overflow: ellipsis; text-transform: var(--type-body-transform); white-space: nowrap; } .client-failover-service-name { min-width: 0; overflow: hidden; color: var(--client-text); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-overflow: ellipsis; text-transform: var(--type-data-transform); white-space: nowrap; }
.client-failover-remove-service { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: oklch(0.62 0.16 28); cursor: pointer; transition: color 180ms ease, filter 240ms ease; } .client-failover-remove-service { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: oklch(0.62 0.16 28); cursor: pointer; transition: color 180ms ease, filter 240ms ease; }
.client-failover-remove-service svg { width: 19px; height: 19px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; } .client-failover-remove-service svg { width: 19px; height: 19px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.client-failover-remove-lid { transform-origin: center 7px; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); } .client-failover-remove-lid { transform-origin: center 7px; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }
@@ -68,27 +68,27 @@
.client-failover-services > .client-failover-picker.is-open .client-failover-picker-trigger::before { transform: rotate(45deg); filter: drop-shadow(0 0 6px color-mix(in oklch, var(--client-accent) 44%, transparent)); } .client-failover-services > .client-failover-picker.is-open .client-failover-picker-trigger::before { transform: rotate(45deg); filter: drop-shadow(0 0 6px color-mix(in oklch, var(--client-accent) 44%, transparent)); }
.client-failover-services > .client-failover-picker .client-failover-picker-list { width: max-content; min-width: calc(100% + 16px); } .client-failover-services > .client-failover-picker .client-failover-picker-list { width: max-content; min-width: calc(100% + 16px); }
.client-failover-service-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 8px 12px; padding: 8px 0; animation: failover-service-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both; } .client-failover-service-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 8px 12px; padding: 8px 0; animation: failover-service-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.client-failover-service-editor input { min-width: 0; min-height: 34px; border: 0; border-bottom: 1px solid var(--client-border); background: transparent; color: var(--client-text); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); } .client-failover-service-editor input { min-width: 0; min-height: 34px; border: 0; border-bottom: 1px solid var(--client-border); background: transparent; color: var(--client-text); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); }
.client-failover-service-editor span { grid-column: 1 / -1; color: oklch(0.68 0.15 28); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-service-editor span { grid-column: 1 / -1; color: oklch(0.68 0.15 28); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-service-editor button { justify-self: start; padding: 4px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; } .client-failover-service-editor button { justify-self: start; padding: 4px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; }
.client-failover-service-editor button:disabled { color: var(--client-muted); cursor: default; opacity: .45; } .client-failover-service-editor button:disabled { color: var(--client-muted); cursor: default; opacity: .45; }
.client-failover-timing { display: grid; gap: 0; } .client-failover-timing { display: grid; gap: 0; }
.client-failover-traffic-switch { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 8px 0 4px; } .client-failover-traffic-switch { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 8px 0 4px; }
.client-failover-traffic-switch > span { min-width: 0; display: grid; gap: 3px; } .client-failover-traffic-switch > span { min-width: 0; display: grid; gap: 3px; }
.client-failover-traffic-switch strong { color: var(--client-text); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); } .client-failover-traffic-switch strong { color: var(--client-text); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); }
.client-failover-traffic-switch small { color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-traffic-switch small { color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-protection { display: grid; gap: 5px; } .client-failover-protection { display: grid; gap: 5px; }
.client-failover-protection-options { display: grid; gap: 0; } .client-failover-protection-options { display: grid; gap: 0; }
.client-failover-runtime { min-height: 132px; display: grid; align-content: center; gap: 5px; padding: 14px 0; border-top: 1px solid color-mix(in oklch, var(--client-border) 48%, transparent); border-bottom: 1px solid color-mix(in oklch, var(--client-border) 48%, transparent); font-variant-numeric: var(--numeric-tabular); } .client-failover-runtime { min-height: 132px; display: grid; align-content: center; gap: 5px; padding: 14px 0; border-top: 1px solid color-mix(in oklch, var(--client-border) 48%, transparent); border-bottom: 1px solid color-mix(in oklch, var(--client-border) 48%, transparent); font-variant-numeric: var(--numeric-tabular); }
.client-failover-runtime strong { font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); } .client-failover-runtime strong { font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); }
.client-failover-runtime span, .client-failover-runtime small { color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-runtime span, .client-failover-runtime small { color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-validation { margin: -12px 0 0; color: oklch(0.68 0.15 28); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-validation { margin: -12px 0 0; color: oklch(0.68 0.15 28); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-discard { min-height: 74px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--client-border); border-bottom: 1px solid var(--client-border); } .client-failover-discard { min-height: 74px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--client-border); border-bottom: 1px solid var(--client-border); }
.client-failover-discard span { flex-basis: 100%; color: var(--client-text); font: var(--type-body); letter-spacing: var(--type-body-tracking); text-transform: var(--type-body-transform); } .client-failover-discard span { flex-basis: 100%; color: var(--client-text); font: var(--type-data); font-variant-numeric: var(--numeric-tabular); letter-spacing: var(--type-data-tracking); text-transform: var(--type-data-transform); }
.client-failover-discard button { padding: 4px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; } .client-failover-discard button { padding: 4px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; }
.client-failover-actions { min-height: 42px; display: flex; flex-wrap: wrap; gap: 18px; } .client-failover-actions { min-height: 42px; display: flex; flex-wrap: wrap; gap: 18px; }
.client-failover-actions button { padding: 7px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; } .client-failover-actions button { padding: 7px 0; border: 0; background: transparent; color: var(--client-accent); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); cursor: pointer; }
.client-failover-actions small { flex-basis: 100%; margin-top: -14px; color: var(--client-muted); font: var(--type-label); letter-spacing: var(--type-label-tracking); text-transform: var(--type-label-transform); } .client-failover-actions small { flex-basis: 100%; margin-top: -14px; color: var(--client-muted); font: var(--type-control); letter-spacing: var(--type-control-tracking); text-transform: var(--type-control-transform); }
.client-failover-actions button:disabled { color: var(--client-muted); cursor: default; opacity: .45; } .client-failover-actions button:disabled { color: var(--client-muted); cursor: default; opacity: .45; }
.client-failover-actions button:focus-visible, .client-failover-service-editor button:focus-visible, .client-failover-discard button:focus-visible, .client-failover-global-actions > button:focus-visible, .client-failover-number-steps button:focus-visible { outline: 2px solid var(--client-accent); outline-offset: 2px; } .client-failover-actions button:focus-visible, .client-failover-service-editor button:focus-visible, .client-failover-discard button:focus-visible, .client-failover-global-actions > button:focus-visible, .client-failover-number-steps button:focus-visible { outline: 2px solid var(--client-accent); outline-offset: 2px; }
.client-failover-form input:not(.client-failover-number-input):focus-visible { outline: 0; border-bottom-color: var(--client-accent); box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 60%, transparent); text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 34%, transparent); } .client-failover-form input:not(.client-failover-number-input):focus-visible { outline: 0; border-bottom-color: var(--client-accent); box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 60%, transparent); text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 34%, transparent); }
@@ -96,4 +96,4 @@
@keyframes failover-service-in { from { opacity: 0; filter: blur(5px); transform: translateY(-4px); } to { opacity: 1; filter: blur(0); transform: translateY(0); } } @keyframes failover-service-in { from { opacity: 0; filter: blur(5px); transform: translateY(-4px); } to { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes failover-service-out { from { opacity: 1; filter: blur(0); transform: translateX(0) scale(1); } to { opacity: 0; filter: blur(6px); transform: translateX(16px) scale(.96); } } @keyframes failover-service-out { from { opacity: 1; filter: blur(0); transform: translateX(0) scale(1); } to { opacity: 0; filter: blur(6px); transform: translateX(16px) scale(.96); } }
@media (max-width: 560px) { .client-failover-channels { grid-template-columns: minmax(0, 1fr); gap: 18px; } .client-failover-checking { grid-column: 1; margin-top: -6px; } .client-failover-service { grid-template-columns: minmax(0, 1fr) 32px; gap: 6px 10px; } .client-failover-service > .client-failover-number-setting { grid-column: 1; grid-row: 2; } .client-failover-remove-service { grid-column: 2; grid-row: 1 / span 2; } .client-failover-service-editor { grid-template-columns: 1fr; gap: 2px; } } @media (max-width: 560px) { .client-failover-channels { grid-template-columns: minmax(0, 1fr); gap: 18px; } .client-failover-checking { grid-column: 1; margin-top: -6px; } .client-failover-service { grid-template-columns: minmax(0, 1fr) 32px; gap: 6px 10px; } .client-failover-service > .client-failover-number-setting { grid-column: 1; grid-row: 2; } .client-failover-remove-service { grid-column: 2; grid-row: 1 / span 2; } .client-failover-service-editor { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-reduced-motion: reduce) { .client-failover-channel-title strong, .client-failover-switch::before, .client-failover-switch > span, .client-failover-picker-trigger, .client-failover-picker-trigger::before, .client-failover-picker-trigger svg, .client-failover-picker-list, .client-failover-picker-list button, .client-failover-number-steps, .client-failover-remove-service, .client-failover-remove-lid { transition: none; } .client-failover-service, .client-failover-service-editor { animation: none; } } @media (prefers-reduced-motion: reduce) { .client-failover-channel-title strong, .client-failover-switch::before, .client-failover-switch > span, .client-failover-picker-trigger, .client-failover-picker-trigger::before, .client-failover-picker-trigger svg, .client-failover-picker-list, .client-failover-picker-list button, .client-failover-number-steps, .client-failover-number-control:hover .client-failover-number-steps, .client-failover-number-control:focus-within .client-failover-number-steps, .client-failover-remove-service, .client-failover-remove-lid { transition: none; } .client-failover-service, .client-failover-service-editor { animation: none; } }
+14 -11
View File
@@ -26,14 +26,15 @@ test('failover settings use Harbor switches, a two-column channel table and plai
assert.match(feature, /snapshot\.reason === 'checking-channels'[\s\S]*Проверяем \{checkingRole === 'primary' \? 'основной' : 'резервный'} канал/); assert.match(feature, /snapshot\.reason === 'checking-channels'[\s\S]*Проверяем \{checkingRole === 'primary' \? 'основной' : 'резервный'} канал/);
assert.match(feature, /ArrowDown[\s\S]*Home[\s\S]*End[\s\S]*Escape/); assert.match(feature, /ArrowDown[\s\S]*Home[\s\S]*End[\s\S]*Escape/);
assert.match(feature, /role="listbox"[\s\S]*role="option"/); assert.match(feature, /role="listbox"[\s\S]*role="option"/);
assert.match(feature, /Что проверять[\s\S]*По этим сайтам Harbor понимает, работает канал или нет/); assert.match(feature, /Что проверять[\s\S]*Harbor проверяет эти сайты через оба канала, чтобы понять, какой канал работает/);
assert.match(feature, /before="Ждать ответ не дольше"[\s\S]*min=\{2}[\s\S]*max=\{30}/); assert.match(feature, /before="Ждать ответа не дольше"[\s\S]*min=\{2}[\s\S]*max=\{30}/);
assert.match(feature, /Проверять каналы каждые[\s\S]*Считать основной неработающим, если он не отвечает[\s\S]*Вернуться на основной после/); assert.match(feature, /Проверять оба канала каждые[\s\S]*Считать основной канал недоступным, если он не отвечает[\s\S]*Вернуться на основной канал после/);
assert.match(feature, /Дождаться паузы в передаче данных[\s\S]*Переключить после[\s\S]*без передачи данных[\s\S]*Считать передачу активной при скорости выше/); assert.match(feature, /Дождаться паузы в передаче данных[\s\S]*Переключить после[\s\S]*без передачи данных[\s\S]*Считать передачу активной при скорости выше/);
assert.match(feature, /Когда включать резервный[\s\S]*основной не отвечает, а резервный работает[\s\S]*Если основной снова не работает[\s\S]*дольше использует резервный канал/); assert.match(feature, /Когда переключаться на резервный канал[\s\S]*основной канал не отвечает, а резервный канал работает[\s\S]*Повторные сбои основного канала[\s\S]*оставляет новые подключения на резервном канале/);
assert.doesNotMatch(feature, /Когда включать резервный|Harbor включит резервный,|через резервный\./);
assert.match(feature, /client-failover-number-input[\s\S]*Math\.max\(2, String\(value\)\.length \+ 0\.6\)/); assert.match(feature, /client-failover-number-input[\s\S]*Math\.max\(2, String\(value\)\.length \+ 0\.6\)/);
assert.match(feature, /client-failover-number-control[\s\S]*client-failover-number-input[\s\S]*client-failover-number-steps[\s\S]*уменьшить на \$\{step\}[\s\S]*><\/button>[\s\S]*увеличить на \$\{step\}[\s\S]*>\+<\/button>/); assert.match(feature, /client-failover-number-control[\s\S]*client-failover-number-input[\s\S]*client-failover-number-steps[\s\S]*уменьшить на \$\{step\}[\s\S]*><\/button>[\s\S]*увеличить на \$\{step\}[\s\S]*>\+<\/button>/);
assert.match(feature, /before="Ждать ответ не дольше"[\s\S]*step=\{1\}/); assert.match(feature, /before="Ждать ответа не дольше"[\s\S]*step=\{1\}/);
assert.doesNotMatch(feature, /advancedOpen|advancedClosing|toggleAdvanced|aria-controls="client-failover-advanced-options"/); assert.doesNotMatch(feature, /advancedOpen|advancedClosing|toggleAdvanced|aria-controls="client-failover-advanced-options"/);
assert.match(feature, /label="Добавить проверку"/); assert.match(feature, /label="Добавить проверку"/);
assert.match(feature, /Новый HTTPS-сервис…/); assert.match(feature, /Новый HTTPS-сервис…/);
@@ -45,7 +46,7 @@ test('failover settings use Harbor switches, a two-column channel table and plai
assert.doesNotMatch(feature, /<details|<summary|Нет данных|текущий канал вне настроенной пары/); assert.doesNotMatch(feature, /<details|<summary|Нет данных|текущий канал вне настроенной пары/);
assert.doesNotMatch(page, /Текущий канал вне резервной пары/); assert.doesNotMatch(page, /Текущий канал вне резервной пары/);
assert.match(page, /Резерв применится после перезапуска VPN/); assert.match(page, /Резерв применится после перезапуска VPN/);
assert.match(feature, /Приостановить автоматику[\s\S]*Проверить оба канала[\s\S]*Направить новые подключения через/); assert.match(feature, /Приостановить автоматическое переключение[\s\S]*Проверить оба канала[\s\S]*Переключить новые подключения на/);
assert.match(feature, /beforeunload/); assert.match(feature, /beforeunload/);
assert.match(styles, /\.client-failover-switch\[aria-checked='true'\][\s\S]*translateX\(22px\)/); assert.match(styles, /\.client-failover-switch\[aria-checked='true'\][\s\S]*translateX\(22px\)/);
assert.match(styles, /\.client-failover-heading \{[^}]*justify-content:\s*space-between[^}]*}/); assert.match(styles, /\.client-failover-heading \{[^}]*justify-content:\s*space-between[^}]*}/);
@@ -58,19 +59,21 @@ test('failover settings use Harbor switches, a two-column channel table and plai
assert.match(styles, /\.client-failover-number-control \{[^}]*position:\s*relative[^}]*min-width:\s*44px[^}]*padding-bottom:\s*18px/); assert.match(styles, /\.client-failover-number-control \{[^}]*position:\s*relative[^}]*min-width:\s*44px[^}]*padding-bottom:\s*18px/);
assert.match(styles, /\.client-failover-number-setting input \{[^}]*border:\s*0[^}]*text-align:\s*center[^}]*appearance:\s*textfield/); assert.match(styles, /\.client-failover-number-setting input \{[^}]*border:\s*0[^}]*text-align:\s*center[^}]*appearance:\s*textfield/);
assert.match(styles, /input::\-webkit-inner-spin-button[\s\S]*input::\-webkit-outer-spin-button[^}]*\-webkit-appearance:\s*none/); assert.match(styles, /input::\-webkit-inner-spin-button[\s\S]*input::\-webkit-outer-spin-button[^}]*\-webkit-appearance:\s*none/);
assert.match(styles, /\.client-failover-number-steps \{[^}]*position:\s*absolute[^}]*opacity:\s*0[^}]*pointer-events:\s*none/); assert.match(styles, /\.client-failover-number-setting \{[^}]*font:\s*var\(--type-data\)/);
assert.match(styles, /\.client-failover-number-control:hover \.client-failover-number-steps,[^}]*:focus-within[^}]*opacity:\s*1[^}]*pointer-events:\s*auto/); assert.match(styles, /\.client-failover-section-header p,[^}]*font:\s*var\(--type-control\)/);
assert.match(styles, /\.client-failover-number-steps \{[^}]*position:\s*absolute[^}]*opacity:\s*0[^}]*pointer-events:\s*none[^}]*opacity 260ms ease 80ms/);
assert.match(styles, /\.client-failover-number-control:hover \.client-failover-number-steps,[^}]*:focus-within[^}]*opacity:\s*1[^}]*pointer-events:\s*auto[^}]*opacity 180ms ease[^}]*transform 220ms/);
assert.match(styles, /\.client-failover-timing \{[^}]*gap:\s*0[^}]*\}[\s\S]*\.client-failover-protection-options \{[^}]*gap:\s*0/); assert.match(styles, /\.client-failover-timing \{[^}]*gap:\s*0[^}]*\}[\s\S]*\.client-failover-protection-options \{[^}]*gap:\s*0/);
assert.doesNotMatch(styles, /client-failover-advanced|failover-advanced-in|failover-advanced-out/); assert.doesNotMatch(styles, /client-failover-advanced|failover-advanced-in|failover-advanced-out/);
}); });
test('runtime status keeps fixed geometry and explains active traffic without motion dependence', () => { test('runtime status keeps fixed geometry and explains active traffic without motion dependence', () => {
assert.match(feature, /Ждём паузу в передаче данных/); assert.match(feature, /Ждём паузу в передаче данных/);
assert.match(feature, /Идёт передача данных ·[\s\S]*transmittingConnections/); assert.match(feature, /Сейчас передаётся [\s\S]*Активных подключений:[\s\S]*transmittingConnections/);
assert.match(feature, /activity\?\.blockers\.slice\(0, 2\)\.map/); assert.match(feature, /activity\?\.blockers\.slice\(0, 2\)\.map/);
assert.match(feature, /Ещё \{activity\.blockers\.length - 2\}/); assert.match(feature, /Ещё \{activity\.blockers\.length - 2\}/);
assert.match(feature, /Проверяем сбой ·[\s\S]*Следующее решение не раньше чем через/); assert.match(feature, /Проверяем основной канал ·[\s\S]*Проверим каналы снова через/);
assert.match(feature, /switchRole && snapshot\.enabled && snapshot\.activation === 'active'/); assert.match(feature, /switchRole && snapshot\.enabled && snapshot\.activation === 'active'/);
assert.match(styles, /\.client-failover-runtime \{[^}]*min-height:\s*132px/); assert.match(styles, /\.client-failover-runtime \{[^}]*min-height:\s*132px/);
assert.match(styles, /@media \(prefers-reduced-motion: reduce\)[\s\S]*transition:\s*none/); assert.match(styles, /@media \(prefers-reduced-motion: reduce\)[^{]*\{[^}]*\.client-failover-number-control:hover \.client-failover-number-steps[^}]*transition:\s*none/);
}); });
+11 -11
View File
@@ -39,25 +39,25 @@ const expectedImports = [
const sha256 = (value) => crypto.createHash('sha256').update(value).digest('hex'); const sha256 = (value) => crypto.createHash('sha256').update(value).digest('hex');
const acceptedLedger = { const acceptedLedger = {
counts: { counts: {
cascadeEdges: 1022, cascadeEdges: 1037,
customProperties: 106, customProperties: 106,
declarations: 4100, declarations: 4110,
important: 0, important: 0,
keyframes: 50, keyframes: 50,
media: 17, media: 17,
rules: 1106, rules: 1106,
variableReferences: 1040, variableReferences: 1049,
}, },
hashes: { hashes: {
cascadeEdges: '2ebf5dd14c4a1ae91a4ac550dc5cd5a1796c4a350a74d70b816e6c8cc2bb1298', cascadeEdges: 'da134201db19eb45f82a1169f571fbea293ff8a76c6bcb24d3b10b060bba2fbd',
customProperties: 'fd6f16069f9fe3526f09d4d574431ddae67150d8e7a8a40e04c9fd2d179ec7ac', customProperties: 'fd6f16069f9fe3526f09d4d574431ddae67150d8e7a8a40e04c9fd2d179ec7ac',
declarations: '144956358828e941f82aad0081344417432f00c3908e14ea30579cda3a67a172', declarations: '89d33ebe8f3b462b0dcb3ae45bf2710d9a8633033047d025aa317b9e35d4d2b1',
duplicateKeyframes: '4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945', duplicateKeyframes: '4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945',
duplicateSelectors: '8982145dba05b33bf1c93b2d54cfbe76305b276ff3c657aa020144016ada5848', duplicateSelectors: '8982145dba05b33bf1c93b2d54cfbe76305b276ff3c657aa020144016ada5848',
keyframes: 'af4b9ae18d070fd2462a9b050293f3821bf5017c6e7cc53bbe18dc826f0fe3b9', keyframes: 'af4b9ae18d070fd2462a9b050293f3821bf5017c6e7cc53bbe18dc826f0fe3b9',
ruleDeclarationSequences: '42bfa78f2f515fa082c36ea606825a617b98c3f8285f940d01fb3bade2a22c1c', ruleDeclarationSequences: '17a00d972ccc4ecb5450cfc5abd385602b6fd3911085e63c375d69df70bbda7f',
selectors: '24384f274822bfebbe8139f8f32f6986956055d716db493260d4157b38a2f647', selectors: '28220ffd959c5f11f9956ebe90eb201c7fe3d4733b0ad6f756ecdc03f8512d13',
variableReferences: '60e91eac692feccb870fba6b1fc7ed87b918a9d95711ab90cca7e69d5c742875', variableReferences: '09c3fc03be5d841b5276279ae40557f75ca79ef2c8b21f7578e67c8801f2a87c',
witnesses: 'ff6fe62b26aaae6c9171e176b9fd6176e13df145ce30998d83d52d696bb0ad8c', witnesses: 'ff6fe62b26aaae6c9171e176b9fd6176e13df145ce30998d83d52d696bb0ad8c',
}, },
}; };
@@ -408,8 +408,8 @@ test('main owns one public stylesheet and the regrouped production CSS is determ
assert.equal((main.match(/import ['"][^'"]+\.css['"]/g) || []).length, 1); assert.equal((main.match(/import ['"][^'"]+\.css['"]/g) || []).length, 1);
const assets = fs.readdirSync(path.join(root, 'dist/assets')).filter((file) => file.endsWith('.css')); const assets = fs.readdirSync(path.join(root, 'dist/assets')).filter((file) => file.endsWith('.css'));
assert.deepEqual(assets, ['index-CFcqdOjW.css']); assert.deepEqual(assets, ['index-CpsQVQ8c.css']);
const built = fs.readFileSync(path.join(root, 'dist/assets', assets[0])); const built = fs.readFileSync(path.join(root, 'dist/assets', assets[0]));
assert.equal(built.byteLength, 155571); assert.equal(built.byteLength, 156271);
assert.equal(sha256(built), '5d6d6b76c699ebe17b2487b532b35703ce427051578c3aa86672d2f1fd2edd98'); assert.equal(sha256(built), '244fa71e9354cb1f81233cc630b8d5014c4f8ad910ad96dae4eee637d5c312e6');
}); });