Remove notes tags display
This commit is contained in:
@@ -186,7 +186,6 @@ export class AppState {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
addAppEventObserver() {
|
addAppEventObserver() {
|
||||||
this.unsubApp = this.application.addEventObserver(async (eventName) => {
|
this.unsubApp = this.application.addEventObserver(async (eventName) => {
|
||||||
if (eventName === ApplicationEvent.Started) {
|
if (eventName === ApplicationEvent.Started) {
|
||||||
@@ -254,14 +253,14 @@ export class AppState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the tags that are referncing this note */
|
/** Returns the tags that are referncing this note */
|
||||||
getNoteTags(note: SNNote) {
|
public getNoteTags(note: SNNote) {
|
||||||
return this.application.referencingForItem(note).filter((ref) => {
|
return this.application.referencingForItem(note).filter((ref) => {
|
||||||
return ref.content_type === ContentType.Tag;
|
return ref.content_type === ContentType.Tag;
|
||||||
}) as SNTag[]
|
}) as SNTag[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the notes this tag references */
|
/** Returns the notes this tag references */
|
||||||
getTagNotes(tag: SNTag) {
|
public getTagNotes(tag: SNTag) {
|
||||||
if (tag.isSmartTag()) {
|
if (tag.isSmartTag()) {
|
||||||
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
|
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
|
||||||
} else {
|
} else {
|
||||||
@@ -271,7 +270,7 @@ export class AppState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getSelectedTag() {
|
public getSelectedTag() {
|
||||||
return this.selectedTag;
|
return this.selectedTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -887,13 +887,14 @@ class EditorViewCtrl extends PureViewCtrl implements EditorViewScope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newRelationships.length > 0) {
|
if (newRelationships.length > 0) {
|
||||||
await this.application.changeAndSaveItems(
|
await this.application.changeItems(
|
||||||
Uuids(newRelationships),
|
Uuids(newRelationships),
|
||||||
(mutator) => {
|
(mutator) => {
|
||||||
mutator.addItemAsRelationship(note);
|
mutator.addItemAsRelationship(note);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
this.application.sync();
|
||||||
this.reloadTagsString();
|
this.reloadTagsString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,13 +94,6 @@
|
|||||||
faded="self.state.hideDate"
|
faded="self.state.hideDate"
|
||||||
label="'Date'"
|
label="'Date'"
|
||||||
)
|
)
|
||||||
menu-row(
|
|
||||||
action="self.selectedMenuItem(); self.toggleWebPrefKey('hideTags')"
|
|
||||||
circle="self.state.hideTags ? 'danger' : 'success'"
|
|
||||||
desc="'Hide the list of tags associated with each note'"
|
|
||||||
faded="self.state.hideTags"
|
|
||||||
label="'Tags'"
|
|
||||||
)
|
|
||||||
.scrollable
|
.scrollable
|
||||||
#notes-scrollable.infinite-scroll(
|
#notes-scrollable.infinite-scroll(
|
||||||
can-load='true',
|
can-load='true',
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ type NotesState = {
|
|||||||
hidePinned?: boolean
|
hidePinned?: boolean
|
||||||
hideNotePreview?: boolean
|
hideNotePreview?: boolean
|
||||||
hideDate?: boolean
|
hideDate?: boolean
|
||||||
hideTags?: boolean
|
|
||||||
noteFilter: { text: string }
|
noteFilter: { text: string }
|
||||||
mutable: { showMenu: boolean }
|
mutable: { showMenu: boolean }
|
||||||
}
|
}
|
||||||
@@ -367,10 +366,6 @@ class NotesViewCtrl extends PureViewCtrl {
|
|||||||
WebPrefKey.NotesHideDate,
|
WebPrefKey.NotesHideDate,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
viewOptions.hideTags = this.application!.getPrefsService().getValue(
|
|
||||||
WebPrefKey.NotesHideTags,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
await this.setNotesState({
|
await this.setNotesState({
|
||||||
...viewOptions
|
...viewOptions
|
||||||
});
|
});
|
||||||
@@ -394,8 +389,8 @@ class NotesViewCtrl extends PureViewCtrl {
|
|||||||
|
|
||||||
onPanelResize(
|
onPanelResize(
|
||||||
newWidth: number,
|
newWidth: number,
|
||||||
lastLeft: number,
|
_: number,
|
||||||
isAtMaxWidth: boolean,
|
__: boolean,
|
||||||
isCollapsed: boolean
|
isCollapsed: boolean
|
||||||
) {
|
) {
|
||||||
this.application!.getPrefsService().setUserPrefValue(
|
this.application!.getPrefsService().setUserPrefValue(
|
||||||
|
|||||||
56
dist/javascripts/app.js
vendored
56
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
Reference in New Issue
Block a user