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">
|
2017-02-20 07:01:01 +08:00
|
|
|
<div class="ng-binding ng-scope">{{vault.name}} <span class="pull-right" style="color: #ce3702;" ng-show="vault.delete_request_pending">{{ 'delete.request.pending' | translate}}</span></div>
|
2016-09-11 05:30:17 +08:00
|
|
|
<small class="ng-binding ng-scope">
|
2016-12-20 06:51:15 +08:00
|
|
|
|
|
|
|
{{ 'created' | translate}}: {{vault.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
|
2016-09-11 05:30:17 +08:00
|
|
|
|
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'last.access' | translate}}:
|
2016-09-12 01:45:20 +08:00
|
|
|
<span ng-if="vault.last_access > 0">{{vault.last_access * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}</span>
|
2016-12-20 06:51:15 +08:00
|
|
|
<span ng-if="vault.last_access === 0">{{'never' | translate}}</span>
|
2016-09-11 05:30:17 +08:00
|
|
|
</small>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
2016-12-20 06:51:15 +08:00
|
|
|
<li ng-if="vaults.length === 0">{{ 'no.vaults' | translate}}
|
2016-09-26 04:29:27 +08:00
|
|
|
</li>
|
2016-09-11 05:30:17 +08:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-if="creating_vault">
|
2016-12-28 23:03:08 +08:00
|
|
|
<div class="login_form" ng-init="vault_name = ''; vault_key=''; ">
|
2016-12-20 06:51:15 +08:00
|
|
|
{{'new.vault.name' | translate}}
|
2016-09-11 05:30:17 +08:00
|
|
|
<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>
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'new.vault.pass' | translate}}
|
2016-09-12 05:40:06 +08:00
|
|
|
<input type="password" ng-model="vault_key" required>
|
2016-12-28 23:03:08 +08:00
|
|
|
<ng-password-meter password="vault_key" score="vault_key_score"></ng-password-meter>
|
2016-09-12 01:45:20 +08:00
|
|
|
</div>
|
|
|
|
<div>
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'new.vault.passr' | translate}}
|
2016-09-12 05:40:06 +08:00
|
|
|
<input type="password" ng-model="vault_key2" required>
|
|
|
|
</div>
|
2016-12-29 01:54:54 +08:00
|
|
|
<div ng-show="error || vault_key_score.score < minimal_value_key_strength" class="error">
|
2016-09-12 05:40:06 +08:00
|
|
|
<ul>
|
2016-12-28 23:03:08 +08:00
|
|
|
<li ng-show="error">{{error}}</li>
|
2016-12-29 01:54:54 +08:00
|
|
|
<li ng-show="vault_key_score.score < minimal_value_key_strength">{{'min.vault.key.strength' | translate:required_score}}</li>
|
2016-09-12 05:40:06 +08:00
|
|
|
</ul>
|
2016-09-12 01:45:20 +08:00
|
|
|
</div>
|
2016-10-02 16:31:55 +08:00
|
|
|
<div>
|
2016-12-20 06:51:15 +08:00
|
|
|
<small> {{'new.vault.sharing_key_notice' | translate}}
|
2016-10-02 16:31:55 +08:00
|
|
|
</small>
|
|
|
|
</div>
|
2016-09-11 05:30:17 +08:00
|
|
|
<div class="button_wrapper">
|
2016-12-28 23:03:08 +08:00
|
|
|
<button class="button button-geen" ng-if="!creating_keys"
|
2016-12-29 01:54:54 +08:00
|
|
|
ng-click="createVault(vault_name, vault_key, vault_key2)" ng-disabled="vault_key_score.score < minimal_value_key_strength || vault_key !== vault_key2 || vault_key === ''">
|
2016-12-28 23:03:08 +08:00
|
|
|
{{ 'new.vault.create' | translate }}
|
|
|
|
</button>
|
2016-09-26 04:29:27 +08:00
|
|
|
<div class="button" ng-if="creating_keys">
|
|
|
|
<span>
|
|
|
|
<i class="fa fa-spinner fa-spin"></i>
|
|
|
|
{{creating_keys}}
|
|
|
|
</span>
|
2016-09-11 05:30:17 +08:00
|
|
|
</div>
|
|
|
|
<div class="button button-red" ng-click="clearState()">
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'cancel' | translate}}
|
2016-09-11 05:30:17 +08:00
|
|
|
</div>
|
2016-09-27 02:56:41 +08:00
|
|
|
<div class="hidden">
|
|
|
|
{{sharing_keys}}
|
|
|
|
</div>
|
2016-09-11 05:30:17 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-if="list_selected_vault != false">
|
|
|
|
<div class="vaultlist">
|
|
|
|
<ul>
|
2016-12-20 06:51:15 +08:00
|
|
|
<li ng-click="clearState()">{{ 'go.back.vaults' | translate }}</li>
|
2016-09-11 05:30:17 +08:00
|
|
|
</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-12-20 06:51:15 +08:00
|
|
|
{{ 'input.vault.password' | translate}} {{list_selected_vault.name}}
|
2016-09-11 05:30:17 +08:00
|
|
|
|
2016-09-13 06:10:24 +08:00
|
|
|
<div class="pw-input">
|
2016-10-13 00:07:30 +08:00
|
|
|
<input type="password" ng-model="vault_key" ng-enter="loginToVault(list_selected_vault, vault_key)">
|
2016-12-20 06:51:15 +08:00
|
|
|
<small class="last_access">{{'last.access' | translate}}:
|
2016-09-13 06:10:24 +08:00
|
|
|
<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>
|
2017-02-18 04:25:18 +08:00
|
|
|
<div class="login_opts">
|
2016-09-11 05:30:17 +08:00
|
|
|
<div>
|
|
|
|
<label>
|
2016-09-26 04:29:27 +08:00
|
|
|
<input type="checkbox" ng-checked="default_vault"
|
|
|
|
ng-click="toggleDefaultVault()">
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'vault.default' | translate}}
|
2016-09-11 05:30:17 +08:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label>
|
2016-09-26 04:29:27 +08:00
|
|
|
<input type="checkbox"
|
|
|
|
ng-checked="remember_vault_password"
|
|
|
|
ng-click="toggleRememberPassword()">
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'vault.auto.login' | translate}}
|
2016-09-11 05:30:17 +08:00
|
|
|
</label>
|
|
|
|
</div>
|
2017-01-09 20:46:43 +08:00
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
<input type="checkbox"
|
|
|
|
ng-checked="auto_logout_timer"
|
|
|
|
ng-click="toggleAutoLogout()">
|
|
|
|
{{ 'auto.logout' | translate}}
|
|
|
|
</label>
|
|
|
|
<select ng-model="logout_timer" ng-change="selectLogoutTimer(logout_timer)">
|
|
|
|
<option value="0">Never</option>
|
|
|
|
<option value="30">30 minutes</option>
|
|
|
|
<option value="60">60 minutes</option>
|
|
|
|
<option value="90">90 minutes</option>
|
|
|
|
<option value="180">3 hour</option>
|
|
|
|
<option value="480">8 hour</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2016-09-11 05:30:17 +08:00
|
|
|
</div>
|
2017-02-18 04:25:18 +08:00
|
|
|
|
|
|
|
<div class="alert alert-danger" ng-show="vault_tries[list_selected_vault.guid].timeout !== 0" translate="vault.locked" translate-value-tries="{{ vault_tries[list_selected_vault.guid].tries }}" translate-value-time="{{ vault_tries[list_selected_vault.guid].timeout | toHHMMSS }}"></div>
|
|
|
|
<button class="button button-geen"
|
|
|
|
ng-click="loginToVault(list_selected_vault, vault_key)" ng-disabled="vault_tries[list_selected_vault.guid].timeout !== 0">
|
2016-12-20 06:51:15 +08:00
|
|
|
{{ 'vault.decrypt' | translate}}
|
2017-02-18 04:25:18 +08:00
|
|
|
</button>
|
2017-02-20 07:01:01 +08:00
|
|
|
<span ng-click="forgottenPassword = true;" style="margin-top: 10px; padding: 6px 12px;" class="link pull-right" ng-show="!forgottenPassword">Forgot password?</span>
|
|
|
|
<button ng-show="forgottenPassword" class="pull-right button button-red" ng-click="requestDeletion(list_selected_vault)">
|
|
|
|
<span ng-show="list_selected_vault.delete_request_pending">{{ 'cancel.request.deletion' | translate }}</span>
|
|
|
|
<span ng-show="!list_selected_vault.delete_request_pending">{{ 'request.deletion' | translate }}</span>
|
|
|
|
</button>
|
2016-09-11 05:30:17 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|