How to use the blessed.checkbox function in blessed

To help you get started, we’ve selected a few blessed 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 freeCodeCamp / freeCodeCamp / setup.js View on Github external
' If authentication provider is already removed, no action will be taken.',
  padding: 1,
  bg: 'magenta',
  fg: 'white'
});

var facebookCheckbox = blessed.checkbox({
  parent: authForm,
  top: 6,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Facebook'
});

var githubCheckbox = blessed.checkbox({
  parent: authForm,
  top: 7,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'GitHub'
});

var googleCheckbox = blessed.checkbox({
  parent: authForm,
  top: 8,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Google'
});
github freeCodeCamp / freeCodeCamp / setup.js View on Github external
mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Twitter'
});

var linkedinCheckbox = blessed.checkbox({
  parent: authForm,
  top: 10,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'LinkedIn'
});

var instagramCheckbox = blessed.checkbox({
  parent: authForm,
  top: 11,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Instagram'
});

var authSubmit = blessed.button({
  parent: authForm,
  top: 13,
  mouse: true,
  shrink: true,
  name: 'submit',
  content: ' SUBMIT ',
  style: {
github okonek / tidal-cli-client / app / UI / SigninScreen.js View on Github external
prepareInputs() {
        this.usernameInput = new Input({
            parent: this.signinForm,
            top: 2,
            name: "username"
        });

        this.passwordInput = new Input({
            parent: this.signinForm,
            top: 4,
            name: "password"
        });
        this.qualityCheckbox = new blessed.checkbox({
            parent: this.signinForm,
            mouse: true,
            keys: true,
            name: "quality",
            top: 6,
            text: "Lossless quality?"
        });
    }
github freeCodeCamp / freeCodeCamp / setup.js View on Github external
'from passportConfig.js, User.js, server.js, login.jade and profile.jade!'
  );
  success.focus();
  screen.render();
});

var authText = blessed.text({
  parent: authForm,
  content: 'Selecting a checkbox removes an authentication provider.' +
    ' If authentication provider is already removed, no action will be taken.',
  padding: 1,
  bg: 'magenta',
  fg: 'white'
});

var facebookCheckbox = blessed.checkbox({
  parent: authForm,
  top: 6,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Facebook'
});

var githubCheckbox = blessed.checkbox({
  parent: authForm,
  top: 7,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'GitHub'
});
github realm / my-first-realm-app / node / QueryBasedSync / index.js View on Github external
keys: true,
    height: 1,
    width: 20,
    left: 1,
    top: 3,
    name: 'body',
    style: {
        bg: 'blue',
    }
});

textfield.on('focus', () => {
    textfield.readInput();
});

var isDone = blessed.checkbox({
    parent: form,
    top: 7,
    left: 1,
    mouse: true,
    keys: true,
    shrink: true,
    style: {
      bg: 'blue'
    },
    height: 1,
    name: 'done',
    content: 'done'
  });

var submit = blessed.button({
    parent: form,
github freeCodeCamp / freeCodeCamp / setup.js View on Github external
mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'GitHub'
});

var googleCheckbox = blessed.checkbox({
  parent: authForm,
  top: 8,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Google'
});

var twitterCheckbox = blessed.checkbox({
  parent: authForm,
  top: 9,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'Twitter'
});

var linkedinCheckbox = blessed.checkbox({
  parent: authForm,
  top: 10,
  mouse: true,
  fg: 'white',
  bg: 'blue',
  content: 'LinkedIn'
});
github heapwolf / lev / lib / ui / query.js View on Github external
var textEnd = blessed.textbox({
    parent: query,
    mouse: true,
    keys: true,
    bg: 243,
    fg: 'white',
    hoverBg: 'black',
    height: 1,
    right: 2,
    left: 17,
    top: 4,
    name: 'text'
  })

  var checkReverse = blessed.checkbox({
    parent: query,
    mouse: true,
    keys: true,
    shrink: true,
    style: {
      bg: 'white',
      fg: 'black'
    },
    height: 1,
    left: 17,
    top: 6,
    name: 'check',
    content: 'Reverse results'
  })

  var textLimit = blessed.textbox({
github ik9999 / searx-term / src / View / MainContent / Preferences / SingleCheckbox.js View on Github external
export default (form, offsetTop, offsetLeft) => {
  return blessed.checkbox({
    checked: true,
    height: 2,
    inputOnFocus: true,
    keys: true,
    mouse: true,
    parent: form,
    right: 0,
    style: {
      focus: {
        fg: Colors.FOCUS
      }
    },
    top: offsetTop,
    width: '100%-' + offsetLeft
  });
};
github heapwolf / lev / lib / ui / connections.js View on Github external
})

  var textName = blessed.textbox({
    parent: form,
    mouse: true,
    keys: true,
    bg: 243,
    fg: 'white',
    hoverBg: 'black',
    height: 1,
    left: sidePanelWidth + labelWidth + 1,
    right: 1,
    top: 1
  })

  var checkType = blessed.checkbox({
    parent: form,
    mouse: true,
    keys: true,
    shrink: true,
    style: {
      bg: 'white',
      fg: 'black'
    },
    height: 1,
    left: sidePanelWidth + labelWidth + 1,
    top: 3,
    name: 'check',
    content: 'Local Database'
  })

  var textKeyEncoding = blessed.textbox({
github heapwolf / lev / lib / ui / connections.js View on Github external
var textCacheSize = blessed.textbox({
    parent: form,
    mouse: true,
    keys: true,
    bg: 243,
    fg: 'white',
    hoverBg: 'black',
    height: 1,
    left: sidePanelWidth + labelWidth + 1,
    width: 25,
    top: 11,
    hidden: true,
    value: '8388608'
  })

  var checkCompression = blessed.checkbox({
    parent: form,
    mouse: true,
    keys: true,
    shrink: true,
    style: {
      bg: 'white',
      fg: 'black'
    },
    height: 1,
    left: sidePanelWidth + labelWidth + 1,
    top: 13,
    checked: true,
    content: 'Use Snappy'
  })