mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-07 01:13:08 +02:00
#747 - Add select options
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
- [#727](https://github.com/estruyf/vscode-front-matter/pull/727): Updated Japanese translations thanks to [mayumihara](https://github.com/mayumih387)
|
||||
- [#737](https://github.com/estruyf/vscode-front-matter/issues/737): Optimize the grid layout of the content and media dashboards
|
||||
- [#741](https://github.com/estruyf/vscode-front-matter/issues/741): Added message on the content dashboard when content is processed
|
||||
- [#747](https://github.com/estruyf/vscode-front-matter/issues/747): The `@frontmatter/extensibility` dependency now supports scripts for placeholders
|
||||
|
||||
### ⚡️ Optimizations
|
||||
|
||||
|
||||
@@ -397,12 +397,21 @@ export class CustomScript {
|
||||
|
||||
for (const question of data.questions) {
|
||||
if (question.name && question.message) {
|
||||
const answer = await window.showInputBox({
|
||||
prompt: question.message,
|
||||
value: question.default || '',
|
||||
ignoreFocusOut: true,
|
||||
title: question.message
|
||||
});
|
||||
let answer;
|
||||
if (question.options) {
|
||||
answer = await window.showQuickPick(question.options, {
|
||||
title: question.message,
|
||||
ignoreFocusOut: true,
|
||||
canPickMany: false
|
||||
});
|
||||
} else {
|
||||
answer = await window.showInputBox({
|
||||
prompt: question.message,
|
||||
value: question.default || '',
|
||||
ignoreFocusOut: true,
|
||||
title: question.message
|
||||
});
|
||||
}
|
||||
|
||||
if (answer) {
|
||||
answers.push(`${question.name}="${answer}"`);
|
||||
|
||||
Reference in New Issue
Block a user