Skip to content

Commit 305d28b

Browse files
committed
remove warning about the relation map - trilium is sunsetting anyway, there's no point now in deprecating this feature, fixes #4779
1 parent a88bf68 commit 305d28b

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/public/app/menus/tree_context_menu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export default class TreeContextMenu {
5050
{ title: 'Open in a new tab <kbd>Ctrl+Click</kbd>', command: "openInTab", uiIcon: "bx bx-empty", enabled: noSelectedNotes },
5151
{ title: 'Open in a new split', command: "openNoteInSplit", uiIcon: "bx bx-dock-right", enabled: noSelectedNotes },
5252
{ title: 'Insert note after <kbd data-command="createNoteAfter"></kbd>', command: "insertNoteAfter", uiIcon: "bx bx-plus",
53-
items: insertNoteAfterEnabled ? await noteTypesService.getNoteTypeItems("insertNoteAfter", {removeDeprecatedTypes: true}) : null,
53+
items: insertNoteAfterEnabled ? await noteTypesService.getNoteTypeItems("insertNoteAfter") : null,
5454
enabled: insertNoteAfterEnabled && noSelectedNotes },
5555
{ title: 'Insert child note <kbd data-command="createNoteInto"></kbd>', command: "insertChildNote", uiIcon: "bx bx-plus",
56-
items: notSearch ? await noteTypesService.getNoteTypeItems("insertChildNote", {removeDeprecatedTypes: true}) : null,
56+
items: notSearch ? await noteTypesService.getNoteTypeItems("insertChildNote") : null,
5757
enabled: notSearch && noSelectedNotes },
5858
{ title: 'Delete <kbd data-command="deleteNotes"></kbd>', command: "deleteNotes", uiIcon: "bx bx-trash",
5959
enabled: isNotRoot && !isHoisted && parentNotSearch },

src/public/app/services/note_types.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
import server from "./server.js";
22
import froca from "./froca.js";
33

4-
async function getNoteTypeItems(command, opts = {}) {
5-
const removeDeprecatedTypes = !!opts.removeDeprecatedTypes;
6-
4+
async function getNoteTypeItems(command) {
75
const items = [
86
{ title: "Text", command: command, type: "text", uiIcon: "bx bx-note" },
97
{ title: "Code", command: command, type: "code", uiIcon: "bx bx-code" },
108
{ title: "Saved Search", command: command, type: "search", uiIcon: "bx bx-file-find" },
11-
{ title: "Relation Map", command: command, type: "relationMap", uiIcon: "bx bx-map-alt", deprecated: true },
9+
{ title: "Relation Map", command: command, type: "relationMap", uiIcon: "bx bx-map-alt" },
1210
{ title: "Note Map", command: command, type: "noteMap", uiIcon: "bx bx-map-alt" },
1311
{ title: "Render Note", command: command, type: "render", uiIcon: "bx bx-extension" },
1412
{ title: "Book", command: command, type: "book", uiIcon: "bx bx-book" },
1513
{ title: "Mermaid Diagram", command: command, type: "mermaid", uiIcon: "bx bx-selection" },
1614
{ title: "Canvas", command: command, type: "canvas", uiIcon: "bx bx-pen" },
1715
{ title: "Web View", command: command, type: "webView", uiIcon: "bx bx-globe-alt" },
18-
].filter(item => !removeDeprecatedTypes || !item.deprecated);
16+
];
1917

2018
const templateNoteIds = await server.get("search-templates");
2119
const templateNotes = await froca.getNotes(templateNoteIds);

src/public/app/widgets/type_widgets/relation_map.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ export default class RelationMapTypeWidget extends TypeWidget {
184184
}
185185

186186
async loadMapData() {
187-
toastService.showMessage("Relation Map has been deprecated since Trilium 0.63 and will be removed in a future version. Migrate your content to some other note type (e.g. canvas) as soon as possible.", 5000);
188-
189187
this.mapData = {
190188
notes: [],
191189
// it is important to have this exact value here so that initial transform is the same as this

0 commit comments

Comments
 (0)