Skip to content

Commit

Permalink
Merge pull request #16 from Araxeus/fix-multiInput-main-label-showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus authored Mar 11, 2023
2 parents 45d588f + 5c36cda commit b3f5cbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ function electronPrompt(options, parentWindow) {
: DEFAULT_HEIGHT,
resizable: false,
title: 'Prompt',
label: 'Please input a value:',
label:
options?.type === 'multiInput'
? null
: 'Please input a value:',
buttonLabels: null,
alwaysOnTop: false,
value: null,
Expand Down
4 changes: 3 additions & 1 deletion lib/page/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ function promptRegister() {
}

//set label
if (promptOptions.useHtmlLabel) {
if (!promptOptions.label) {
$('#label').remove();
} else if (promptOptions.useHtmlLabel) {
$('#label').innerHTML = promptOptions.label;
} else {
$('#label').textContent = promptOptions.label;
Expand Down

0 comments on commit b3f5cbb

Please sign in to comment.