@@ -53,7 +53,7 @@ const props = withDefaults(
5353
5454const { locale } = useI18n ()
5555const { accentColors, selectedAccentColor } = useAccentColor ()
56- const { settings } = useSettings ()
56+ const { localSettings } = useUserLocalSettings ()
5757const { copy, copied } = useClipboard ()
5858
5959const colorMode = useColorMode ()
@@ -963,7 +963,7 @@ const effectiveDataSingle = computed<EvolutionData>(() => {
963963
964964 if (isDownloadsMetric .value && data .length ) {
965965 const pkg = effectivePackageNames .value [0 ] ?? props .packageName ?? ' '
966- if (settings .value .chartFilter .anomaliesFixed ) {
966+ if (localSettings .value .chartFilter .anomaliesFixed ) {
967967 data = applyBlocklistCorrection ({
968968 data ,
969969 packageName: pkg ,
@@ -973,7 +973,7 @@ const effectiveDataSingle = computed<EvolutionData>(() => {
973973
974974 return applyDataCorrection (
975975 data as Array <{ value: number }>,
976- settings .value .chartFilter ,
976+ localSettings .value .chartFilter ,
977977 ) as EvolutionData
978978 }
979979
@@ -1016,12 +1016,12 @@ const chartData = computed<{
10161016 for (const pkg of names ) {
10171017 let data = state .evolutionsByPackage [pkg ] ?? []
10181018 if (isDownloadsMetric .value && data .length ) {
1019- if (settings .value .chartFilter .anomaliesFixed ) {
1019+ if (localSettings .value .chartFilter .anomaliesFixed ) {
10201020 data = applyBlocklistCorrection ({ data , packageName: pkg , granularity })
10211021 }
10221022 data = applyDataCorrection (
10231023 data as Array <{ value: number }>,
1024- settings .value .chartFilter ,
1024+ localSettings .value .chartFilter ,
10251025 ) as EvolutionData
10261026 }
10271027 const points = extractSeriesPoints (granularity , data )
@@ -1787,10 +1787,10 @@ watch(selectedMetric, value => {
17871787 <label class =" flex flex-col gap-1 flex-1" >
17881788 <span class =" text-2xs font-mono text-fg-subtle tracking-wide uppercase" >
17891789 {{ $t('package.trends.average_window') }}
1790- <span class =" text-fg-muted" >({{ settings .chartFilter.averageWindow }})</span >
1790+ <span class =" text-fg-muted" >({{ localSettings .chartFilter.averageWindow }})</span >
17911791 </span >
17921792 <input
1793- v-model.number =" settings .chartFilter.averageWindow"
1793+ v-model.number =" localSettings .chartFilter.averageWindow"
17941794 type =" range"
17951795 min =" 0"
17961796 max =" 20"
@@ -1801,10 +1801,10 @@ watch(selectedMetric, value => {
18011801 <label class =" flex flex-col gap-1 flex-1" >
18021802 <span class =" text-2xs font-mono text-fg-subtle tracking-wide uppercase" >
18031803 {{ $t('package.trends.smoothing') }}
1804- <span class =" text-fg-muted" >({{ settings .chartFilter.smoothingTau }})</span >
1804+ <span class =" text-fg-muted" >({{ localSettings .chartFilter.smoothingTau }})</span >
18051805 </span >
18061806 <input
1807- v-model.number =" settings .chartFilter.smoothingTau"
1807+ v-model.number =" localSettings .chartFilter.smoothingTau"
18081808 type =" range"
18091809 min =" 0"
18101810 max =" 20"
@@ -1869,7 +1869,7 @@ watch(selectedMetric, value => {
18691869 :class =" { 'opacity-50 pointer-events-none': !hasAnomalies }"
18701870 >
18711871 <input
1872- v-model =" settings .chartFilter.anomaliesFixed"
1872+ v-model =" localSettings .chartFilter.anomaliesFixed"
18731873 type =" checkbox"
18741874 :disabled =" !hasAnomalies"
18751875 class =" accent-[var(--accent-color,var(--fg-subtle))]"
0 commit comments