mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Rename SectionItem to just Item and use across option sections
This commit is contained in:
parent
f895919435
commit
e030e6f656
15 changed files with 317 additions and 260 deletions
|
@ -5,7 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
import { setContext } from "svelte";
|
import { setContext } from "svelte";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
import SectionItem from "./SectionItem.svelte";
|
import Item from "./Item.svelte";
|
||||||
import { sectionKey } from "./contextKeys";
|
import { sectionKey } from "./contextKeys";
|
||||||
import type { Identifier } from "./identifier";
|
import type { Identifier } from "./identifier";
|
||||||
import { insertElement, appendElement } from "./identifier";
|
import { insertElement, appendElement } from "./identifier";
|
||||||
|
@ -84,9 +84,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
{#each $dynamicItems as item}
|
{#each $dynamicItems as item}
|
||||||
<SectionItem id={item[0].id} registration={item[1]}>
|
<Item id={item[0].id} registration={item[1]}>
|
||||||
<svelte:component this={item[0].component} {...item[0].props} />
|
<svelte:component this={item[0].component} {...item[0].props} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
import { setContext } from "svelte";
|
import { setContext } from "svelte";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
import SectionItem from "./SectionItem.svelte";
|
import Item from "./Item.svelte";
|
||||||
import { sectionKey } from "./contextKeys";
|
import { sectionKey } from "./contextKeys";
|
||||||
import type { Identifier } from "./identifier";
|
import type { Identifier } from "./identifier";
|
||||||
import { insertElement, appendElement } from "./identifier";
|
import { insertElement, appendElement } from "./identifier";
|
||||||
|
@ -56,9 +56,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<div bind:this={sectionRef} {id}>
|
<div bind:this={sectionRef} {id}>
|
||||||
<slot />
|
<slot />
|
||||||
{#each $dynamicItems as item}
|
{#each $dynamicItems as item}
|
||||||
<SectionItem id={item[0].id} registration={item[1]}>
|
<Item id={item[0].id} registration={item[1]}>
|
||||||
<svelte:component this={item[0].component} {...item[0].props} />
|
<svelte:component this={item[0].component} {...item[0].props} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import SpinBoxRow from "./SpinBoxRow.svelte";
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
||||||
import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte";
|
import SpinBoxFloatRow from "./SpinBoxFloatRow.svelte";
|
||||||
import type { DeckOptionsState } from "./lib";
|
import type { DeckOptionsState } from "./lib";
|
||||||
|
@ -17,62 +18,74 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.deckConfigAdvancedTitle()} {api}>
|
<TitledContainer title={tr.deckConfigAdvancedTitle()} {api}>
|
||||||
<SpinBoxRow
|
<Item>
|
||||||
bind:value={$config.maximumReviewInterval}
|
<SpinBoxRow
|
||||||
defaultValue={defaults.maximumReviewInterval}
|
bind:value={$config.maximumReviewInterval}
|
||||||
min={1}
|
defaultValue={defaults.maximumReviewInterval}
|
||||||
max={365 * 100}
|
min={1}
|
||||||
markdownTooltip={tr.deckConfigMaximumIntervalTooltip()}
|
max={365 * 100}
|
||||||
>
|
markdownTooltip={tr.deckConfigMaximumIntervalTooltip()}
|
||||||
{tr.schedulingMaximumInterval()}
|
>
|
||||||
</SpinBoxRow>
|
{tr.schedulingMaximumInterval()}
|
||||||
|
</SpinBoxRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxFloatRow
|
<Item>
|
||||||
bind:value={$config.initialEase}
|
<SpinBoxFloatRow
|
||||||
defaultValue={defaults.initialEase}
|
bind:value={$config.initialEase}
|
||||||
min={1.31}
|
defaultValue={defaults.initialEase}
|
||||||
max={5}
|
min={1.31}
|
||||||
markdownTooltip={tr.deckConfigStartingEaseTooltip()}
|
max={5}
|
||||||
>
|
markdownTooltip={tr.deckConfigStartingEaseTooltip()}
|
||||||
{tr.schedulingStartingEase()}
|
>
|
||||||
</SpinBoxFloatRow>
|
{tr.schedulingStartingEase()}
|
||||||
|
</SpinBoxFloatRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxFloatRow
|
<Item>
|
||||||
bind:value={$config.easyMultiplier}
|
<SpinBoxFloatRow
|
||||||
defaultValue={defaults.easyMultiplier}
|
bind:value={$config.easyMultiplier}
|
||||||
min={1}
|
defaultValue={defaults.easyMultiplier}
|
||||||
max={3}
|
min={1}
|
||||||
markdownTooltip={tr.deckConfigEasyBonusTooltip()}
|
max={3}
|
||||||
>
|
markdownTooltip={tr.deckConfigEasyBonusTooltip()}
|
||||||
{tr.schedulingEasyBonus()}
|
>
|
||||||
</SpinBoxFloatRow>
|
{tr.schedulingEasyBonus()}
|
||||||
|
</SpinBoxFloatRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxFloatRow
|
<Item>
|
||||||
bind:value={$config.intervalMultiplier}
|
<SpinBoxFloatRow
|
||||||
defaultValue={defaults.intervalMultiplier}
|
bind:value={$config.intervalMultiplier}
|
||||||
min={0.5}
|
defaultValue={defaults.intervalMultiplier}
|
||||||
max={2}
|
min={0.5}
|
||||||
markdownTooltip={tr.deckConfigIntervalModifierTooltip()}
|
max={2}
|
||||||
>
|
markdownTooltip={tr.deckConfigIntervalModifierTooltip()}
|
||||||
{tr.schedulingIntervalModifier()}
|
>
|
||||||
</SpinBoxFloatRow>
|
{tr.schedulingIntervalModifier()}
|
||||||
|
</SpinBoxFloatRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxFloatRow
|
<Item>
|
||||||
bind:value={$config.hardMultiplier}
|
<SpinBoxFloatRow
|
||||||
defaultValue={defaults.hardMultiplier}
|
bind:value={$config.hardMultiplier}
|
||||||
min={0.5}
|
defaultValue={defaults.hardMultiplier}
|
||||||
max={1.3}
|
min={0.5}
|
||||||
markdownTooltip={tr.deckConfigHardIntervalTooltip()}
|
max={1.3}
|
||||||
>
|
markdownTooltip={tr.deckConfigHardIntervalTooltip()}
|
||||||
{tr.schedulingHardInterval()}
|
>
|
||||||
</SpinBoxFloatRow>
|
{tr.schedulingHardInterval()}
|
||||||
|
</SpinBoxFloatRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxFloatRow
|
<Item>
|
||||||
bind:value={$config.lapseMultiplier}
|
<SpinBoxFloatRow
|
||||||
defaultValue={defaults.lapseMultiplier}
|
bind:value={$config.lapseMultiplier}
|
||||||
max={1}
|
defaultValue={defaults.lapseMultiplier}
|
||||||
markdownTooltip={tr.deckConfigNewIntervalTooltip()}
|
max={1}
|
||||||
>
|
markdownTooltip={tr.deckConfigNewIntervalTooltip()}
|
||||||
{tr.schedulingNewInterval()}
|
>
|
||||||
</SpinBoxFloatRow>
|
{tr.schedulingNewInterval()}
|
||||||
|
</SpinBoxFloatRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import CheckBoxRow from "./CheckBoxRow.svelte";
|
import CheckBoxRow from "./CheckBoxRow.svelte";
|
||||||
import type { DeckOptionsState } from "./lib";
|
import type { DeckOptionsState } from "./lib";
|
||||||
|
|
||||||
|
@ -16,18 +17,22 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.deckConfigAudioTitle()} {api}>
|
<TitledContainer title={tr.deckConfigAudioTitle()} {api}>
|
||||||
<CheckBoxRow
|
<Item>
|
||||||
bind:value={$config.disableAutoplay}
|
<CheckBoxRow
|
||||||
defaultValue={defaults.disableAutoplay}
|
bind:value={$config.disableAutoplay}
|
||||||
>
|
defaultValue={defaults.disableAutoplay}
|
||||||
{tr.deckConfigDisableAutoplay()}
|
>
|
||||||
</CheckBoxRow>
|
{tr.deckConfigDisableAutoplay()}
|
||||||
|
</CheckBoxRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<CheckBoxRow
|
<Item>
|
||||||
bind:value={$config.skipQuestionWhenReplayingAnswer}
|
<CheckBoxRow
|
||||||
defaultValue={defaults.skipQuestionWhenReplayingAnswer}
|
bind:value={$config.skipQuestionWhenReplayingAnswer}
|
||||||
markdownTooltip={tr.deckConfigAlwaysIncludeQuestionAudioTooltip()}
|
defaultValue={defaults.skipQuestionWhenReplayingAnswer}
|
||||||
>
|
markdownTooltip={tr.deckConfigAlwaysIncludeQuestionAudioTooltip()}
|
||||||
{tr.schedulingAlwaysIncludeQuestionSideWhenReplaying()}
|
>
|
||||||
</CheckBoxRow>
|
{tr.schedulingAlwaysIncludeQuestionSideWhenReplaying()}
|
||||||
|
</CheckBoxRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import CheckBoxRow from "./CheckBoxRow.svelte";
|
import CheckBoxRow from "./CheckBoxRow.svelte";
|
||||||
import type { DeckOptionsState } from "./lib";
|
import type { DeckOptionsState } from "./lib";
|
||||||
|
|
||||||
|
@ -16,19 +17,23 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.deckConfigBuryTitle()} {api}>
|
<TitledContainer title={tr.deckConfigBuryTitle()} {api}>
|
||||||
<CheckBoxRow
|
<Item>
|
||||||
bind:value={$config.buryNew}
|
<CheckBoxRow
|
||||||
defaultValue={defaults.buryNew}
|
bind:value={$config.buryNew}
|
||||||
markdownTooltip={tr.deckConfigBuryTitle()}
|
defaultValue={defaults.buryNew}
|
||||||
>
|
markdownTooltip={tr.deckConfigBuryTitle()}
|
||||||
{tr.deckConfigBuryNewSiblings()}
|
>
|
||||||
</CheckBoxRow>
|
{tr.deckConfigBuryNewSiblings()}
|
||||||
|
</CheckBoxRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<CheckBoxRow
|
<Item>
|
||||||
bind:value={$config.buryReviews}
|
<CheckBoxRow
|
||||||
defaultValue={defaults.buryReviews}
|
bind:value={$config.buryReviews}
|
||||||
markdownTooltip={tr.deckConfigBuryTooltip()}
|
defaultValue={defaults.buryReviews}
|
||||||
>
|
markdownTooltip={tr.deckConfigBuryTooltip()}
|
||||||
{tr.deckConfigBuryReviewSiblings()}
|
>
|
||||||
</CheckBoxRow>
|
{tr.deckConfigBuryReviewSiblings()}
|
||||||
|
</CheckBoxRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -12,7 +12,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import TextInputModal from "./TextInputModal.svelte";
|
import TextInputModal from "./TextInputModal.svelte";
|
||||||
import StickyBar from "components/StickyBar.svelte";
|
import StickyBar from "components/StickyBar.svelte";
|
||||||
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
||||||
import SectionItem from "components/SectionItem.svelte";
|
import Item from "components/Item.svelte";
|
||||||
import ButtonGroup from "components/ButtonGroup.svelte";
|
import ButtonGroup from "components/ButtonGroup.svelte";
|
||||||
import ButtonGroupItem from "components/ButtonGroupItem.svelte";
|
import ButtonGroupItem from "components/ButtonGroupItem.svelte";
|
||||||
|
|
||||||
|
@ -89,30 +89,30 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
<StickyBar>
|
<StickyBar>
|
||||||
<ButtonToolbar class="justify-content-between" size={2.3} wrap={false}>
|
<ButtonToolbar class="justify-content-between" size={2.3} wrap={false}>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<ButtonGroup class="flex-grow-1">
|
<ButtonGroup class="flex-grow-1">
|
||||||
<ButtonGroupItem>
|
<ButtonGroupItem>
|
||||||
<SelectButton class="flex-grow-1" on:change={blur}>
|
<SelectButton class="flex-grow-1" on:change={blur}>
|
||||||
{#each $configList as entry}
|
{#each $configList as entry}
|
||||||
<SelectOption
|
<SelectOption
|
||||||
value={String(entry.idx)}
|
value={String(entry.idx)}
|
||||||
selected={entry.current}
|
selected={entry.current}
|
||||||
>
|
>
|
||||||
{configLabel(entry)}
|
{configLabel(entry)}
|
||||||
</SelectOption>
|
</SelectOption>
|
||||||
{/each}
|
{/each}
|
||||||
</SelectButton>
|
</SelectButton>
|
||||||
</ButtonGroupItem>
|
</ButtonGroupItem>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem>
|
<Item>
|
||||||
<SaveButton
|
<SaveButton
|
||||||
{state}
|
{state}
|
||||||
on:add={promptToAdd}
|
on:add={promptToAdd}
|
||||||
on:clone={promptToClone}
|
on:clone={promptToClone}
|
||||||
on:rename={promptToRename}
|
on:rename={promptToRename}
|
||||||
/>
|
/>
|
||||||
</SectionItem>
|
</Item>
|
||||||
</ButtonToolbar>
|
</ButtonToolbar>
|
||||||
</StickyBar>
|
</StickyBar>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
import SectionItem from "components/SectionItem.svelte";
|
import Item from "components/Item.svelte";
|
||||||
import SpinBoxRow from "./SpinBoxRow.svelte";
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
||||||
import Warning from "./Warning.svelte";
|
import Warning from "./Warning.svelte";
|
||||||
import type { DeckOptionsState } from "./lib";
|
import type { DeckOptionsState } from "./lib";
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.deckConfigDailyLimits()} {api}>
|
<TitledContainer title={tr.deckConfigDailyLimits()} {api}>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<SpinBoxRow
|
<SpinBoxRow
|
||||||
bind:value={$config.newPerDay}
|
bind:value={$config.newPerDay}
|
||||||
defaultValue={defaults.newPerDay}
|
defaultValue={defaults.newPerDay}
|
||||||
|
@ -49,9 +49,9 @@
|
||||||
</SpinBoxRow>
|
</SpinBoxRow>
|
||||||
|
|
||||||
<Warning warning={newCardsGreaterThanParent} />
|
<Warning warning={newCardsGreaterThanParent} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem>
|
<Item>
|
||||||
<SpinBoxRow
|
<SpinBoxRow
|
||||||
bind:value={$config.reviewsPerDay}
|
bind:value={$config.reviewsPerDay}
|
||||||
defaultValue={defaults.reviewsPerDay}
|
defaultValue={defaults.reviewsPerDay}
|
||||||
|
@ -61,5 +61,5 @@
|
||||||
</SpinBoxRow>
|
</SpinBoxRow>
|
||||||
|
|
||||||
<Warning warning={reviewsTooLow} />
|
<Warning warning={reviewsTooLow} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -5,7 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import ConfigSelector from "./ConfigSelector.svelte";
|
import ConfigSelector from "./ConfigSelector.svelte";
|
||||||
import Container from "components/Container.svelte";
|
import Container from "components/Container.svelte";
|
||||||
import SectionItem from "components/SectionItem.svelte";
|
import Item from "components/Item.svelte";
|
||||||
import DailyLimits from "./DailyLimits.svelte";
|
import DailyLimits from "./DailyLimits.svelte";
|
||||||
import DisplayOrder from "./DisplayOrder.svelte";
|
import DisplayOrder from "./DisplayOrder.svelte";
|
||||||
import NewOptions from "./NewOptions.svelte";
|
import NewOptions from "./NewOptions.svelte";
|
||||||
|
@ -58,36 +58,36 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<ConfigSelector {state} />
|
<ConfigSelector {state} />
|
||||||
|
|
||||||
<Container api={options}>
|
<Container api={options}>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<DailyLimits {state} api={dailyLimits} />
|
<DailyLimits {state} api={dailyLimits} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem>
|
<Item>
|
||||||
<NewOptions {state} api={newOptions} />
|
<NewOptions {state} api={newOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<LapseOptions {state} api={lapseOptions} />
|
<LapseOptions {state} api={lapseOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<BuryOptions {state} api={buryOptions} />
|
<BuryOptions {state} api={buryOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
{#if state.v3Scheduler}
|
{#if state.v3Scheduler}
|
||||||
<SectionItem>
|
<Item>
|
||||||
<DisplayOrder {state} api={displayOrder} />
|
<DisplayOrder {state} api={displayOrder} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<SectionItem>
|
<Item>
|
||||||
<TimerOptions {state} api={timerOptions} />
|
<TimerOptions {state} api={timerOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<AudioOptions {state} api={audioOptions} />
|
<AudioOptions {state} api={audioOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<Addons {state} api={addonOptions} />
|
<Addons {state} api={addonOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
<SectionItem>
|
<Item>
|
||||||
<AdvancedOptions {state} api={advancedOptions} />
|
<AdvancedOptions {state} api={advancedOptions} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import EnumSelectorRow from "./EnumSelectorRow.svelte";
|
import EnumSelectorRow from "./EnumSelectorRow.svelte";
|
||||||
|
|
||||||
import type { DeckOptionsState } from "./lib";
|
import type { DeckOptionsState } from "./lib";
|
||||||
|
@ -39,48 +40,58 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.deckConfigOrderingTitle()} {api}>
|
<TitledContainer title={tr.deckConfigOrderingTitle()} {api}>
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.newCardGatherPriority}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.newCardGatherPriority}
|
bind:value={$config.newCardGatherPriority}
|
||||||
choices={newGatherPriorityChoices}
|
defaultValue={defaults.newCardGatherPriority}
|
||||||
markdownTooltip={tr.deckConfigNewGatherPriorityTooltip()}
|
choices={newGatherPriorityChoices}
|
||||||
>
|
markdownTooltip={tr.deckConfigNewGatherPriorityTooltip()}
|
||||||
{tr.deckConfigNewGatherPriority()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.deckConfigNewGatherPriority()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.newCardSortOrder}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.newCardSortOrder}
|
bind:value={$config.newCardSortOrder}
|
||||||
choices={newSortOrderChoices}
|
defaultValue={defaults.newCardSortOrder}
|
||||||
markdownTooltip={tr.deckConfigNewCardSortOrderTooltip()}
|
choices={newSortOrderChoices}
|
||||||
>
|
markdownTooltip={tr.deckConfigNewCardSortOrderTooltip()}
|
||||||
{tr.deckConfigNewCardSortOrder()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.deckConfigNewCardSortOrder()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.newMix}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.newMix}
|
bind:value={$config.newMix}
|
||||||
choices={reviewMixChoices()}
|
defaultValue={defaults.newMix}
|
||||||
markdownTooltip={tr.deckConfigNewReviewPriorityTooltip()}
|
choices={reviewMixChoices()}
|
||||||
>
|
markdownTooltip={tr.deckConfigNewReviewPriorityTooltip()}
|
||||||
{tr.deckConfigNewReviewPriority()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.deckConfigNewReviewPriority()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.interdayLearningMix}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.interdayLearningMix}
|
bind:value={$config.interdayLearningMix}
|
||||||
choices={reviewMixChoices()}
|
defaultValue={defaults.interdayLearningMix}
|
||||||
markdownTooltip={tr.deckConfigInterdayStepPriorityTooltip()}
|
choices={reviewMixChoices()}
|
||||||
>
|
markdownTooltip={tr.deckConfigInterdayStepPriorityTooltip()}
|
||||||
{tr.deckConfigInterdayStepPriority()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.deckConfigInterdayStepPriority()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.reviewOrder}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.reviewOrder}
|
bind:value={$config.reviewOrder}
|
||||||
choices={reviewOrderChoices}
|
defaultValue={defaults.reviewOrder}
|
||||||
markdownTooltip={tr.deckConfigReviewSortOrderTooltip()}
|
choices={reviewOrderChoices}
|
||||||
>
|
markdownTooltip={tr.deckConfigReviewSortOrderTooltip()}
|
||||||
{tr.deckConfigReviewSortOrder()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.deckConfigReviewSortOrder()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>>
|
</TitledContainer>>
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import StepsInputRow from "./StepsInputRow.svelte";
|
import StepsInputRow from "./StepsInputRow.svelte";
|
||||||
import SpinBoxRow from "./SpinBoxRow.svelte";
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
||||||
import EnumSelectorRow from "./EnumSelectorRow.svelte";
|
import EnumSelectorRow from "./EnumSelectorRow.svelte";
|
||||||
|
@ -32,41 +33,49 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.schedulingLapses()} {api}>
|
<TitledContainer title={tr.schedulingLapses()} {api}>
|
||||||
<StepsInputRow
|
<Item>
|
||||||
bind:value={$config.relearnSteps}
|
<StepsInputRow
|
||||||
defaultValue={defaults.relearnSteps}
|
bind:value={$config.relearnSteps}
|
||||||
markdownTooltip={tr.deckConfigRelearningStepsTooltip()}
|
defaultValue={defaults.relearnSteps}
|
||||||
>
|
markdownTooltip={tr.deckConfigRelearningStepsTooltip()}
|
||||||
{tr.deckConfigRelearningSteps()}
|
>
|
||||||
</StepsInputRow>
|
{tr.deckConfigRelearningSteps()}
|
||||||
|
</StepsInputRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxRow
|
<Item>
|
||||||
bind:value={$config.minimumLapseInterval}
|
<SpinBoxRow
|
||||||
defaultValue={defaults.minimumLapseInterval}
|
bind:value={$config.minimumLapseInterval}
|
||||||
min={1}
|
defaultValue={defaults.minimumLapseInterval}
|
||||||
markdownTooltip={tr.deckConfigMinimumIntervalTooltip()}
|
min={1}
|
||||||
>
|
markdownTooltip={tr.deckConfigMinimumIntervalTooltip()}
|
||||||
{tr.schedulingMinimumInterval()}
|
>
|
||||||
</SpinBoxRow>
|
{tr.schedulingMinimumInterval()}
|
||||||
|
</SpinBoxRow>
|
||||||
|
|
||||||
<Warning warning={stepsExceedMinimumInterval} />
|
<Warning warning={stepsExceedMinimumInterval} />
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxRow
|
<Item>
|
||||||
bind:value={$config.leechThreshold}
|
<SpinBoxRow
|
||||||
defaultValue={defaults.leechThreshold}
|
bind:value={$config.leechThreshold}
|
||||||
min={1}
|
defaultValue={defaults.leechThreshold}
|
||||||
markdownTooltip={tr.deckConfigLeechThresholdTooltip()}
|
min={1}
|
||||||
>
|
markdownTooltip={tr.deckConfigLeechThresholdTooltip()}
|
||||||
{tr.schedulingLeechThreshold()}
|
>
|
||||||
</SpinBoxRow>
|
{tr.schedulingLeechThreshold()}
|
||||||
|
</SpinBoxRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.leechAction}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.leechAction}
|
bind:value={$config.leechAction}
|
||||||
choices={leechChoices}
|
defaultValue={defaults.leechAction}
|
||||||
breakpoint="sm"
|
choices={leechChoices}
|
||||||
markdownTooltip={tr.deckConfigLeechActionTooltip()}
|
breakpoint="sm"
|
||||||
>
|
markdownTooltip={tr.deckConfigLeechActionTooltip()}
|
||||||
{tr.schedulingLeechAction()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.schedulingLeechAction()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import StepsInputRow from "./StepsInputRow.svelte";
|
import StepsInputRow from "./StepsInputRow.svelte";
|
||||||
import SpinBoxRow from "./SpinBoxRow.svelte";
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
||||||
import EnumSelectorRow from "./EnumSelectorRow.svelte";
|
import EnumSelectorRow from "./EnumSelectorRow.svelte";
|
||||||
|
@ -40,41 +41,49 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.schedulingNewCards()} {api}>
|
<TitledContainer title={tr.schedulingNewCards()} {api}>
|
||||||
<StepsInputRow
|
<Item>
|
||||||
bind:value={$config.learnSteps}
|
<StepsInputRow
|
||||||
defaultValue={defaults.learnSteps}
|
bind:value={$config.learnSteps}
|
||||||
markdownTooltip={tr.deckConfigLearningStepsTooltip()}
|
defaultValue={defaults.learnSteps}
|
||||||
>
|
markdownTooltip={tr.deckConfigLearningStepsTooltip()}
|
||||||
{tr.deckConfigLearningSteps()}
|
>
|
||||||
</StepsInputRow>
|
{tr.deckConfigLearningSteps()}
|
||||||
|
</StepsInputRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxRow
|
<Item>
|
||||||
bind:value={$config.graduatingIntervalGood}
|
<SpinBoxRow
|
||||||
defaultValue={defaults.graduatingIntervalGood}
|
bind:value={$config.graduatingIntervalGood}
|
||||||
markdownTooltip={tr.deckConfigGraduatingIntervalTooltip()}
|
defaultValue={defaults.graduatingIntervalGood}
|
||||||
>
|
markdownTooltip={tr.deckConfigGraduatingIntervalTooltip()}
|
||||||
{tr.schedulingGraduatingInterval()}
|
>
|
||||||
</SpinBoxRow>
|
{tr.schedulingGraduatingInterval()}
|
||||||
|
</SpinBoxRow>
|
||||||
|
|
||||||
<Warning warning={stepsExceedGraduatingInterval} />
|
<Warning warning={stepsExceedGraduatingInterval} />
|
||||||
|
</Item>
|
||||||
|
|
||||||
<SpinBoxRow
|
<Item>
|
||||||
bind:value={$config.graduatingIntervalEasy}
|
<SpinBoxRow
|
||||||
defaultValue={defaults.graduatingIntervalEasy}
|
bind:value={$config.graduatingIntervalEasy}
|
||||||
markdownTooltip={tr.deckConfigEasyIntervalTooltip()}
|
defaultValue={defaults.graduatingIntervalEasy}
|
||||||
>
|
markdownTooltip={tr.deckConfigEasyIntervalTooltip()}
|
||||||
{tr.schedulingEasyInterval()}
|
>
|
||||||
</SpinBoxRow>
|
{tr.schedulingEasyInterval()}
|
||||||
|
</SpinBoxRow>
|
||||||
|
|
||||||
<Warning warning={goodExceedsEasy} />
|
<Warning warning={goodExceedsEasy} />
|
||||||
|
</Item>
|
||||||
|
|
||||||
<EnumSelectorRow
|
<Item>
|
||||||
bind:value={$config.newCardInsertOrder}
|
<EnumSelectorRow
|
||||||
defaultValue={defaults.newCardInsertOrder}
|
bind:value={$config.newCardInsertOrder}
|
||||||
choices={newInsertOrderChoices}
|
defaultValue={defaults.newCardInsertOrder}
|
||||||
breakpoint={"md"}
|
choices={newInsertOrderChoices}
|
||||||
markdownTooltip={tr.deckConfigNewInsertionOrderTooltip()}
|
breakpoint={"md"}
|
||||||
>
|
markdownTooltip={tr.deckConfigNewInsertionOrderTooltip()}
|
||||||
{tr.deckConfigNewInsertionOrder()}
|
>
|
||||||
</EnumSelectorRow>
|
{tr.deckConfigNewInsertionOrder()}
|
||||||
|
</EnumSelectorRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import TitledContainer from "./TitledContainer.svelte";
|
import TitledContainer from "./TitledContainer.svelte";
|
||||||
|
import Item from "components/Item.svelte";
|
||||||
import SpinBoxRow from "./SpinBoxRow.svelte";
|
import SpinBoxRow from "./SpinBoxRow.svelte";
|
||||||
import CheckBoxRow from "./CheckBoxRow.svelte";
|
import CheckBoxRow from "./CheckBoxRow.svelte";
|
||||||
import type { DeckOptionsState } from "./lib";
|
import type { DeckOptionsState } from "./lib";
|
||||||
|
@ -17,21 +18,25 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<TitledContainer title={tr.deckConfigTimerTitle()} {api}>
|
<TitledContainer title={tr.deckConfigTimerTitle()} {api}>
|
||||||
<SpinBoxRow
|
<Item>
|
||||||
bind:value={$config.capAnswerTimeToSecs}
|
<SpinBoxRow
|
||||||
defaultValue={defaults.capAnswerTimeToSecs}
|
bind:value={$config.capAnswerTimeToSecs}
|
||||||
min={30}
|
defaultValue={defaults.capAnswerTimeToSecs}
|
||||||
max={600}
|
min={30}
|
||||||
markdownTooltip={tr.deckConfigMaximumAnswerSecsTooltip()}
|
max={600}
|
||||||
>
|
markdownTooltip={tr.deckConfigMaximumAnswerSecsTooltip()}
|
||||||
{tr.deckConfigMaximumAnswerSecs()}
|
>
|
||||||
</SpinBoxRow>
|
{tr.deckConfigMaximumAnswerSecs()}
|
||||||
|
</SpinBoxRow>
|
||||||
|
</Item>
|
||||||
|
|
||||||
<CheckBoxRow
|
<Item>
|
||||||
bind:value={$config.showTimer}
|
<CheckBoxRow
|
||||||
defaultValue={defaults.showTimer}
|
bind:value={$config.showTimer}
|
||||||
markdownTooltip={tr.deckConfigShowAnswerTimerTooltip()}
|
defaultValue={defaults.showTimer}
|
||||||
>
|
markdownTooltip={tr.deckConfigShowAnswerTimerTooltip()}
|
||||||
{tr.schedulingShowAnswerTimer()}
|
>
|
||||||
</CheckBoxRow>
|
{tr.schedulingShowAnswerTimer()}
|
||||||
|
</CheckBoxRow>
|
||||||
|
</Item>
|
||||||
</TitledContainer>
|
</TitledContainer>
|
||||||
|
|
|
@ -33,7 +33,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import { isApplePlatform } from "lib/platform";
|
import { isApplePlatform } from "lib/platform";
|
||||||
import StickyBar from "components/StickyBar.svelte";
|
import StickyBar from "components/StickyBar.svelte";
|
||||||
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
||||||
import SectionItem from "components/SectionItem.svelte";
|
import Item from "components/Item.svelte";
|
||||||
|
|
||||||
import NoteTypeButtons from "./NoteTypeButtons.svelte";
|
import NoteTypeButtons from "./NoteTypeButtons.svelte";
|
||||||
import FormatInlineButtons from "./FormatInlineButtons.svelte";
|
import FormatInlineButtons from "./FormatInlineButtons.svelte";
|
||||||
|
@ -54,24 +54,24 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
<StickyBar>
|
<StickyBar>
|
||||||
<ButtonToolbar {size} {wrap} api={toolbar}>
|
<ButtonToolbar {size} {wrap} api={toolbar}>
|
||||||
<SectionItem id="notetype">
|
<Item id="notetype">
|
||||||
<NoteTypeButtons api={notetypeButtons} />
|
<NoteTypeButtons api={notetypeButtons} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem id="inlineFormatting">
|
<Item id="inlineFormatting">
|
||||||
<FormatInlineButtons api={formatInlineButtons} />
|
<FormatInlineButtons api={formatInlineButtons} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem id="blockFormatting">
|
<Item id="blockFormatting">
|
||||||
<FormatBlockButtons api={formatBlockButtons} />
|
<FormatBlockButtons api={formatBlockButtons} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem id="color">
|
<Item id="color">
|
||||||
<ColorButtons api={colorButtons} />
|
<ColorButtons api={colorButtons} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem id="template">
|
<Item id="template">
|
||||||
<TemplateButtons api={templateButtons} />
|
<TemplateButtons api={templateButtons} />
|
||||||
</SectionItem>
|
</Item>
|
||||||
</ButtonToolbar>
|
</ButtonToolbar>
|
||||||
</StickyBar>
|
</StickyBar>
|
||||||
|
|
|
@ -10,7 +10,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
import ButtonGroupItem from "components/ButtonGroupItem.svelte";
|
import ButtonGroupItem from "components/ButtonGroupItem.svelte";
|
||||||
import IconButton from "components/IconButton.svelte";
|
import IconButton from "components/IconButton.svelte";
|
||||||
import ButtonDropdown from "components/ButtonDropdown.svelte";
|
import ButtonDropdown from "components/ButtonDropdown.svelte";
|
||||||
import SectionItem from "components/SectionItem.svelte";
|
import Item from "components/Item.svelte";
|
||||||
import WithDropdownMenu from "components/WithDropdownMenu.svelte";
|
import WithDropdownMenu from "components/WithDropdownMenu.svelte";
|
||||||
import OnlyEditable from "./OnlyEditable.svelte";
|
import OnlyEditable from "./OnlyEditable.svelte";
|
||||||
import CommandIconButton from "./CommandIconButton.svelte";
|
import CommandIconButton from "./CommandIconButton.svelte";
|
||||||
|
@ -71,7 +71,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</OnlyEditable>
|
</OnlyEditable>
|
||||||
|
|
||||||
<ButtonDropdown id={menuId}>
|
<ButtonDropdown id={menuId}>
|
||||||
<SectionItem id="justify">
|
<Item id="justify">
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<ButtonGroupItem>
|
<ButtonGroupItem>
|
||||||
<CommandIconButton
|
<CommandIconButton
|
||||||
|
@ -109,9 +109,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
>
|
>
|
||||||
</ButtonGroupItem>
|
</ButtonGroupItem>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</SectionItem>
|
</Item>
|
||||||
|
|
||||||
<SectionItem id="indentation">
|
<Item id="indentation">
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<ButtonGroupItem>
|
<ButtonGroupItem>
|
||||||
<OnlyEditable let:disabled>
|
<OnlyEditable let:disabled>
|
||||||
|
@ -137,7 +137,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</OnlyEditable>
|
</OnlyEditable>
|
||||||
</ButtonGroupItem>
|
</ButtonGroupItem>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</SectionItem>
|
</Item>
|
||||||
</ButtonDropdown>
|
</ButtonDropdown>
|
||||||
</WithDropdownMenu>
|
</WithDropdownMenu>
|
||||||
</ButtonGroupItem>
|
</ButtonGroupItem>
|
||||||
|
|
Loading…
Reference in a new issue