encryption status

This commit is contained in:
Mo Bitar
2017-01-14 12:50:10 -06:00
parent 4479a24431
commit 0f69b1ec14
2 changed files with 3 additions and 18 deletions

View File

@@ -172,14 +172,7 @@ angular.module('app.frontend')
this.encryptionStatusForNotes = function() { this.encryptionStatusForNotes = function() {
var allNotes = modelManager.filteredNotes; var allNotes = modelManager.filteredNotes;
var countEncrypted = 0; return allNotes.length + "/" + allNotes.length + " notes encrypted";
allNotes.forEach(function(note){
if(note.encryptionEnabled()) {
countEncrypted++;
}
}.bind(this))
return countEncrypted + "/" + allNotes.length + " notes encrypted";
} }
this.archiveEncryptionFormat = {encrypted: true}; this.archiveEncryptionFormat = {encrypted: true};
@@ -233,15 +226,7 @@ angular.module('app.frontend')
} }
this.onAuthSuccess = function(user) { this.onAuthSuccess = function(user) {
window.location.reload();
// if(this.user.shouldMerge && this.hasLocalData()) {
// apiController.mergeLocalDataRemotely(this.user, function(){
// window.location.reload();
// });
// } else {
window.location.reload();
// }
this.showLogin = false; this.showLogin = false;
this.showRegistration = false; this.showRegistration = false;
} }

View File

@@ -247,7 +247,7 @@ angular.module('app.frontend')
var retrieved = this.handleItemsResponse(response.retrieved_items, null); var retrieved = this.handleItemsResponse(response.retrieved_items, null);
// merge only metadata for saved items // merge only metadata for saved items
var omitFields = ["content", "enc_item_key", "auth_hash"]; var omitFields = ["content", "auth_hash"];
var saved = this.handleItemsResponse(response.saved_items, omitFields); var saved = this.handleItemsResponse(response.saved_items, omitFields);
this.handleUnsavedItemsResponse(response.unsaved) this.handleUnsavedItemsResponse(response.unsaved)