Skip to content

Commit 3f14416

Browse files
committed
Merge branch 'add-backup-notice'
2 parents 1cfb9bc + 5e4a266 commit 3f14416

File tree

7 files changed

+37
-6
lines changed

7 files changed

+37
-6
lines changed

controller/translationcontroller.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ public function getLanguageStrings() {
104104
'settings.password' => $this->trans->t('Password settings'),
105105
'settings.import' => $this->trans->t('Import credentials'),
106106
'settings.export' => $this->trans->t('Export credentials'),
107+
'settings.vault.change.password.hint' => $this->trans->t('Since all data has to be downloaded, re-encrypted and uploaded again when changing the password, this process is error-prone. It is strongly recommended to have an updated backup of your vault before changing the password.'),
108+
'settings.vault.change.password.confirm' => $this->trans->t('I understand the risks'),
107109
'settings.sharing' => $this->trans->t('Sharing'),
108110
'changepw.navigate.away.warning' => $this->trans->t('Are you sure you want to leave? This will destroy all your credentials'),
109111
'incorrect.password' => $this->trans->t('Old password field incorrect!'),

css/app.css

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/app.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/app/controllers/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
}
215215
});
216216

217-
217+
$scope.confirm_vault_pw_change = false;
218218
$scope.changeVaultPassword = function (oldVaultPass, newVaultPass, newVaultPass2) {
219219
$scope.error = '';
220220
if (oldVaultPass !== VaultService.getActiveVault().vaultKey) {

js/templates.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sass/settings.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,14 @@ h3 {
110110
.password-settings-padding-left-fix{
111111
padding-left: 0 !important;
112112
}
113+
.change-password-hint {
114+
margin-top: 10px;
115+
margin-bottom: 10px;
116+
}
117+
label[for=confirmVaultPWChange] {
118+
margin-bottom: 10px;
119+
}
120+
label[for=confirmVaultDelete] {
121+
margin-top: 10px;
122+
margin-bottom: 10px;
123+
}

templates/views/partials/forms/settings/general_settings.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ <h3>{{ 'change.vault.key' | translate}}</h3>
2525
<li ng-show="vault_key_score.score < minimal_value_key_strength">{{'min.vault.key.strength' | translate:required_score}}</li>
2626
</ul>
2727
</div>
28-
<button ng-click="changeVaultPassword(oldVaultPass,newVaultPass,newVaultPass2)" ng-disabled="vault_key_score.score < minimal_value_key_strength"
29-
>{{ 'change' | translate}}
28+
<p class="change-password-hint">{{'settings.vault.change.password.hint' | translate}}</p>
29+
<input id="confirmVaultPWChange" class="checkbox" type="checkbox"
30+
ng-model="$parent.confirm_vault_pw_change">
31+
<label for="confirmVaultPWChange">{{'settings.vault.change.password.confirm' | translate}}</label>
32+
<button ng-click="changeVaultPassword(oldVaultPass,newVaultPass,newVaultPass2)"
33+
ng-disabled="vault_key_score.score < minimal_value_key_strength || !$parent.confirm_vault_pw_change">
34+
{{ 'change' | translate}}
3035
</button>
3136
<div ng-show="change_pw.total > 0">
3237
{{'warning.leave' | translate}}<br />
@@ -47,7 +52,9 @@ <h3>{{'delete.vault' | translate}}</h3>
4752
ng-model="$parent.confirm_vault_delete">
4853
<label for="confirmVaultDelete">{{'delete.vault.checkbox' | translate}}</label>
4954

50-
<button class="btn btn-danger" ng-click="delete_vault()">{{'delete.vault.confirm' | translate}}</button>
55+
<button class="btn btn-danger" ng-click="delete_vault()" ng-disabled="!$parent.confirm_vault_delete">
56+
{{'delete.vault.confirm' | translate}}
57+
</button>
5158
<div ng-show="remove_pw">
5259
{{'deleting.pw' | translate:translationData}}
5360
<div progress-bar="remove_pw.percent" index="remove_pw.done" total="remove_pw.total"></div>

0 commit comments

Comments
 (0)