mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
parent
b22b3310d6
commit
bf36e10519
1 changed files with 30 additions and 27 deletions
|
@ -395,35 +395,38 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
{/if}
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>{tr.deckConfigComputeOptimalRetention()}</summary>
|
||||
<button
|
||||
class="btn {computingRetention ? 'btn-warning' : 'btn-primary'}"
|
||||
disabled={!computingRetention && computing}
|
||||
on:click={() => computeRetention()}
|
||||
>
|
||||
<div style="display:none;">
|
||||
<details>
|
||||
<summary>{tr.deckConfigComputeOptimalRetention()}</summary>
|
||||
<button
|
||||
class="btn {computingRetention
|
||||
? '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}
|
||||
{tr.actionsCancel()}
|
||||
{:else}
|
||||
{tr.deckConfigComputeButton()}
|
||||
<div>{computeRetentionProgressString}</div>
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
{#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>
|
||||
|
||||
</details>
|
||||
</div>
|
||||
<button
|
||||
class="btn {computing ? 'btn-warning' : 'btn-primary'}"
|
||||
disabled={computing}
|
||||
|
|
Loading…
Reference in a new issue