Merge branch 'master' of https://github.com/bitpay/copay into bug/fix-parse-empty-bitpay-account-storage
This commit is contained in:
commit
288170fd33
46 changed files with 1049 additions and 351 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('completeController', function($scope, $stateParams, $timeout, $log, platformInfo, configService, storageService) {
|
||||
angular.module('copayApp.controllers').controller('completeController', function($scope, $stateParams, $timeout, $log, $ionicHistory, $state, platformInfo, configService, storageService, lodash) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
$scope.skipped = $stateParams.skipped == 'false' ? false : true;
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
|
|
@ -31,8 +31,13 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
if(window.StatusBar){
|
||||
$log.debug('Hiding status bar...');
|
||||
StatusBar.hide();
|
||||
}
|
||||
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = JSON.parse(info);
|
||||
var feedbackInfo = lodash.isString(info) ? JSON.parse(info) : null;
|
||||
feedbackInfo.sent = true;
|
||||
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {});
|
||||
});
|
||||
|
|
@ -78,4 +83,22 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.afterLeave", function() {
|
||||
if(window.StatusBar){
|
||||
$log.debug('Showing status bar...');
|
||||
StatusBar.show();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.close = function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true,
|
||||
historyRoot: true
|
||||
});
|
||||
$timeout(function() {
|
||||
$state.go('tabs.home');
|
||||
}, 100);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, lodash, externalLinkService, configService, gettextCatalog, platformInfo, feedbackService, ongoingProcess) {
|
||||
angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, lodash, externalLinkService, configService, gettextCatalog, platformInfo, feedbackService, ongoingProcess, popupService) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
var isAndroid = platformInfo.isAndroid;
|
||||
var isIOS = platformInfo.isIOS;
|
||||
|
|
@ -22,28 +22,39 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
|
|||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback'));
|
||||
return;
|
||||
}
|
||||
$state.go('feedback.complete', {
|
||||
$state.go('tabs.rate.complete', {
|
||||
score: $stateParams.score,
|
||||
skipped: true
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function() {
|
||||
if(window.StatusBar){
|
||||
$log.debug('Hiding status bar...');
|
||||
StatusBar.hide();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.afterLeave", function() {
|
||||
if(window.StatusBar){
|
||||
$log.debug('Showing status bar...');
|
||||
StatusBar.show();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.sendFeedback = function() {
|
||||
$state.go('feedback.send', {
|
||||
$state.go('tabs.rate.send', {
|
||||
score: $scope.score
|
||||
});
|
||||
};
|
||||
|
||||
$scope.goAppStore = function() {
|
||||
var defaults = configService.getDefaults();
|
||||
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);
|
||||
if (isAndroid) url = defaults.rateApp.android;
|
||||
if (isIOS) url = defaults.rateApp.ios;
|
||||
// if (isWP) url = defaults.rateApp.windows; // TODO
|
||||
externalLinkService.open(url);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,16 +6,12 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
|||
$scope.score = 0;
|
||||
|
||||
$scope.goFeedbackFlow = function() {
|
||||
if ($scope.isModal) {
|
||||
$scope.rateModal.hide();
|
||||
$scope.rateModal.remove();
|
||||
}
|
||||
if ($scope.isCordova && $scope.score == 5) {
|
||||
$state.go('feedback.rateApp', {
|
||||
$state.go('tabs.rate.rateApp', {
|
||||
score: $scope.score
|
||||
});
|
||||
} else {
|
||||
$state.go('feedback.send', {
|
||||
$state.go('tabs.rate.send', {
|
||||
score: $scope.score
|
||||
});
|
||||
}
|
||||
|
|
@ -25,7 +21,7 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
|||
$scope.score = score;
|
||||
switch ($scope.score) {
|
||||
case 1:
|
||||
$scope.button_title = gettextCatalog.getString("I think this app is terrible");
|
||||
$scope.button_title = gettextCatalog.getString("I think this app is terrible.");
|
||||
break;
|
||||
case 2:
|
||||
$scope.button_title = gettextCatalog.getString("I don't like it");
|
||||
|
|
@ -37,7 +33,7 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
|||
$scope.button_title = gettextCatalog.getString("I like the app");
|
||||
break;
|
||||
case 5:
|
||||
$scope.button_title = gettextCatalog.getString("This app is fantastic");
|
||||
$scope.button_title = gettextCatalog.getString("This app is fantastic!");
|
||||
break;
|
||||
}
|
||||
$timeout(function() {
|
||||
|
|
@ -46,21 +42,16 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
|||
};
|
||||
|
||||
$scope.hideCard = function() {
|
||||
if ($scope.isModal) {
|
||||
$scope.rateModal.hide();
|
||||
$scope.rateModal.remove();
|
||||
} else {
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = JSON.parse(info);
|
||||
feedbackInfo.sent = true;
|
||||
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
|
||||
$scope.showRateCard.value = false;
|
||||
});
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = JSON.parse(info);
|
||||
feedbackInfo.sent = true;
|
||||
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
|
||||
$scope.showRateCard.value = false;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,29 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $stateParams, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
switch ($scope.score) {
|
||||
case 1:
|
||||
$scope.reaction = gettextCatalog.getString("Ouch!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.");
|
||||
break;
|
||||
case 2:
|
||||
$scope.reaction = gettextCatalog.getString("Oh no!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.");
|
||||
break;
|
||||
case 3:
|
||||
$scope.reaction = gettextCatalog.getString("Thanks!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet.");
|
||||
break;
|
||||
case 4:
|
||||
$scope.reaction = gettextCatalog.getString("Thanks!");
|
||||
$scope.comment = gettextCatalog.getString("That's exciting to hear. We'd love to earn that fifth star from you.");
|
||||
break;
|
||||
case 5:
|
||||
$scope.reaction = gettextCatalog.getString("Feedback!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet.");
|
||||
break;
|
||||
}
|
||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||
|
||||
$scope.sendFeedback = function(feedback, skip) {
|
||||
|
||||
|
|
@ -32,7 +9,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
var dataSrc = {
|
||||
"Email": lodash.values(config.emailFor)[0] || ' ',
|
||||
"Feedback": skip ? ' ' : feedback,
|
||||
"Score": $stateParams.score
|
||||
"Score": $stateParams.score || ' '
|
||||
};
|
||||
|
||||
ongoingProcess.set('sendingFeedback', true);
|
||||
|
|
@ -42,11 +19,63 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback'));
|
||||
return;
|
||||
}
|
||||
$state.go('feedback.complete', {
|
||||
if (!$stateParams.score) {
|
||||
popupService.showAlert(gettextCatalog.getString('Thank you!'), gettextCatalog.getString('A member of the team will review your feedback as soon as possible.'), function() {
|
||||
$scope.feedback.value = '';
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true,
|
||||
historyRoot: true
|
||||
});
|
||||
$ionicHistory.clearHistory();
|
||||
$timeout(function() {
|
||||
$state.go('tabs.settings');
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
$state.go('tabs.rate.complete', {
|
||||
score: $stateParams.score,
|
||||
skipped: skip
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
|
||||
$scope.feedback = {};
|
||||
|
||||
if ($scope.score) {
|
||||
$ionicNavBarDelegate.showBackButton(false);
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
}
|
||||
else $ionicNavBarDelegate.showBackButton(true);
|
||||
|
||||
switch ($scope.score) {
|
||||
case 1:
|
||||
$scope.reaction = gettextCatalog.getString("Ouch!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 2:
|
||||
$scope.reaction = gettextCatalog.getString("Oh no!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 3:
|
||||
$scope.reaction = gettextCatalog.getString("Hmm...");
|
||||
$scope.comment = gettextCatalog.getString("We'd love to do better.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 4:
|
||||
$scope.reaction = gettextCatalog.getString("Thanks!");
|
||||
$scope.comment = gettextCatalog.getString("That's exciting to hear. We'd love to earn that fifth star from you – how could we improve your experience?");
|
||||
break;
|
||||
case 5:
|
||||
$scope.reaction = gettextCatalog.getString("Thank you!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay.") + ' ' + gettextCatalog.getString("Is there anything we could do better?");
|
||||
break;
|
||||
default:
|
||||
$scope.reaction = gettextCatalog.getString("Feedback!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay. How could we improve your experience?");
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService) {
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
|
|
|||
|
|
@ -32,15 +32,4 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
updateConfig();
|
||||
});
|
||||
|
||||
$scope.openRateModal = function() {
|
||||
$scope.isModal = true;
|
||||
$ionicModal.fromTemplateUrl('views/feedback/rateCard.html', {
|
||||
scope: $scope,
|
||||
backdropClickToClose: false,
|
||||
hardwareBackButtonClose: false
|
||||
}).then(function(modal) {
|
||||
$scope.rateModal = modal;
|
||||
$scope.rateModal.show();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txDetailsController', function($log, $ionicHistory, $scope, walletService, lodash, gettextCatalog, profileService, configService, externalLinkService, popupService, ongoingProcess) {
|
||||
angular.module('copayApp.controllers').controller('txDetailsController', function($log, $ionicHistory, $scope, $timeout, walletService, lodash, gettextCatalog, profileService, configService, externalLinkService, popupService, ongoingProcess) {
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.title = gettextCatalog.getString('Transaction');
|
||||
|
|
@ -29,6 +29,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
|
||||
updateMemo();
|
||||
initActionList();
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService) {
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
|
@ -10,6 +10,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.openTxpModal = txpModalService.open;
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.isAndroid = platformInfo.isAndroid;
|
||||
$scope.isIOS = platformInfo.isIOS;
|
||||
|
||||
$scope.amountIsCollapsible = !$scope.isAndroid;
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
externalLinkService.open(url, target);
|
||||
|
|
@ -158,6 +161,52 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
}
|
||||
};
|
||||
|
||||
$scope.getDate = function(txCreated) {
|
||||
var date = new Date(txCreated * 1000);
|
||||
return date;
|
||||
};
|
||||
|
||||
$scope.isFirstInGroup = function(index) {
|
||||
if (index === 0) {
|
||||
return true;
|
||||
}
|
||||
var curTx = $scope.txHistory[index];
|
||||
var prevTx = $scope.txHistory[index - 1];
|
||||
return !createdDuringSameMonth(curTx, prevTx);
|
||||
};
|
||||
|
||||
$scope.isLastInGroup = function(index) {
|
||||
if (index === $scope.txHistory.length - 1) {
|
||||
return true;
|
||||
}
|
||||
return $scope.isFirstInGroup(index + 1);
|
||||
};
|
||||
|
||||
function createdDuringSameMonth(tx1, tx2) {
|
||||
var date1 = new Date(tx1.time * 1000);
|
||||
var date2 = new Date(tx2.time * 1000);
|
||||
return getMonthYear(date1) === getMonthYear(date2);
|
||||
}
|
||||
|
||||
$scope.createdWithinPastDay = function(time) {
|
||||
var now = new Date();
|
||||
var date = new Date(time * 1000);
|
||||
return (now.getTime() - date.getTime()) < (1000 * 60 * 60 * 24);
|
||||
};
|
||||
|
||||
$scope.isDateInCurrentMonth = function(date) {
|
||||
var now = new Date();
|
||||
return getMonthYear(now) === getMonthYear(date);
|
||||
};
|
||||
|
||||
function getMonthYear(date) {
|
||||
return date.getMonth() + date.getFullYear();
|
||||
}
|
||||
|
||||
$scope.isUnconfirmed = function(tx) {
|
||||
return !tx.confirmations || tx.confirmations === 0;
|
||||
};
|
||||
|
||||
$scope.showMore = function() {
|
||||
$timeout(function() {
|
||||
currentTxHistoryPage++;
|
||||
|
|
@ -184,9 +233,72 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
var prevPos;
|
||||
var screenInactive = true;
|
||||
|
||||
$scope.wallet = profileService.getWallet(data.stateParams.walletId);
|
||||
function getScrollPosition() {
|
||||
var scrollPosition = $ionicScrollDelegate.getScrollPosition();
|
||||
if (!scrollPosition || screenInactive) {
|
||||
$window.requestAnimationFrame(function() {
|
||||
getScrollPosition();
|
||||
});
|
||||
return;
|
||||
}
|
||||
var pos = scrollPosition.top;
|
||||
if (pos === prevPos) {
|
||||
$window.requestAnimationFrame(function() {
|
||||
getScrollPosition();
|
||||
});
|
||||
return;
|
||||
}
|
||||
prevPos = pos;
|
||||
var amountHeight = 180 - pos;
|
||||
if (amountHeight < 80) {
|
||||
amountHeight = 80;
|
||||
}
|
||||
var contentMargin = amountHeight;
|
||||
if (contentMargin > 180) {
|
||||
contentMargin = 180;
|
||||
}
|
||||
|
||||
var amountScale = (amountHeight / 180);
|
||||
if (amountScale < 0.5) {
|
||||
amountScale = 0.5;
|
||||
}
|
||||
if (amountScale > 1.1) {
|
||||
amountScale = 1.1;
|
||||
}
|
||||
|
||||
var s = amountScale;
|
||||
|
||||
$scope.altAmountOpacity = (amountHeight - 100) / 80;
|
||||
$window.requestAnimationFrame(function() {
|
||||
$scope.amountHeight = amountHeight + 'px';
|
||||
$scope.contentMargin = contentMargin + 'px';
|
||||
$scope.amountScale = 'scale3d(' + s + ',' + s + ',' + s + ')';
|
||||
$scope.$digest();
|
||||
getScrollPosition();
|
||||
});
|
||||
}
|
||||
|
||||
var scrollWatcherInitialized;
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
$timeout(function() {
|
||||
screenInactive = false;
|
||||
}, 200);
|
||||
if (scrollWatcherInitialized || !$scope.amountIsCollapsible) {
|
||||
return;
|
||||
}
|
||||
scrollWatcherInitialized = true;
|
||||
$timeout(function() {
|
||||
getScrollPosition();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.walletId = data.stateParams.walletId;
|
||||
$scope.wallet = profileService.getWallet($scope.walletId);
|
||||
$scope.requiresMultipleSignatures = $scope.wallet.credentials.m > 1;
|
||||
|
||||
addressbookService.list(function(err, ab) {
|
||||
|
|
@ -209,6 +321,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
|
||||
$scope.$on("$ionicView.leave", function(event, data) {
|
||||
screenInactive = true;
|
||||
lodash.each(listeners, function(x) {
|
||||
x();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ angular.module('copayApp.directives')
|
|||
scope.emailHash = md5.createHash(scope.email.toLowerCase() || '');
|
||||
}
|
||||
},
|
||||
template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=mm">'
|
||||
}
|
||||
template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=identicon">'
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*/
|
||||
|
||||
.state('tabs.wallet', {
|
||||
url: '/wallet/{walletId}/{fromOnboarding}',
|
||||
url: '/wallet/:walletId/:fromOnboarding',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
controller: 'walletDetailsController',
|
||||
|
|
@ -186,6 +186,23 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.wallet.backupWarning', {
|
||||
url: '/backupWarning/:from/:walletId',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
templateUrl: 'views/backupWarning.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.wallet.backup', {
|
||||
url: '/backup/:walletId',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
templateUrl: 'views/backup.html',
|
||||
controller: 'backupController'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
@ -601,7 +618,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
|
||||
/*
|
||||
*
|
||||
* Back flow from receive
|
||||
* Init backup flow
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -726,43 +743,52 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*
|
||||
*/
|
||||
|
||||
.state('feedback', {
|
||||
.state('tabs.feedback', {
|
||||
url: '/feedback',
|
||||
abstract: true,
|
||||
template: '<ion-nav-view name="feedback"></ion-nav-view>'
|
||||
})
|
||||
.state('feedback.send', {
|
||||
url: '/send/:score',
|
||||
views: {
|
||||
'feedback': {
|
||||
controller: 'sendController',
|
||||
templateUrl: 'views/feedback/send.html'
|
||||
'tab-settings@tabs': {
|
||||
templateUrl: 'views/feedback/send.html',
|
||||
controller: 'sendController'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('feedback.complete', {
|
||||
.state('tabs.rate', {
|
||||
url: '/rate',
|
||||
abstract: true
|
||||
})
|
||||
.state('tabs.rate.send', {
|
||||
url: '/send/:score',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
templateUrl: 'views/feedback/send.html',
|
||||
controller: 'sendController'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.rate.complete', {
|
||||
url: '/complete/:score/:skipped',
|
||||
views: {
|
||||
'feedback': {
|
||||
'tab-home@tabs': {
|
||||
controller: 'completeController',
|
||||
templateUrl: 'views/feedback/complete.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('feedback.rateApp', {
|
||||
.state('tabs.rate.rateApp', {
|
||||
url: '/rateApp/:score',
|
||||
views: {
|
||||
'feedback': {
|
||||
'tab-home@tabs': {
|
||||
controller: 'rateAppController',
|
||||
templateUrl: 'views/feedback/rateApp.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
/*
|
||||
*
|
||||
* Buy or Sell Bitcoin
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Buy or Sell Bitcoin
|
||||
*
|
||||
*/
|
||||
|
||||
.state('tabs.buyandsell', {
|
||||
url: '/buyandsell',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
},
|
||||
|
||||
rateApp: {
|
||||
ios: 'https://itunes.apple.com/app/bitpay-secure-bitcoin-wallet/id1149581638',
|
||||
ios: 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1149581638&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8',
|
||||
android: 'https://play.google.com/store/apps/details?id=com.bitpay.wallet',
|
||||
wp: ''
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ angular.module('copayApp.services').factory('feeService', function($log, $stateP
|
|||
var feeLevelValue = lodash.find(levels, {
|
||||
level: feeLevel
|
||||
});
|
||||
if (!feeLevelValue || !feeLevelValue.feePerKB)
|
||||
if (!feeLevelValue || feeLevelValue.feePerKB == null)
|
||||
return cb({
|
||||
message: 'Could not get dynamic fee for level: ' + feeLevel
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,12 +51,12 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
|
|||
|
||||
var _cordovaConfirm = function(title, message, okText, cancelText, cb) {
|
||||
var onConfirm = function(buttonIndex) {
|
||||
if (buttonIndex == 1) return cb(true);
|
||||
if (buttonIndex == 2) return cb(true);
|
||||
else return cb(false);
|
||||
}
|
||||
okText = okText || gettextCatalog.getString('OK');
|
||||
cancelText = cancelText || gettextCatalog.getString('Cancel');
|
||||
navigator.notification.confirm(message, onConfirm, title, [okText, cancelText]);
|
||||
navigator.notification.confirm(message, onConfirm, title, [cancelText, okText]);
|
||||
};
|
||||
|
||||
var _cordovaPrompt = function(title, message, opts, cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue