Merge pull request #4370 from JDonadio/ref/root-go
Replace $root.go - Use scope on preferences
This commit is contained in:
commit
bcd3833445
35 changed files with 346 additions and 396 deletions
|
|
@ -1,17 +1,17 @@
|
||||||
<div class="backup" ng-controller="backupController as wordsC">
|
<div class="backup" ng-controller="backupController" ng-init="init()">
|
||||||
<nav class="tab-bar">
|
<nav class="tab-bar">
|
||||||
<section class="left-small" ng-show="(wordsC.step != 1 && wordsC.step != 4)">
|
<section class="left-small" ng-show="(step != 1 && step != 4)">
|
||||||
<a ng-click="wordsC.goToStep(1);">
|
<a ng-click="goToStep(1);">
|
||||||
<i class="icon-arrow-left3 icon-back"></i>
|
<i class="icon-arrow-left3 icon-back"></i>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="middle tab-bar-section" ng-style="{'color':index.backgroundColor}">
|
<section class="middle tab-bar-section" ng-style="{'color':index.backgroundColor}">
|
||||||
<span>{{wordsC.walletName}}</span>
|
<span>{{walletName}}</span>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="right-small">
|
<section class="right-small">
|
||||||
<a class="p10" ng-click="$root.go(index.prevState);">
|
<a class="p10" ng-click="backTo(index.prevState)">
|
||||||
<span class="text-close">
|
<span class="text-close">
|
||||||
<i class="fi-x size-24"></i>
|
<i class="fi-x size-24"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -19,9 +19,9 @@
|
||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="box-notification" ng-show="wordsC.error">
|
<div class="box-notification" ng-show="error">
|
||||||
<span class="text-warning">
|
<span class="text-warning">
|
||||||
{{wordsC.error|translate}}
|
{{error|translate}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -30,8 +30,8 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="content preferences text-center">
|
<div class="content preferences text-center">
|
||||||
<div ng-show="wordsC.step == 1">
|
<div ng-show="step == 1">
|
||||||
<div ng-show="wordsC.mnemonicWords || (wordsC.credentialsEncrypted && !wordsC.deleted)" class="row">
|
<div ng-show="mnemonicWords || (credentialsEncrypted && !deleted)" class="row">
|
||||||
<h5 class="text-center" translate>Write your wallet recovery phrase</h5>
|
<h5 class="text-center" translate>Write your wallet recovery phrase</h5>
|
||||||
<div class="size-14 text-gray columns" ng-show="(index.n>1 && index.m != index.n )">
|
<div class="size-14 text-gray columns" ng-show="(index.n>1 && index.m != index.n )">
|
||||||
<span translate>
|
<span translate>
|
||||||
|
|
@ -56,37 +56,37 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row m20t" ng-show="wordsC.deleted">
|
<div class="row m20t" ng-show="deleted">
|
||||||
<div class="columns size-14 text-gray text-center" translate>
|
<div class="columns size-14 text-gray text-center" translate>
|
||||||
Wallet recovery phrase not available. You can still export it from Advanced > Export.
|
Wallet recovery phrase not available. You can still export it from Advanced > Export.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="wordsC.mnemonicWords || (wordsC.credentialsEncrypted && !wordsC.deleted)">
|
<div ng-show="mnemonicWords || (credentialsEncrypted && !deleted)">
|
||||||
<p class="text-center columns text-gray" ng-show="index.n==1 && wordsC.step == 1">
|
<p class="text-center columns text-gray" ng-show="index.n==1 && step == 1">
|
||||||
<span translate>
|
<span translate>
|
||||||
You need the wallet recovery phrase to restore this personal wallet. Write it down and keep them somewhere safe.
|
You need the wallet recovery phrase to restore this personal wallet. Write it down and keep them somewhere safe.
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="row" ng-show="wordsC.credentialsEncrypted">
|
<div class="row" ng-show="credentialsEncrypted">
|
||||||
<div class="m10t columns">
|
<div class="m10t columns">
|
||||||
<a class="button outline light-gray expand tiny" ng-click="wordsC.toggle()">
|
<a class="button outline light-gray expand tiny" ng-click="toggle()">
|
||||||
<i class="fi-widget m3r"></i>
|
<i class="fi-widget m3r"></i>
|
||||||
<span translate ng-hide="wordsC.show">Show Wallet Recovery Phrase</span>
|
<span translate ng-hide="show">Show Wallet Recovery Phrase</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" ng-show="!wordsC.credentialsEncrypted">
|
<div class="row" ng-show="!credentialsEncrypted">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="panel" ng-class="{'enable_text_select': index.network == 'testnet'}">
|
<div class="panel" ng-class="{'enable_text_select': index.network == 'testnet'}">
|
||||||
<span ng-repeat="word in wordsC.mnemonicWords track by $index"><span style="white-space:nowrap">{{word}}</span><span ng-show="wordsC.useIdeograms"> </span> </span>
|
<span ng-repeat="word in mnemonicWords track by $index"><span style="white-space:nowrap">{{word}}</span><span ng-show="useIdeograms"> </span> </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="columns extra-padding-bottom" ng-show="!wordsC.credentialsEncrypted">
|
<div class="columns extra-padding-bottom" ng-show="!credentialsEncrypted">
|
||||||
<div class="line-t p10 size-10 text-gray text-center" ng-show="wordsC.mnemonicHasPassphrase">
|
<div class="line-t p10 size-10 text-gray text-center" ng-show="mnemonicHasPassphrase">
|
||||||
<i class="fi-alert"></i>
|
<i class="fi-alert"></i>
|
||||||
<span translate>
|
<span translate>
|
||||||
This recovery phrase was created with a password. To recover this wallet both the recovery phrase and password are needed.
|
This recovery phrase was created with a password. To recover this wallet both the recovery phrase and password are needed.
|
||||||
|
|
@ -96,11 +96,11 @@
|
||||||
|
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button
|
<button
|
||||||
ng-show="!wordsC.deleted"
|
ng-show="!deleted"
|
||||||
ng-disabled="wordsC.credentialsEncrypted || wordsC.error"
|
ng-disabled="credentialsEncrypted || error"
|
||||||
class="round expand m0"
|
class="round expand m0"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-click="wordsC.goToStep(2);"
|
ng-click="goToStep(2);"
|
||||||
translate>Continue
|
translate>Continue
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -110,19 +110,19 @@
|
||||||
## STEP 2
|
## STEP 2
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div ng-show="wordsC.step == 2">
|
<div ng-show="step == 2">
|
||||||
<div class="columns text-center extra-padding-bottom">
|
<div class="columns text-center extra-padding-bottom">
|
||||||
<h5 translate>Confirm your wallet recovery phrase</h5>
|
<h5 translate>Confirm your wallet recovery phrase</h5>
|
||||||
<p class="text-gray m0" translate>
|
<p class="text-gray m0" translate>
|
||||||
Please tap the words in order to confirm your backup phrase is correctly written.
|
Please tap the words in order to confirm your backup phrase is correctly written.
|
||||||
</p>
|
</p>
|
||||||
<div class="panel words text-left">
|
<div class="panel words text-left">
|
||||||
<span ng-repeat="cword in wordsC.customWords track by $index" ng-show="wordsC.customWords[$index]">
|
<span ng-repeat="cword in customWords track by $index" ng-show="customWords[$index]">
|
||||||
<button class="button radius tiny words" ng-click="removeButton($index, cword)">{{cword.word}}</button>
|
<button class="button radius tiny words" ng-click="removeButton($index, cword)">{{cword.word}}</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-left">
|
<div class="text-left">
|
||||||
<span ng-repeat="shuffledWord in wordsC.shuffledMnemonicWords track by $index">
|
<span ng-repeat="shuffledWord in shuffledMnemonicWords track by $index">
|
||||||
<button class="button radius tiny words" ng-click="addButton($index, shuffledWord)"
|
<button class="button radius tiny words" ng-click="addButton($index, shuffledWord)"
|
||||||
ng-disabled="shuffledWord.selected">{{shuffledWord.word}}
|
ng-disabled="shuffledWord.selected">{{shuffledWord.word}}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -132,10 +132,10 @@
|
||||||
|
|
||||||
<div class="button-box">
|
<div class="button-box">
|
||||||
<button
|
<button
|
||||||
ng-disabled="!wordsC.selectComplete"
|
ng-disabled="!selectComplete"
|
||||||
class="round expand m0"
|
class="round expand m0"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-click="wordsC.goToStep(3);"
|
ng-click="goToStep(3);"
|
||||||
translate>Continue
|
translate>Continue
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
## STEP 3
|
## STEP 3
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div ng-show="wordsC.step == 3">
|
<div ng-show="step == 3">
|
||||||
<div class="columns text-center">
|
<div class="columns text-center">
|
||||||
<h5 translate>Enter your password</h5>
|
<h5 translate>Enter your password</h5>
|
||||||
<p class="text-gray m0" translate>
|
<p class="text-gray m0" translate>
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
ng-disabled="!passphrase"
|
ng-disabled="!passphrase"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
class="button round expand m0"
|
class="button round expand m0"
|
||||||
ng-click="wordsC.goToStep(4);"
|
ng-click="goToStep(4);"
|
||||||
translate>Continue
|
translate>Continue
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -171,8 +171,8 @@
|
||||||
## STEP 4
|
## STEP 4
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div ng-show="wordsC.step == 4">
|
<div ng-show="step == 4">
|
||||||
<div class="row m10t m10b text-center" ng-show="!wordsC.backupError">
|
<div class="row m10t m10b text-center" ng-show="!backupError">
|
||||||
<div class="circle-icon">
|
<div class="circle-icon">
|
||||||
<i class="fi-like size-48"></i>
|
<i class="fi-like size-48"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -185,7 +185,7 @@
|
||||||
<button
|
<button
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
class="button round expand"
|
class="button round expand"
|
||||||
ng-click="$root.go('walletHome');"
|
href ui-sref="walletHome"
|
||||||
translate>Finish
|
translate>Finish
|
||||||
</button>
|
</button>
|
||||||
<!-- hide this in multisig just to show less text -->
|
<!-- hide this in multisig just to show less text -->
|
||||||
|
|
@ -201,7 +201,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row m10t m10b text-center" ng-show="wordsC.backupError">
|
<div class="row m10t m10b text-center" ng-show="backupError">
|
||||||
<div class="circle-icon">
|
<div class="circle-icon">
|
||||||
<i class="fi-dislike size-48"></i>
|
<i class="fi-dislike size-48"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -222,7 +222,7 @@
|
||||||
<button
|
<button
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
class="button round expand m0"
|
class="button round expand m0"
|
||||||
ng-click="wordsC.goToStep(1);"
|
ng-click="goToStep(1);"
|
||||||
translate>Try again
|
translate>Try again
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
</p>
|
</p>
|
||||||
<button class="m20t outline black round expand"
|
<button class="m20t outline black round expand"
|
||||||
ng-style="{'background-color': '#2b71b1'}"
|
ng-style="{'background-color': '#2b71b1'}"
|
||||||
ng-click="$root.go('coinbase')">OK</button>
|
href ui-sref="coinbase">OK</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -161,8 +161,7 @@
|
||||||
Bitcoin purchase completed. Coinbase has queued the transfer to your selected Copay wallet.
|
Bitcoin purchase completed. Coinbase has queued the transfer to your selected Copay wallet.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button class="outline dark-gray round expand"
|
<button class="outline dark-gray round expand" href ui-sref="coinbase">OK</button>
|
||||||
ng-click="$root.go('coinbase')">OK</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,10 +115,7 @@
|
||||||
A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business days.
|
A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business days.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button class="outline dark-gray round expand"
|
<button class="outline dark-gray round expand" href ui-sref="glidera">OK</button>
|
||||||
ng-click="$root.go('glidera')">
|
|
||||||
OK
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="right-small" ng-show="index.coinbaseAccount">
|
<section class="right-small" ng-show="index.coinbaseAccount">
|
||||||
<a class="p10" ng-click="$root.go('preferencesCoinbase')">
|
<a class="p10" href ui-sref="preferencesCoinbase">
|
||||||
<i class="fi-widget size-24"></i>
|
<i class="fi-widget size-24"></i>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
Reconnect
|
Reconnect
|
||||||
</button>
|
</button>
|
||||||
<div class="m20t size-12">
|
<div class="m20t size-12">
|
||||||
Or go to <a class="text-gray" ng-click="$root.go('preferencesCoinbase')">Preferences</a> and log out manually.
|
Or go to <a class="text-gray" href ui-sref="preferencesCoinbase">Preferences</a> and log out manually.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
<ul ng-show="index.coinbaseAccount" class="no-bullet m0 size-12">
|
<ul ng-show="index.coinbaseAccount" class="no-bullet m0 size-12">
|
||||||
<li class="line-b line-t p15 pointer"
|
<li class="line-b line-t p15 pointer"
|
||||||
ng-click="$root.go('buyCoinbase')">
|
href ui-sref="buyCoinbase">
|
||||||
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="30">
|
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="30">
|
||||||
<span class="m10 text-normal text-bold">Buy Bitcoin</span>
|
<span class="m10 text-normal text-bold">Buy Bitcoin</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="line-b p15 pointer"
|
<li class="line-b p15 pointer"
|
||||||
ng-click="$root.go('sellCoinbase')">
|
href ui-sref="sellCoinbase">
|
||||||
<img src="img/sell-bitcoin.svg" alt="sell bitcoin" width="30">
|
<img src="img/sell-bitcoin.svg" alt="sell bitcoin" width="30">
|
||||||
<span class="m10 text-normal text-bold">Sell Bitcoin</span>
|
<span class="m10 text-normal text-bold">Sell Bitcoin</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,17 @@
|
||||||
ng-init="titleSection='Export Wallet'; goBackToState = 'preferencesAdvanced'">
|
ng-init="titleSection='Export Wallet'; goBackToState = 'preferencesAdvanced'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="exportController as exportC">
|
<div class="content preferences" ng-controller="exportController">
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<div ng-show="!exportC.backupWalletPlainText">
|
<div ng-show="!backupWalletPlainText">
|
||||||
<div class="text-warning size-14 m20b" ng-show="exportC.error">
|
<div class="text-warning size-14 m20b" ng-show="error">
|
||||||
<i class="fi-alert size-12"></i>
|
<i class="fi-alert size-12"></i>
|
||||||
<span translate> Failed to export </span>
|
<span translate> Failed to export </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="text-warning size-14 m20b" ng-show="exportC.isEncrypted">
|
<div class="text-warning size-14 m20b" ng-show="isEncrypted">
|
||||||
<i class="fi-alert size-12"></i>
|
<i class="fi-alert size-12"></i>
|
||||||
<span translate> A spending password is set for this wallet. Exporting keeps the spending password in the export archive.</span>
|
<span translate> A spending password is set for this wallet. Exporting keeps the spending password in the export archive.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -26,12 +26,12 @@
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<label for="password" translate>Set up a password </label>
|
<label for="password" translate>Set up a password </label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="password" class="form-control" placeholder="{{'Your password'|translate}}" name="password" ng-model="exportC.password">
|
<input type="password" class="form-control" placeholder="{{'Your password'|translate}}" name="password" ng-model="password">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="password" translate>Repeat the password</label>
|
<label for="password" translate>Repeat the password</label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="password" class="form-control" placeholder="{{'Repeat password'|translate}}" name="password" ng-model="exportC.repeatpassword">
|
<input type="password" class="form-control" placeholder="{{'Repeat password'|translate}}" name="password" ng-model="repeatpassword">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -68,25 +68,25 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<button class="black round expand m20t" ng-click="exportC.downloadWalletBackup()"
|
<button class="black round expand m20t" ng-click="downloadWalletBackup()"
|
||||||
ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
|
ng-disabled="(!password || password != repeatpassword)"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-show="!index.isSafari && !index.isCordova"><i class="fi-download"></i>
|
ng-show="!index.isSafari && !index.isCordova"><i class="fi-download"></i>
|
||||||
<span translate>Download</span></button>
|
<span translate>Download</span></button>
|
||||||
<button class="black round expand m20t" ng-click="exportC.viewWalletBackup()"
|
<button class="black round expand m20t" ng-click="viewWalletBackup()"
|
||||||
ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
|
ng-disabled="(!password || password != repeatpassword)"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-show="index.isSafari && !index.isCordova"><i class="fi-eye"></i>
|
ng-show="index.isSafari && !index.isCordova"><i class="fi-eye"></i>
|
||||||
<span translate>View</span></button>
|
<span translate>View</span></button>
|
||||||
<div ng-show="index.isCordova">
|
<div ng-show="index.isCordova">
|
||||||
<h4 translate>Export options</h4>
|
<h4 translate>Export options</h4>
|
||||||
<button class="black round expand" ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
|
<button class="black round expand" ng-disabled="(!password || password != repeatpassword)"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-click="exportC.copyWalletBackup()"><i class="fi-clipboard-pencil"></i>
|
ng-click="copyWalletBackup()"><i class="fi-clipboard-pencil"></i>
|
||||||
<span translate>Copy to clipboard</span></button>
|
<span translate>Copy to clipboard</span></button>
|
||||||
<button class="black round expand" ng-disabled="(!exportC.password || exportC.password != exportC.repeatpassword)"
|
<button class="black round expand" ng-disabled="(!password || password != repeatpassword)"
|
||||||
ng-style="{'background-color':index.backgroundColor}"
|
ng-style="{'background-color':index.backgroundColor}"
|
||||||
ng-click="exportC.sendWalletBackup()"><i class="fi-mail"></i>
|
ng-click="sendWalletBackup()"><i class="fi-mail"></i>
|
||||||
<span translate>Send by email</span></button>
|
<span translate>Send by email</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -94,11 +94,11 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" ng-show="exportC.backupWalletPlainText">
|
<div class="row" ng-show="backupWalletPlainText">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<h3 translate>Wallet Export</h3>
|
<h3 translate>Wallet Export</h3>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<textarea rows="12">{{exportC.backupWalletPlainText}}</textarea>
|
<textarea rows="12">{{backupWalletPlainText}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="size-12 text-gray text-right">
|
<div class="size-12 text-gray text-right">
|
||||||
<i class="icon-compose"></i>
|
<i class="icon-compose"></i>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
Retry
|
Retry
|
||||||
</button>
|
</button>
|
||||||
<div class="m20t size-12">
|
<div class="m20t size-12">
|
||||||
<a class="text-gray" ng-click="$root.go('preferencesGlidera')">Preferences</a>
|
<a class="text-gray" href ui-sref="preferencesGlidera">Preferences</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
<div class="p20v text-center white">
|
<div class="p20v text-center white">
|
||||||
<img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="100">
|
<img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="100">
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-header" ng-click="$root.go('preferencesGlidera')">
|
<div class="sub-header" href ui-sref="preferencesGlidera">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div ng-show="!index.glideraPersonalInfo && !index.glideraEmail">
|
<div ng-show="!index.glideraPersonalInfo && !index.glideraEmail">
|
||||||
Preferences
|
Preferences
|
||||||
|
|
@ -136,7 +136,7 @@
|
||||||
ng-show="index.glideraStatus && index.glideraStatus.userCanTransact">
|
ng-show="index.glideraStatus && index.glideraStatus.userCanTransact">
|
||||||
<li ng-show="index.glideraStatus.userCanBuy"
|
<li ng-show="index.glideraStatus.userCanBuy"
|
||||||
class="line-b line-t p20 pointer"
|
class="line-b line-t p20 pointer"
|
||||||
ng-click="$root.go('buyGlidera')">
|
href ui-sref="buyGlidera">
|
||||||
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="40">
|
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="40">
|
||||||
<span class="m10 text-normal text-bold">Buy Bitcoin</span>
|
<span class="m10 text-normal text-bold">Buy Bitcoin</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="line-b p20 pointer"
|
<li class="line-b p20 pointer"
|
||||||
ng-show="index.glideraStatus.userCanSell"
|
ng-show="index.glideraStatus.userCanSell"
|
||||||
ng-click="$root.go('sellGlidera')">
|
href ui-sref="sellGlidera">
|
||||||
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="40">
|
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="40">
|
||||||
<span class="m10 text-normal text-bold">Sell Bitcoin</span>
|
<span class="m10 text-normal text-bold">Sell Bitcoin</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,9 @@
|
||||||
<ion-content overflow-scroll="true">
|
<ion-content overflow-scroll="true">
|
||||||
<ul class="pr">
|
<ul class="pr">
|
||||||
<li ng-show="sidebar.wallets[0]"
|
<li ng-show="sidebar.wallets[0]"
|
||||||
ng-repeat="item in sidebar.wallets track by $index"
|
ng-repeat="item in sidebar.wallets track by $index" ng-class="{'selected': item.id == index.walletId}" class="nav-item"
|
||||||
ng-class="{'selected': item.id == index.walletId}"
|
menu-toggle href ui-sref="walletHome" on-touch="sidebar.switchWallet(item.id, index.walletId)">
|
||||||
class="nav-item"
|
<div class="avatar-wallet" ng-style="{'background-color':item.color}">
|
||||||
menu-toggle on-touch="$root.go('walletHome'); sidebar.switchWallet(item.id, index.walletId)" >
|
|
||||||
<div class="avatar-wallet"
|
|
||||||
ng-style="{'background-color':item.color}">
|
|
||||||
<i class="icon-wallet size-21"></i>
|
<i class="icon-wallet size-21"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="name-wallet" ng-class="{'m8t':item.n == 1}">{{item.name || item.id}}</div>
|
<div class="name-wallet" ng-class="{'m8t':item.n == 1}">{{item.name || item.id}}</div>
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,13 @@
|
||||||
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet"
|
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet"
|
||||||
on-tap="index.toggleLeftMenu()"><i class="fi-list size-24"></i>
|
on-tap="index.toggleLeftMenu()"><i class="fi-list size-24"></i>
|
||||||
</a>
|
</a>
|
||||||
<a ng-show="goBackToState"
|
<a ng-show="goBackToState" ng-click="$root.go(goBackToState); goBackToState = null"><i class="icon-arrow-left3 icon-back"></i>
|
||||||
ng-click="$root.go(goBackToState); goBackToState = null"><i class="icon-arrow-left3 icon-back"></i>
|
<span class="text-back" translate>Back</span>
|
||||||
<span class="text-back">{{'Back'|translate}}</span>
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a ng-show="closeToHome" class="p10 "
|
<a ng-show="closeToHome" class="p10 "
|
||||||
ng-click="topbar.goHome(); index.setCompactTxHistory(); closeToHome = null">
|
ng-click="topbar.goHome(); index.setCompactTxHistory(); closeToHome = null">
|
||||||
<span class="text-close">{{'Close'|translate}}</span>
|
<span class="text-close" translate>Close</span>
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="content preferences" ng-controller="paperWalletController as paperWallet">
|
<div class="content preferences" ng-controller="paperWalletController as paperWallet">
|
||||||
<h4 ng-show="!paperWallet.error"></h4>
|
<h4 ng-show="!paperWallet.error"></h4>
|
||||||
<div class="box-notification m20b" ng-show="paperWallet.error">
|
<div class="box-notification m20b" ng-show="paperWallet.error">
|
||||||
<span classs="text-warning">{{paperWallet.error|translate}}</span>
|
<span class="text-warning">{{paperWallet.error|translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
<form ng-show="!paperWallet.balance" class="oh">
|
<form ng-show="!paperWallet.balance" class="oh">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesController as preferences" ng-init="preferences.init()">
|
<div class="content preferences" ng-controller="preferencesController" ng-init="init()">
|
||||||
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<ul class="no-bullet m0" ng-show="!index.noFocusedWallet">
|
<ul class="no-bullet m0" ng-show="!index.noFocusedWallet">
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesAlias')">
|
<li href ui-sref="preferencesAlias">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
{{index.alias||index.walletName}}
|
{{index.alias||index.walletName}}
|
||||||
<i class="icon-arrow-right3 size-24"></i>
|
<i class="icon-arrow-right3 size-24"></i>
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<div translate>Alias</div>
|
<div translate>Alias</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesEmail')">
|
<li href ui-sref="preferencesEmail">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
<span ng-if="!index.preferences.email" translate>Disabled</span>
|
<span ng-if="!index.preferences.email" translate>Disabled</span>
|
||||||
<span ng-if="index.preferences.email">{{index.preferences.email}}</span>
|
<span ng-if="index.preferences.email">{{index.preferences.email}}</span>
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<div translate>Email Notifications</div>
|
<div translate>Email Notifications</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesColor')">
|
<li href ui-sref="preferencesColor">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
<span ng-style="{'color':index.backgroundColor}">█</span>
|
<span ng-style="{'color':index.backgroundColor}">█</span>
|
||||||
<i class="icon-arrow-right3 size-24"></i>
|
<i class="icon-arrow-right3 size-24"></i>
|
||||||
|
|
@ -39,13 +39,13 @@
|
||||||
|
|
||||||
<li ng-show="index.isPrivKeyExternal">
|
<li ng-show="index.isPrivKeyExternal">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
{{preferences.externalSource}}
|
{{externalSource}}
|
||||||
<!-- (Accont {{preferences.externalAccount}}) -->
|
<!-- (Accont {{preferences.externalAccount}}) -->
|
||||||
</div>
|
</div>
|
||||||
<div translate>Hardware wallet</div>
|
<div translate>Hardware wallet</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('backup')" ng-hide="index.isPrivKeyExternal">
|
<li href ui-sref="backup" ng-hide="index.isPrivKeyExternal">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
<span class="text-warning" ng-show="index.needsBackup">
|
<span class="text-warning" ng-show="index.needsBackup">
|
||||||
<i class="fi-alert"></i> <span translate>Not completed</span>
|
<i class="fi-alert"></i> <span translate>Not completed</span>
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<div translate>Backup</div>
|
<div translate>Backup</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesAdvanced')">
|
<li href ui-sref="preferencesAdvanced">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Advanced</div>
|
<div translate>Advanced</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -71,14 +71,14 @@
|
||||||
<span class="toggle-label" translate>Request Spending Password</span>
|
<span class="toggle-label" translate>Request Spending Password</span>
|
||||||
</ion-toggle>
|
</ion-toggle>
|
||||||
|
|
||||||
<ion-toggle ng-model="touchidEnabled" toggle-class="toggle-balanced" ng-change="touchidChange()" ng-show="preferences.touchidAvailable">
|
<ion-toggle ng-model="touchidEnabled" toggle-class="toggle-balanced" ng-change="touchidChange()" ng-show="touchidAvailable">
|
||||||
<span class="toggle-label" translate>Scan Fingerprint</span>
|
<span class="toggle-label" translate>Scan Fingerprint</span>
|
||||||
</ion-toggle>
|
</ion-toggle>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show ="!deleted">
|
<div ng-show ="!deleted">
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="$root.go('deleteWords')">
|
<li href ui-sref="deleteWords">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Delete recovery phrase</div>
|
<div translate>Delete recovery phrase</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,15 @@
|
||||||
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="$root.go('termOfUse')">
|
<li href ui-sref="termOfUse">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<span translate>Terms of Use</span>
|
<span translate>Terms of Use</span>
|
||||||
</li>
|
</li>
|
||||||
<li ng-click="$root.go('translators')">
|
<li href ui-sref="translators">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<span translate>Translators</span>
|
<span translate>Translators</span>
|
||||||
</li>
|
</li>
|
||||||
<li ng-conf ng-click="$root.go('logs')">
|
<li ng-conf href ui-sref="logs">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<span translate>Session log</span>
|
<span translate>Session log</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -4,38 +4,38 @@
|
||||||
ng-init="titleSection='Advanced'; goBackToState = 'preferences'">
|
ng-init="titleSection='Advanced'; goBackToState = 'preferences'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesAdvancedController as preferences">
|
<div class="content preferences">
|
||||||
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
|
|
||||||
<li ng-click="$root.go('information')">
|
<li href ui-sref="information">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Wallet Information</div>
|
<div translate>Wallet Information</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-show="index.network == 'livenet'" ng-click="$root.go('paperWallet')">
|
<li ng-show="index.network == 'livenet'" href ui-sref="paperWallet">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Sweep paper wallet</div>
|
<div translate>Sweep paper wallet</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('export')">
|
<li href ui-sref="export">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Export Wallet</div>
|
<div translate>Export Wallet</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesBwsUrl')">
|
<li href ui-sref="preferencesBwsUrl">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div>Wallet Service URL</div>
|
<div>Wallet Service URL</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesHistory')">
|
<li href ui-sref="preferencesHistory">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Transaction History</div>
|
<div translate>Transaction History</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('delete')">
|
<li href ui-sref="delete">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>Delete Wallet</div>
|
<div translate>Delete Wallet</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,12 @@
|
||||||
ng-init="titleSection='Alias'; goBackToState = 'preferences'">
|
ng-init="titleSection='Alias'; goBackToState = 'preferences'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesAliasController as prefAlias">
|
<div class="content preferences" ng-controller="preferencesAliasController">
|
||||||
|
|
||||||
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<form name="settingsAliasForm" ng-submit="prefAlias.save()" class="columns">
|
<form name="settingsAliasForm" ng-submit="save()" class="columns">
|
||||||
<label><span translate>Alias for <i>{{index.walletName}}</i></span></label>
|
<label><span translate>Alias for <i>{{index.walletName}}</i></span></label>
|
||||||
<input type="text" id="alias2" type="text" name="alias2" ng-model="prefAlias.alias">
|
<input type="text" id="alias2" type="text" name="alias2" ng-model="alias">
|
||||||
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
|
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
|
||||||
ng-style="{'background-color':index.backgroundColor}">
|
ng-style="{'background-color':index.backgroundColor}">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,12 @@
|
||||||
ng-init="titleSection='Wallet Service URL'; goBackToState = 'preferencesAdvanced';">
|
ng-init="titleSection='Wallet Service URL'; goBackToState = 'preferencesAdvanced';">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="content preferences" ng-controller="preferencesBwsUrlController">
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesBwsUrlController as prefBwsUrl">
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<form name="settingsBwsUrlForm" ng-submit="prefBwsUrl.save()" class="columns">
|
<form name="settingsBwsUrlForm" ng-submit="save()" class="columns">
|
||||||
<label class="left">Wallet Service URL</label>
|
<label class="left">Wallet Service URL</label>
|
||||||
<a class="right size-12" ng-click="prefBwsUrl.resetDefaultUrl()" translate> Set default url</a>
|
<a class="right size-12" ng-click="resetDefaultUrl()" translate> Set default url</a>
|
||||||
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="prefBwsUrl.bwsurl">
|
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="bwsurl">
|
||||||
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
|
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
|
||||||
ng-style="{'background-color':index.backgroundColor}">
|
ng-style="{'background-color':index.backgroundColor}">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,15 @@
|
||||||
ng-init="titleSection='Delete Wallet'; goBackToState = 'preferencesAdvanced'">
|
ng-init="titleSection='Delete Wallet'; goBackToState = 'preferencesAdvanced'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="content preferences" ng-controller="preferencesDeleteWalletController">
|
||||||
<div class="content preferences" ng-controller="preferencesDeleteWalletController as preferences">
|
|
||||||
<div class="text-center text-gray m20t size-12">
|
<div class="text-center text-gray m20t size-12">
|
||||||
<div class="text-warning size-18 m10b" translate>Warning!</div>
|
<div class="text-warning size-18 m10b" translate>Warning!</div>
|
||||||
<div class="m20b" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
|
<div class="m20b" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="preferences.deleteWallet()">
|
<li ng-click="deleteWallet()">
|
||||||
<div class="right" ng-style="{'color':index.backgroundColor}">
|
<div class="right" ng-style="{'color':index.backgroundColor}" ng-show="!isDeletingWallet">
|
||||||
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
|
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
|
||||||
</div>
|
</div>
|
||||||
<div translate>Delete wallet</div>
|
<div translate>Delete wallet</div>
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesDeleteWordsController as preferences">
|
<div class="content preferences" ng-controller="preferencesDeleteWordsController">
|
||||||
|
|
||||||
<div ng-show="!preferences.deleted">
|
<div ng-show="!deleted">
|
||||||
<div class="text-center text-gray m20t size-12">
|
<div class="text-center text-gray m20t size-12">
|
||||||
<div class="box-notification text-warning" ng-show="preferences.error" >
|
<div class="box-notification text-warning" ng-show="error" >
|
||||||
{{preferences.error|translate}}
|
{{error|translate}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-warning size-18 m10b" translate>Warning!</div>
|
<div class="text-warning size-18 m10b" translate>Warning!</div>
|
||||||
<div class="m15" ng-show="!index.needsBackup" translate>Once you have copied your wallet recovery phrase down, it is recommended to delete it from this device.</div>
|
<div class="m15" ng-show="!index.needsBackup" translate>Once you have copied your wallet recovery phrase down, it is recommended to delete it from this device.</div>
|
||||||
<div class="m15" ng-show="index.needsBackup" translate>Need to do backup</div>
|
<div class="m15" ng-show="index.needsBackup" translate>Need to do backup</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="no-bullet m0" ng-show="!index.needsBackup">
|
<ul class="no-bullet m0" ng-show="!index.needsBackup">
|
||||||
<li ng-click="preferences.delete()">
|
<li ng-click="delete()">
|
||||||
<div class="right" ng-style="{'color':index.backgroundColor}">
|
<div class="right" ng-style="{'color':index.backgroundColor}">
|
||||||
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
|
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row m20t" ng-show="preferences.deleted">
|
<div class="row m20t" ng-show="deleted">
|
||||||
<div class="columns size-14 text-gray text-center" translate>
|
<div class="columns size-14 text-gray text-center" translate>
|
||||||
Wallet recovery phrase not available. You can still export it from Advanced > Export.
|
Wallet recovery phrase not available. You can still export it from Advanced > Export.
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -4,21 +4,18 @@
|
||||||
ng-init="titleSection='Email Notifications'; goBackToState = 'preferences'">
|
ng-init="titleSection='Email Notifications'; goBackToState = 'preferences'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="content preferences" ng-controller="preferencesEmailController">
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesEmailController as prefEmail">
|
|
||||||
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<form name="emailForm" ng-submit="prefEmail.save(emailForm)" class="columns" novalidate ng-init="prefEmail.email = index.preferences.email">
|
<form name="emailForm" ng-submit="save(emailForm)" class="columns" novalidate ng-init="email = index.preferences.email">
|
||||||
<div class="box-notification" ng-show="prefEmail.error">
|
<div class="box-notification" ng-show="error">
|
||||||
<span class="text-warning size-14">
|
<span class="text-warning size-14">
|
||||||
{{prefEmail.error|translate}}
|
{{error|translate}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label translate>Email for wallet notifications</label>
|
<label translate>Email for wallet notifications</label>
|
||||||
<input type="email" id="email" name="email" ng-model="prefEmail.email" required>
|
<input type="email" id="email" name="email" ng-model="email" required>
|
||||||
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
|
<input type="submit" class="button expand black round" value="{{'Save'|translate}}"
|
||||||
ng-style="{'background-color':index.backgroundColor}" ng-disabled="emailForm.$invalid && !index.preferences.email">
|
ng-style="{'background-color':index.backgroundColor}" ng-disabled="emailForm.$invalid && !index.preferences.email">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
ng-init="titleSection='Global preferences'; closeToHome = true; noColor = true">
|
ng-init="titleSection='Global preferences'; closeToHome = true; noColor = true">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesGlobalController as prefGlobal" ng-init="prefGlobal.init()">
|
<div class="content preferences" ng-controller="preferencesGlobalController" ng-init="init()">
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="$root.go('preferencesLanguage')">
|
<li href ui-sref="preferencesLanguage">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
{{prefGlobal.currentLanguageName|translate}}
|
{{currentLanguageName|translate}}
|
||||||
<i class="icon-arrow-right3 size-24"></i>
|
<i class="icon-arrow-right3 size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
<div translate>Language</div>
|
<div translate>Language</div>
|
||||||
|
|
@ -17,17 +17,17 @@
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="$root.go('preferencesUnit')">
|
<li href ui-sref="preferencesUnit">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
{{prefGlobal.unitName}}
|
{{unitName}}
|
||||||
<i class="icon-arrow-right3 size-24"></i>
|
<i class="icon-arrow-right3 size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
<div translate>Unit</div>
|
<div translate>Unit</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li ng-click="$root.go('preferencesAltCurrency')">
|
<li href ui-sref="preferencesAltCurrency">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
{{prefGlobal.selectedAlternative.name}}
|
{{selectedAlternative.name}}
|
||||||
<i class="icon-arrow-right3 size-24"></i>
|
<i class="icon-arrow-right3 size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
<div translate>Alternative Currency</div>
|
<div translate>Alternative Currency</div>
|
||||||
|
|
@ -36,9 +36,9 @@
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="$root.go('preferencesFee')">
|
<li href ui-sref="preferencesFee">
|
||||||
<div class="right text-gray">
|
<div class="right text-gray">
|
||||||
{{prefGlobal.feeOpts[prefGlobal.currentFeeLevel]|translate}}
|
{{feeOpts[currentFeeLevel]|translate}}
|
||||||
<i class="icon-arrow-right3 size-24"></i>
|
<i class="icon-arrow-right3 size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
<div translate>Bitcoin Network Fee Policy</div>
|
<div translate>Bitcoin Network Fee Policy</div>
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
|
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
|
||||||
</ion-toggle>
|
</ion-toggle>
|
||||||
|
|
||||||
<div ng-show="prefGlobal.usePushNotifications && PNEnabledByUser">
|
<div ng-show="usePushNotifications && PNEnabledByUser">
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<ion-toggle ng-model="pushNotifications" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
|
<ion-toggle ng-model="pushNotifications" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
|
||||||
<span class="toggle-label" translate>Enable push notifications</span>
|
<span class="toggle-label" translate>Enable push notifications</span>
|
||||||
|
|
@ -68,15 +68,15 @@
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-click="$root.go('about')">
|
<li href ui-sref="about">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<div translate>About Copay</div>
|
<div translate>About Copay</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div ng-show="prefGlobal.usePushNotifications && !PNEnabledByUser && isIOSApp">
|
<div ng-show="usePushNotifications && !PNEnabledByUser && isIOSApp">
|
||||||
<div class="text-centered text-gray size-12 m10" translate>Push notifications for Copay are currently disabled. Enable them in the Settings app.</div>
|
<div class="text-centered text-gray size-12 m10" translate>Push notifications for Copay are currently disabled. Enable them in the Settings app.</div>
|
||||||
<ul class="no-bullet m0" ng-click="prefGlobal.openSettings()">
|
<ul class="no-bullet m0" ng-click="openSettings()">
|
||||||
<li ng-style="{'color':index.backgroundColor}" translate>Open Settings app</li>
|
<li ng-style="{'color':index.backgroundColor}" translate>Open Settings app</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,20 @@
|
||||||
ng-include="'views/includes/topbar.html'"
|
ng-include="'views/includes/topbar.html'"
|
||||||
ng-init="titleSection='Transaction History'; goBackToState = 'preferencesAdvanced'">
|
ng-init="titleSection='Transaction History'; goBackToState = 'preferencesAdvanced'">
|
||||||
</div>
|
</div>
|
||||||
<div class="content preferences" ng-controller="preferencesHistory as history">
|
<div class="content preferences" ng-controller="preferencesHistory">
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<ul class="no-bullet m0">
|
|
||||||
<li ng-if="!index.isCordova" ng-init="history.csvHistory()">
|
|
||||||
<a style="color:#444"
|
|
||||||
ng-csv="history.csvContent"
|
|
||||||
csv-header="history.csvHeader"
|
|
||||||
ng-show="history.csvReady"
|
|
||||||
filename="Copay-{{index.alias || index.walletName}}.csv" translate>
|
|
||||||
Export to file
|
|
||||||
</a>
|
|
||||||
<a style="color:#777"
|
|
||||||
ng-show="!history.csvReady"
|
|
||||||
translate>
|
|
||||||
Export to file [preparing...]
|
|
||||||
</a>
|
|
||||||
|
|
||||||
|
<ul class="no-bullet m0">
|
||||||
|
<li ng-if="csvReady && !index.isCordova" ng-init="index.updatingTxHistory ? null : csvHistory()"
|
||||||
|
ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{index.alias || index.walletName}}.csv">
|
||||||
|
<span ng-style="{'color':index.backgroundColor}" translate>
|
||||||
|
Export to file
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li ng-click="history.clearTransactionHistory();" translate>
|
<li ng-if="!csvReady && !index.isCordova">
|
||||||
|
<span translate>Export to file [preparing...]</span>
|
||||||
|
</li>
|
||||||
|
<li ng-click="clearTransactionHistory()" ng-style="{'color':index.backgroundColor}" translate>
|
||||||
Clear cache
|
Clear cache
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
ng-init="titleSection='Wallet Information'; goBackToState = 'preferencesAdvanced'">
|
ng-init="titleSection='Wallet Information'; goBackToState = 'preferencesAdvanced'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content preferences" ng-controller="preferencesInformation as info" ng-init="info.init()">
|
<div class="content preferences" ng-controller="preferencesInformation" ng-init="init()">
|
||||||
<h4 class="title m0" translate>Wallet Information</h4>
|
<h4 class="title m0" translate>Wallet Information</h4>
|
||||||
|
|
||||||
<ul class="no-bullet m0 size-14">
|
<ul class="no-bullet m0 size-14">
|
||||||
|
|
@ -15,8 +15,6 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="line-b p20 oh">
|
<li class="line-b p20 oh">
|
||||||
<span translate>Wallet Name (at creation)</span>
|
<span translate>Wallet Name (at creation)</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
@ -24,7 +22,6 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="line-b p20 oh">
|
<li class="line-b p20 oh">
|
||||||
<span translate>Wallet Id</span>
|
<span translate>Wallet Id</span>
|
||||||
<span class="right text-gray enable_text_select">
|
<span class="right text-gray enable_text_select">
|
||||||
|
|
@ -39,8 +36,6 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="line-b p20 oh">
|
<li class="line-b p20 oh">
|
||||||
<span translate>Wallet Network</span>
|
<span translate>Wallet Network</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
@ -48,7 +43,6 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="line-b p20 oh">
|
<li class="line-b p20 oh">
|
||||||
<span translate>Address Type</span>
|
<span translate>Address Type</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
@ -56,7 +50,6 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="line-b p20 oh">
|
<li class="line-b p20 oh">
|
||||||
<span translate>Derivation Strategy</span>
|
<span translate>Derivation Strategy</span>
|
||||||
<span class="right text-gray">
|
<span class="right text-gray">
|
||||||
|
|
@ -85,8 +78,6 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="title m0" translate>Copayers</h4>
|
<h4 class="title m0" translate>Copayers</h4>
|
||||||
<li ng-repeat="copayer in index.copayers">
|
<li ng-repeat="copayer in index.copayers">
|
||||||
<span class="size-12" ng-show="copayer.id == index.copayerId">
|
<span class="size-12" ng-show="copayer.id == index.copayerId">
|
||||||
|
|
@ -128,10 +119,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="no-bullet m0">
|
<ul class="no-bullet m0">
|
||||||
<li ng-style="{'color':index.backgroundColor}" ng-click="index.retryScan(); $root.go('walletHome')" translate>
|
<li ng-style="{'color':index.backgroundColor}" href ui-sref="walletHome" ng-click="index.retryScan()" translate>
|
||||||
Scan addresses for funds
|
Scan addresses for funds
|
||||||
</li>
|
</li>
|
||||||
<li ng-style="{'color':index.backgroundColor}" ng-show="index.isCordova" ng-click="info.sendAddrs()" translate>
|
<li ng-style="{'color':index.backgroundColor}" ng-show="index.isCordova" ng-click="sendAddrs()" translate>
|
||||||
Send addresses by email
|
Send addresses by email
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -151,8 +142,6 @@
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
|
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
<div class="text-center text-warning m20b">
|
<div class="text-center text-warning m20b">
|
||||||
<i class="fi-alert"></i> <span translate>You do not have a wallet</span>
|
<i class="fi-alert"></i> <span translate>You do not have a wallet</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="button black round expand" ng-click="$root.go('add')" translate>Create</button>
|
<button class="button black round expand" href ui-sref="add" translate>Create</button>
|
||||||
|
|
||||||
<div class="text-center text-gray p20v" ng-click="$root.go('preferencesGlobal')">
|
<div class="text-center text-gray p20v" href ui-sref="preferencesGlobal">
|
||||||
<button class=" outline round dark-gray tiny" translate>Settings</button>
|
<button class=" outline round dark-gray tiny" translate>Settings</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -269,8 +269,7 @@
|
||||||
<p class="text-gray m20b columns" translate>
|
<p class="text-gray m20b columns" translate>
|
||||||
Before receiving funds, it is necessary backup your wallet. If you lose this device, it is impossible to access your funds without a backup.
|
Before receiving funds, it is necessary backup your wallet. If you lose this device, it is impossible to access your funds without a backup.
|
||||||
</p>
|
</p>
|
||||||
<button class="m20t button black expand round"
|
<button class="m20t button black expand round" href ui-sref="backup" ng-style="{'background-color':index.backgroundColor}" >
|
||||||
ng-click="$root.go('backup')" ng-style="{'background-color':index.backgroundColor}" >
|
|
||||||
<span translate>Backup now</span>
|
<span translate>Backup now</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('backupController',
|
angular.module('copayApp.controllers').controller('backupController',
|
||||||
function($rootScope, $scope, $timeout, $log, lodash, profileService, gettext, bwcService, bwsError, walletService, ongoingProcess) {
|
function($rootScope, $scope, $timeout, $log, go, lodash, profileService, gettext, bwcService, bwsError, walletService, ongoingProcess) {
|
||||||
|
|
||||||
var self = this;
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
self.customWords = [];
|
$scope.customWords = [];
|
||||||
self.walletName = fc.credentials.walletName;
|
$scope.walletName = fc.credentials.walletName;
|
||||||
|
|
||||||
var handleEncryptedWallet = function(client, cb) {
|
var handleEncryptedWallet = function(client, cb) {
|
||||||
if (!walletService.isEncrypted(client)) return cb();
|
if (!walletService.isEncrypted(client)) return cb();
|
||||||
|
|
@ -17,24 +16,22 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (fc.isPrivKeyEncrypted() && !isDeletedSeed()) {
|
if (fc.isPrivKeyEncrypted() && !isDeletedSeed()) {
|
||||||
self.credentialsEncrypted = true;
|
$scope.credentialsEncrypted = true;
|
||||||
passwordRequest();
|
passwordRequest();
|
||||||
} else {
|
} else {
|
||||||
if (!isDeletedSeed())
|
if (!isDeletedSeed())
|
||||||
initWords();
|
initWords();
|
||||||
}
|
}
|
||||||
|
|
||||||
init();
|
$scope.init = function() {
|
||||||
|
|
||||||
function init() {
|
|
||||||
$scope.passphrase = '';
|
$scope.passphrase = '';
|
||||||
self.shuffledMnemonicWords = shuffledWords(self.mnemonicWords);
|
$scope.shuffledMnemonicWords = shuffledWords($scope.mnemonicWords);
|
||||||
self.customWords = [];
|
$scope.customWords = [];
|
||||||
self.step = 1;
|
$scope.step = 1;
|
||||||
self.deleted = isDeletedSeed();
|
$scope.deleted = isDeletedSeed();
|
||||||
self.credentialsEncrypted = false;
|
$scope.credentialsEncrypted = false;
|
||||||
self.selectComplete = false;
|
$scope.selectComplete = false;
|
||||||
self.backupError = false;
|
$scope.backupError = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
function isDeletedSeed() {
|
function isDeletedSeed() {
|
||||||
|
|
@ -43,16 +40,23 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
self.goToStep = function(n) {
|
$scope.backTo = function(state) {
|
||||||
|
if (state == 'walletHome')
|
||||||
|
go.walletHome();
|
||||||
|
else
|
||||||
|
go.preferences();
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.goToStep = function(n) {
|
||||||
if (n == 1)
|
if (n == 1)
|
||||||
init();
|
$scope.init();
|
||||||
if (n == 2)
|
if (n == 2)
|
||||||
self.step = 2;
|
$scope.step = 2;
|
||||||
if (n == 3) {
|
if (n == 3) {
|
||||||
if (!self.mnemonicHasPassphrase)
|
if (!$scope.mnemonicHasPassphrase)
|
||||||
finalStep();
|
finalStep();
|
||||||
else
|
else
|
||||||
self.step = 3;
|
$scope.step = 3;
|
||||||
}
|
}
|
||||||
if (n == 4)
|
if (n == 4)
|
||||||
finalStep();
|
finalStep();
|
||||||
|
|
@ -65,7 +69,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
backupError(err);
|
backupError(err);
|
||||||
}
|
}
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
self.step = 4;
|
$scope.step = 4;
|
||||||
return;
|
return;
|
||||||
}, 1);
|
}, 1);
|
||||||
});
|
});
|
||||||
|
|
@ -74,12 +78,12 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
|
|
||||||
function initWords() {
|
function initWords() {
|
||||||
var words = fc.getMnemonic();
|
var words = fc.getMnemonic();
|
||||||
self.xPrivKey = fc.credentials.xPrivKey;
|
$scope.xPrivKey = fc.credentials.xPrivKey;
|
||||||
walletService.lock(fc);
|
walletService.lock(fc);
|
||||||
self.mnemonicWords = words.split(/[\u3000\s]+/);
|
$scope.mnemonicWords = words.split(/[\u3000\s]+/);
|
||||||
self.shuffledMnemonicWords = shuffledWords(self.mnemonicWords);
|
$scope.shuffledMnemonicWords = shuffledWords($scope.mnemonicWords);
|
||||||
self.mnemonicHasPassphrase = fc.mnemonicHasPassphrase();
|
$scope.mnemonicHasPassphrase = fc.mnemonicHasPassphrase();
|
||||||
self.useIdeograms = words.indexOf("\u3000") >= 0;
|
$scope.useIdeograms = words.indexOf("\u3000") >= 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
function shuffledWords(words) {
|
function shuffledWords(words) {
|
||||||
|
|
@ -93,10 +97,10 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.toggle = function() {
|
$scope.toggle = function() {
|
||||||
self.error = "";
|
$scope.error = "";
|
||||||
|
|
||||||
if (self.credentialsEncrypted)
|
if ($scope.credentialsEncrypted)
|
||||||
passwordRequest();
|
passwordRequest();
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
@ -116,12 +120,12 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
|
|
||||||
handleEncryptedWallet(fc, function(err) {
|
handleEncryptedWallet(fc, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = bwsError.msg(err, gettext('Could not decrypt'));
|
$scope.error = bwsError.msg(err, gettext('Could not decrypt'));
|
||||||
$log.warn('Error decrypting credentials:', self.error); //TODO
|
$log.warn('Error decrypting credentials:', $scope.error); //TODO
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.credentialsEncrypted = false;
|
$scope.credentialsEncrypted = false;
|
||||||
initWords();
|
initWords();
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
@ -137,37 +141,38 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
word: item.word,
|
word: item.word,
|
||||||
prevIndex: index
|
prevIndex: index
|
||||||
};
|
};
|
||||||
self.customWords.push(newWord);
|
$scope.customWords.push(newWord);
|
||||||
self.shuffledMnemonicWords[index].selected = true;
|
$scope.shuffledMnemonicWords[index].selected = true;
|
||||||
self.shouldContinue();
|
$scope.shouldContinue();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.removeButton = function(index, item) {
|
$scope.removeButton = function(index, item) {
|
||||||
self.customWords.splice(index, 1);
|
if ($scope.loading) return;
|
||||||
self.shuffledMnemonicWords[item.prevIndex].selected = false;
|
$scope.customWords.splice(index, 1);
|
||||||
self.shouldContinue();
|
$scope.shuffledMnemonicWords[item.prevIndex].selected = false;
|
||||||
|
$scope.shouldContinue();
|
||||||
};
|
};
|
||||||
|
|
||||||
self.shouldContinue = function() {
|
$scope.shouldContinue = function() {
|
||||||
if (self.customWords.length == 12)
|
if ($scope.customWords.length == 12)
|
||||||
self.selectComplete = true;
|
$scope.selectComplete = true;
|
||||||
else
|
else
|
||||||
self.selectComplete = false;
|
$scope.selectComplete = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
function confirm(cb) {
|
function confirm(cb) {
|
||||||
self.backupError = false;
|
$scope.backupError = false;
|
||||||
|
|
||||||
var customWordList = lodash.pluck(self.customWords, 'word');
|
var customWordList = lodash.pluck($scope.customWords, 'word');
|
||||||
|
|
||||||
if (!lodash.isEqual(self.mnemonicWords, customWordList)) {
|
if (!lodash.isEqual($scope.mnemonicWords, customWordList)) {
|
||||||
return cb('Mnemonic string mismatch');
|
return cb('Mnemonic string mismatch');
|
||||||
}
|
}
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
if (self.mnemonicHasPassphrase) {
|
if ($scope.mnemonicHasPassphrase) {
|
||||||
var walletClient = bwcService.getClient();
|
var walletClient = bwcService.getClient();
|
||||||
var separator = self.useIdeograms ? '\u3000' : ' ';
|
var separator = $scope.useIdeograms ? '\u3000' : ' ';
|
||||||
var customSentence = customWordList.join(separator);
|
var customSentence = customWordList.join(separator);
|
||||||
var passphrase = $scope.passphrase || '';
|
var passphrase = $scope.passphrase || '';
|
||||||
|
|
||||||
|
|
@ -181,7 +186,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
return cb(err);
|
return cb(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (walletClient.credentials.xPrivKey != self.xPrivKey) {
|
if (walletClient.credentials.xPrivKey != $scope.xPrivKey) {
|
||||||
return cb('Private key mismatch');
|
return cb('Private key mismatch');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -194,7 +199,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
function backupError(err) {
|
function backupError(err) {
|
||||||
ongoingProcess.set('validatingWords', false);
|
ongoingProcess.set('validatingWords', false);
|
||||||
$log.debug('Failed to verify backup: ', err);
|
$log.debug('Failed to verify backup: ', err);
|
||||||
self.backupError = true;
|
$scope.backupError = true;
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,19 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('exportController',
|
angular.module('copayApp.controllers').controller('exportController',
|
||||||
function($rootScope, $scope, $timeout, $log, backupService, storageService, profileService, platformInfo, notification, go, gettext, gettextCatalog) {
|
function($rootScope, $scope, $timeout, $log, backupService, storageService, profileService, platformInfo, notification, go, gettext, gettextCatalog) {
|
||||||
var self = this;
|
|
||||||
var isWP = platformInfo.isWP;
|
var isWP = platformInfo.isWP;
|
||||||
var isAndroid = platformInfo.isAndroid;
|
var isAndroid = platformInfo.isAndroid;
|
||||||
|
|
||||||
self.error = null;
|
$scope.error = null;
|
||||||
self.success = null;
|
$scope.success = null;
|
||||||
$scope.metaDataEnabled = true;
|
$scope.metaDataEnabled = true;
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
self.isEncrypted = fc.isPrivKeyEncrypted();
|
$scope.isEncrypted = fc.isPrivKeyEncrypted();
|
||||||
|
|
||||||
self.downloadWalletBackup = function() {
|
$scope.downloadWalletBackup = function() {
|
||||||
self.getMetaData($scope.metaDataEnabled, function(err, txsFromLocal, localAddressBook) {
|
$scope.getMetaData($scope.metaDataEnabled, function(err, txsFromLocal, localAddressBook) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = true;
|
$scope.error = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var opts = {
|
var opts = {
|
||||||
|
|
@ -24,9 +23,9 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
addressBook: localAddressBook
|
addressBook: localAddressBook
|
||||||
};
|
};
|
||||||
|
|
||||||
backupService.walletDownload(self.password, opts, function(err) {
|
backupService.walletDownload($scope.password, opts, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = true;
|
$scope.error = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$rootScope.$emit('Local/BackupDone');
|
$rootScope.$emit('Local/BackupDone');
|
||||||
|
|
@ -36,12 +35,12 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getMetaData = function(metaData, cb) {
|
$scope.getMetaData = function(metaData, cb) {
|
||||||
if (metaData == false) return cb();
|
if (metaData == false) return cb();
|
||||||
self.getHistoryCache(function(err, txsFromLocal) {
|
$scope.getHistoryCache(function(err, txsFromLocal) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
self.getAddressbook(function(err, localAddressBook) {
|
$scope.getAddressbook(function(err, localAddressBook) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
return cb(null, txsFromLocal, localAddressBook)
|
return cb(null, txsFromLocal, localAddressBook)
|
||||||
|
|
@ -49,7 +48,7 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getHistoryCache = function(cb) {
|
$scope.getHistoryCache = function(cb) {
|
||||||
storageService.getTxHistory(fc.credentials.walletId, function(err, txs) {
|
storageService.getTxHistory(fc.credentials.walletId, function(err, txs) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
|
|
@ -66,7 +65,7 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getAddressbook = function(cb) {
|
$scope.getAddressbook = function(cb) {
|
||||||
storageService.getAddressbook(fc.credentials.network, function(err, addressBook) {
|
storageService.getAddressbook(fc.credentials.network, function(err, addressBook) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
|
|
@ -81,10 +80,10 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.getBackup = function(cb) {
|
$scope.getBackup = function(cb) {
|
||||||
self.getMetaData($scope.metaDataEnabled, function(err, txsFromLocal, localAddressBook) {
|
$scope.getMetaData($scope.metaDataEnabled, function(err, txsFromLocal, localAddressBook) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = true;
|
$scope.error = true;
|
||||||
return cb(null);
|
return cb(null);
|
||||||
}
|
}
|
||||||
var opts = {
|
var opts = {
|
||||||
|
|
@ -93,30 +92,29 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
addressBook: localAddressBook
|
addressBook: localAddressBook
|
||||||
};
|
};
|
||||||
|
|
||||||
var ew = backupService.walletExport(self.password, opts);
|
var ew = backupService.walletExport($scope.password, opts);
|
||||||
if (!ew) {
|
if (!ew) {
|
||||||
self.error = true;
|
$scope.error = true;
|
||||||
} else {
|
} else {
|
||||||
self.error = false;
|
$scope.error = false;
|
||||||
$rootScope.$emit('Local/BackupDone');
|
$rootScope.$emit('Local/BackupDone');
|
||||||
}
|
}
|
||||||
return cb(ew);
|
return cb(ew);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.viewWalletBackup = function() {
|
$scope.viewWalletBackup = function() {
|
||||||
var self = this;
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
self.getBackup(function(backup) {
|
$scope.getBackup(function(backup) {
|
||||||
var ew = backup;
|
var ew = backup;
|
||||||
if (!ew) return;
|
if (!ew) return;
|
||||||
self.backupWalletPlainText = ew;
|
$scope.backupWalletPlainText = ew;
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.copyWalletBackup = function() {
|
$scope.copyWalletBackup = function() {
|
||||||
self.getBackup(function(backup) {
|
$scope.getBackup(function(backup) {
|
||||||
var ew = backup;
|
var ew = backup;
|
||||||
if (!ew) return;
|
if (!ew) return;
|
||||||
window.cordova.plugins.clipboard.copy(ew);
|
window.cordova.plugins.clipboard.copy(ew);
|
||||||
|
|
@ -124,14 +122,14 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.sendWalletBackup = function() {
|
$scope.sendWalletBackup = function() {
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
window.plugins.toast.showShortCenter(gettextCatalog.getString('Preparing backup...'));
|
window.plugins.toast.showShortCenter(gettextCatalog.getString('Preparing backup...'));
|
||||||
var name = (fc.credentials.walletName || fc.credentials.walletId);
|
var name = (fc.credentials.walletName || fc.credentials.walletId);
|
||||||
if (fc.alias) {
|
if (fc.alias) {
|
||||||
name = fc.alias + ' [' + name + ']';
|
name = fc.alias + ' [' + name + ']';
|
||||||
}
|
}
|
||||||
self.getBackup(function(backup) {
|
$scope.getBackup(function(backup) {
|
||||||
var ew = backup;
|
var ew = backup;
|
||||||
if (!ew) return;
|
if (!ew) return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,28 +3,27 @@
|
||||||
angular.module('copayApp.controllers').controller('preferencesController',
|
angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
function($scope, $rootScope, $timeout, $log, configService, profileService, fingerprintService, walletService) {
|
function($scope, $rootScope, $timeout, $log, configService, profileService, fingerprintService, walletService) {
|
||||||
|
|
||||||
var self = this;
|
|
||||||
var fc;
|
var fc;
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
||||||
var disableFocusListener = $rootScope.$on('Local/NewFocusedWalletReady', function() {
|
var disableFocusListener = $rootScope.$on('Local/NewFocusedWalletReady', function() {
|
||||||
self.init();
|
$scope.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('$destroy', function() {
|
$scope.$on('$destroy', function() {
|
||||||
disableFocusListener();
|
disableFocusListener();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.init = function() {
|
$scope.init = function() {
|
||||||
fc = profileService.focusedClient;
|
fc = profileService.focusedClient;
|
||||||
if (fc) {
|
if (fc) {
|
||||||
$scope.encryptEnabled = walletService.isEncrypted(fc);
|
$scope.encryptEnabled = walletService.isEncrypted(fc);
|
||||||
this.externalSource = fc.getPrivKeyExternalSourceName() == 'ledger' ? "Ledger" : null;
|
$scope.externalSource = fc.getPrivKeyExternalSourceName() == 'ledger' ? "Ledger" : null;
|
||||||
// TODO externalAccount
|
// TODO externalAccount
|
||||||
//this.externalIndex = fc.getExternalIndex();
|
//this.externalIndex = fc.getExternalIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.touchidAvailable = fingerprintService.isAvailable();
|
$scope.touchidAvailable = fingerprintService.isAvailable();
|
||||||
$scope.touchidEnabled = config.touchIdFor ? config.touchIdFor[fc.credentials.walletId] : null;
|
$scope.touchidEnabled = config.touchIdFor ? config.touchIdFor[fc.credentials.walletId] : null;
|
||||||
|
|
||||||
$scope.deleted = false;
|
$scope.deleted = false;
|
||||||
|
|
@ -41,7 +40,6 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.encryptChange = function() {
|
$scope.encryptChange = function() {
|
||||||
var self = this;
|
|
||||||
if (!fc) return;
|
if (!fc) return;
|
||||||
var val = $scope.encryptEnabled;
|
var val = $scope.encryptEnabled;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesAdvancedController',
|
|
||||||
function($scope) {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
@ -2,20 +2,18 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesAliasController',
|
angular.module('copayApp.controllers').controller('preferencesAliasController',
|
||||||
function($scope, $timeout, configService, profileService, go) {
|
function($scope, $timeout, configService, profileService, go) {
|
||||||
var config = configService.getSync();
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var walletId = fc.credentials.walletId;
|
var walletId = fc.credentials.walletId;
|
||||||
|
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
config.aliasFor = config.aliasFor || {};
|
|
||||||
this.alias = config.aliasFor[walletId] || fc.credentials.walletName;
|
|
||||||
|
|
||||||
this.save = function() {
|
config.aliasFor = config.aliasFor || {};
|
||||||
var self = this;
|
$scope.alias = config.aliasFor[walletId] || fc.credentials.walletName;
|
||||||
|
|
||||||
|
$scope.save = function() {
|
||||||
var opts = {
|
var opts = {
|
||||||
aliasFor: {}
|
aliasFor: {}
|
||||||
};
|
};
|
||||||
opts.aliasFor[walletId] = self.alias;
|
opts.aliasFor[walletId] = $scope.alias;
|
||||||
|
|
||||||
configService.set(opts, function(err) {
|
configService.set(opts, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -27,6 +25,5 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
|
||||||
go.path('preferences');
|
go.path('preferences');
|
||||||
}, 50);
|
}, 50);
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
||||||
function($scope, $log, configService, go, applicationService, profileService, storageService) {
|
function($scope, $log, configService, applicationService, profileService, storageService) {
|
||||||
this.error = null;
|
$scope.error = null;
|
||||||
this.success = null;
|
$scope.success = null;
|
||||||
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var walletId = fc.credentials.walletId;
|
var walletId = fc.credentials.walletId;
|
||||||
var defaults = configService.getDefaults();
|
var defaults = configService.getDefaults();
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
||||||
this.bwsurl = (config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url;
|
$scope.bwsurl = (config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url;
|
||||||
|
|
||||||
this.resetDefaultUrl = function() {
|
$scope.resetDefaultUrl = function() {
|
||||||
this.bwsurl = defaults.bws.url;
|
$scope.bwsurl = defaults.bws.url;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.save = function() {
|
$scope.save = function() {
|
||||||
|
|
||||||
var bws;
|
var bws;
|
||||||
switch (this.bwsurl) {
|
switch ($scope.bwsurl) {
|
||||||
case 'prod':
|
case 'prod':
|
||||||
case 'production':
|
case 'production':
|
||||||
bws = 'https://bws.bitpay.com/bws/api'
|
bws = 'https://bws.bitpay.com/bws/api'
|
||||||
|
|
@ -35,16 +35,16 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
||||||
};
|
};
|
||||||
if (bws) {
|
if (bws) {
|
||||||
$log.info('Using BWS URL Alias to ' + bws);
|
$log.info('Using BWS URL Alias to ' + bws);
|
||||||
this.bwsurl = bws;
|
$scope.bwsurl = bws;
|
||||||
}
|
}
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
bwsFor: {}
|
bwsFor: {}
|
||||||
};
|
};
|
||||||
opts.bwsFor[walletId] = this.bwsurl;
|
opts.bwsFor[walletId] = $scope.bwsurl;
|
||||||
|
|
||||||
configService.set(opts, function(err) {
|
configService.set(opts, function(err) {
|
||||||
if (err) console.log(err);
|
if (err) $log.debug(err);
|
||||||
storageService.setCleanAndScanAddresses(walletId, function() {
|
storageService.setCleanAndScanAddresses(walletId, function() {
|
||||||
applicationService.restart();
|
applicationService.restart();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
|
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
|
||||||
function($scope, $rootScope, $filter, $timeout, $modal, $log, $ionicModal, storageService, notification, profileService, platformInfo, go, gettext, gettextCatalog, applicationService, ongoingProcess) {
|
function($scope, $rootScope, $filter, $timeout, $modal, $log, $ionicModal, storageService, notification, profileService, platformInfo, go, gettext, gettextCatalog, applicationService, ongoingProcess) {
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
this.isCordova = isCordova;
|
$scope.isCordova = isCordova;
|
||||||
this.error = null;
|
$scope.error = null;
|
||||||
|
|
||||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||||
var accept_msg = gettextCatalog.getString('Accept');
|
var accept_msg = gettextCatalog.getString('Accept');
|
||||||
|
|
@ -20,8 +20,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|
||||||
$ionicModal.fromTemplateUrl('views/modals/confirmation.html', {
|
$ionicModal.fromTemplateUrl('views/modals/confirmation.html', {
|
||||||
scope: $scope,
|
scope: $scope
|
||||||
animation: 'slide-in-up'
|
|
||||||
}).then(function(modal) {
|
}).then(function(modal) {
|
||||||
$scope.confirmationModal = modal;
|
$scope.confirmationModal = modal;
|
||||||
$scope.confirmationModal.show();
|
$scope.confirmationModal.show();
|
||||||
|
|
@ -33,12 +32,11 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var name = fc.credentials.walletName;
|
var name = fc.credentials.walletName;
|
||||||
var walletName = (fc.alias || '') + ' [' + name + ']';
|
var walletName = (fc.alias || '') + ' [' + name + ']';
|
||||||
var self = this;
|
|
||||||
|
|
||||||
profileService.deleteWalletClient(fc, function(err) {
|
profileService.deleteWalletClient(fc, function(err) {
|
||||||
ongoingProcess.set('deletingWallet', false);
|
ongoingProcess.set('deletingWallet', false);
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = err.message || err;
|
$scope.error = err.message || err;
|
||||||
} else {
|
} else {
|
||||||
notification.success(gettextCatalog.getString('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', {
|
notification.success(gettextCatalog.getString('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', {
|
||||||
walletName: walletName
|
walletName: walletName
|
||||||
|
|
@ -48,7 +46,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.deleteWallet = function() {
|
$scope.deleteWallet = function() {
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
navigator.notification.confirm(
|
navigator.notification.confirm(
|
||||||
delete_msg,
|
delete_msg,
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function(confirmDialog, lodash, notification, profileService, go, gettext) {
|
angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, confirmDialog, lodash, notification, profileService, go, gettext) {
|
||||||
var self = this;
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var msg = gettext('Are you sure you want to delete the recovery phrase?');
|
var msg = gettext('Are you sure you want to delete the recovery phrase?');
|
||||||
var successMsg = gettext('Recovery phrase deleted');
|
var successMsg = gettext('Recovery phrase deleted');
|
||||||
|
|
||||||
if (lodash.isEmpty(fc.credentials.mnemonic) && lodash.isEmpty(fc.credentials.mnemonicEncrypted))
|
if (lodash.isEmpty(fc.credentials.mnemonic) && lodash.isEmpty(fc.credentials.mnemonicEncrypted))
|
||||||
self.deleted = true;
|
$scope.deleted = true;
|
||||||
|
|
||||||
self.delete = function() {
|
$scope.delete = function() {
|
||||||
confirmDialog.show(msg, function(ok) {
|
confirmDialog.show(msg, function(ok) {
|
||||||
if (ok) {
|
if (ok) {
|
||||||
fc.clearMnemonic();
|
fc.clearMnemonic();
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,18 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesEmailController',
|
angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, go, profileService, walletService) {
|
||||||
function($rootScope, go, profileService, gettext, $log, walletService) {
|
$scope.save = function(form) {
|
||||||
this.save = function(form) {
|
$scope.error = null;
|
||||||
var self = this;
|
$scope.saving = true;
|
||||||
this.error = null;
|
|
||||||
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var email = self.email || '';
|
var email = $scope.email || '';
|
||||||
|
|
||||||
walletService.updateRemotePreferences(fc, {
|
walletService.updateRemotePreferences(fc, {
|
||||||
email: email,
|
email: email,
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
|
$scope.saving = false;
|
||||||
if (!err)
|
if (!err)
|
||||||
$rootScope.$emit('Local/EmailUpdated', email);
|
$rootScope.$emit('Local/EmailUpdated', email);
|
||||||
|
|
||||||
go.path('preferences');
|
go.path('preferences');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,18 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
||||||
function($scope, $rootScope, $log, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
|
function($scope, $rootScope, $log, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
|
||||||
|
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
this.init = function() {
|
|
||||||
|
$scope.init = function() {
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
this.unitName = config.wallet.settings.unitName;
|
$scope.unitName = config.wallet.settings.unitName;
|
||||||
this.currentLanguageName = uxLanguage.getCurrentLanguageName();
|
$scope.currentLanguageName = uxLanguage.getCurrentLanguageName();
|
||||||
this.selectedAlternative = {
|
$scope.selectedAlternative = {
|
||||||
name: config.wallet.settings.alternativeName,
|
name: config.wallet.settings.alternativeName,
|
||||||
isoCode: config.wallet.settings.alternativeIsoCode
|
isoCode: config.wallet.settings.alternativeIsoCode
|
||||||
};
|
};
|
||||||
this.feeOpts = feeService.feeOpts;
|
$scope.feeOpts = feeService.feeOpts;
|
||||||
this.currentFeeLevel = feeService.getCurrentFeeLevel();
|
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
|
||||||
this.usePushNotifications = isCordova && !platformInfo.isWP;
|
$scope.usePushNotifications = isCordova && !platformInfo.isWP;
|
||||||
$scope.PNEnabledByUser = true;
|
$scope.PNEnabledByUser = true;
|
||||||
$scope.isIOSApp = platformInfo.isIOS && isCordova;
|
$scope.isIOSApp = platformInfo.isIOS && isCordova;
|
||||||
if ($scope.isIOSApp) {
|
if ($scope.isIOSApp) {
|
||||||
|
|
@ -28,7 +29,7 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
|
||||||
$scope.pushNotifications = config.pushNotifications.enabled;
|
$scope.pushNotifications = config.pushNotifications.enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.openSettings = function() {
|
$scope.openSettings = function() {
|
||||||
cordova.plugins.diagnostic.switchToSettings(function() {
|
cordova.plugins.diagnostic.switchToSettings(function() {
|
||||||
$log.debug('switched to settings');
|
$log.debug('switched to settings');
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
|
|
|
||||||
|
|
@ -4,26 +4,11 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
function($scope, $log, $timeout, storageService, go, profileService, lodash) {
|
function($scope, $log, $timeout, storageService, go, profileService, lodash) {
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var c = fc.credentials;
|
var c = fc.credentials;
|
||||||
this.csvReady = false;
|
$scope.csvReady = false;
|
||||||
|
|
||||||
|
$scope.csvHistory = function(cb) {
|
||||||
|
var allTxs = [];
|
||||||
|
|
||||||
this.csvHistory = function(cb) {
|
|
||||||
|
|
||||||
function formatDate(date) {
|
|
||||||
var dateObj = new Date(date);
|
|
||||||
if (!dateObj) {
|
|
||||||
$log.debug('Error formating a date');
|
|
||||||
return 'DateError'
|
|
||||||
}
|
|
||||||
if (!dateObj.toJSON()) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return dateObj.toJSON();
|
|
||||||
}
|
|
||||||
|
|
||||||
var step = 6;
|
|
||||||
var unique = {};
|
|
||||||
function getHistory(cb) {
|
function getHistory(cb) {
|
||||||
storageService.getTxHistory(c.walletId, function(err, txs) {
|
storageService.getTxHistory(c.walletId, function(err, txs) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
@ -38,16 +23,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
allTxs.push(txsFromLocal);
|
allTxs.push(txsFromLocal);
|
||||||
return cb(null, lodash.flatten(allTxs));
|
return cb(null, lodash.flatten(allTxs));
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
var fc = profileService.focusedClient;
|
|
||||||
var c = fc.credentials;
|
|
||||||
|
|
||||||
if (!fc.isComplete())
|
|
||||||
return;
|
|
||||||
|
|
||||||
var self = this;
|
|
||||||
var allTxs = [];
|
|
||||||
|
|
||||||
$log.debug('Generating CSV from History');
|
$log.debug('Generating CSV from History');
|
||||||
getHistory(function(err, txs) {
|
getHistory(function(err, txs) {
|
||||||
|
|
@ -59,12 +35,12 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
|
|
||||||
$log.debug('Wallet Transaction History Length:', txs.length);
|
$log.debug('Wallet Transaction History Length:', txs.length);
|
||||||
|
|
||||||
self.satToUnit = 1 / self.unitToSatoshi;
|
$scope.satToUnit = 1 / $scope.unitToSatoshi;
|
||||||
var data = txs;
|
var data = txs;
|
||||||
var satToBtc = 1 / 100000000;
|
var satToBtc = 1 / 100000000;
|
||||||
self.csvContent = [];
|
$scope.csvContent = [];
|
||||||
self.csvFilename = 'Copay-' + (self.alias || self.walletName) + '.csv';
|
$scope.csvFilename = 'Copay-' + ($scope.alias || $scope.walletName) + '.csv';
|
||||||
self.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers', 'Comment'];
|
$scope.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers', 'Comment'];
|
||||||
|
|
||||||
var _amount, _note, _copayers, _creator, _comment;
|
var _amount, _note, _copayers, _creator, _comment;
|
||||||
data.forEach(function(it, index) {
|
data.forEach(function(it, index) {
|
||||||
|
|
@ -89,7 +65,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
if (it.action == 'moved')
|
if (it.action == 'moved')
|
||||||
_note += ' Moved:' + (it.amount * satToBtc).toFixed(8)
|
_note += ' Moved:' + (it.amount * satToBtc).toFixed(8)
|
||||||
|
|
||||||
self.csvContent.push({
|
$scope.csvContent.push({
|
||||||
'Date': formatDate(it.time * 1000),
|
'Date': formatDate(it.time * 1000),
|
||||||
'Destination': it.addressTo || '',
|
'Destination': it.addressTo || '',
|
||||||
'Description': _note,
|
'Description': _note,
|
||||||
|
|
@ -103,7 +79,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
|
|
||||||
if (it.fees && (it.action == 'moved' || it.action == 'sent')) {
|
if (it.fees && (it.action == 'moved' || it.action == 'sent')) {
|
||||||
var _fee = (it.fees * satToBtc).toFixed(8)
|
var _fee = (it.fees * satToBtc).toFixed(8)
|
||||||
self.csvContent.push({
|
$scope.csvContent.push({
|
||||||
'Date': formatDate(it.time * 1000),
|
'Date': formatDate(it.time * 1000),
|
||||||
'Destination': 'Bitcoin Network Fees',
|
'Destination': 'Bitcoin Network Fees',
|
||||||
'Description': '',
|
'Description': '',
|
||||||
|
|
@ -116,16 +92,31 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.csvReady = true;
|
$scope.csvReady = true;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
if (cb)
|
if (cb)
|
||||||
return cb();
|
return cb();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function formatDate(date) {
|
||||||
|
var dateObj = new Date(date);
|
||||||
|
if (!dateObj) {
|
||||||
|
$log.debug('Error formating a date');
|
||||||
|
return 'DateError'
|
||||||
|
}
|
||||||
|
if (!dateObj.toJSON()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return dateObj.toJSON();
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.clearTransactionHistory = function() {
|
||||||
this.clearTransactionHistory = function() {
|
|
||||||
storageService.removeTxHistory(c.walletId, function(err) {
|
storageService.removeTxHistory(c.walletId, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.error(err);
|
$log.error(err);
|
||||||
|
|
@ -137,5 +128,5 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
||||||
go.walletHome();
|
go.walletHome();
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var c = fc.credentials;
|
var c = fc.credentials;
|
||||||
|
|
||||||
this.init = function() {
|
$scope.init = function() {
|
||||||
var basePath = c.getBaseAddressDerivationPath();
|
var basePath = c.getBaseAddressDerivationPath();
|
||||||
|
|
||||||
$scope.walletName = c.walletName;
|
$scope.walletName = c.walletName;
|
||||||
|
|
@ -43,11 +43,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.sendAddrs = function() {
|
$scope.sendAddrs = function() {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
self.loading = true;
|
|
||||||
|
|
||||||
function formatDate(ts) {
|
function formatDate(ts) {
|
||||||
var dateObj = new Date(ts * 1000);
|
var dateObj = new Date(ts * 1000);
|
||||||
if (!dateObj) {
|
if (!dateObj) {
|
||||||
|
|
@ -64,7 +60,6 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
fc.getMainAddresses({
|
fc.getMainAddresses({
|
||||||
doNotVerify: true
|
doNotVerify: true
|
||||||
}, function(err, addrs) {
|
}, function(err, addrs) {
|
||||||
self.loading = false;
|
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.warn(err);
|
$log.warn(err);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@ describe('Backup Controller', function() {
|
||||||
it('should be defined', function() {
|
it('should be defined', function() {
|
||||||
should.exist(ctrl);
|
should.exist(ctrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set the mnemonic incomplete wallets', function(done) {
|
it('should set the mnemonic incomplete wallets', function(done) {
|
||||||
should.exist(ctrl);
|
should.exist(scope.mnemonicWords);
|
||||||
ctrl.mnemonicWords.should.deep.equal('dizzy cycle skirt decrease exotic fork sure mixture hair vapor copper hero'.split(' '));
|
scope.mnemonicWords.should.deep.equal('dizzy cycle skirt decrease exotic fork sure mixture hair vapor copper hero'.split(' '));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -35,11 +36,11 @@ describe('Backup Controller', function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not set the mnemonic for complete wallets', function() {
|
it('should not set the mnemonic for complete wallets', function() {
|
||||||
ctrl.mnemonicWords.should.deep.equal('cheese where alarm job conduct donkey license pave congress pepper fence current'.split(' '));
|
scope.mnemonicWords.should.deep.equal('cheese where alarm job conduct donkey license pave congress pepper fence current'.split(' '));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set main wallet info', function(done) {
|
it('should set main wallet info', function(done) {
|
||||||
ctrl.walletName.should.equal('kk');
|
scope.walletName.should.equal('kk');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,17 @@ describe('Preferences History Controller', function() {
|
||||||
mocks.clear({}, done);
|
mocks.clear({}, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should be defined', function() {
|
||||||
|
should.exist(ctrl);
|
||||||
|
});
|
||||||
|
|
||||||
it('should export csv', function(done) {
|
it('should export csv', function(done) {
|
||||||
ctrl.csvHistory(function(err) {
|
scope.csvHistory(function(err) {
|
||||||
should.not.exist(err);
|
should.not.exist(err);
|
||||||
ctrl.csvReady.should.equal(true);
|
should.exist(scope.csvReady);
|
||||||
JSON.stringify(ctrl.csvContent).should.equal('[{"Date":"2016-06-03T15:54:51.000Z","Destination":"","Description":"","Amount":"0.00120000","Currency":"BTC","Txid":"bf31ecaa8e10ce57f9a889fc4c893b40ff57b016dd763957d942e21ed55fc62c","Creator":"","Copayers":"","Comment":"just a comment"}]');
|
scope.csvReady.should.equal(true);
|
||||||
|
should.exist(scope.csvContent);
|
||||||
|
JSON.stringify(scope.csvContent).should.equal('[{"Date":"2016-06-03T15:54:51.000Z","Destination":"","Description":"","Amount":"0.00120000","Currency":"BTC","Txid":"bf31ecaa8e10ce57f9a889fc4c893b40ff57b016dd763957d942e21ed55fc62c","Creator":"","Copayers":"","Comment":"just a comment"}]');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue