Merge pull request #133 from cmgustavo/ref/design-36

Ref/design 36
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-19 09:30:24 -03:00 committed by GitHub
commit 041052d440
18 changed files with 177 additions and 173 deletions

View file

@ -1,31 +1,29 @@
<ion-view id="view-add">
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Add wallet' | translate}}</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button back-button" ui-sref="tabs.home">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<ion-list>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create-personal">
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.add.create-personal">
<h2 translate>New Personal Wallet</h2>
<i class="icon nav-item-arrow-right"></i>
</a>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create-shared">
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.add.create-shared">
<h2 translate>Create Shared Wallet</h2>
<i class="icon nav-item-arrow-right"></i>
</a>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.join">
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.add.join">
<h2 translate>Join shared wallet</h2>
<i class="icon nav-item-arrow-right"></i>
</a>
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.import">
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.add.import">
<h2 translate>Import wallet</h2>
<i class="icon nav-item-arrow-right"></i>
</a>

View file

@ -1,10 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button button-clear" ui-sref="tabs.addressbook">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
<ion-nav-title>
<span translate>Add entry</span>
</ion-nav-title>

View file

@ -1,15 +1,13 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button button-clear" ui-sref="tabs.settings">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
<ion-nav-title>
<span translate>Addressbook</span>
</ion-nav-title>
<ion-nav-buttons side="secondary">
<button class="button button-clear" ui-sref="tabs.addressbook.add">
<button class="button button-back button-clear" ui-sref="tabs.addressbook.add">
<i class="icon ion-ios-plus-empty"></i>
</button>
</ion-nav-buttons>

View file

@ -1,10 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button button-clear" ui-sref="tabs.addressbook">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
<ion-nav-title>
<span translate>Addressbook</span>
</ion-nav-title>

View file

@ -1,10 +1,8 @@
<ion-view id="view-amount">
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button back-button" ng-click="$ionicGoBack()">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content scroll="false" class="amount" ng-controller="amountController" ng-init="init()">

View file

@ -7,7 +7,7 @@
<ion-content scroll="false" ng-controller="confirmController" ng-init="init()">
<div class="card">
<div class="list card">
<div class="item item-text-wrap">
<i class="icon ion-arrow-up-c"></i> <span class="text-bold size-16">Sending</span>
<div class="text-bold size-28 m15t">{{amountStr}} </div>
@ -24,7 +24,7 @@
<div class="item item-icon-left">
<gravatar class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
<label translate>To</label> {{toAddress}}
<span translate>To</span>: {{toAddress}}
<p ng-show="toName">{{toName}}</p>
<div ng-show="_paypro" ng-click="openPPModal(_paypro)">
@ -33,23 +33,24 @@
{{_paypro.domain}}
</div>
</div>
</div>
<div class="item">
<label translate>From</label>
<span class="badge badge-assertive" ng-show="notAvailable" translate>No wallet with enough funds</span>
</div>
<div class="text-center" ng-show="notAvailable">
<span class="badge badge-assertive" translate>No wallet with enough funds</span>
</div>
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
<div class="list card">
<div class="item item-icon-left item-icon-right" ng-click="showDescriptionPopup()">
<span ng-show="!description" translate>Add Description</span>
<span ng-show="description">{{description}}</span>
<i class="icon ion-ios-chatbubble-outline size-21"></i>
<i class="icon ion-ios-plus-empty size-21"></i>
<span ng-show="!description" translate>Add description</span>
<span ng-show="description">{{description}}</span>
<i ng-show="!description" class="icon ion-ios-plus-empty size-21"></i>
</div>
</div>
<button class="item button button-block button-balanced" ng-click="approve()">
<button class="item button button-block button-positive" ng-click="approve()">
<span translate>Send</span>
</button>
</ion-content>

View file

@ -1,10 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button back-button" ui-sref="tabs.add">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
<ion-nav-title>{{'Join shared wallet' | translate}}</ion-nav-title>
</ion-nav-bar>
@ -15,37 +13,33 @@
<div class="card list">
<div class="row">
<div class="col">
<label class="item item-input item-stacked-label no-border">
<span class="input-label" translate>Your nickname</span>
<input type="text"
placeholder="{{'John'|translate}}"
name="myName"
ng-model="myName"
ng-required="true">
</label>
</div>
</div>
<label class="item item-input item-stacked-label no-border">
<span class="input-label" translate>Your nickname</span>
<input type="text"
placeholder="{{'John'|translate}}"
name="myName"
ng-model="myName"
ng-required="true">
</label>
<div class="row">
<div class="col col-90">
<label class="item item-input item-stacked-label no-border">
<span class="input-label" translate>Wallet Invitation</span>
<i class="icon ion-checkmark-circled balanced" ng-show="joinForm.secret.$valid && !joinForm.secret.$pristine && secret"></i>
<i class="icon ion-close-circled assertive" ng-show="joinForm.secret.$invalid && !joinForm.secret.$pristine && secret"></i>
<input id="secret"
type="text"
placeholder="{{'Paste invitation here'|translate}}"
name="secret"
ng-model="secret"
wallet-secret required>
</label>
<label class="item item-input item-stacked-label no-border">
<span class="input-label" translate>Wallet Invitation</span>
<div class="input-notification">
<i class="icon ion-checkmark-circled balanced"
ng-show="!joinForm.secret.$invalid"></i>
<i class="icon ion-close-circled assertive"
ng-show="joinForm.secret.$invalid && secret"></i>
</div>
<div class="col text-center">
<div class="qr-scan-icon">
<qr-scanner class="qr-icon size-24" on-scan="join.onQrCodeScanned(data)"></qr-scanner>
<input id="secret"
type="text"
placeholder="{{'Paste invitation here'|translate}}"
name="secret"
ng-model="secret"
wallet-secret required>
</div>
</div>
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<span translate ng-show="!showAdv">Show advanced options</span>

View file

@ -1,6 +1,6 @@
<ion-modal-view ng-controller="scannerController" ng-init="init()">
<ion-header-bar align-title="center" class="bar-royal">
<button ng-click="cancel()" class="button button-clear button-positive" translate>
<button ng-click="cancel()" class="button button-back button-clear" translate>
Close
</button>
<h1 class="title ellipsis" translate>QR-Scanner</h1>

View file

@ -1,10 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-buttons side="primary">
<button class="button back-button" ui-sref="tabs.settings">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-back-button>
<i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAbout">
<div class="list">
@ -27,17 +25,17 @@
</div>
<div class="item item-divider">
</div>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.termsOfUse">
<a class="item item-icon-left item-icon-right" ui-sref="tabs.about.termsOfUse">
<i class="icon ion-ios-list-outline"></i>
<span translate>Terms of Use</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.translators">
<a class="item item-icon-left item-icon-right" ui-sref="tabs.about.translators">
<i class="icon ion-ios-people-outline"></i>
<span translate>Translators</span>
<i class="icon nav-item-arrow-right"></i>
</a>
<a class="item item-icon-left item-icon-right" ui-sref="tabs.logs">
<a class="item item-icon-left item-icon-right" ui-sref="tabs.about.logs">
<i class="icon ion-ios-copy-outline"></i>
<span translate>Session log</span>
<i class="icon nav-item-arrow-right"></i>

View file

@ -51,14 +51,14 @@
</span>
</h2>
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>
<p>
<span ng-show="!wallet.isComplete()" class="assertive" translate>
Incomplete
</span>
<p ng-show="wallet.isComplete() && !wallet.balanceHidden">
{{wallet.status.availableBalanceStr}}
</p>
<p ng-show="wallet.isComplete() && wallet.balanceHidden">
<strong class="size-12" translate>[Balance Hidden]</strong>
<div ng-show="wallet.isComplete()">
<span ng-show="!wallet.balanceHidden">{{wallet.status.availableBalanceStr}}</span>
<span ng-show="wallet.balanceHidden" translate>[Balance Hidden]</span>
</div>
</p>
<i class="icon nav-item-arrow-right"></i>
</a>

View file

@ -17,9 +17,8 @@
</div>
<div class="card" ng-if="list[0]">
<div class="item item-heading item-icon-right" ui-sref="tabs.addressbook">
<span translate>Contacts & Wallets</span>
<i class="icon nav-item-arrow-right"></i>
<div class="item item-heading">
<span translate>Contacts &amp; Wallets</span>
</div>
<div class="item text-center" ng-show="!list[0]" translate>No Wallet - Contact</div>
<a class="item item-icon-left" ng-repeat="item in list" ng-click="goToAmount(item)">

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService) {
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService, $ionicHistory) {
var address = $stateParams.address;
@ -26,10 +26,13 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f
});
$scope.sendTo = function() {
$ionicHistory.clearHistory();
$state.go('tabs.send');
$timeout(function() {
$state.transitionTo('send.amount', {
$state.transitionTo('tabs.send.amount', {
toAddress: $scope.addressbookEntry.address,
toName: $scope.addressbookEntry.name
toName: $scope.addressbookEntry.name,
toEmail: $scope.addressbookEntry.email
});
}, 100);
};

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicHistory, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
angular.module('copayApp.controllers').controller('amountController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Enter Amount'));
var unitToSatoshi;
@ -188,7 +188,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var _amount = evaluate(format($scope.amount));
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
$state.transitionTo('send.confirm', {
$state.transitionTo('tabs.send.confirm', {
toAmount: amount * unitToSatoshi,
toAddress: $scope.toAddress,
toName: $scope.toName,

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, popupService) {
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, $ionicNavBarDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, gettext, txFormatService, ongoingProcess, $ionicModal, $ionicHistory, popupService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Confirm'));
var cachedTxp = {};
var isChromeApp = platformInfo.isChromeApp;
@ -17,24 +17,14 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.showDescriptionPopup = function() {
$scope.data = {
comment: null
var title = gettextCatalog.getString('Add description');
var opts = {
defaultText: $scope.description
};
var commentPopup = $ionicPopup.show({
templateUrl: "views/includes/note.html",
title: gettextCatalog.getString('Set description'),
scope: $scope,
popupService.showPrompt(title, null, opts, function(res) {
if (res) $scope.description = res;
});
$scope.commentPopupClose = function() {
commentPopup.close();
};
$scope.commentPopupSave = function() {
$log.debug('Saving description: ' + $scope.data.comment);
$scope.description = $scope.data.comment;
commentPopup.close();
};
};
var setFromPayPro = function(uri, cb) {
@ -87,6 +77,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
};
$scope.init = function() {
if ($stateParams.paypro) {
return setFromPayPro($stateParams.paypro, function(err) {
if (err && !isChromeApp) {
showAlert(gettext('Could not fetch payment'));
}
});
}
// TODO (URL , etc)
if (!$stateParams.toAddress || !$stateParams.toAmount) {
$log.error('Bad params at amount')
@ -271,7 +268,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
if (err) return;
walletService.publishAndSign(wallet, txp, function(err, txp) {
if (err) return setSendError(err);
$state.transitionTo('tabs.home');
$ionicHistory.clearHistory();
$state.go('tabs.home');
});
});
};

View file

@ -75,7 +75,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
return;
}
$log.debug('Got toAddress:' + addr + ' | ' + item.name);
return $state.transitionTo('send.amount', {
return $state.transitionTo('tabs.send.amount', {
toAddress: addr,
toName: item.name,
toEmail: item.email

View file

@ -218,29 +218,24 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
/*
*
* Send
*
*/
/*
*
* Send
*
*/
.state('send', {
url: '/send',
abstract: true,
template: '<ion-nav-view name="send"></ion-nav-view>'
})
.state('send.amount', {
.state('tabs.send.amount', {
url: '/amount/:toAddress/:toName/:toEmail',
views: {
'send': {
'tab-send@tabs': {
templateUrl: 'views/amount.html'
}
}
})
.state('send.confirm', {
.state('tabs.send.confirm', {
url: '/confirm/:toAddress/:toName/:toAmount/:toEmail/:description/:paypro',
views: {
'send': {
'tab-send@tabs': {
templateUrl: 'views/confirm.html'
}
}
@ -256,39 +251,39 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.add', {
url: '/add',
views: {
'tab-home': {
'tab-home@tabs': {
templateUrl: 'views/add.html'
}
}
})
.state('tabs.join', {
.state('tabs.add.join', {
url: '/join/:url',
views: {
'tab-home': {
'tab-home@tabs': {
templateUrl: 'views/join.html'
},
}
})
.state('tabs.import', {
.state('tabs.add.import', {
url: '/import',
views: {
'tab-home': {
'tab-home@tabs': {
templateUrl: 'views/import.html'
},
},
})
.state('tabs.create-personal', {
.state('tabs.add.create-personal', {
url: '/create-personal',
views: {
'tab-home': {
'tab-home@tabs': {
templateUrl: 'views/tab-create-personal.html'
},
}
})
.state('tabs.create-shared', {
.state('tabs.add.create-shared', {
url: '/create-shared',
views: {
'tab-home': {
'tab-home@tabs': {
templateUrl: 'views/tab-create-shared.html'
},
}
@ -303,7 +298,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.language', {
url: '/language',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/preferencesLanguage.html'
}
}
@ -311,7 +306,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.unit', {
url: '/unit',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/preferencesUnit.html'
}
}
@ -319,7 +314,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.fee', {
url: '/fee',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/preferencesFee.html'
}
}
@ -327,7 +322,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.altCurrency', {
url: '/altCurrency',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/preferencesAltCurrency.html'
}
}
@ -335,31 +330,31 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.about', {
url: '/about',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/preferencesAbout.html'
}
}
})
.state('tabs.logs', {
.state('tabs.about.logs', {
url: '/logs',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/preferencesLogs.html'
}
}
})
.state('tabs.termsOfUse', {
.state('tabs.about.termsOfUse', {
url: '/termsOfUse',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/termsOfUse.html',
}
}
})
.state('tabs.translators', {
.state('tabs.about.translators', {
url: '/translators',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/translators.html'
}
}
@ -375,7 +370,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/preferences/:walletId',
abstract: true,
views: {
'tab-settings': {
'tab-settings@tabs': {
template: '<ion-nav-view name="preferences"></ion-nav-view>'
},
}
@ -495,7 +490,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('tabs.addressbook', {
url: '/addressbook',
views: {
'tab-settings': {
'tab-settings@tabs': {
templateUrl: 'views/addressbook.html',
controller: 'addressbookListController'
}

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, $window, bitcore) {
angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, $window, $timeout, bitcore) {
var root = {};
@ -26,7 +26,11 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
// data extensions for Payment Protocol with non-backwards-compatible request
if ((/^bitcoin:\?r=[\w+]/).exec(data)) {
data = decodeURIComponent(data.replace('bitcoin:?r=', ''));
$state.go('send.confirm', {paypro: data})
$state.go('tabs.send');
$timeout(function() {
$state.transitionTo('tabs.send.confirm', {paypro: data});
}, 100);
return true;
}
@ -41,44 +45,65 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
var amount = parsed.amount ? parsed.amount : '';
if (parsed.r) {
$state.go('send.confirm', {paypro: parsed.r});
} else {
if (amount) {
$state.go('send.confirm', {toAmount: amount, toAddress: addr, description:message})
$state.go('tabs.send');
$timeout(function() {
if (parsed.r) {
$state.transitionTo('tabs.send.confirm', {paypro: parsed.r});
} else {
$state.go('send.amount', {toAddress: addr})
if (amount) {
$state.transitionTo('tabs.send.confirm', {toAmount: amount, toAddress: addr, description:message});
} else {
$state.transitionTo('tabs.send.amount', {toAddress: addr});
}
}
}
}, 100);
return true;
// Plain URL
} else if (/^https?:\/\//.test(data)) {
return $state.go('send.confirm', {paypro: data})
$state.go('tabs.send');
$timeout(function() {
$state.transitionTo('tabs.send.confirm', {paypro: data});
}, 100);
return true;
// Plain Address
} else if (bitcore.Address.isValid(data, 'livenet')) {
return $state.go('send.amount', {toAddress: data})
$state.go('tabs.send');
$timeout(function() {
$state.transitionTo('tabs.send.amount', {toAddress: data});
}, 100);
return true;
} else if (bitcore.Address.isValid(data, 'testnet')) {
return $state.go('send.amount', {toAddress: data})
$state.go('tabs.send');
$timeout(function() {
$state.transitionTo('tabs.send.amount', {toAddress: data});
}, 100);
return true;
// Protocol
} else if (data.indexOf($window.appConfig.name + '://glidera')==0) {
return $state.go('uriglidera', {url: data})
return $state.go('uriglidera', {url: data});
} else if (data.indexOf($window.appConfig.name + '://coinbase')==0) {
return $state.go('uricoinbase', {url: data})
return $state.go('uricoinbase', {url: data});
// Join
} else if (data.match(/^copay:[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
return $state.go('add.join', {url: data})
$state.go('tabs.home');
$timeout(function() {
$state.transitionTo('tabs.add.join', {url: data});
}, 100);
return true;
// Old join
} else if (data.match(/^[0-9A-HJ-NP-Za-km-z]{70,80}$/)) {
return $state.go('add.join', {url: data})
$state.go('tabs.home');
$timeout(function() {
$state.transitionTo('tabs.add.join', {url: data});
}, 100);
return true;
}
return false;
};

View file

@ -32,9 +32,10 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
opts = opts || {};
$ionicPopup.prompt({
title: title,
template: message,
inputType: opts.inputType || 'password',
inputPlaceholder: opts.inputPlaceholder || 'Your password'
subTitle: message,
inputType: opts.inputType,
inputPlaceholder: opts.inputPlaceholder,
defaultText: opts.defaultText
}).then(function(res) {
return cb(res)
});
@ -106,7 +107,7 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
*
* @param {String} Title
* @param {String} Message
* @param {Object} Object{ inputType, inputPlaceholder } (optional)
* @param {Object} Object{ inputType, inputPlaceholder, defaultText } (optional)
* @param {Callback} Function
* @returns {Callback} Return the value of the input if user presses OK
*/