@@ -55,7 +55,7 @@ const props = withDefaults(
5555
5656const { locale } = useI18n ()
5757const { accentColors, selectedAccentColor } = useAccentColor ()
58- const { settings } = useSettings ()
58+ const { localSettings } = useUserLocalSettings ()
5959const { copy, copied } = useClipboard ()
6060
6161const colorMode = useColorMode ()
@@ -965,7 +965,7 @@ const effectiveDataSingle = computed<EvolutionData>(() => {
965965
966966 if (isDownloadsMetric .value && data .length ) {
967967 const pkg = effectivePackageNames .value [0 ] ?? props .packageName ?? ' '
968- if (settings .value .chartFilter .anomaliesFixed ) {
968+ if (localSettings .value .chartFilter .anomaliesFixed ) {
969969 data = applyBlocklistCorrection ({
970970 data ,
971971 packageName: pkg ,
@@ -975,7 +975,7 @@ const effectiveDataSingle = computed<EvolutionData>(() => {
975975
976976 return applyDataCorrection (
977977 data as Array <{ value: number }>,
978- settings .value .chartFilter ,
978+ localSettings .value .chartFilter ,
979979 ) as EvolutionData
980980 }
981981
@@ -1018,12 +1018,12 @@ const chartData = computed<{
10181018 for (const pkg of names ) {
10191019 let data = state .evolutionsByPackage [pkg ] ?? []
10201020 if (isDownloadsMetric .value && data .length ) {
1021- if (settings .value .chartFilter .anomaliesFixed ) {
1021+ if (localSettings .value .chartFilter .anomaliesFixed ) {
10221022 data = applyBlocklistCorrection ({ data , packageName: pkg , granularity })
10231023 }
10241024 data = applyDataCorrection (
10251025 data as Array <{ value: number }>,
1026- settings .value .chartFilter ,
1026+ localSettings .value .chartFilter ,
10271027 ) as EvolutionData
10281028 }
10291029 const points = extractSeriesPoints (granularity , data )
@@ -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.average_window') }}
1804- <span class =" text-fg-muted" >({{ settings .chartFilter.averageWindow }})</span >
1804+ <span class =" text-fg-muted" >({{ localSettings .chartFilter.averageWindow }})</span >
18051805 </span >
18061806 <input
1807- v-model.number =" settings .chartFilter.averageWindow"
1807+ v-model.number =" localSettings .chartFilter.averageWindow"
18081808 type =" range"
18091809 min =" 0"
18101810 max =" 20"
@@ -1815,10 +1815,10 @@ watch(selectedMetric, value => {
18151815 <label class =" flex flex-col gap-1 flex-1" >
18161816 <span class =" text-2xs font-mono text-fg-subtle tracking-wide uppercase" >
18171817 {{ $t('package.trends.smoothing') }}
1818- <span class =" text-fg-muted" >({{ settings .chartFilter.smoothingTau }})</span >
1818+ <span class =" text-fg-muted" >({{ localSettings .chartFilter.smoothingTau }})</span >
18191819 </span >
18201820 <input
1821- v-model.number =" settings .chartFilter.smoothingTau"
1821+ v-model.number =" localSettings .chartFilter.smoothingTau"
18221822 type =" range"
18231823 min =" 0"
18241824 max =" 20"
@@ -1883,9 +1883,11 @@ watch(selectedMetric, value => {
18831883 :class =" { 'opacity-50 pointer-events-none': !hasAnomalies }"
18841884 >
18851885 <input
1886- :checked =" settings .chartFilter.anomaliesFixed && hasAnomalies"
1886+ :checked =" localSettings .chartFilter.anomaliesFixed && hasAnomalies"
18871887 @change ="
1888- settings.chartFilter.anomaliesFixed = ($event.target as HTMLInputElement).checked
1888+ localSettings.chartFilter.anomaliesFixed = (
1889+ $event.target as HTMLInputElement
1890+ ).checked
18891891 "
18901892 type =" checkbox"
18911893 :disabled =" !hasAnomalies"
0 commit comments