Merge pull request #2063 from cmgustavo/feature/open-external-link-mobile

Feature/open external link mobile
This commit is contained in:
Matias Alejo Garcia 2014-12-09 18:18:07 -03:00
commit 838f9e0806
12 changed files with 81 additions and 70 deletions

View File

@ -83,6 +83,9 @@ if [ ! -d $PROJECT ]; then
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=bitcoin cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=bitcoin
checkOK checkOK
cordova plugin add org.apache.cordova.inappbrowser
checkOK
fi fi
echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}" echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"

View File

@ -975,24 +975,13 @@ table tr.deleting {
background: #FCD5D5; background: #FCD5D5;
} }
/* SECONDARY */
input[type='submit']
{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week], textarea { input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week], textarea {
color: #343c43; color: #343c43;
margin-bottom: 1.3rem; margin-bottom: 1.3rem;
height: 40px; height: 40px;
border-radius: 3px;
background: #F2F5F8; background: #F2F5F8;
-moz-box-shadow: inset 1px 1px 0px 0px rgba(0,0,0,0.05); -moz-box-shadow: none;
box-shadow: inset 1px 1px 0px 0px rgba(0,0,0,0.05); box-shadow: none;
border: none; border: none;
padding-left: 45px; padding-left: 45px;
} }
@ -1001,8 +990,6 @@ button.secondary,
.button.secondary { .button.secondary {
color: #fff; color: #fff;
background: #008CC1; background: #008CC1;
-moz-box-shadow: 1px 1px 0px 0px #10769D;
box-shadow: 1px 1px 0px 0px #10769D;
} }
button.secondary:hover, button.secondary:hover,
button.secondary:focus, button.secondary:focus,
@ -1034,8 +1021,6 @@ button.primary,
color: #fff; color: #fff;
border-radius: 3px; border-radius: 3px;
border-radius: 3px; border-radius: 3px;
-moz-box-shadow: 1px 1px 0px 0px #16A085;
box-shadow: 1px 1px 0px 0px #16A085;
} }
button.primary:hover, button.primary:hover,
button.primary:focus, button.primary:focus,
@ -1056,8 +1041,6 @@ button[disabled].primary:focus,
.button.disabled.primary:focus, .button.disabled.primary:focus,
.button[disabled].primary:hover, .button[disabled].primary:hover,
.button[disabled].primary:focus { .button[disabled].primary:focus {
-moz-box-shadow: 1px 1px 0px 0px #687D80;
box-shadow: 1px 1px 0px 0px #687D80;
background-color: #95a5a6; background-color: #95a5a6;
color: #E6E6E6; color: #E6E6E6;
} }
@ -1068,8 +1051,6 @@ button.warning,
background-color: #C0392A; background-color: #C0392A;
color: #fff; color: #fff;
border-radius: 3px; border-radius: 3px;
-moz-box-shadow: 1px 1px 0px 0px #A02F23;
box-shadow: 1px 1px 0px 0px #A02F23;
} }
button.warning:hover, button.warning:hover,
button.warning:focus, button.warning:focus,
@ -1130,8 +1111,6 @@ button[disabled].white:focus,
/* BLACK */ /* BLACK */
button.black, button.black,
.button.black { .button.black {
-moz-box-shadow: 1px 1px 0px 0px #1B2937;
box-shadow: 1px 1px 0px 0px #1B2937;
background-color: #2C3E50; background-color: #2C3E50;
color: #fff; color: #fff;
} }

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService, isMobile, configService) { angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService, isMobile, configService, go) {
var _credentials, _firstpin; var _credentials, _firstpin;
@ -172,4 +172,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
}); });
}; };
$scope.openExternalLink = function(url) {
go.openExternalLink(url);
};
}); });

View File

@ -2,7 +2,7 @@
var bitcore = require('bitcore'); var bitcore = require('bitcore');
angular.module('copayApp.controllers').controller('HistoryController', angular.module('copayApp.controllers').controller('HistoryController',
function($scope, $rootScope, $filter, $timeout, $modal, rateService, notification) { function($scope, $rootScope, $filter, $timeout, $modal, rateService, notification, go) {
var w = $rootScope.wallet; var w = $rootScope.wallet;
$rootScope.title = 'History'; $rootScope.title = 'History';
@ -145,6 +145,9 @@ angular.module('copayApp.controllers').controller('HistoryController',
return w.getNetworkName().substring(0, 4); return w.getNetworkName().substring(0, 4);
}; };
$scope.openExternalLink = function(url) {
go.openExternalLink(url);
};
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss('cancel');

View File

@ -40,6 +40,10 @@ angular.module('copayApp.services').factory('go', function($window, $location) {
} }
}; };
root.openExternalLink = function(url) {
var ref = window.open(url, '_blank', 'location=no');
};
root.go = function(path) { root.go = function(path) {
var parts = path.split('#'); var parts = path.split('#');
$location.path(parts[0]); $location.path(parts[0]);

View File

@ -30,7 +30,7 @@
<div class="panel"> <div class="panel">
<label><span translate>Wallet name (*)</span> <label><span translate>Wallet name</span>
<div class="input"> <div class="input">
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName" ng-required="true"> <input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName" ng-required="true">
<i class="icon-wallet"></i> <i class="icon-wallet"></i>
@ -59,10 +59,10 @@
</div> </div>
<p translate class="comment" ng-show="totalCopayers>1">(*) The limits are imposed by the bitcoin network.</p> <p translate class="comment" ng-show="totalCopayers>1">(*) The limits are imposed by the bitcoin network.</p>
<div class="line-dashed-h"></div> <div class="line-dashed-h m20b"></div>
<div class="m20t m20b"> <div class="m20b oh">
<a class="small" ng-click="hideAdv=!hideAdv"> <a class="small left button-setup" ng-click="hideAdv=!hideAdv">
<i class="fi-widget m3r"></i> <i class="fi-widget m3r"></i>
<span translate ng-hide="!hideAdv">Show</span> <span translate ng-hide="!hideAdv">Show</span>
<span translate ng-hide="hideAdv">Hide</span> <span translate ng-hide="hideAdv">Hide</span>
@ -72,17 +72,25 @@
</a> </a>
</div> </div>
<div ng-hide="hideAdv" class="row"> <div ng-hide="hideAdv" class="row">
<input id="network-name" type="checkbox" ng-model="networkName" ng-true-value="'testnet'" <div class="large-12 columns">
ng-false-value="'livenet'" class="form-control" ng-checked="networkName == 'testnet' ? true : false">
<label for="network-name" translate>Use test network</label>
<p> <label for="network-name">
<input type="text" placeholder="BIP32 master extended private key (hex)" name="private" ng-model="private"> <input id="network-name" type="checkbox" ng-model="networkName" ng-true-value="'testnet'"
ng-false-value="'livenet'" class="form-control" ng-checked="networkName == 'testnet' ? true : false">
Use test network
</label>
<label for="ext-master">Master extended private key
<input id="ext-master"
type="text"
placeholder="BIP32 master extended private key (hex)"
name="private" ng-model="private">
</div>
</div> </div>
<div class="text-right"> <div class="text-right">
<button translate type="submit" class="button primary m0" ng-disabled="setupForm.$invalid || loading"> <button translate type="submit" class="button primary expand m0" ng-disabled="setupForm.$invalid || loading">
Create {{requiredCopayers}}-of-{{totalCopayers}} wallet Create {{requiredCopayers}}-of-{{totalCopayers}} wallet
</button> </button>
</div> </div>

View File

@ -120,7 +120,8 @@
</a> </a>
</div> </div>
<div class="right"> <div class="right">
<a class="button-setup text-gray" href="https://copay.io/profile-storage"> <a class="button-setup text-gray"
ng-click="openExternalLink('https://copay.io/profile-storage.html')">
Learn more about this option Learn more about this option
</a> </a>
</div> </div>

View File

@ -57,16 +57,18 @@
<i class="icon-locked"></i> <i class="icon-locked"></i>
</div> </div>
<div class="line-dashed-h m10b m20t"></div> <div class="line-dashed-h m20b"></div>
<a class="expand small" ng-click="hideAdv=!hideAdv"> <div class="m20b oh">
<i class="fi-widget m3r"></i> <a class="small left button-setup" ng-click="hideAdv=!hideAdv">
<span translate ng-hide="!hideAdv">Show</span> <i class="fi-widget m3r"></i>
<span translate ng-hide="hideAdv">Hide</span> <span translate ng-hide="!hideAdv">Show</span>
<span translate>advanced options</span> <span translate ng-hide="hideAdv">Hide</span>
<i ng-if="hideAdv" class="icon-arrow-down4"></i> <span translate>advanced options</span>
<i ng-if="!hideAdv" class="icon-arrow-up4"></i> <i ng-if="hideAdv" class="icon-arrow-down4"></i>
</a> <i ng-if="!hideAdv" class="icon-arrow-up4"></i>
</a>
</div>
<div ng-hide="hideAdv" class="m10t"> <div ng-hide="hideAdv" class="m10t">
<label> <label>
@ -88,7 +90,7 @@
<div class="text-right m20t"> <div class="text-right m20t">
<button translate type="submit" class="button black m0" ng-disabled="importForm.$invalid"> <button translate type="submit" class="button expand black m0" ng-disabled="importForm.$invalid">
Import backup Import backup
</button> </button>
</div> </div>

View File

@ -52,10 +52,10 @@
ng-include="'views/includes/scanner.html'"> ng-include="'views/includes/scanner.html'">
</div> </div>
<div class="line-dashed-h"></div> <div class="line-dashed-h m20b"></div>
<div class="m20t m20b left"> <div class="m20b oh">
<a class="expand small" ng-click="hideAdv=!hideAdv"> <a class="small left button-setup" ng-click="hideAdv=!hideAdv">
<i class="fi-widget m3r"></i> <i class="fi-widget m3r"></i>
<span translate ng-hide="!hideAdv">Show</span> <span translate ng-hide="!hideAdv">Show</span>
<span translate ng-hide="hideAdv">Hide</span> <span translate ng-hide="hideAdv">Hide</span>
@ -64,13 +64,18 @@
<i ng-if="!hideAdv" class="icon-arrow-up4"></i> <i ng-if="!hideAdv" class="icon-arrow-up4"></i>
</a> </a>
</div> </div>
<div ng-hide="hideAdv"> <div ng-hide="hideAdv" class="row">
<p> <div class="large-12 columns">
<input class="columns" type="text" placeholder="BIP32 master extended private key (hex)" name="private" ng-model="$parent.private"> <label for="ext-master">Master extended private key
<input id="ext-master"
type="text"
placeholder="BIP32 master extended private key (hex)" name="private" ng-model="$parent.private">
</label>
</div>
</div> </div>
<div class="text-right m20t"> <div class="text-right m20t">
<button translate type="submit" class="button secondary m0" ng-disabled="joinForm.$invalid">Join</button> <button translate type="submit" class="button expand secondary m0" ng-disabled="joinForm.$invalid">Join</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -79,8 +79,11 @@
</ul> </ul>
</div> </div>
<div class="m10v text-right"> <div class="m10t oh">
<a href="http://{{getShortNetworkName()}}.insight.is/tx/{{btx.txid}}" target="_blank"> See it on the blockchain <i class="icon-arrow-right2 vm"></i></a> <a class="right button-setup"
ng-click="openExternalLink('http://' + getShortNetworkName() + '.insight.is/tx/' + btx.txid)">
See it on the blockchain <i class="icon-arrow-right2 vm"></i>
</a>
</p> </p>
</div> </div>
</div> </div>

View File

@ -27,7 +27,7 @@
<div class="m20b row"> <div class="m20b row">
<div class="large-12 columns"> <div class="large-12 columns">
<a class="size-12" ng-click="hideAdv=!hideAdv"> <a class="small left button-setup" ng-click="hideAdv=!hideAdv">
<i class="fi-widget m3r"></i> <i class="fi-widget m3r"></i>
<span translate ng-hide="!hideAdv">Show</span> <span translate ng-hide="!hideAdv">Show</span>
<span translate ng-hide="hideAdv">Hide</span> <span translate ng-hide="hideAdv">Hide</span>
@ -89,7 +89,8 @@
<div class="large-12 columns"> <div class="large-12 columns">
<div class="panel"> <div class="panel">
<h2><i class="fi-minus-circle m10r"></i> <h2><i class="fi-minus-circle m10r"></i>
<span translate>Join Secret</span> </h2> <span translate>Join Secret</span>
</h2>
<p translate class="text-gray"> <p translate class="text-gray">
This is the initial secret join string. Since your wallet it is already complete, this is only useful to rejoin peers that lost their backup BUT have the extended private key stored (they will be rejected on other case). They need to enter their extended private key during the join process (in advanced options). This is the initial secret join string. Since your wallet it is already complete, this is only useful to rejoin peers that lost their backup BUT have the extended private key stored (they will be rejected on other case). They need to enter their extended private key during the join process (in advanced options).
</p> </p>

View File

@ -108,9 +108,9 @@
<div class="line-dashed-h m20b"></div> <div class="line-dashed-h m20b"></div>
<div class="m20b row"> <div class="m20b row oh">
<div class="large-12 columns"> <div class="large-12 columns">
<a class="size-12" ng-click="hideAdv=!hideAdv"> <a class="small left button-setup" ng-click="hideAdv=!hideAdv">
<i class="fi-widget m3r"></i> <i class="fi-widget m3r"></i>
<span translate ng-hide="!hideAdv">Show</span> <span translate ng-hide="!hideAdv">Show</span>
<span translate ng-hide="hideAdv">Hide</span> <span translate ng-hide="hideAdv">Hide</span>
@ -122,17 +122,15 @@
</div> </div>
<div ng-hide="hideAdv" class="row"> <div ng-hide="hideAdv" class="row">
<div class="row"> <div class="large-12 columns">
<div class="large-12 columns"> <div class="panel">
<div class="panel"> <h2><i class="fi-minus-circle m10r"></i>
<h2><i class="fi-minus-circle m10r"></i> <span translate>Delete Profile</span>
<span translate>Delete Profile</span> </h2>
</h2> <p translate class="text-gray">Permanently delete this profile and all its wallets. WARNING: this action cannot be reversed.</p>
<p translate class="text-gray">Permanently delete this profile and all its wallets. WARNING: this action cannot be reversed.</p> <a translate class="button warning m0" ng-really-message="{{'Are you sure you want to delete this profile?' | translate}}"
<a translate class="button warning m0" ng-really-message="{{'Are you sure you want to delete this profile?' | translate}}" ng-really-click="deleteProfile()">Delete Profile
ng-really-click="deleteProfile()">Delete Profile </a>
</a>
</div>
</div> </div>
</div> </div>
</div> </div>