File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 </div >
3434 </div >
3535 <div class =" controls" >
36+ <vscode-dropdown
37+ v-if =" addon.installed && (addon.tags?.length ?? 0) > 0"
38+ @change =" versionChange"
39+ :disabled =" addon.processing"
40+ :value =" addon.version"
41+ >
42+ <vscode-option >Latest</vscode-option >
43+ <vscode-option v-for =" tag in addon.tags" :key =" tag" >{{
44+ tag
45+ }}</vscode-option >
46+ </vscode-dropdown >
3647 <vscode-button
3748 v-if =" addon.hasUpdate"
3849 @click =" update"
@@ -80,10 +91,16 @@ import { vscode } from "@/services/vscode.service";
8091import {
8192 vsCodeButton ,
8293 provideVSCodeDesignSystem ,
94+ vsCodeDropdown ,
95+ vsCodeOption ,
8396} from " @vscode/webview-ui-toolkit" ;
8497import { useAddonStore } from " @/stores/addonStore" ;
8598
86- provideVSCodeDesignSystem ().register (vsCodeButton ());
99+ provideVSCodeDesignSystem ().register (
100+ vsCodeButton (),
101+ vsCodeDropdown (),
102+ vsCodeOption ()
103+ );
87104
88105const addonStore = useAddonStore ();
89106
@@ -132,6 +149,11 @@ const uninstall = () => {
132149 lockAddon ();
133150 vscode .postMessage (" uninstall" , { name: props .addon .name });
134151};
152+ const versionChange = (e : Event ) => {
153+ e .stopPropagation ();
154+ const value = (e .target as HTMLInputElement ).value ;
155+ vscode .postMessage (" setVersion" , { name: props .addon .name , version: value });
156+ };
135157 </script >
136158
137159<style lang="scss">
@@ -145,6 +167,7 @@ const uninstall = () => {
145167 background-color : var (--panel-view-background );
146168 padding : 0.5em 0.4em ;
147169 border-radius : 0.2em ;
170+ --input-min-width : 10em ;
148171
149172 .top {
150173 display : flex ;
Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ export interface Addon {
1010 hasUpdate ?: boolean ;
1111 enabled ?: boolean [ ] ;
1212 installed ?: boolean ;
13+ tags ?: string [ ] ;
14+ version ?: string ;
1315}
Original file line number Diff line number Diff line change 3636 />
3737 </TransitionGroup >
3838 </div >
39- <vscode-progress-ring v-if =" addonStore.loading" />
40- <div id =" addon-list-count" >
41- {{ addons.length }} / {{ addonStore.addons.length }} /
42- {{ addonStore.total }}
43- </div >
39+ <vscode-progress-ring
40+ v-if ="
41+ addonStore.loading ||
42+ (addonStore.addons?.length ?? 0) < (addonStore.total ?? 0)
43+ "
44+ />
4445 </div >
4546</template >
4647
You can’t perform that action at this time.
0 commit comments