copay/public/views/create.html

188 lines
8.1 KiB
HTML

<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Create new wallet'; goBackToState = 'add'; noColor = true">
</div>
<div class="content p20v" ng-controller="createController as create" ng-init="create.setTotalCopayers(1)">
<div class="onGoingProcess" ng-show="create.loading && !create.hwWallet">
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate>Creating Wallet...</span>
</div>
</div>
<div class="onGoingProcess" ng-show="create.hwWallet">
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}" style="max-height:6.5em" >
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate>Connecting to {{create.hwWallet}} Wallet...</span>
<span ng-show="create.hwWallet=='Trezor'" translate>Please accept to export two public keys from the Trezor app</span>
</div>
</div>
<div class="create-tab small-only-text-center" ng-hide="create.hideTabs">
<div class="row">
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected': totalCopayers == 1}">
<a href
ng-click="create.setTotalCopayers(1)" translate>Personal Wallet</a>
</div>
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected': totalCopayers != 1}">
<a href
ng-click="create.setTotalCopayers(3)" translate>Shared Wallet</a>
</div>
</div>
</div>
<form name="setupForm" ng-submit="create.create(setupForm)" novalidate>
<div class="row">
<div class="large-12 columns">
<div class="box-notification" ng-show="create.error">
<span class="text-warning size-14">
{{create.error|translate}}
</span>
</div>
<div ng-hide="create.hideWalletName">
<label><span translate>Wallet name</span>
<div class="input">
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" name="walletName" ng-model="walletName" ng-required="true" ng-focus="create.formFocus('wallet-name')" ng-blur="create.formFocus(false)">
</div>
</label>
</div>
<div ng-show="totalCopayers != 1">
<label><span translate>Your nickname</span>
<div class="input">
<input type="text" placeholder="{{'John'|translate}}" class="form-control" name="myName" ng-model="myName" ng-required="totalCopayers != 1" ng-disabled="totalCopayers == 1" ng-focus="create.formFocus('my-name')" ng-blur="create.formFocus(false)">
</div>
</label>
</div>
<div class="row" ng-show="totalCopayers != 1">
<div class="large-6 medium-6 columns">
<label><span translate>Total number of copayers</span>
<select class="m10t" ng-model="totalCopayers"
ng-options="totalCopayers as totalCopayers for totalCopayers in create.TCValues"
ng-change="create.setTotalCopayers(totalCopayers)">
</select>
</label>
</div>
<div class="large-6 medium-6 columns">
<label><span translate>Required number of signatures</span>
<select class="m10t" ng-model="requiredCopayers" ng-options="requiredCopayers as requiredCopayers for requiredCopayers in create.RCValues" ng-disabled="totalCopayers == 1">
</select>
</label>
</div>
</div>
<div class="m10t oh" ng-init="hideAdv=true">
<a class="button outline light-gray expand tiny" ng-click="hideAdv=!hideAdv">
<i class="fi-widget m3r"></i>
<span translate ng-hide="!hideAdv">Show advanced options</span>
<span translate ng-hide="hideAdv">Hide advanced options</span>
<i ng-if="hideAdv" class="icon-arrow-down4"></i>
<i ng-if="!hideAdv" class="icon-arrow-up4"></i>
</a>
</div>
<div ng-hide="hideAdv" class="row">
<div class="large-12 columns">
<div>
<label for="bws" class="oh">
<span>Wallet Service URL</span>
<input type="text" id="bwsurl" name="bwsurl" ng-model="bwsurl">
</label>
</div>
<div>
<label><span translate>Wallet Seed</span>
<select class="m10t" ng-model="seedSource"
ng-options="seed as seed.label for seed in create.seedOptions"
ng-change="create.setSeedSource()">
</select>
</label>
</div>
<div ng-show="create.seedSourceId == 'trezor' || create.seedSourceId == 'ledger'">
<label class="oh"><span translate>Account Number</span>
<input type="number" id="account" ng-model="account">
</label>
</div>
<div class="box-notification" ng-show="create.seedSourceId=='new' && createPassphrase">
<span class="text-warning size-14">
<i class="fi-alert"></i>
<span translate>
WARNING: Passphrase cannot be recovered. <b>Be sure to write it down</b>. The wallet can not be restored without the passphrase.
</span>
</span>
</div>
<div ng-show="create.seedSourceId=='new' ">
<label for="createPassphrase" ><span translate>Add a Seed Passphrase</span> <small translate>Add an optional passphrase to secure the seed</small>
<div class="input">
<input type="text" class="form-control"
name="createPassphrase" ng-model="createPassphrase">
</div>
</label>
</div>
<div ng-show="create.seedSourceId=='set'">
<label for="ext-master">
<span translate>Wallet Seed</span>
<small translate>Enter the seed words (BIP39)</small>
<input id="ext-master"
type="text"
name="privateKey" ng-model="privateKey">
</label>
</div>
<div ng-show="create.seedSourceId=='set'">
<label for="passphrase"> <span translate>Seed Passphrase</span> <small translate>The seed could require a passphrase to be imported</small>
<div class="input">
<input type="text" class="form-control" name="passphrase" ng-model="passphrase">
</div>
</label>
</div>
<div ng-show="create.seedSourceId == 'set'">
<label class="oh"><span translate>Derivation Path</span> <small translate>BIP32 path for address derivation</small>
<input type="text" class="form-control" name="derivationPath" ng-model="derivationPath">
</label>
</div>
<div class="oh" ng-show="create.seedSourceId == 'new'">
<label for="network-name" >
<span translate>Testnet</span>
<switch id="network-name" name="isTestnet" ng-model="isTestnet" class="green right m5t m10b"></switch>
</label>
</div>
</div> <!-- columns -->
</div> <!-- advanced -->
<button type="submit" class="button round black expand m0" ng-show="totalCopayers != 1" ng-disabled="setupForm.$invalid || create.loading || create.hwWallet">
<span translate>Create {{requiredCopayers}}-of-{{totalCopayers}} wallet</span>
</button>
<button type="submit" class="button round black expand m0" ng-show="totalCopayers == 1" ng-disabled="setupForm.$invalid || create.loading || create.hwWallet">
<span translate>Create new wallet</span>
</button>
</div> <!-- large-12 columns -->
</div> <!-- row -->
</form>
</div>
<div class="extra-margin-bottom"></div>