@@ -338,6 +338,7 @@ export class NotesPanel {
|
|||||||
if(this.selectedNote.dummy && oldTag) {
|
if(this.selectedNote.dummy && oldTag) {
|
||||||
_.remove(oldTag.notes, this.selectedNote);
|
_.remove(oldTag.notes, this.selectedNote);
|
||||||
}
|
}
|
||||||
|
this.selectNote(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.noteFilter.text = "";
|
this.noteFilter.text = "";
|
||||||
@@ -351,7 +352,7 @@ export class NotesPanel {
|
|||||||
this.notes.forEach((note) => { note.visible = true; })
|
this.notes.forEach((note) => { note.visible = true; })
|
||||||
this.selectFirstNote();
|
this.selectFirstNote();
|
||||||
} else if(syncManager.initialDataLoaded()) {
|
} else if(syncManager.initialDataLoaded()) {
|
||||||
if(!tag.isSmartTag()) {
|
if(!tag.isSmartTag() || tag.content.isAllTag) {
|
||||||
this.createNewNote();
|
this.createNewNote();
|
||||||
} else {
|
} else {
|
||||||
if(this.selectedNote && !this.notes.includes(this.selectedNote)) {
|
if(this.selectedNote && !this.notes.includes(this.selectedNote)) {
|
||||||
@@ -400,6 +401,7 @@ export class NotesPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!note) {
|
if(!note) {
|
||||||
|
this.selectedNote = null;
|
||||||
this.selectionMade()(null);
|
this.selectionMade()(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,17 +32,36 @@ export class TagsPanel {
|
|||||||
})
|
})
|
||||||
|
|
||||||
syncManager.addEventHandler((syncEvent, data) => {
|
syncManager.addEventHandler((syncEvent, data) => {
|
||||||
if(syncEvent == "local-data-loaded"
|
if(syncEvent == 'local-data-loaded'
|
||||||
|| syncEvent == "sync:completed"
|
|| syncEvent == 'sync:completed'
|
||||||
|| syncEvent == "local-data-incremental-load") {
|
|| syncEvent == 'local-data-incremental-load') {
|
||||||
this.tags = modelManager.tags;
|
this.tags = modelManager.tags;
|
||||||
this.smartTags = modelManager.getSmartTags();
|
this.smartTags = modelManager.getSmartTags();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
modelManager.addItemSyncObserver("tags-list", "*", (allItems, validItems, deletedItems, source, sourceKey) => {
|
modelManager.addItemSyncObserver(
|
||||||
this.reloadNoteCounts();
|
'tags-list',
|
||||||
});
|
'*',
|
||||||
|
(allItems, validItems, deletedItems, source, sourceKey) => {
|
||||||
|
this.reloadNoteCounts();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
modelManager.addItemSyncObserver(
|
||||||
|
'tags-list-tags',
|
||||||
|
'Tag',
|
||||||
|
(allItems, validItems, deletedItems, source, sourceKey) => {
|
||||||
|
if(!this.selectedTag) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/** If the selected tag has been deleted, revert to All view. */
|
||||||
|
const selectedTag = allItems.find((tag) => tag.uuid === this.selectedTag.uuid);
|
||||||
|
if(selectedTag && selectedTag.deleted) {
|
||||||
|
this.selectTag(this.smartTags[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
this.reloadNoteCounts = function() {
|
this.reloadNoteCounts = function() {
|
||||||
let allTags = [];
|
let allTags = [];
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', '
|
|||||||
# Default value for keep_releases is 5
|
# Default value for keep_releases is 5
|
||||||
# set :keep_releases, 5
|
# set :keep_releases, 5
|
||||||
|
|
||||||
set :rvm_ruby_version, '2.3.0'
|
|
||||||
|
|
||||||
namespace :deploy do
|
namespace :deploy do
|
||||||
|
|
||||||
after :restart, :clear_cache do
|
after :restart, :clear_cache do
|
||||||
|
|||||||
10
dist/javascripts/app.js
vendored
10
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "standard-notes-web",
|
"name": "standard-notes-web",
|
||||||
"version": "3.0.24",
|
"version": "3.0.25",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user