passman/templates/views/vaults.html

101 lines
2.9 KiB
HTML
Raw Normal View History

2016-09-11 05:30:17 +08:00
<div class="vault_wrapper">
<div class="vaults"
ng-if="!list_selected_vault && !creating_vault">
<div class="ui-select-container ui-select-bootstrap vaultlist">
<ul>
<li ng-click="newVault()">+ Create a new vault</li>
<li ng-repeat="vault in vaults"
ng-class="{'selected': vault == list_selected_vault }"
ng-click="selectVault(vault)">
<div>
<span class="ui-select-choices-row-inner">
<div class="ng-binding ng-scope">{{vault.name}}</div>
<small class="ng-binding ng-scope">
Created: {{vault.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
|
2016-09-12 01:45:20 +08:00
Last accessed:
<span ng-if="vault.last_access > 0">{{vault.last_access * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
<span ng-if="vault.last_access === 0">Never</span>
2016-09-11 05:30:17 +08:00
</small>
</span>
</div>
</li>
<li ng-if="vaults.length === 0">No vaults found, why not create one?</li>
2016-09-11 05:30:17 +08:00
</ul>
</div>
</div>
<div ng-if="creating_vault">
<div class="login_form" ng-init="vault_name = '' ">
2016-09-11 05:30:17 +08:00
Please give your new vault a name.
<div>
2016-09-12 05:40:06 +08:00
<input type="text" ng-model="vault_name" required>
2016-09-11 05:30:17 +08:00
</div>
2016-09-12 01:45:20 +08:00
<div>
Vault password
2016-09-12 05:40:06 +08:00
<input type="password" ng-model="vault_key" required>
<ng-password-meter password="vault_key"></ng-password-meter>
2016-09-12 01:45:20 +08:00
</div>
<div>
Repeat vault password
2016-09-12 05:40:06 +08:00
<input type="password" ng-model="vault_key2" required>
</div>
<div ng-show="error" class="error">
<ul>
<li>{{error}}</li>
</ul>
2016-09-12 01:45:20 +08:00
</div>
2016-09-11 05:30:17 +08:00
<div class="button_wrapper">
2016-09-12 02:47:29 +08:00
<div class="button button-geen" ng-click="createVault(vault_name, vault_key, vault_key2)">
2016-09-11 05:30:17 +08:00
Create vault
</div>
<div class="button button-red" ng-click="clearState()">
Cancel
</div>
</div>
</div>
</div>
<div ng-if="list_selected_vault != false">
<div class="vaultlist">
<ul>
<li ng-click="clearState()">Go back to vaults</li>
</ul>
</div>
<div class="login_form">
2016-09-12 02:47:29 +08:00
<div ng-show="error" class="error">
<ul>
<li>{{error}}</li>
</ul>
</div>
2016-09-11 05:30:17 +08:00
Please input the password for {{list_selected_vault.name}}
<div class="pw-input">
2016-09-12 02:47:29 +08:00
<input type="password" ng-model="vault_key">
<small class="last_access">Last accessed:
<span ng-if="list_selected_vault.last_access > 0">{{list_selected_vault.last_access * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
<span ng-if="list_selected_vault.last_access === 0">Never</span>
</small>
2016-09-11 05:30:17 +08:00
</div>
<div>
<div>
<label>
<input type="checkbox" ng-checked="default_vault" ng-click="toggleDefaultVault()">
2016-09-11 05:30:17 +08:00
Set this vault as default.
</label>
</div>
<div>
<label>
2016-09-12 02:47:29 +08:00
<input type="checkbox" ng-checked="remember_vault_password" ng-click="toggleRememberPassword()">
2016-09-11 05:30:17 +08:00
Login automatically to this vault.
</label>
</div>
</div>
2016-09-12 02:47:29 +08:00
<div class="button button-geen" ng-click="loginToVault(list_selected_vault, vault_key)">
2016-09-11 05:30:17 +08:00
Decrypt vault
</div>
</div>
</div>
</div>