Remove forgetting curve radio buttons when only one radio button (#3804)

This commit is contained in:
Luc Mcgrady 2025-02-09 12:53:05 +00:00 committed by GitHub
parent acaeee91fa
commit dda5973fdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,9 +51,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</script> </script>
<div class="forgetting-curve"> <div class="forgetting-curve">
<InputBox> {#if maxDays > 7}
<div class="time-range-selector"> <InputBox>
{#if maxDays > 0} <div class="time-range-selector">
<label> <label>
<input <input
type="radio" type="radio"
@ -62,8 +62,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/> />
{tr.cardStatsFsrsForgettingCurveFirstWeek()} {tr.cardStatsFsrsForgettingCurveFirstWeek()}
</label> </label>
{/if}
{#if maxDays > 7}
<label> <label>
<input <input
type="radio" type="radio"
@ -72,29 +70,29 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/> />
{tr.cardStatsFsrsForgettingCurveFirstMonth()} {tr.cardStatsFsrsForgettingCurveFirstMonth()}
</label> </label>
{/if} {#if maxDays > 30}
{#if maxDays > 30} <label>
<label> <input
<input type="radio"
type="radio" bind:group={$timeRange}
bind:group={$timeRange} value={TimeRange.Year}
value={TimeRange.Year} />
/> {tr.cardStatsFsrsForgettingCurveFirstYear()}
{tr.cardStatsFsrsForgettingCurveFirstYear()} </label>
</label> {/if}
{/if} {#if maxDays > 365}
{#if maxDays > 365} <label>
<label> <input
<input type="radio"
type="radio" bind:group={$timeRange}
bind:group={$timeRange} value={TimeRange.AllTime}
value={TimeRange.AllTime} />
/> {tr.cardStatsFsrsForgettingCurveAllTime()}
{tr.cardStatsFsrsForgettingCurveAllTime()} </label>
</label> {/if}
{/if} </div>
</div> </InputBox>
</InputBox> {/if}
<Graph {title}> <Graph {title}>
<svg bind:this={svg} viewBox={`0 0 ${bounds.width} ${bounds.height}`}> <svg bind:this={svg} viewBox={`0 0 ${bounds.width} ${bounds.height}`}>
<AxisTicks {bounds} /> <AxisTicks {bounds} />