From c3ef4123830f7db8f4276e4fe90cc7df7bfbc220 Mon Sep 17 00:00:00 2001 From: Marty Alcala Date: Wed, 9 Nov 2016 12:34:38 -0500 Subject: [PATCH] prelim wallet details header collapse transition --- src/js/controllers/walletDetails.js | 18 +++++++++- src/sass/views/walletDetails.scss | 17 +++++++-- www/views/walletDetails.html | 56 ++++++++++++++++++++++++++--- 3 files changed, 83 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 5addca3b0..994f741a6 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicHistory) { +angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicHistory, $ionicScrollDelegate, $window) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -230,6 +230,22 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun //$state.transitionTo('tabs.preferences.backupWarning'); }; + $scope.amountHeight = '180px'; + + $scope.getScrollPosition = function(){ + console.log($ionicScrollDelegate.getScrollPosition().top); + var pos = $ionicScrollDelegate.getScrollPosition().top; + var amountHeight = 180 - pos; + if(amountHeight < 80) { + amountHeight = 80; + } + console.log('amountHeight', amountHeight); + $window.requestAnimationFrame(function() { + $scope.amountHeight = amountHeight + 'px'; + $scope.$evalAsync(angular.noop); + }); + }; + $scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.walletId = data.stateParams.walletId; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index a0ad9dd0e..02ebc4579 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -104,9 +104,16 @@ .nav-bar-block, .bar { background-color: inherit !important; } + ion-content { + margin-top: 180px; + padding-top: 0; + top: 0; + //top: 40px; + } .amount-wrapper { position: relative; overflow: visible; + //margin-top: 40px; .amount-bg { content: ''; @@ -120,10 +127,14 @@ .amount { width: 100%; text-align: center; - padding: 2rem 1rem 1.5rem 1rem; + //padding: 2rem 1rem 1.5rem 1rem; color: #fff; - height: 140px; + height: 180px; margin-bottom: 10px; + padding-top: 40px; + display: flex; + align-items: center; + justify-content: center; &-alternative { line-height: 36px; @@ -157,7 +168,7 @@ } .wallet-not-backed-up-warning { - margin-top: -15px; + //margin-top: -15px; margin-bottom: 1rem; background: #E15061; text-align: center; diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 8486249b7..b7d87870f 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -10,14 +10,62 @@ - + +
+
+
+
+ + + +
+ This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information. + Recreate +
+ +
+ Scan status finished with error +
Tap to retry +
+ + +
+ {{status.totalBalanceStr}} +
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
+
+
Available: {{status.totalBalanceStr}}
+
Confirming: {{status.pendingAmountStr}}
+
+
+ +
+ [Balance Hidden] +
+ Tap and hold to show +
+
+
+
+
+ ... +
+
+
+ +
+ +
+
+ -
+ +
- + --> Wallet not backed up