Merge branch 'master' of github.com:bitpay/copay into statusBarRouting

This commit is contained in:
Marty Alcala 2016-11-16 12:44:23 -05:00
commit 1f91ba9e46
6 changed files with 40 additions and 18 deletions

View file

@ -65,6 +65,7 @@
<variable name="SENDER_ID" value="*PUSHSENDERID*"/> <variable name="SENDER_ID" value="*PUSHSENDERID*"/>
</plugin> </plugin>
<plugin name="cordova-custom-config" spec="~3.0.5" /> <plugin name="cordova-custom-config" spec="~3.0.5" />
<plugin name="cordova-plugin-queries-schemes" spec="~0.1.5" />
<!-- Supported Platforms --> <!-- Supported Platforms -->
<engine name="ios" spec="~4.2.1" /> <engine name="ios" spec="~4.2.1" />

View file

@ -7,7 +7,7 @@ angular.module('copayApp.controllers').controller('completeController', function
var config = configService.getSync(); var config = configService.getSync();
$scope.shareFacebook = function() { $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() { $scope.shareTwitter = function() {
@ -31,7 +31,7 @@ angular.module('copayApp.controllers').controller('completeController', function
}; };
$scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.$on("$ionicView.beforeEnter", function(event, data) {
if(window.StatusBar){ if (window.StatusBar) {
$log.debug('Hiding status bar...'); $log.debug('Hiding status bar...');
StatusBar.hide(); StatusBar.hide();
} }
@ -49,17 +49,28 @@ angular.module('copayApp.controllers').controller('completeController', function
$scope.socialsharing = isAvailable; $scope.socialsharing = isAvailable;
if (isAvailable) { if (isAvailable) {
window.plugins.socialsharing.canShareVia('com.apple.social.facebook', 'msg', null, null, null, function(e) { window.plugins.socialsharing.canShareVia('com.apple.social.facebook', 'msg', null, null, null, function(e) {
$scope.shareFacebookVia = 'com.apple.social.facebook';
$scope.facebook = true; $scope.facebook = true;
}, function(e) { }, function(e) {
$log.debug('facebook error: ' + e); window.plugins.socialsharing.canShareVia('com.facebook.katana', 'msg', null, null, null, function(e) {
$scope.facebook = false; $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) { window.plugins.socialsharing.canShareVia('com.apple.social.twitter', 'msg', null, null, null, function(e) {
$scope.shareTwitterVia = 'com.twitter.android'; $scope.shareTwitterVia = 'com.apple.social.twitter';
$scope.twitter = true; $scope.twitter = true;
}, function(e) { }, function(e) {
$log.debug('twitter error: ' + e); window.plugins.socialsharing.canShareVia('com.twitter.android', 'msg', null, null, null, function(e) {
$scope.twitter = false; $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) { window.plugins.socialsharing.canShareVia('com.google.android.apps.plus', 'msg', null, null, null, function(e) {
$scope.shareGooglePlusVia = 'com.google.android.apps.plus'; $scope.shareGooglePlusVia = 'com.google.android.apps.plus';
@ -85,7 +96,7 @@ angular.module('copayApp.controllers').controller('completeController', function
}); });
$scope.$on("$ionicView.afterLeave", function() { $scope.$on("$ionicView.afterLeave", function() {
if(window.StatusBar){ if (window.StatusBar) {
$log.debug('Showing status bar...'); $log.debug('Showing status bar...');
StatusBar.show(); StatusBar.show();
} }

View file

@ -1,6 +1,6 @@
'use strict'; '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) {
$scope.sendFeedback = function(feedback, skip) { $scope.sendFeedback = function(feedback, skip) {
@ -9,7 +9,10 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
var dataSrc = { var dataSrc = {
"Email": lodash.values(config.emailFor)[0] || ' ', "Email": lodash.values(config.emailFor)[0] || ' ',
"Feedback": skip ? ' ' : feedback, "Feedback": skip ? ' ' : feedback,
"Score": $stateParams.score || ' ' "Score": $stateParams.score || ' ',
"AppVersion": $window.version,
"Platform": ionic.Platform.platform(),
"DeviceVersion": ionic.Platform.version()
}; };
ongoingProcess.set('sendingFeedback', true); ongoingProcess.set('sendingFeedback', true);
@ -47,8 +50,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
if ($scope.score) { if ($scope.score) {
$ionicNavBarDelegate.showBackButton(false); $ionicNavBarDelegate.showBackButton(false);
$ionicConfig.views.swipeBackEnabled(false); $ionicConfig.views.swipeBackEnabled(false);
} } else $ionicNavBarDelegate.showBackButton(true);
else $ionicNavBarDelegate.showBackButton(true);
switch ($scope.score) { switch ($scope.score) {
case 1: case 1:
@ -78,4 +80,8 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
} }
}); });
$scope.$on("$ionicView.afterEnter", function() {
$scope.showForm = true;
});
}); });

View file

@ -28,7 +28,9 @@
} }
.user-feedback { .user-feedback {
border-top: 1px solid $subtle-gray; border-top: 1px solid $subtle-gray;
padding: 20px;
width: 100%; width: 100%;
margin-bottom: 20px;
} }
.send-feedback-star { .send-feedback-star {
height: 1rem; height: 1rem;

View file

@ -31,9 +31,11 @@
<div class="comment"> <div class="comment">
<span translate>{{comment}}</span> <span translate>{{comment}}</span>
</div> </div>
<textarea class="user-feedback" ng-model="feedback.value" rows="5" placeholder="Your ideas, feedback, or comments" autofocus></textarea> <div ng-if="showForm">
<button ng-disabled="!feedback.value" type="submit" class="button button-standard button-primary" ng-click="sendFeedback(feedback.value, false)" translate> <textarea class="user-feedback" ng-model="feedback.value" rows="5" placeholder="Your ideas, feedback, or comments" autofocus></textarea>
Send <button ng-disabled="!feedback.value" type="submit" class="button button-standard button-primary" ng-click="sendFeedback(feedback.value, false)" translate>
</button> Send
</button>
</div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -20,7 +20,7 @@
<span translate>Address Book</span> <span translate>Address Book</span>
<i class="icon bp-arrow-right"></i> <i class="icon bp-arrow-right"></i>
</a> </a>
<a class="item item-icon-left item-icon-right" ng-click="openExternalLink('https://help.bitpay.com', true, 'BitPay Help Center', 'Help and support information is available at the BitPay Help Center website. Would you like to go there now?', 'Open Help Center', 'Go Back')"> <a class="item item-icon-left item-icon-right" ng-click="openExternalLink('https://help.bitpay.com/bitpay-app', true, 'BitPay Help Center', 'Help and support information is available at the BitPay Help Center website. Would you like to go there now?', 'Open Help Center', 'Go Back')">
<i class="icon big-icon-svg"> <i class="icon big-icon-svg">
<img src="img/icon-help-support.svg" class="bg"/> <img src="img/icon-help-support.svg" class="bg"/>
</i> </i>