refactor wallet settings

This commit is contained in:
Gabriel Bazán 2016-08-16 16:47:51 -03:00
commit ac7ce0af23
17 changed files with 635 additions and 692 deletions

View file

@ -1,91 +1,81 @@
<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection=index.setWalletPreferencesTitle(); closeToHome = true">
</div>
<div class="content preferences" ng-controller="preferencesController" ng-init="init()">
<h4></h4>
<ul class="no-bullet m0" ng-show="!index.noFocusedWallet">
<li href ui-sref="preferencesAlias">
<div class="right text-gray">
{{index.alias||index.walletName}}
<i class="icon-arrow-right3 size-24 right"></i>
<ion-view ng-controller="preferencesController" cache-view="false" ng-init="init()">
<ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Settings</ion-nav-title>
<ion-nav-buttons side="primary">
 <button class="button" href ui-sref="walletDetails">
     <i class="ion-arrow-left-c"></i> Back
   </button>
  </ion-nav-buttons>
</ion-nav-bar>
<ion-content class="has-header">
<div class="list">
<div class="item item-divider">
Preferences
</div>
<div translate>Alias</div>
</li>
<li href ui-sref="preferencesEmail">
<div class="right text-gray">
<span ng-if="!index.preferences.email" translate>Disabled</span>
<span ng-if="index.preferences.email">{{index.preferences.email}}</span>
<i class="icon-arrow-right3 size-24 right"></i>
</div>
<div translate>Email Notifications</div>
</li>
<li href ui-sref="preferencesColor">
<div class="right text-gray">
<span ng-style="{'color':index.backgroundColor}">&block;</span>
<i class="icon-arrow-right3 size-24 right"></i>
</div>
<div translate>Color</div>
</li>
<li ng-show="index.isPrivKeyExternal">
<div class="right text-gray m10r">
{{externalSource}}
</div>
<div translate>Hardware wallet</div>
</li>
<li href ui-sref="backup" ng-hide="index.isPrivKeyExternal">
<div class="right text-gray">
<span class="text-warning" ng-show="index.needsBackup">
<i class="fi-alert"></i> <span translate>Not completed</span>
<div class="item item-icon-right" href ui-sref="preferencesAlias">
<span translate>Wallet Name</span>
<span class="item-note">
{{index.alias||index.walletName}}
</span>
<i class="icon-arrow-right3 size-24 text-gray"></i>
<i class="icon ion-ios-arrow-right"></i>
</div>
<div translate>Backup</div>
</li>
<li href ui-sref="preferencesAdvanced">
<i class="icon-arrow-right3 size-24 right text-gray"></i>
<div translate>Advanced</div>
</li>
</ul>
<h4 translate ng-show="index.canSign || !deleted">
Security preferences
</h4>
<div ng-show="!index.noFocusedWallet && index.canSign">
<ion-toggle ng-model="encryptEnabled" toggle-class="toggle-balanced" ng-change="encryptChange()">
<span class="toggle-label" translate>Request Spending Password</span>
</ion-toggle>
<ion-toggle ng-model="touchidEnabled" toggle-class="toggle-balanced" ng-change="touchidChange()" ng-show="touchidAvailable">
<span class="toggle-label" translate>Scan Fingerprint</span>
</ion-toggle>
</div>
<div ng-show ="!deleted">
<ul class="no-bullet m0">
<li href ui-sref="deleteWords">
<i class="icon-arrow-right3 size-24 right text-gray"></i>
<div translate>Delete recovery phrase</div>
</li>
</ul>
</div>
<h4></h4>
</div>
<div class="extra-margin-bottom"></div>
<div class="item">
<span translate>Devices</span>
<span class="item-note">
1
</span>
</div>
<div class="item">
<span translate>Required number of signatures</span>
<span class="item-note">
1
</span>
</div>
<div class="item" ng-show="index.isPrivKeyExternal">
<span translate>Hardware wallet</span>
<span class="item-note">
{{externalSource}}
</span>
</div>
<div class="item item-icon-right" href ui-sref="preferencesColor">
<span ng-style="{'color':index.backgroundColor}">&block;</span>
<span translate>Wallet Color</span>
<span class="item-note">
{{index.alias||index.walletName}}
</span>
<i class="icon ion-ios-arrow-right"></i>
</div>
<div class="item item-icon-right" href ui-sref="preferencesEmail">
<span translate>Email Notifications</span>
<span class="item-note">
<span ng-if="!index.preferences.email" translate>Disabled</span>
<span ng-if="index.preferences.email">{{index.preferences.email}}</span>
</span>
<i class="icon ion-ios-arrow-right"></i>
</div>
<div class="item item-divider">
Security
</div>
<div class="item item-icon-right" href ui-sref="backup" ng-hide="index.isPrivKeyExternal">
<span translate>Backup</span>
<i class="icon ion-ios-arrow-right"></i>
</div>
<div ng-show="!index.noFocusedWallet && index.canSign">
<ion-toggle ng-model="encryptEnabled" toggle-class="toggle-balanced" ng-change="encryptChange()">
<span class="toggle-label" translate>Request Spending Password</span>
</ion-toggle>
</div>
<div class="item item-icon-right" href ui-sref="deleteWords" ng-show ="!deleted">
<span translate>Delete recovery phrase</span>
<i class="icon ion-ios-arrow-right"></i>
</div>
<div class="item item-divider">
Advanced
</div>
<div class="item item-icon-right" href ui-sref="preferencesAdvanced">
<span translate>Advanced</span>
<i class="icon ion-ios-arrow-right"></i>
</div>
</div>
</ion-content>
</ion-view>