Collapse passed provisioning checks (Refs #83)
This commit is contained in:
@@ -20,14 +20,15 @@
|
||||
{#if groups.length}
|
||||
<ol class="phases">
|
||||
{#each groups as group (group.key)}
|
||||
{@const defaultOpen = detail.deployment.state !== 'done' || group.steps.some(step => step.state === 'failed' || step.checks.some(check => check.result !== 'pass'))}
|
||||
<li class:current={active && (group.state === 'current' || group.state === 'waiting')} class:failed={group.state === 'failed'}>
|
||||
<details open={expanded[group.key] ?? true}>
|
||||
<details open={expanded[group.key] ?? defaultOpen}>
|
||||
<summary
|
||||
onclick={event => { event.preventDefault(); expanded[group.key] = !(expanded[group.key] ?? true); }}
|
||||
onclick={event => { event.preventDefault(); expanded[group.key] = !(expanded[group.key] ?? defaultOpen); }}
|
||||
onkeydown={event => {
|
||||
if (event.key !== 'Enter' && event.key !== ' ') return;
|
||||
event.preventDefault();
|
||||
if (!event.repeat) expanded[group.key] = !(expanded[group.key] ?? true);
|
||||
if (!event.repeat) expanded[group.key] = !(expanded[group.key] ?? defaultOpen);
|
||||
}}
|
||||
>
|
||||
<span class="phase-icon state-{group.state}" aria-hidden="true">{progressIcons[group.state]}</span>
|
||||
|
||||
Reference in New Issue
Block a user