How to use the sweetalert2.queue function in sweetalert2

To help you get started, we’ve selected a few sweetalert2 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 leftstick / angular-sweetalert / src / services / swal.js View on Github external
wrapper.queue = function(...args) {
        return wrapNativePromise($q, swal.queue(...args), '');
    };
github zachd / ethereum-identity-research / app / javascripts / app.js View on Github external
function showRecoveryPopup() {
  swal.queue([{
    title: 'Select an Account',
    input: 'text',
    html: '<div id="recovery-info"><p>To recover your account, scan your contact card from a friends device or enter your UUID manually.' +
    '</p><a class="ui button" id="recovery-scanner">Open Scanner</a>' +
    '<br><div class="ui horizontal divider">Or</div>' +
    '</div>',
    inputValidator: function(input) {
      return new Promise(function(resolve, reject) {
        if (input === "" || !ethUtils.isValidAddress(input))
          reject("Please enter a valid UUID.");
        if (window.localMediaStream)
          stopVideo();
        resolve();
      })
    },
    preConfirm: function (input) {
github ladjs / lad / template / assets / js / flash.js View on Github external
: `<ul class="m-a-0 text-left"><li>${messages.join('</li><li>')}</li></ul>`;
      _.each(messages, message =&gt; {
        if (type === 'custom' &amp;&amp; _.isObject(message)) steps.push(message);
        else
          steps.push({
            title:
              _.isObject(window._types) &amp;&amp; !s.isBlank(window._types[type])
                ? window._types[type]
                : type,
            html,
            type: _.isObject(window._types) &amp;&amp; !s.isBlank(window._types[type]) ? type : null
          });
      });
    });

    if (steps.length &gt; 0) swal.queue(steps);
  }
})();