yangdx
commited on
Commit
·
e8519f9
1
Parent(s):
ecaa7f0
Add node types
Browse files
lightrag_webui/src/components/graph/Legend.tsx
CHANGED
@@ -16,7 +16,9 @@ const PREDEFINED_TYPES = [
|
|
16 |
'weapon',
|
17 |
'animal',
|
18 |
'unknown',
|
19 |
-
'
|
|
|
|
|
20 |
]
|
21 |
|
22 |
interface LegendProps {
|
|
|
16 |
'weapon',
|
17 |
'animal',
|
18 |
'unknown',
|
19 |
+
'object',
|
20 |
+
'group',
|
21 |
+
'technology',
|
22 |
]
|
23 |
|
24 |
interface LegendProps {
|
lightrag_webui/src/hooks/useLightragGraph.tsx
CHANGED
@@ -74,7 +74,12 @@ const TYPE_SYNONYMS: Record<string, string> = {
|
|
74 |
'object': 'object',
|
75 |
'物品': 'object',
|
76 |
'stuff': 'object',
|
77 |
-
'物体': 'object'
|
|
|
|
|
|
|
|
|
|
|
78 |
};
|
79 |
|
80 |
// 节点类型到颜色的映射
|
@@ -91,21 +96,21 @@ const NODE_TYPE_COLORS: Record<string, string> = {
|
|
91 |
'equipment': '#2F4F4F', // DarkSlateGray
|
92 |
'weapon': '#4421af', // DeepPurple
|
93 |
'object': '#00cc00', // Green
|
|
|
94 |
};
|
95 |
|
96 |
// Extended colors pool - Used for unknown node types
|
97 |
const EXTENDED_COLORS = [
|
98 |
-
'#cd071e', // ChinaRed
|
99 |
-
'#0000ff', // Blue
|
100 |
-
'#9b3a31', // DarkBrown
|
101 |
-
'#0f558a', // NavyBlue
|
102 |
'#5a2c6d', // DeepViolet
|
103 |
-
'#
|
|
|
104 |
'#00CED1', // DarkTurquoise
|
105 |
-
'#
|
106 |
-
'#bd7ebe', // LightViolet
|
107 |
'#b2e061', // YellowGreen
|
|
|
108 |
'#6ef7b3', // LightGreen
|
|
|
|
|
109 |
];
|
110 |
|
111 |
// Select color based on node type
|
|
|
74 |
'object': 'object',
|
75 |
'物品': 'object',
|
76 |
'stuff': 'object',
|
77 |
+
'物体': 'object',
|
78 |
+
|
79 |
+
'group': 'group',
|
80 |
+
'群组': 'group',
|
81 |
+
'community': 'group',
|
82 |
+
'社区': 'group'
|
83 |
};
|
84 |
|
85 |
// 节点类型到颜色的映射
|
|
|
96 |
'equipment': '#2F4F4F', // DarkSlateGray
|
97 |
'weapon': '#4421af', // DeepPurple
|
98 |
'object': '#00cc00', // Green
|
99 |
+
'group': '#0f558a', // NavyBlue
|
100 |
};
|
101 |
|
102 |
// Extended colors pool - Used for unknown node types
|
103 |
const EXTENDED_COLORS = [
|
|
|
|
|
|
|
|
|
104 |
'#5a2c6d', // DeepViolet
|
105 |
+
'#0000ff', // Blue
|
106 |
+
'#cd071e', // ChinaRed
|
107 |
'#00CED1', // DarkTurquoise
|
108 |
+
'#9b3a31', // DarkBrown
|
|
|
109 |
'#b2e061', // YellowGreen
|
110 |
+
'#bd7ebe', // LightViolet
|
111 |
'#6ef7b3', // LightGreen
|
112 |
+
'#003366', // DarkBlue
|
113 |
+
'#DEB887', // BurlyWood
|
114 |
];
|
115 |
|
116 |
// Select color based on node type
|
lightrag_webui/src/locales/ar.json
CHANGED
@@ -155,7 +155,8 @@
|
|
155 |
"weapon": "سلاح",
|
156 |
"animal": "حيوان",
|
157 |
"unknown": "غير معروف",
|
158 |
-
"object": "
|
|
|
159 |
"technology": "العلوم"
|
160 |
},
|
161 |
"sideBar": {
|
|
|
155 |
"weapon": "سلاح",
|
156 |
"animal": "حيوان",
|
157 |
"unknown": "غير معروف",
|
158 |
+
"object": "مصنوع",
|
159 |
+
"group": "مجموعة",
|
160 |
"technology": "العلوم"
|
161 |
},
|
162 |
"sideBar": {
|
lightrag_webui/src/locales/fr.json
CHANGED
@@ -156,6 +156,7 @@
|
|
156 |
"animal": "Animal",
|
157 |
"unknown": "Inconnu",
|
158 |
"object": "Objet",
|
|
|
159 |
"technology": "Technologie"
|
160 |
},
|
161 |
"sideBar": {
|
|
|
156 |
"animal": "Animal",
|
157 |
"unknown": "Inconnu",
|
158 |
"object": "Objet",
|
159 |
+
"group": "Groupe",
|
160 |
"technology": "Technologie"
|
161 |
},
|
162 |
"sideBar": {
|
lightrag_webui/src/locales/zh.json
CHANGED
@@ -156,6 +156,7 @@
|
|
156 |
"animal": "动物",
|
157 |
"unknown": "未知",
|
158 |
"object": "物品",
|
|
|
159 |
"technology": "技术"
|
160 |
},
|
161 |
"sideBar": {
|
|
|
156 |
"animal": "动物",
|
157 |
"unknown": "未知",
|
158 |
"object": "物品",
|
159 |
+
"group": "群组",
|
160 |
"technology": "技术"
|
161 |
},
|
162 |
"sideBar": {
|