Damien Elmes 2025-07-01 11:19:49 +07:00
parent b22b3310d6
commit bf36e10519

View file

@ -395,35 +395,38 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{/if} {/if}
</details> </details>
<details> <div style="display:none;">
<summary>{tr.deckConfigComputeOptimalRetention()}</summary> <details>
<button <summary>{tr.deckConfigComputeOptimalRetention()}</summary>
class="btn {computingRetention ? 'btn-warning' : 'btn-primary'}" <button
disabled={!computingRetention && computing} class="btn {computingRetention
on:click={() => computeRetention()} ? 'btn-warning'
> : 'btn-primary'}"
disabled={!computingRetention && computing}
on:click={() => computeRetention()}
>
{#if computingRetention}
{tr.actionsCancel()}
{:else}
{tr.deckConfigComputeButton()}
{/if}
</button>
{#if optimalRetention}
{estimatedRetention(optimalRetention)}
{#if optimalRetention - $config.desiredRetention >= 0.01}
<Warning
warning={tr.deckConfigDesiredRetentionBelowOptimal()}
className="alert-warning"
/>
{/if}
{/if}
{#if computingRetention} {#if computingRetention}
{tr.actionsCancel()} <div>{computeRetentionProgressString}</div>
{:else}
{tr.deckConfigComputeButton()}
{/if} {/if}
</button> </details>
</div>
{#if optimalRetention}
{estimatedRetention(optimalRetention)}
{#if optimalRetention - $config.desiredRetention >= 0.01}
<Warning
warning={tr.deckConfigDesiredRetentionBelowOptimal()}
className="alert-warning"
/>
{/if}
{/if}
{#if computingRetention}
<div>{computeRetentionProgressString}</div>
{/if}
</details>
<button <button
class="btn {computing ? 'btn-warning' : 'btn-primary'}" class="btn {computing ? 'btn-warning' : 'btn-primary'}"
disabled={computing} disabled={computing}