How to use the sweetalert2.close 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 gaplo917 / hkepc-ionic-reader / src / es6 / core / controller / ChatDetailController.js View on Github external
.safeApply(this.scope, ({ username, messages, actionUrl, hiddenFormInputs }) => {
        swal.close()

        // must exist in the list
        this.recipient = {
          id: this.recipientId,
          username: username
        }

        this.messages = messages

        // scroll to bottom
        this.ionicScrollDelegate.scrollBottom(false)

        this.actionUrl = actionUrl
        this.hiddenFormInputs = hiddenFormInputs
      }).subscribe()
  }
github gaplo917 / hkepc-ionic-reader / src / es6 / core / controller / WriteNewPostController.js View on Github external
.safeApply(this.scope, ({ responseText, result }) => {
          if (result) {
            swal.close()

            this.ngToast.success(`<i class="ion-ios-checkmark"> 成功發佈主題!</i>`)

            this.onBack()
          } else {
            swal({
              animation: false,
              title: '發佈失敗',
              text: `HKEPC 傳回:「${responseText}」`,
              type: 'error',
              confirmButtonText: '確定'
            })
          }
        }).subscribe(
          () =&gt; {},
github gaplo917 / hkepc-ionic-reader / src / es6 / core / controller / WriteReportController.js View on Github external
.safeApply(this.scope, ({ responseText, result }) =&gt; {
          if (result) {
            swal.close()

            this.ngToast.success(`<i class="ion-ios-checkmark"> 成功報告!</i>`)

            this.onBack()
          } else {
            swal({
              animation: false,
              title: '發佈失敗',
              text: `HKEPC 傳回:「${responseText}」`,
              type: 'error',
              confirmButtonText: '確定'
            })
          }
        }).subscribe(
          () =&gt; {},
github sweetalert2 / ngx-sweetalert2 / src / swal.component.ts View on Github external
public ngOnDestroy(): void {
        if (this.isCurrentlyShown) {
            Swal.close();
        }
    }
github ShashankaNataraj / Juggernaut / src / web / Actions.js View on Github external
.on('click', (evt) => {
						cfg.onSelectRoot(currentPath);
						Swal.close();
					})
			},
github dreamnettech / dreamtime / src / modules / nudify / nudify.js View on Github external
if (!startsWith(url, 'http://') && !startsWith(url, 'https://')) {
      throw new AppError('Please enter a valid web address.', { title: 'Upload failed.', level: 'warning' })
    }

    Swal.fire({
      title: 'Downloading...',
      text: 'One moment, please.',
      showConfirmButton: false,
      allowOutsideClick: false,
      allowEscapeKey: false,
    })

    try {
      const file = await File.fromUrl(url)

      Swal.close()

      this.add(file)
    } catch (error) {
      throw new AppError('There was a problem trying to download the file. Make sure you have an Internet connection.', { title: 'Upload failed.', level: 'warning', error })
    }
  }