How to use electron-prompt - 4 common examples

To help you get started, we’ve selected a few electron-prompt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wonderunit / storyboarder / src / js / shot-generator-new / components / PosePresetsEditor / index.js View on Github external
const onCreatePosePreset = event => {
    event.preventDefault()

    // show a prompt to get the desired preset name
    let win = remote.getCurrentWindow()
    prompt({
      title: 'Preset Name',
      label: 'Select a Preset Name',
      value: `Pose ${shortId(THREE.Math.generateUUID())}`
    }, win).then(name => {
      if (name != null && name != '' && name != ' ') {
        withState((dispatch, state) => {
          // get the latest skeleton data
          let sceneObject = getSceneObjects(state)[id]
          let skeleton = sceneObject.skeleton
          let model = sceneObject.model

          // create a preset out of it
          let newPreset = {
            id: THREE.Math.generateUUID(),
            name,
            keywords: name, // TODO keyword editing
github sakazuki / node-red-desktop / src / main / main.ts View on Github external
private async onNodeAddRemote() {
    this.showShade();
    const res = await prompt({
      width: this.getBrowserWindow().getBounds().width * 0.5,
      height: 200,
      resizable: true,
      title: i18n.__("dialog.npmInstall"),
      label: i18n.__("dialog.npmInstallDesc"),
      value: "",
      inputAttrs: {
        type: "text",
        required: true
      },
      useHtmlLabel: true,
      minimizable: false,
      maximizable: false
    }, this.getBrowserWindow());
    if (res) {
      this.loadingShade();

electron-prompt

Electron helper to prompt for a value via input or select

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular electron-prompt functions