From 826d9fe0724328775b618f7f811f8871345e6c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 16 Nov 2016 12:58:55 -0300 Subject: [PATCH 1/5] fix share buttons --- app-template/config-template.xml | 1 + src/js/controllers/feedback/complete.js | 29 +++++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/app-template/config-template.xml b/app-template/config-template.xml index 9f54116f4..406dc1c34 100644 --- a/app-template/config-template.xml +++ b/app-template/config-template.xml @@ -65,6 +65,7 @@ + diff --git a/src/js/controllers/feedback/complete.js b/src/js/controllers/feedback/complete.js index 80018be79..2422a22ec 100644 --- a/src/js/controllers/feedback/complete.js +++ b/src/js/controllers/feedback/complete.js @@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('completeController', function var config = configService.getSync(); $scope.shareFacebook = function() { - window.plugins.socialsharing.shareViaFacebook(config.download.url, null, null, null); + window.plugins.socialsharing.shareVia($scope.shareFacebookVia, config.download.url, null, null, null, null, null); }; $scope.shareTwitter = function() { @@ -31,7 +31,7 @@ angular.module('copayApp.controllers').controller('completeController', function }; $scope.$on("$ionicView.beforeEnter", function(event, data) { - if(window.StatusBar){ + if (window.StatusBar) { $log.debug('Hiding status bar...'); StatusBar.hide(); } @@ -49,17 +49,28 @@ angular.module('copayApp.controllers').controller('completeController', function $scope.socialsharing = isAvailable; if (isAvailable) { window.plugins.socialsharing.canShareVia('com.apple.social.facebook', 'msg', null, null, null, function(e) { + $scope.shareFacebookVia = 'com.apple.social.facebook'; $scope.facebook = true; }, function(e) { - $log.debug('facebook error: ' + e); - $scope.facebook = false; + window.plugins.socialsharing.canShareVia('com.facebook.katana', 'msg', null, null, null, function(e) { + $scope.shareFacebookVia = 'com.facebook.katana'; + $scope.facebook = true; + }, function(e) { + $log.debug('facebook error: ' + e); + $scope.facebook = false; + }); }); - window.plugins.socialsharing.canShareVia('com.twitter.android', 'msg', null, null, null, function(e) { - $scope.shareTwitterVia = 'com.twitter.android'; + window.plugins.socialsharing.canShareVia('com.apple.social.twitter', 'msg', null, null, null, function(e) { + $scope.shareTwitterVia = 'com.apple.social.twitter'; $scope.twitter = true; }, function(e) { - $log.debug('twitter error: ' + e); - $scope.twitter = false; + window.plugins.socialsharing.canShareVia('com.twitter.android', 'msg', null, null, null, function(e) { + $scope.shareTwitterVia = 'com.twitter.android'; + $scope.twitter = true; + }, function(e) { + $log.debug('twitter error: ' + e); + $scope.twitter = false; + }); }); window.plugins.socialsharing.canShareVia('com.google.android.apps.plus', 'msg', null, null, null, function(e) { $scope.shareGooglePlusVia = 'com.google.android.apps.plus'; @@ -85,7 +96,7 @@ angular.module('copayApp.controllers').controller('completeController', function }); $scope.$on("$ionicView.afterLeave", function() { - if(window.StatusBar){ + if (window.StatusBar) { $log.debug('Showing status bar...'); StatusBar.show(); } From 094296ebd0e402b27e488cf9418763f50635ab51 Mon Sep 17 00:00:00 2001 From: James Walpole Date: Wed, 16 Nov 2016 11:28:45 -0500 Subject: [PATCH 2/5] Update Help Center Link --- www/views/tab-settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/tab-settings.html b/www/views/tab-settings.html index 6d460df2b..c452c03ac 100644 --- a/www/views/tab-settings.html +++ b/www/views/tab-settings.html @@ -20,7 +20,7 @@ Address Book - + From 13274527be38c8d3333636c9f5fc6815ddc8471e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 16 Nov 2016 14:11:18 -0300 Subject: [PATCH 3/5] adding app version, device version and platform to spreadsheet post --- src/js/controllers/feedback/send.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/feedback/send.js b/src/js/controllers/feedback/send.js index e65e7cd17..fbd504292 100644 --- a/src/js/controllers/feedback/send.js +++ b/src/js/controllers/feedback/send.js @@ -1,15 +1,21 @@ 'use strict'; -angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) { +angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) { $scope.sendFeedback = function(feedback, skip) { var config = configService.getSync(); + var isWP = platformInfo.isWP; + var isIOS = platformInfo.isIOS; + var isAndroid = platformInfo.isAndroid; var dataSrc = { "Email": lodash.values(config.emailFor)[0] || ' ', "Feedback": skip ? ' ' : feedback, - "Score": $stateParams.score || ' ' + "Score": $stateParams.score || ' ', + "AppVersion": $window.version, + "Platform": ionic.Platform.platform(), + "DeviceVersion": ionic.Platform.version() }; ongoingProcess.set('sendingFeedback', true); @@ -47,8 +53,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc if ($scope.score) { $ionicNavBarDelegate.showBackButton(false); $ionicConfig.views.swipeBackEnabled(false); - } - else $ionicNavBarDelegate.showBackButton(true); + } else $ionicNavBarDelegate.showBackButton(true); switch ($scope.score) { case 1: From 2e7f144972a47e8ca27de9970f5ef2c466324b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 16 Nov 2016 14:12:53 -0300 Subject: [PATCH 4/5] delete unused variables --- src/js/controllers/feedback/send.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/js/controllers/feedback/send.js b/src/js/controllers/feedback/send.js index fbd504292..498cd98b4 100644 --- a/src/js/controllers/feedback/send.js +++ b/src/js/controllers/feedback/send.js @@ -1,13 +1,10 @@ 'use strict'; -angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) { +angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) { $scope.sendFeedback = function(feedback, skip) { var config = configService.getSync(); - var isWP = platformInfo.isWP; - var isIOS = platformInfo.isIOS; - var isAndroid = platformInfo.isAndroid; var dataSrc = { "Email": lodash.values(config.emailFor)[0] || ' ', From 2b6d60f96f25088a8418da962ead5524d511cc7a Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 16 Nov 2016 14:40:56 -0300 Subject: [PATCH 5/5] Fix shaking when transition to feedback --- src/js/controllers/feedback/send.js | 4 ++++ src/sass/views/feedback/send.scss | 2 ++ www/views/feedback/send.html | 10 ++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/feedback/send.js b/src/js/controllers/feedback/send.js index e65e7cd17..13f81896e 100644 --- a/src/js/controllers/feedback/send.js +++ b/src/js/controllers/feedback/send.js @@ -78,4 +78,8 @@ angular.module('copayApp.controllers').controller('sendController', function($sc } }); + $scope.$on("$ionicView.afterEnter", function() { + $scope.showForm = true; + }); + }); diff --git a/src/sass/views/feedback/send.scss b/src/sass/views/feedback/send.scss index b4c383587..2277729f1 100644 --- a/src/sass/views/feedback/send.scss +++ b/src/sass/views/feedback/send.scss @@ -28,7 +28,9 @@ } .user-feedback { border-top: 1px solid $subtle-gray; + padding: 20px; width: 100%; + margin-bottom: 20px; } .send-feedback-star { height: 1rem; diff --git a/www/views/feedback/send.html b/www/views/feedback/send.html index dcb96534b..bb5dc977e 100644 --- a/www/views/feedback/send.html +++ b/www/views/feedback/send.html @@ -31,9 +31,11 @@
{{comment}}
- - +
+ + +