File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 33
33
</div >
34
34
</div >
35
35
<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 >
36
47
<vscode-button
37
48
v-if =" addon.hasUpdate"
38
49
@click =" update"
@@ -80,10 +91,16 @@ import { vscode } from "@/services/vscode.service";
80
91
import {
81
92
vsCodeButton ,
82
93
provideVSCodeDesignSystem ,
94
+ vsCodeDropdown ,
95
+ vsCodeOption ,
83
96
} from " @vscode/webview-ui-toolkit" ;
84
97
import { useAddonStore } from " @/stores/addonStore" ;
85
98
86
- provideVSCodeDesignSystem ().register (vsCodeButton ());
99
+ provideVSCodeDesignSystem ().register (
100
+ vsCodeButton (),
101
+ vsCodeDropdown (),
102
+ vsCodeOption ()
103
+ );
87
104
88
105
const addonStore = useAddonStore ();
89
106
@@ -132,6 +149,11 @@ const uninstall = () => {
132
149
lockAddon ();
133
150
vscode .postMessage (" uninstall" , { name: props .addon .name });
134
151
};
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
+ };
135
157
</script >
136
158
137
159
<style lang="scss">
@@ -145,6 +167,7 @@ const uninstall = () => {
145
167
background-color : var (--panel-view-background );
146
168
padding : 0.5em 0.4em ;
147
169
border-radius : 0.2em ;
170
+ --input-min-width : 10em ;
148
171
149
172
.top {
150
173
display : flex ;
Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ export interface Addon {
10
10
hasUpdate ?: boolean ;
11
11
enabled ?: boolean [ ] ;
12
12
installed ?: boolean ;
13
+ tags ?: string [ ] ;
14
+ version ?: string ;
13
15
}
Original file line number Diff line number Diff line change 36
36
/>
37
37
</TransitionGroup >
38
38
</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
+ />
44
45
</div >
45
46
</template >
46
47
You can’t perform that action at this time.
0 commit comments