File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export function useCommandPalettePackageCommands(
1515) {
1616 const { t } = useI18n ( )
1717 const route = useRoute ( )
18+ const { announce, close } = useCommandPalette ( )
1819
1920 function isCurrentPackageCompare ( packageName : string ) {
2021 const packages = route . query . packages
@@ -118,13 +119,19 @@ export function useCommandPalettePackageCommands(
118119 t ( 'package.download.tarball' ) ,
119120 ] ,
120121 iconClass : 'i-lucide:download' ,
121- action : ( ) => {
122- void downloadPackageTarball ( resolvedContext . packageName , {
122+ action : async ( ) => {
123+ await downloadPackageTarball ( resolvedContext . packageName , {
123124 version : resolvedContext . resolvedVersion ! ,
124125 dist : {
125126 tarball : resolvedContext . tarballUrl ! ,
126127 } ,
127128 } )
129+ close ( )
130+ announce (
131+ t ( 'command_palette.announcements.download_started' , {
132+ package : resolvedContext . packageName ,
133+ } ) ,
134+ )
128135 } ,
129136 } )
130137 }
Original file line number Diff line number Diff line change 175175 "relative_dates_off" : " Relative dates off." ,
176176 "theme_changed" : " Theme set to {theme}." ,
177177 "accent_color_changed" : " Accent color set to {color}." ,
178- "background_theme_changed" : " Background shade set to {theme}."
178+ "background_theme_changed" : " Background shade set to {theme}." ,
179+ "download_started" : " Downloading {package} tarball."
179180 }
180181 },
181182 "nav" : {
Original file line number Diff line number Diff line change 531531 },
532532 "background_theme_changed" : {
533533 "type" : " string"
534+ },
535+ "download_started" : {
536+ "type" : " string"
534537 }
535538 },
536539 "additionalProperties" : false
You can’t perform that action at this time.
0 commit comments