Make conflict_of synced property
This commit is contained in:
@@ -255,7 +255,7 @@ angular.module('app')
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(note.conflict_of) {
|
if(note.content.conflict_of) {
|
||||||
flags.push({
|
flags.push({
|
||||||
text: "Conflicted Copy",
|
text: "Conflicted Copy",
|
||||||
class: "danger"
|
class: "danger"
|
||||||
@@ -327,7 +327,11 @@ angular.module('app')
|
|||||||
let run = () => {
|
let run = () => {
|
||||||
$timeout(() => {
|
$timeout(() => {
|
||||||
this.selectedNote = note;
|
this.selectedNote = note;
|
||||||
note.conflict_of = null; // clear conflict
|
if(note.content.conflict_of) {
|
||||||
|
note.content.conflict_of = null; // clear conflict
|
||||||
|
note.setDirty(true, true);
|
||||||
|
syncManager.sync();
|
||||||
|
}
|
||||||
this.selectionMade()(note);
|
this.selectionMade()(note);
|
||||||
this.selectedIndex = Math.max(this.visibleNotes().indexOf(note), 0);
|
this.selectedIndex = Math.max(this.visibleNotes().indexOf(note), 0);
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,11 @@ angular.module('app')
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.selectedTag = tag;
|
this.selectedTag = tag;
|
||||||
tag.conflict_of = null; // clear conflict
|
if(tag.content.conflict_of) {
|
||||||
|
tag.content.conflict_of = null; // clear conflict
|
||||||
|
tag.setDirty(true, true);
|
||||||
|
syncManager.sync();
|
||||||
|
}
|
||||||
this.selectionMade()(tag);
|
this.selectionMade()(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ class EditorMenu {
|
|||||||
|
|
||||||
$scope.selectComponent = function(component) {
|
$scope.selectComponent = function(component) {
|
||||||
if(component) {
|
if(component) {
|
||||||
component.conflict_of = null; // clear conflict if applicable
|
if(component.content.conflict_of) {
|
||||||
|
component.content.conflict_of = null; // clear conflict if applicable
|
||||||
|
component.setDirty(true, true);
|
||||||
|
syncManager.sync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$timeout(() => {
|
$timeout(() => {
|
||||||
$scope.callback()(component);
|
$scope.callback()(component);
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
"circle" => "selectedEditor === editor && 'success'",
|
"circle" => "selectedEditor === editor && 'success'",
|
||||||
"has-button" => "selectedEditor == editor || defaultEditor == editor", "button-text" => "defaultEditor == editor ? 'Undefault' : 'Set Default'",
|
"has-button" => "selectedEditor == editor || defaultEditor == editor", "button-text" => "defaultEditor == editor ? 'Undefault' : 'Set Default'",
|
||||||
"button-action" => "toggleDefaultForEditor(editor)", "button-class" => "defaultEditor == editor ? 'warning' : 'info'"}
|
"button-action" => "toggleDefaultForEditor(editor)", "button-class" => "defaultEditor == editor ? 'warning' : 'info'"}
|
||||||
.sk-menu-panel-column{"ng-if" => "component.conflict_of || shouldDisplayRunningLocallyLabel(editor)"}
|
.sk-menu-panel-column{"ng-if" => "component.content.conflict_of || shouldDisplayRunningLocallyLabel(editor)"}
|
||||||
%strong.danger.medium-text{"ng-if" => "editor.conflict_of"} Conflicted copy
|
%strong.danger.medium-text{"ng-if" => "editor.content.conflict_of"} Conflicted copy
|
||||||
.sk-sublabel{"ng-if" => "shouldDisplayRunningLocallyLabel(editor)"} Running Locally
|
.sk-sublabel{"ng-if" => "shouldDisplayRunningLocallyLabel(editor)"} Running Locally
|
||||||
|
|
||||||
%a.no-decoration{"ng-if" => "editors.length == 0", "href" => "https://standardnotes.org/extensions", "target" => "blank"}
|
%a.no-decoration{"ng-if" => "editors.length == 0", "href" => "https://standardnotes.org/extensions", "target" => "blank"}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"ng-change" => "ctrl.tagTitleDidChange(tag)", "ng-blur" => "ctrl.saveTag($event, tag)", "spellcheck" => "false"}
|
"ng-change" => "ctrl.tagTitleDidChange(tag)", "ng-blur" => "ctrl.saveTag($event, tag)", "spellcheck" => "false"}
|
||||||
.count {{tag.cachedNoteCount}}
|
.count {{tag.cachedNoteCount}}
|
||||||
|
|
||||||
.red.small-text.bold{"ng-show" => "tag.conflict_of"} Conflicted copy
|
.red.small-text.bold{"ng-show" => "tag.content.conflict_of"} Conflicted copy
|
||||||
.red.small-text.bold{"ng-show" => "tag.errorDecrypting"} Unable to Decrypt
|
.red.small-text.bold{"ng-show" => "tag.errorDecrypting"} Unable to Decrypt
|
||||||
|
|
||||||
.menu{"ng-show" => "ctrl.selectedTag == tag"}
|
.menu{"ng-show" => "ctrl.selectedTag == tag"}
|
||||||
|
|||||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -4830,9 +4830,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"standard-file-js": {
|
"standard-file-js": {
|
||||||
"version": "0.3.46",
|
"version": "0.3.47",
|
||||||
"resolved": "https://registry.npmjs.org/standard-file-js/-/standard-file-js-0.3.46.tgz",
|
"resolved": "https://registry.npmjs.org/standard-file-js/-/standard-file-js-0.3.47.tgz",
|
||||||
"integrity": "sha512-fGym9hkkWr+Fi+FTsNWJXPXUNUkkVf3A/T2Jc1YqqLSK5/ze0Txo3Ij9pVIfWD7EQcTN6arI7vw1ErpoXWfMaw==",
|
"integrity": "sha512-csWmQXj5eTh0uHuuYYD4pP7tEeORtkdlWuZpVBYFCip4ch2Ug4uyKOCjHr3uOYTjLVaQKhkE/6xPpECWASmQMg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"statuses": {
|
"statuses": {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"sn-models": "0.1.14",
|
"sn-models": "0.1.14",
|
||||||
"sn-stylekit": "2.0.13",
|
"sn-stylekit": "2.0.13",
|
||||||
"standard-file-js": "0.3.46",
|
"standard-file-js": "0.3.47",
|
||||||
"grunt-shell": "^2.1.0"
|
"grunt-shell": "^2.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user