From f8e91bc26e88ca8904373a266db237aa9ee809c4 Mon Sep 17 00:00:00 2001 From: Paito Anderson Date: Tue, 25 Jun 2019 15:09:55 -0400 Subject: [PATCH 1/2] Fix dialogs on mobile devices --- test-plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-plugin.js b/test-plugin.js index 10c9fd7..dbdb620 100644 --- a/test-plugin.js +++ b/test-plugin.js @@ -20,7 +20,7 @@ function reply() { } function alertDialog() { - Front.dialog('alert', { + Front.alert({ title: 'I\'m an alert dialog', message: 'You are now alerted', }, function () { @@ -29,7 +29,7 @@ function alertDialog() { } function confirmDialog() { - Front.dialog('confirm', { + Front.confirm({ title: 'I\'m a confirm dialog', message: 'Do you confirm', okTitle: 'OK Button', @@ -43,7 +43,7 @@ function confirmDialog() { } function promptDialog() { - Front.dialog('prompt', { + Front.prompt({ title: 'I\'m a prompt dialog', message: 'Please enter something' }, function (data) { From d9c91c0f38642baf5fc79204d6e9882ef1671e62 Mon Sep 17 00:00:00 2001 From: Paito Anderson Date: Tue, 25 Jun 2019 15:10:32 -0400 Subject: [PATCH 2/2] Add report and copy examples --- plugin.html | 2 ++ test-plugin.js | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/plugin.html b/plugin.html index 79f07c8..a831972 100644 --- a/plugin.html +++ b/plugin.html @@ -21,8 +21,10 @@ + + diff --git a/test-plugin.js b/test-plugin.js index dbdb620..ee2c3e3 100644 --- a/test-plugin.js +++ b/test-plugin.js @@ -28,6 +28,15 @@ function alertDialog() { }); } +function reportDialog() { + Front.report({ + title: 'I\'m a report dialog', + message: 'You have been reported' + }, function() { + console.log('Report closed'); + }); +} + function confirmDialog() { Front.confirm({ title: 'I\'m a confirm dialog', @@ -54,6 +63,10 @@ function promptDialog() { }); } +function copyText() { + Front.copyToClipboard('Front is awesome!'); +} + function fetchTeammates() { Front.fetchAllowedTeammates(function (teammates) { if (!teammates)