File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ const dataset = computed<VueUiSparklineDatasetItem[]>(() =>
208208
209209const lastDatapoint = computed (() => dataset .value .at (- 1 )?.period ?? ' ' )
210210
211- const isLoop = shallowRef (false )
211+ const isLoop = shallowRef (settings . value . enableGraphPulseLooping )
212212const showPulse = shallowRef (true )
213213const keyboardShortcuts = useKeyboardShortcuts ()
214214
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ export interface AppSettings {
2323 preferredBackgroundTheme : BackgroundThemeId | null
2424 /** Hide platform-specific packages (e.g., @scope/pkg-linux-x64) from search results */
2525 hidePlatformPackages : boolean
26+ /** Enable weekly download graph pulse looping animation */
27+ enableGraphPulseLooping : boolean
2628 /** User-selected locale */
2729 selectedLocale : LocaleObject [ 'code' ] | null
2830 /** Search provider for package search */
@@ -52,6 +54,7 @@ const DEFAULT_SETTINGS: AppSettings = {
5254 includeTypesInInstall : true ,
5355 accentColorId : null ,
5456 hidePlatformPackages : true ,
57+ enableGraphPulseLooping : false ,
5558 selectedLocale : null ,
5659 preferredBackgroundTheme : null ,
5760 searchProvider : import . meta. test ? 'npm' : 'algolia' ,
Original file line number Diff line number Diff line change @@ -142,6 +142,16 @@ const setLocale: typeof setNuxti18nLocale = newLocale => {
142142 :description =" $t('settings.hide_platform_packages_description')"
143143 v-model =" settings.hidePlatformPackages"
144144 />
145+
146+ <!-- Divider -->
147+ <div class =" border-t border-border my-4" />
148+
149+ <!-- Enable weekly download graph pulse looping animation -->
150+ <SettingsToggle
151+ :label =" $t('settings.enable_graph_pulse_loop')"
152+ :description =" $t('settings.enable_graph_pulse_loop_description')"
153+ v-model =" settings.enableGraphPulseLooping"
154+ />
145155 </div >
146156 </section >
147157
Original file line number Diff line number Diff line change 138138 "include_types_description" : " Add {'@'}types package to install commands for untyped packages" ,
139139 "hide_platform_packages" : " Hide platform-specific packages in search" ,
140140 "hide_platform_packages_description" : " Hide native binary packages like {'@'}esbuild/linux-x64 from results" ,
141+ "enable_graph_pulse_loop" : " Enable looping of pulse effect on mini graph" ,
142+ "enable_graph_pulse_loop_description" : " Activate the reapeated animation of the pulse effect on the weekly download graph" ,
141143 "theme" : " Theme" ,
142144 "theme_light" : " Light" ,
143145 "theme_dark" : " Dark" ,
Original file line number Diff line number Diff line change 418418 "hide_platform_packages_description" : {
419419 "type" : " string"
420420 },
421+ "enable_graph_pulse_loop" : {
422+ "type" : " string"
423+ },
424+ "enable_graph_pulse_loop_description" : {
425+ "type" : " string"
426+ },
421427 "theme" : {
422428 "type" : " string"
423429 },
You can’t perform that action at this time.
0 commit comments