mirror of https://github.com/BTCPrivate/copay.git
rate the app
This commit is contained in:
parent
a2e20ee75d
commit
9e3f627c58
|
@ -1,7 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('rateAppStoreController', function($scope, $state, $stateParams) {
|
angular.module('copayApp.controllers').controller('rateAppStoreController', function($scope, $state, $stateParams, externalLinkService, configService, gettextCatalog, platformInfo) {
|
||||||
$scope.score = parseInt($stateParams.score);
|
$scope.score = parseInt($stateParams.score);
|
||||||
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
|
var isAndroid = platformInfo.isAndroid;
|
||||||
|
var isIOS = platformInfo.isIOS;
|
||||||
|
var isWP = platformInfo.isWP;
|
||||||
|
var config = configService.getSync();
|
||||||
|
|
||||||
$scope.skip = function() {
|
$scope.skip = function() {
|
||||||
$state.go('feedback.thanks', {
|
$state.go('feedback.thanks', {
|
||||||
|
@ -17,6 +22,14 @@ angular.module('copayApp.controllers').controller('rateAppStoreController', func
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.goAppStore = function() {
|
$scope.goAppStore = function() {
|
||||||
|
var url;
|
||||||
|
if (isAndroid) url = config.rateApp.android;
|
||||||
|
if (isIOS) url = config.rateApp.ios;
|
||||||
|
// if (isWP) url = config.rateApp.ios; TODO
|
||||||
|
var title = gettextCatalog.getString('Rate the app');
|
||||||
|
var message = gettextCatalog.getString('You must go to the official website of the app to rate it');
|
||||||
|
var okText = gettextCatalog.getString('Go');
|
||||||
|
var cancelText = gettextCatalog.getString('Cancel');
|
||||||
|
externalLinkService.open(url, true, title, message, okText, cancelText);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('thanksController', function($scope, $state, $stateParams, platformInfo) {
|
angular.module('copayApp.controllers').controller('thanksController', function($scope, $state, $stateParams, platformInfo, configService) {
|
||||||
$scope.score = parseInt($stateParams.score);
|
$scope.score = parseInt($stateParams.score);
|
||||||
$scope.skip = $stateParams.skip && $scope.score == 5;
|
$scope.skip = $stateParams.skip && $scope.score == 5;
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
if (platformInfo.isCordova) {
|
if (platformInfo.isCordova) {
|
||||||
window.plugins.socialsharing.share('https://bitpay.com/wallet', null, null, null);
|
var config = configService.getSync();
|
||||||
|
window.plugins.socialsharing.share(config.download.url, null, null, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1029,7 +1029,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
profileService.storeProfileIfDirty();
|
profileService.storeProfileIfDirty();
|
||||||
$log.debug('Profile loaded ... Starting UX.');
|
$log.debug('Profile loaded ... Starting UX.');
|
||||||
scannerService.gentleInitialize();
|
scannerService.gentleInitialize();
|
||||||
// $state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
}
|
}
|
||||||
|
|
||||||
// After everything have been loaded, initialize handler URL
|
// After everything have been loaded, initialize handler URL
|
||||||
|
|
|
@ -15,6 +15,16 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
||||||
url: 'https://bws.bitpay.com/bws/api',
|
url: 'https://bws.bitpay.com/bws/api',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
download: {
|
||||||
|
url: 'https://bitpay.com/wallet',
|
||||||
|
},
|
||||||
|
|
||||||
|
rateApp: {
|
||||||
|
ios: 'https://itunes.apple.com/app/bitpay-secure-bitcoin-wallet/id1149581638',
|
||||||
|
android: 'https://play.google.com/store/apps/details?id=com.bitpay.wallet',
|
||||||
|
wp: ''
|
||||||
|
},
|
||||||
|
|
||||||
// wallet default config
|
// wallet default config
|
||||||
wallet: {
|
wallet: {
|
||||||
requiredCopayers: 2,
|
requiredCopayers: 2,
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
<span translate>Would you be willing to rate BitPay Wallet in the app store?</span>
|
<span translate>Would you be willing to rate BitPay Wallet in the app store?</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="button button-standard button-primary" ng-click="goAppStore()">
|
<button type="submit" class="button button-standard button-primary" ng-click="goAppStore()" ng-if="isCordova">
|
||||||
<span translate>Rate on the app store</span>
|
<span translate>Rate on the app store</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" class="button button-standard button-primary" ng-click="sendFeedback()">
|
<button type="submit" class="button button-standard button-primary" ng-click="sendFeedback()">
|
||||||
<span translate>Send us feedback instead</span>
|
<span translate>Send us feedback</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
Loading…
Reference in New Issue