chore(react): start rendering nodes in note map

This commit is contained in:
Elian Doran
2025-10-04 12:29:37 +03:00
parent 09811d23f6
commit e32237559e
6 changed files with 171 additions and 154 deletions

View File

@@ -1,6 +1,6 @@
import { NoteMapLink, NoteMapPostResponse } from "@triliumnext/commons";
import server from "../../services/server";
import { NodeObject } from "force-graph";
import { LinkObject, NodeObject } from "force-graph";
type MapType = "tree" | "link";
@@ -11,13 +11,22 @@ interface GroupedLink {
names: string[];
}
interface Node extends NodeObject {
export interface Node extends NodeObject {
id: string;
name: string;
type: string;
color: string;
}
export interface Link extends LinkObject<NodeObject> {
id: string;
name: string;
x: number;
y: number;
source: Node;
target: Node;
}
export interface NotesAndRelationsData {
nodes: Node[];
links: {