only accept relevant items
This commit is contained in:
@@ -71,7 +71,7 @@ class AccountMenu {
|
|||||||
}
|
}
|
||||||
$scope.newPasswordData.status = "Successfully changed password and re-encrypted all items.";
|
$scope.newPasswordData.status = "Successfully changed password and re-encrypted all items.";
|
||||||
$timeout(function(){
|
$timeout(function(){
|
||||||
alert("Your password has been changed, and your items successfully re-encrypted and synced. You must sign out on all other signed in applications and sign in again, or else you may corrupt your data.")
|
alert("Your password has been changed, and your items successfully re-encrypted and synced. You must sign out of all other signed in applications and sign in again, or else you may corrupt your data.")
|
||||||
$scope.newPasswordData = {};
|
$scope.newPasswordData = {};
|
||||||
}, 1000)
|
}, 1000)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class ModelManager {
|
|||||||
this.itemChangeObservers = [];
|
this.itemChangeObservers = [];
|
||||||
this.items = [];
|
this.items = [];
|
||||||
this._extensions = [];
|
this._extensions = [];
|
||||||
|
this.acceptableContentTypes = ["Note", "Tag", "Extension"];
|
||||||
}
|
}
|
||||||
|
|
||||||
get allItems() {
|
get allItems() {
|
||||||
@@ -62,7 +63,7 @@ class ModelManager {
|
|||||||
for (var json_obj of items) {
|
for (var json_obj of items) {
|
||||||
json_obj = _.omit(json_obj, omitFields || [])
|
json_obj = _.omit(json_obj, omitFields || [])
|
||||||
var item = this.findItem(json_obj["uuid"]);
|
var item = this.findItem(json_obj["uuid"]);
|
||||||
if(json_obj["deleted"] == true) {
|
if(json_obj["deleted"] == true || !_.includes(this.acceptableContentTypes, json_obj["content_type"])) {
|
||||||
if(item) {
|
if(item) {
|
||||||
this.removeItemLocally(item)
|
this.removeItemLocally(item)
|
||||||
}
|
}
|
||||||
@@ -227,7 +228,11 @@ class ModelManager {
|
|||||||
|
|
||||||
/* Used when changing encryption key */
|
/* Used when changing encryption key */
|
||||||
setAllItemsDirty() {
|
setAllItemsDirty() {
|
||||||
for(var item of this.allItems) {
|
var relevantItems = this.allItems.filter(function(item){
|
||||||
|
return _.includes(this.acceptableContentTypes, item.content_type);
|
||||||
|
}.bind(this));
|
||||||
|
|
||||||
|
for(var item of relevantItems) {
|
||||||
item.setDirty(true);
|
item.setDirty(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
%a.block.mt-5{"ng-click" => "newPasswordData.changePassword = !newPasswordData.changePassword"} Change Password
|
%a.block.mt-5{"ng-click" => "newPasswordData.changePassword = !newPasswordData.changePassword"} Change Password
|
||||||
%section.gray-bg.mt-10.medium-padding{"ng-if" => "newPasswordData.changePassword"}
|
%section.gray-bg.mt-10.medium-padding{"ng-if" => "newPasswordData.changePassword"}
|
||||||
%p.bold Change Password (Beta)
|
%p.bold Change Password (Beta)
|
||||||
%p.mt-10 Since your encrpytion key is based on your password, changing your password requires all your notes and tags to be re-encrypted using your new key.
|
%p.mt-10 Since your encryption key is based on your password, changing your password requires all your notes and tags to be re-encrypted using your new key.
|
||||||
%p.mt-5 If you have thousands of items, this can take several minutes — you must keep the application window open during this process.
|
%p.mt-5 If you have thousands of items, this can take several minutes — you must keep the application window open during this process.
|
||||||
%p.mt-5 After changing your password, you must log out of all other applications currently signed in to your account.
|
%p.mt-5 After changing your password, you must log out of all other applications currently signed in to your account.
|
||||||
%p.bold.mt-5 It is highly recommended you download a backup of your data before proceeding.
|
%p.bold.mt-5 It is highly recommended you download a backup of your data before proceeding.
|
||||||
|
|||||||
Reference in New Issue
Block a user