mirror of https://github.com/BTCPrivate/copay.git
Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/recieve_view_polish
This commit is contained in:
commit
6836139ead
|
@ -84,6 +84,9 @@ Session.vim
|
|||
.netrwhist
|
||||
*~
|
||||
|
||||
.tags
|
||||
.tags1
|
||||
|
||||
# SASS
|
||||
src/sass/*.css
|
||||
.sass-cache
|
||||
|
|
|
@ -16,18 +16,21 @@
|
|||
<preference name="iosPersistentFileLocation" value="Library" />
|
||||
<preference name="DisallowOverscroll" value="true"/>
|
||||
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
|
||||
<preference name="SplashScreen" value="copayscreen" />
|
||||
<preference name="ShowSplashScreenSpinner" value="false" />
|
||||
<preference name="AutoHideSplashScreen" value="false" />
|
||||
<preference name="FadeSplashScreen" value="true" />
|
||||
<preference name="FadeSplashScreenDuration" value="1" />
|
||||
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
<preference name="StatusBarBackgroundColor" value="#1e3186" />
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
<preference name="BackupWebStorage" value="none"/>
|
||||
<preference name="windows-target-version" value="8.1"/>
|
||||
<preference name="Orientation" value="default" />
|
||||
<preference name="cordova-custom-config-stoponerror" value="true" />
|
||||
|
||||
<preference name="StatusBarOverlaysWebView" value="true" />
|
||||
<preference name="StatusBarStyle" value="lightcontent" />
|
||||
|
||||
<preference name="ShowSplashScreenSpinner" value="false" />
|
||||
<preference name="AutoHideSplashScreen" value="false" />
|
||||
<preference name="FadeSplashScreen" value="true" />
|
||||
<preference name="FadeSplashScreenDuration" value="100" />
|
||||
<preference name="SplashMaintainAspectRatio" value="true" />
|
||||
|
||||
<!-- Plugins -->
|
||||
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
|
||||
|
@ -57,8 +60,9 @@
|
|||
<variable name="URL_SCHEME" value="UNUSED" />
|
||||
</plugin>
|
||||
<plugin name="phonegap-plugin-push" spec="~1.8.2">
|
||||
<variable name="SENDER_ID" value="*PUSHSENDERID*"/>
|
||||
</plugin>
|
||||
<variable name="SENDER_ID" value="*PUSHSENDERID*"/>
|
||||
</plugin>
|
||||
<plugin name="cordova-custom-config" spec="~3.0.5" />
|
||||
|
||||
<!-- Supported Platforms -->
|
||||
<engine name="ios" spec="~4.2.1" />
|
||||
|
@ -67,9 +71,8 @@
|
|||
|
||||
<!-- Platform Specific Settings -->
|
||||
<platform name="ios">
|
||||
<!-- <hook type="after_prepare" src="util/hooks/ios/add-custom-urls-to-plist.js" />
|
||||
<hook type="after_prepare" src="util/hooks/ios/add-uistatusbarhidden-to-plist.js" /> -->
|
||||
|
||||
<config-file platform="ios" target="*-Info.plist" parent="UIStatusBarHidden"><true/></config-file>
|
||||
<config-file platform="ios" target="*-Info.plist" parent="UIViewControllerBasedStatusBarAppearance"><false/></config-file>
|
||||
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60@3x.png" width="180" height="180" />
|
||||
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60.png" width="60" height="60" />
|
||||
<icon src="resources/*PACKAGENAME*/ios/icon/icon-60@2x.png" width="120" height="120" />
|
||||
|
@ -87,7 +90,6 @@
|
|||
<icon src="resources/*PACKAGENAME*/ios/icon/icon-50.png" width="50" height="50" />
|
||||
<icon src="resources/*PACKAGENAME*/ios/icon/icon-50@2x.png" width="100" height="100" />
|
||||
|
||||
|
||||
<splash src="resources/*PACKAGENAME*/ios/splash/Default~iphone.png" width="320" height="480"/>
|
||||
<splash src="resources/*PACKAGENAME*/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
|
||||
<splash src="resources/*PACKAGENAME*/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
|
||||
|
@ -101,8 +103,7 @@
|
|||
</platform>
|
||||
|
||||
<platform name="android">
|
||||
<hook type="after_prepare" src="util/hooks/android/add-custom-urls-to-android-manifest.js" />
|
||||
<hook type="after_prepare" src="util/hooks/android/prohibit-cloud-backups-in-android-manifest.js" />
|
||||
<preference name="android-manifest/application/@android:allowBackup" value="false" />
|
||||
|
||||
<icon src="resources/*PACKAGENAME*/android/icon/drawable-ldpi-icon.png" density="ldpi" />
|
||||
<icon src="resources/*PACKAGENAME*/android/icon/drawable-mdpi-icon.png" density="mdpi" />
|
||||
|
|
10
package.json
10
package.json
|
@ -27,8 +27,8 @@
|
|||
"bitcore-wallet-client": "4.3.1",
|
||||
"bower": "^1.7.9",
|
||||
"chai": "^3.5.0",
|
||||
"cordova": "5.4.1",
|
||||
"cordova-android": "5.1.1",
|
||||
"cordova-custom-config": "^3.0.5",
|
||||
"cordova-plugin-qrscanner": "^2.3.1",
|
||||
"coveralls": "^2.11.9",
|
||||
"express": "^4.11.2",
|
||||
|
@ -89,12 +89,10 @@
|
|||
"clean-all": "git clean -dfx && npm install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"androidmanifest": "^2.0.0",
|
||||
"cordova": "^5.4.1",
|
||||
"globby": "^6.0.0",
|
||||
"cordova": "^6.3.1",
|
||||
"grunt": "^1.0.1",
|
||||
"ionic": "^2.1.0",
|
||||
"plist": "^2.0.1",
|
||||
"trash-cli": "^1.4.0",
|
||||
"xcode": "^0.8.2"
|
||||
"lodash": "^4.3.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,15 +3,11 @@
|
|||
angular.module('copayApp.controllers').controller('copayersController',
|
||||
function($scope, $log, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) {
|
||||
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
init();
|
||||
});
|
||||
|
||||
var init = function() {
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = profileService.getWallet(data.stateParams.walletId);
|
||||
updateWallet();
|
||||
};
|
||||
});
|
||||
|
||||
$rootScope.$on('bwsEvent', function() {
|
||||
updateWallet();
|
||||
|
@ -40,7 +36,9 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
};
|
||||
|
||||
$scope.showDeletePopup = function() {
|
||||
popupService.showConfirm(gettextCatalog.getString('Confirm'), gettextCatalog.getString('Are you sure you want to delete this wallet?'), null, null, function(res) {
|
||||
var title = gettextCatalog.getString('Confirm');
|
||||
var msg = gettextCatalog.getString('Are you sure you want to cancel and delete this wallet?');
|
||||
popupService.showConfirm(title, msg, null, null, function(res) {
|
||||
if (res) deleteWallet();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService, storageService, $stateParams) {
|
||||
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService, storageService, $stateParams, startupService) {
|
||||
|
||||
$scope.$on("$ionicView.afterEnter", function() {
|
||||
startupService.ready();
|
||||
});
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.lang = uxLanguage.currentLanguage;
|
||||
$scope.terms = {};
|
||||
|
|
|
@ -34,6 +34,9 @@ angular.module('copayApp.controllers').controller('tourController',
|
|||
var rate = rateService.toFiat(btcAmount * 1e8, localCurrency);
|
||||
$scope.localCurrencySymbol = '$';
|
||||
$scope.localCurrencyPerBtc = $filter('formatFiatAmount')(parseFloat(rate.toFixed(2), 10));
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -50,7 +53,7 @@ angular.module('copayApp.controllers').controller('tourController',
|
|||
ongoingProcess.set('creatingWallet', false);
|
||||
popupService.showAlert(
|
||||
gettextCatalog.getString('Cannot Create Wallet'), err,
|
||||
function() {
|
||||
function() {
|
||||
retryCount = 0;
|
||||
return $scope.createDefaultWallet();
|
||||
}, gettextCatalog.getString('Retry'));
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService) {
|
||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
|
||||
$scope.$parent.$on("$ionicView.afterEnter", function() {
|
||||
startupService.ready();
|
||||
});
|
||||
|
||||
$scope.goImport = function(code) {
|
||||
$state.go('onboarding.import', {
|
||||
fromOnboarding: true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabHomeController',
|
||||
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService) {
|
||||
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService, startupService) {
|
||||
var wallet;
|
||||
var listeners = [];
|
||||
var notifications = [];
|
||||
|
@ -13,6 +13,10 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
$scope.homeTip = $stateParams.fromOnboarding;
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
|
||||
$scope.$on("$ionicView.afterEnter", function() {
|
||||
startupService.ready();
|
||||
});
|
||||
|
||||
if (!$scope.homeTip) {
|
||||
storageService.getHomeTipAccepted(function(error, value) {
|
||||
$scope.homeTip = (value == 'false') ? false : true;
|
||||
|
|
|
@ -114,6 +114,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
|
||||
if (!wallets || !wallets.length) {
|
||||
$scope.hasFunds = false;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
}
|
||||
|
||||
var index = 0;
|
||||
|
@ -130,6 +133,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
}
|
||||
if (index == wallets.length) {
|
||||
$scope.hasFunds = $scope.hasFunds || false;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -947,22 +947,21 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
});
|
||||
|
||||
$ionicPlatform.on('resume', function() {
|
||||
// Nothing tot do
|
||||
// Nothing to do
|
||||
});
|
||||
|
||||
$ionicPlatform.on('menubutton', function() {
|
||||
window.location = '#/preferences';
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
navigator.splashscreen.hide();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
|
||||
$log.info('Init profile...');
|
||||
// Try to open local profile
|
||||
profileService.loadAndBindProfile(function(err) {
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true
|
||||
});
|
||||
if (err) {
|
||||
if (err.message && err.message.match('NOPROFILE')) {
|
||||
$log.debug('No profile... redirecting');
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').service('startupService', function($log, $timeout) {
|
||||
|
||||
var splashscreenVisible = true;
|
||||
var statusBarVisible = false;
|
||||
|
||||
function _hideSplash(){
|
||||
if(typeof navigator.splashscreen !== "undefined" && splashscreenVisible){
|
||||
$log.debug('startupService is hiding the splashscreen...');
|
||||
$timeout(function(){
|
||||
navigator.splashscreen.hide();
|
||||
}, 20);
|
||||
splashscreenVisible = false;
|
||||
}
|
||||
}
|
||||
function _showStatusBar(){
|
||||
if(typeof StatusBar !== "undefined" && !statusBarVisible){
|
||||
$log.debug('startupService is showing the StatusBar...');
|
||||
StatusBar.show();
|
||||
statusBarVisible = true;
|
||||
}
|
||||
}
|
||||
this.ready = function() {
|
||||
_showStatusBar();
|
||||
_hideSplash();
|
||||
};
|
||||
});
|
|
@ -35,7 +35,8 @@ $button-secondary-active-border: transparent;
|
|||
@include button-outline($button-primary-bg);
|
||||
}
|
||||
&.button-primary,
|
||||
&.button-secondary {
|
||||
&.button-secondary,
|
||||
&.button-assertive {
|
||||
&.button-standard {
|
||||
@extend %button-standard;
|
||||
& + .button-standard {
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
.copayers-secret {
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
margin: 10px;
|
||||
white-space: -moz-pre-wrap !important;
|
||||
white-space: -pre-wrap;
|
||||
white-space: -o-pre-wrap;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
white-space: -webkit-pre-wrap;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var AndroidManifest = require('androidmanifest');
|
||||
|
||||
var FILEPATH = 'platforms/android/AndroidManifest.xml';
|
||||
var manifest = new AndroidManifest().readFile(FILEPATH);
|
||||
|
||||
var mainActivity = manifest.activity('MainActivity');
|
||||
|
||||
var customUrls = ['copay', 'bitcoin', 'bitauth'];
|
||||
|
||||
customUrls.forEach(function(url){
|
||||
var selector = 'intent-filter > data[android\\:scheme=' + url + ']';
|
||||
if(mainActivity.find(selector).length > 0){
|
||||
return;
|
||||
}
|
||||
|
||||
var intentFilter = manifest.$('<intent-filter>');
|
||||
intentFilter.append('<data android:scheme="' + url + '" />');
|
||||
intentFilter.append('<action android:name="android.intent.action.VIEW" />');
|
||||
intentFilter.append('<category android:name="android.intent.category.DEFAULT" />');
|
||||
intentFilter.append('<category android:name="android.intent.category.BROWSABLE" />');
|
||||
mainActivity.append(intentFilter);
|
||||
});
|
||||
|
||||
manifest.writeFile(FILEPATH);
|
||||
console.log('custome uri schemes written to AndroidManifest');
|
|
@ -1,18 +0,0 @@
|
|||
module.exports = function(ctx) {
|
||||
var fs = ctx.requireCordovaModule('fs'),
|
||||
path = ctx.requireCordovaModule('path'),
|
||||
xml = ctx.requireCordovaModule('cordova-common').xmlHelpers;
|
||||
|
||||
var manifestPath = path.join(ctx.opts.projectRoot, '/platforms/android/AndroidManifest.xml');
|
||||
var doc = xml.parseElementtreeSync(manifestPath);
|
||||
if (doc.getroot().tag !== 'manifest') {
|
||||
throw new Error(manifestPath + ' has incorrect root node name (expected "manifest")');
|
||||
}
|
||||
|
||||
doc.getroot().find('./application').attrib['android:allowBackup'] = "false";
|
||||
|
||||
//write the manifest file
|
||||
fs.writeFileSync(manifestPath, doc.write({
|
||||
indent: 4
|
||||
}), 'utf-8');
|
||||
};
|
|
@ -4,26 +4,29 @@
|
|||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
<ion-nav-title>{{wallet.name}}</ion-nav-title>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button button-clear" ng-click="showDeletePopup()">
|
||||
Cancel
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
|
||||
<ion-content>
|
||||
<div ng-show="!wallet.notAuthorized">
|
||||
<div class="list card text-center">
|
||||
<a class="item item-heading" ng-style="{'border-width': 0}" translate>
|
||||
<div class="item item-heading item-text-wrap" translate>
|
||||
Share this invitation with your copayers
|
||||
</a>
|
||||
<div ng-click="copySecret()" ng-class="{'enable_text_select': !isCordova}">
|
||||
<div class="text-center" copy-to-clipboard="secret">
|
||||
<qrcode size="220" error-correction-level="L" data="{{secret}}"></qrcode>
|
||||
<div ng-show="!secret" style="position:relative; top:-226px; height:0px">
|
||||
<div style="height:220px; width:220px; margin:auto; background: white">
|
||||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copayers-secret">
|
||||
{{secret || ('Loading...'|translate)}}
|
||||
</div>
|
||||
<div class="item text-center" copy-to-clipboard="secret" ng-click="copySecret()">
|
||||
<qrcode size="220" error-correction-level="L" data="{{secret}}"></qrcode>
|
||||
<div ng-show="!secret" style="position:relative; top:-226px; height:0px">
|
||||
<div style="height:220px; width:220px; margin:auto; background: white">
|
||||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copayers-secret">
|
||||
{{secret || ('Loading...'|translate)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -36,30 +39,24 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div class="m30v line-t">
|
||||
<h4 class="size-14 p10h m10t">
|
||||
<span translate>Waiting for copayers</span>
|
||||
<div class="list">
|
||||
<div class="item item-heading">
|
||||
<span class="text-gray right">
|
||||
[ <span translate>{{wallet.m}}-of-{{wallet.n}}</span> ]
|
||||
</span>
|
||||
</h4>
|
||||
<span translate>Waiting for copayers</span>
|
||||
</div>
|
||||
<div ng-include="'views/includes/copayers.html'"></div>
|
||||
<div ng-if="!wallet.isComplete()" class="line-b p10 white size-12">
|
||||
<div ng-if="!wallet.isComplete()" class="item item-icon-left">
|
||||
<i class="icon ion-loop"></i>
|
||||
<span translate>Waiting...</span>
|
||||
{{'Waiting...'|translate}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m20b text-center" ng-show="wallet.notAuthorized">
|
||||
<div class="m30v text-center" ng-show="wallet.notAuthorized">
|
||||
<h1 translate>Wallet incomplete and broken</h1>
|
||||
<h4 translate>Delete it and create a new one</h4>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<button class="button button-block button-assertive" ng-click="showDeletePopup()">
|
||||
<i class="fi-trash"></i> <span translate>Cancel and delete the wallet</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<div ng-repeat="copayer in copayers">
|
||||
<span class="item size-12" ng-show="copayer.id == wallet.copayerId">
|
||||
<i class="icon ion-checkmark"></i> {{'Me'|translate}}
|
||||
<div class="item item-icon-left" ng-repeat="copayer in copayers">
|
||||
<span ng-show="copayer.id == wallet.copayerId">
|
||||
<i class="icon ion-checkmark"></i>
|
||||
{{'Me'|translate}}
|
||||
</span>
|
||||
<span class="item size-12 text-gray" ng-show="copayer.id != wallet.copayerId">
|
||||
<i class="icon ion-checkmark"></i> {{copayer.name}}
|
||||
<span ng-show="copayer.id != wallet.copayerId">
|
||||
<i class="icon ion-checkmark"></i>
|
||||
{{copayer.name}}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<button class="button button-block button-assertive" ng-click="showDeletePopup()"translate>Delete <span ng-show="alias">{{alias}}</span>{{walletName}}</button>
|
||||
<div class="padding">
|
||||
<button class="button button-standard button-assertive" ng-click="showDeletePopup()">
|
||||
{{'Delete'|translate}} <span ng-show="alias">{{alias}}</span>{{walletName}}
|
||||
</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Send' | translate}}</ion-nav-title>
|
||||
</ion-nav-bar>
|
||||
<ion-content scroll="false">
|
||||
<div class="ng-hide zero-state" ng-show="!hasFunds">
|
||||
<ion-content scroll="false" class="ng-hide" ng-show="!hasFunds">
|
||||
<div class="zero-state">
|
||||
<i class="icon zero-state-icon">
|
||||
<img src="img/tab-icons/ico-send-selected.svg"/>
|
||||
</i>
|
||||
|
|
Loading…
Reference in New Issue