Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing example prompt: label and input field not displayed, cancel and ok buttons unstyled #79

Closed
stepheneb opened this issue Oct 26, 2021 · 2 comments

Comments

@stepheneb
Copy link

Using electron-prompt 1..7.0

Also:

node --version: 
v14.18.1
electron --version: 
v13.2.3
electron-forge: 
...
└─┬ @electron-forge/plugin-webpack@6.0.0-beta.61
  └── webpack@5.52.1 

Am calling prompt() in response to a menu action:

'''
{
label: "CfA Key",
enabled: true,
click() {
cfa.prompt();
}
}
'''

Which calls this function in the main process:

let cfa_prompt = () => {
  prompt({
      title: 'Prompt example',
      label: 'URL:',
      value: 'http://example.org',
      inputAttrs: {
        type: 'url'
      },
      type: 'input'
    })
    .then((r) => {
      if (r === null) {
        console.log('user cancelled');
      } else {
        console.log('result', r);
      }
    })
    .catch(console.error);
};

Which displays:

image

Seems related to #55 -- which is closed ... but I I didn't see a resolution in the comments for that issue???

@lucasreppewelander
Copy link

i have the same, with webpack the prompt.html gets placed inside the .webpack/main/native_modueles but only the html file, not the css nor js file, thats the main issue.

@p-sam
Copy link
Owner

p-sam commented Dec 17, 2021

Yup, as it was in #55 if you end up treating electron-prompt like a frontend dependancy, it won't work, you gotta explicitely use the node require. Since this seems like a duplicate of a non-issue, there's not much point in leaving this open further

@p-sam p-sam closed this as completed Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants