{#snippet row(limit: Quota, who: string)} {@const state = standing(limit, now)} {@const percent = limit.used_percent} {@const used = percent == null || !Number.isFinite(percent) ? null : Math.round(percent)} {@const age = observedAge(limit, now)} {@const heat = state === 'fresh' && percent != null ? heatOf(percent) : 'cool'}
  • {limitName(limit)} {#if state === 'failed'} no reading {reason(limit)} {:else if used == null} no percentage {seen(limit)} {:else} {used}% used {#if state === 'fresh'} {resetText(limit, now) ? `resets ${resetText(limit, now)}` : 'no reset time'} {:else if state === 'old'} {seen(limit)} {:else} read at an unknown time {/if} {/if}
  • {/snippet} {#snippet account(group: LimitGroup)}

    {group.name}

    {/snippet}
    {#each fold.shown as group (group.id)} {@render account(group)} {/each} {#if fold.folded.length}
    {fold.folded.length} more {fold.folded.length === 1 ? 'account' : 'accounts'} highest cap: {#each fold.folded as group, index (group.id)}{index ? '; ' : ''}{group.name} {accountCap(group, now)}{/each} {#each fold.folded as group (group.id)} {@render account(group)} {/each}
    {/if}