From 35c7c9d9652c2a192542e02f7640f240421744fe Mon Sep 17 00:00:00 2001 From: vcoppe Date: Thu, 3 Oct 2024 13:24:23 +0200 Subject: [PATCH] compact elevation profile dataset control --- .../lib/components/ButtonWithTooltip.svelte | 4 +- .../lib/components/ElevationProfile.svelte | 201 +++++++++++------- website/src/locales/en.json | 9 +- 3 files changed, 128 insertions(+), 86 deletions(-) diff --git a/website/src/lib/components/ButtonWithTooltip.svelte b/website/src/lib/components/ButtonWithTooltip.svelte index c5a7d2a5..7d7b42ed 100644 --- a/website/src/lib/components/ButtonWithTooltip.svelte +++ b/website/src/lib/components/ButtonWithTooltip.svelte @@ -1,6 +1,7 @@ - diff --git a/website/src/lib/components/ElevationProfile.svelte b/website/src/lib/components/ElevationProfile.svelte index 407334c6..06f19bdd 100644 --- a/website/src/lib/components/ElevationProfile.svelte +++ b/website/src/lib/components/ElevationProfile.svelte @@ -1,6 +1,7 @@ -
-
- - -
+
+ + {#if showControls} -
- - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + +
+ {#if elevationFill === 'slope'} + + {/if} +
+ + {$_('quantities.slope')} +
+ +
+ {#if elevationFill === 'surface'} + + {/if} +
+ + {$_('quantities.surface')} +
+
+ + +
+ {#if additionalDatasets.includes('speed')} + + {/if} +
+ + {$velocityUnits === 'speed' ? $_('quantities.speed') : $_('quantities.pace')} +
+ +
+ {#if additionalDatasets.includes('hr')} + + {/if} +
+ + {$_('quantities.heartrate')} +
+ +
+ {#if additionalDatasets.includes('cad')} + + {/if} +
+ + {$_('quantities.cadence')} +
+ +
+ {#if additionalDatasets.includes('atemp')} + + {/if} +
+ + {$_('quantities.temperature')} +
+ +
+ {#if additionalDatasets.includes('power')} + + {/if} +
+ + {$_('quantities.power')} +
+
+
+
{/if}
diff --git a/website/src/locales/en.json b/website/src/locales/en.json index 86c55681..b29d60df 100644 --- a/website/src/locales/en.json +++ b/website/src/locales/en.json @@ -341,14 +341,7 @@ } }, "chart": { - "show_slope": "Show slope data", - "show_surface": "Show surface data", - "show_speed": "Show speed data", - "show_pace": "Show pace data", - "show_heartrate": "Show heart rate data", - "show_cadence": "Show cadence data", - "show_temperature": "Show temperature data", - "show_power": "Show power data" + "settings": "Elevation profile settings" }, "quantities": { "distance": "Distance",