How to use the @ionic/core.alertController.create function in @ionic/core

To help you get started, we’ve selected a few @ionic/core 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 deckgo / deckdeckgo / remote / src / app / pages / app-remote / app-remote.tsx View on Github external
private async openDisconnectConfirm() {
        const alert: HTMLIonAlertElement = await alertController.create({
            header: 'Disconnect',
            message: 'The remote control must be disconnected from the presentation?',
            cssClass: 'custom-info',
            buttons: [
                {
                    text: 'No',
                    role: 'cancel',
                    handler: () => {
                        // Nothing
                    }
                }, {
                    text: 'Yes',
                    handler: async () => {
                        await this.disconnect();
                    }
                }
github jgw96 / web-whiteboard / src / components / app-controls / app-controls.tsx View on Github external
async exportToNote() {
    const alert = await alertCtrl.create({
      header: 'Confirm',
      subHeader: 'export to onenote',
      message: 'Export to OneNote?',
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel',
          cssClass: 'secondary',
          handler: () => {
            console.log('Confirm Cancel: blah');
          }
        }, {
          text: 'Yes',
          handler: () => {
            console.log('Confirm Okay');
            this.export.emit();
github jgw96 / web-whiteboard / src / components / app-canvas / app-canvas.tsx View on Github external
async exportToOneNote() {
    if (this.contextAnimation) {
      this.contextAnimation.reverse();
    }

    const alert = await alertCtrl.create({
      header: "Name",
      message: "Your board will be uploaded to OneDrive first, what would you like to name it?",
      inputs: [
        {
          placeholder: "My board",
          name: "name"
        }
      ],
      buttons: [
        {
          text: 'Cancel',
          role: 'cancel',
          cssClass: 'secondary',
          handler: () => {
            console.log('Confirm Cancel')
          }
github jgw96 / web-whiteboard / src / components / app-home / app-home.tsx View on Github external
(window as any).requestIdleCallback(async () => {
      if (this.name && this.username) {
        const alert = await alertCtrl.create({
          header: "Saved Image",
          subHeader: "Open a saved image?",
          buttons: [
            {
              text: 'Cancel',
              role: 'cancel',
              cssClass: 'secondary',
              handler: () => {
                console.log('Confirm Cancel: blah');
              }
            }, {
              text: 'Confirm',
              handler: async () => {
                const module = await import('../../services/api');

                const data = await module.getSavedImage(this.name, { username: this.username });
github deckgo / deckdeckgo / studio / src / app / modals / editor / app-custom-data / app-custom-data.tsx View on Github external
private async openCustomDataPublicInfo() {
        const alert: HTMLIonAlertElement = await alertController.create({
            header: 'About your data',
            message: 'Please note that currently, all the data you would upload, will be publicly visible on the internet.',
            cssClass: 'custom-info',
            buttons: [
                {
                    text: 'Cancel',
                    role: 'cancel',
                    handler: () => {
                        this.uploading = false;
                    }
                }, {
                    text: 'Ok',
                    handler: async () => {
                        await set('deckdeckgo_display_custom_data', true);

                        this.infoDisplayedOnce = true;
github deckgo / deckdeckgo / studio / src / app / popovers / editor / slide / app-edit-slide-qrcode / app-edit-slide-qrcode.tsx View on Github external
private async presentQRCodeInfo() {
        const alert: HTMLIonAlertElement = await alertController.create({
            message: 'The QR codes you add to your presentations are by default linked with the homepage.<br><br>As soon as you share them, their content will automatically be updated with their online urls.<br><br>Alternatively, you could also provide a custom url for their content.',
            buttons: ['Ok']
        });

        return await alert.present();
    }
github deckgo / deckdeckgo / studio / src / app / popovers / editor / app-image / app-image.tsx View on Github external
private async presentHistoryInfo() {
        const alert: HTMLIonAlertElement = await alertController.create({
            message: 'The editor keeps track of the last 10 images you would have use in any of your presentations.<br><br>Select one to add it again quickly.',
            buttons: ['Ok']
        });

        return await alert.present();
    }
github deckgo / deckdeckgo / studio / src / app / modals / editor / app-custom-images / app-custom-images.tsx View on Github external
private async openCustomImagesPublicInfo() {
        const alert: HTMLIonAlertElement = await alertController.create({
            header: 'About your images',
            message: 'Please note that currently, all the images you would upload, will be publicly visible on the internet.',
            cssClass: 'custom-info',
            buttons: [
                {
                    text: 'Cancel',
                    role: 'cancel',
                    handler: () => {
                        this.uploading = false;
                    }
                }, {
                    text: 'Ok',
                    handler: async () => {
                        await set('deckdeckgo_display_custom_images', true);

                        this.infoDisplayedOnce = true;