copay/www/views/join.html

132 lines
5.5 KiB
HTML

<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>{{'Join shared wallet' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="joinController as join">
<form name="joinForm" ng-submit="join.join(joinForm)" novalidate>
<div class="card list">
<label class="item item-input item-stacked-label no-border">
<span class="input-label" translate>Your nickname</span>
<input type="text"
placeholder="{{'John'|translate}}"
name="myName"
ng-model="myName"
ng-required="true">
</label>
<label class="item item-input item-stacked-label no-border">
<span class="input-label" translate>Wallet Invitation</span>
<div class="input-notification">
<i class="icon ion-checkmark-circled balanced"
ng-show="!joinForm.secret.$invalid"></i>
<i class="icon ion-close-circled assertive"
ng-show="joinForm.secret.$invalid && secret"></i>
</div>
<div class="qr-scan-icon">
<qr-scanner class="qr-icon size-24" on-scan="join.onQrCodeScanned(data)"></qr-scanner>
<input id="secret"
type="text"
placeholder="{{'Paste invitation here'|translate}}"
name="secret"
ng-model="secret"
wallet-secret required>
</div>
</label>
<div class="item item-divider"></div>
<a class="item" ng-click="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</a>
<div ng-show="showAdv">
<label class="item item-input item-stacked-label">
<span class="input-label">Wallet Service URL</span>
<input type="text" id="bwsurl" name="bwsurl" ng-model="bwsurl">
</label>
<label class="item item-input item-select">
<div class="input-label" translate>
Wallet Key
</div>
<select class="m10t"
ng-model="seedSource"
ng-options="seed as seed.label for seed in join.seedOptions"
ng-change="join.setSeedSource()">
</select>
</label>
<label class="item item-input item-stacked-label"
ng-show="join.seedSourceId == 'trezor' || join.seedSourceId == 'ledger'">
<span class="input-label" translate>Account Number</span>
<input type="number" id="account" ng-model="account" ignore-mouse-wheel>
</label>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId=='set'">
<span class="input-label" translate>Wallet Recovery Phrase</span>
<input id="ext-master"
placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
autocapitalize="off"
type="text"
name="privateKey"
ng-model="privateKey">
</label>
<ion-toggle ng-model="encrypt" toggle-class="toggle-positive" ng-change="resizeView()" ng-show="join.seedSourceId == 'new' || join.seedSourceId == 'set'">
<span translate>Encrypt with a Password</span>
</ion-toggle>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId == 'new' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'Add an optional password to secure the recovery phrase'|translate}}"
autocapitalize="off"
name="createPassphrase"
ng-model="createPassphrase">
</label>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId == 'set' && encrypt">
<span class="input-label" translate>Add a Password</span>
<input type="text"
placeholder="{{'The recovery phrase could require a password to be imported'|translate}}"
autocapitalize="off"
name="passphrase"
ng-model="passphrase">
</label>
<div class="text-center box-notification error" ng-show="(join.seedSourceId =='new' || join.seedSourceId =='set') && encrypt">
<strong translate>This password cannot be recovered. If the password is lost, funds can only be recovered with a valid backup.</strong>
</div>
<ion-checkbox ng-model="passwordSaved" class="checkbox-positive" ng-show="encrypt">
<span class="toggle-label" translate>I have written it down</span>
</ion-checkbox>
<label class="item item-input item-stacked-label" ng-show="join.seedSourceId == 'set'">
<span class="input-label" translate>Derivation Path</span>
<input type="text"
placeholder="{{'BIP32 path for address derivation'|translate}}"
name="derivationPath"
ng-model="derivationPath">
</label>
</div> <!-- advanced -->
</div> <!-- list -->
<button type="submit" class="button button-block button-positive"
ng-disabled="joinForm.$invalid || ((encrypt && !passwordSaved) || encrypt && ((join.seedSourceId == 'new' && !createPassphrase) || (join.seedSourceId == 'set' && !passphrase)))"
translate>Join
</button>
</form>
</ion-content>
</ion-view>