Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
}
}
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();
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')
}
(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 });
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;
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();
}
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();
}
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;