Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added: "Advanced settings" dropdown
  • Loading branch information
Luc-Mcgrady committed Feb 27, 2025
commit c08af64537adaf00c982a10b4e6a2fa2b965bdf2
126 changes: 75 additions & 51 deletions ts/routes/deck-options/SimulatorModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -241,66 +241,81 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</SettingTitle>
</SpinBoxRow>

<SpinBoxRow
bind:value={simulateFsrsRequest.maxInterval}
defaultValue={$config.maximumReviewInterval}
min={1}
max={36500}
>
<SettingTitle on:click={() => openHelpModal("simulateFsrsReview")}>
{tr.schedulingMaximumInterval()}
</SettingTitle>
</SpinBoxRow>

<EnumSelectorRow
bind:value={simulateFsrsRequest.reviewOrder}
defaultValue={$config.reviewOrder}
choices={reviewOrderChoices($fsrs)}
>
<SettingTitle on:click={() => openHelpModal("simulateFsrsReview")}>
{tr.deckConfigReviewSortOrder()}
</SettingTitle>
</EnumSelectorRow>
<details>
<summary>{"Advanced settings"}</summary>
<SpinBoxRow
bind:value={simulateFsrsRequest.maxInterval}
defaultValue={$config.maximumReviewInterval}
min={1}
max={36500}
>
<SettingTitle
on:click={() => openHelpModal("simulateFsrsReview")}
>
{tr.schedulingMaximumInterval()}
</SettingTitle>
</SpinBoxRow>

<SwitchRow
bind:value={simulateFsrsRequest.newCardsIgnoreReviewLimit}
defaultValue={$newCardsIgnoreReviewLimit}
>
<SettingTitle on:click={() => openHelpModal("simulateFsrsReview")}>
<GlobalLabel title={tr.deckConfigNewCardsIgnoreReviewLimit()} />
</SettingTitle>
</SwitchRow>
<EnumSelectorRow
bind:value={simulateFsrsRequest.reviewOrder}
defaultValue={$config.reviewOrder}
choices={reviewOrderChoices($fsrs)}
>
<SettingTitle
on:click={() => openHelpModal("simulateFsrsReview")}
>
{tr.deckConfigReviewSortOrder()}
</SettingTitle>
</EnumSelectorRow>

<SwitchRow bind:value={smooth} defaultValue={true}>
<SettingTitle on:click={() => openHelpModal("simulateFsrsReview")}>
{"Smooth Graph"}
</SettingTitle>
</SwitchRow>
<SwitchRow
bind:value={simulateFsrsRequest.newCardsIgnoreReviewLimit}
defaultValue={$newCardsIgnoreReviewLimit}
>
<SettingTitle
on:click={() => openHelpModal("simulateFsrsReview")}
>
<GlobalLabel
title={tr.deckConfigNewCardsIgnoreReviewLimit()}
/>
</SettingTitle>
</SwitchRow>

<SwitchRow
bind:value={suspendLeeches}
defaultValue={$config.leechAction ==
DeckConfig_Config_LeechAction.SUSPEND}
>
<SettingTitle on:click={() => openHelpModal("simulateFsrsReview")}>
{"Suspend Leeches"}
</SettingTitle>
</SwitchRow>
<SwitchRow bind:value={smooth} defaultValue={true}>
<SettingTitle
on:click={() => openHelpModal("simulateFsrsReview")}
>
{"Smooth Graph"}
</SettingTitle>
</SwitchRow>

{#if suspendLeeches}
<SpinBoxRow
bind:value={leechThreshold}
defaultValue={$config.leechThreshold}
min={1}
max={9999}
<SwitchRow
bind:value={suspendLeeches}
defaultValue={$config.leechAction ==
DeckConfig_Config_LeechAction.SUSPEND}
>
<SettingTitle
on:click={() => openHelpModal("simulateFsrsReview")}
>
{tr.schedulingLeechThreshold()}
{"Suspend Leeches"}
</SettingTitle>
</SpinBoxRow>
{/if}
</SwitchRow>

{#if suspendLeeches}
<SpinBoxRow
bind:value={leechThreshold}
defaultValue={$config.leechThreshold}
min={1}
max={9999}
>
<SettingTitle
on:click={() => openHelpModal("simulateFsrsReview")}
>
{tr.schedulingLeechThreshold()}
</SettingTitle>
</SpinBoxRow>
{/if}
</details>

<button
class="btn {computing ? 'btn-warning' : 'btn-primary'}"
Expand Down Expand Up @@ -407,4 +422,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
.btn {
margin-bottom: 0.375rem;
}

details {
margin-bottom: 1em;
padding-left: 1em;
}

summary {
margin-bottom: 0.5em;
}
</style>