rename variable

This commit is contained in:
Luc Mcgrady 2025-08-07 21:22:07 +01:00
parent bcab1f6d31
commit 440e5a1674
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
3 changed files with 7 additions and 7 deletions

View file

@ -12,7 +12,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export { className as class }; export { className as class };
export let title: string; export let title: string;
export let onTitleClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null; export let onHelpClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null;
</script> </script>
<div <div
@ -29,8 +29,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{title} {title}
</h1> </h1>
<div <div
on:click={onTitleClick} on:click={onHelpClick}
on:keydown={onTitleClick} on:keydown={onHelpClick}
role="button" role="button"
tabindex="0" tabindex="0"
class="help-badge position-absolute" class="help-badge position-absolute"

View file

@ -8,7 +8,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
// When title is null (default), the graph is inlined, not having TitledContainer wrapper. // When title is null (default), the graph is inlined, not having TitledContainer wrapper.
export let title: string | null = null; export let title: string | null = null;
export let subtitle: string | null = null; export let subtitle: string | null = null;
export let onTitleClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null; export let onHelpClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null;
</script> </script>
{#if title == null} {#if title == null}
@ -19,7 +19,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<slot /> <slot />
</div> </div>
{:else} {:else}
<TitledContainer class="d-flex flex-column" {title} {onTitleClick}> <TitledContainer class="d-flex flex-column" {title} {onHelpClick}>
<slot slot="tooltip" name="tooltip"></slot> <slot slot="tooltip" name="tooltip"></slot>
<div class="graph d-flex flex-grow-1 flex-column justify-content-center"> <div class="graph d-flex flex-grow-1 flex-column justify-content-center">
{#if subtitle} {#if subtitle}

View file

@ -57,12 +57,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const title = tr.statisticsTrueRetentionTitle(); const title = tr.statisticsTrueRetentionTitle();
const subtitle = tr.statisticsTrueRetentionSubtitle(); const subtitle = tr.statisticsTrueRetentionSubtitle();
const onTitleClick = () => { const onHelpClick = () => {
openHelpModal(Object.keys(retentionHelp).indexOf("trueRetention")); openHelpModal(Object.keys(retentionHelp).indexOf("trueRetention"));
}; };
</script> </script>
<Graph {title} {subtitle} {onTitleClick}> <Graph {title} {subtitle} {onHelpClick}>
<HelpModal <HelpModal
title={tr.statisticsTrueRetentionTitle()} title={tr.statisticsTrueRetentionTitle()}
url={HelpPage.DeckOptions.fsrs} url={HelpPage.DeckOptions.fsrs}