mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 15:36:50 +08:00
### What problem does this PR solve? fix: Optimize internationalization configuration - Update multi-language options, adding general translations for functions like Select All and Clear - Add internationalization support for modules like Chat, Search, and Datasets ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -18,6 +18,7 @@ import { TreeData } from '@antv/g6/lib/types';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import React, { useCallback, useEffect, useRef } from 'react';
|
||||
import { ErrorBoundary, FallbackProps } from 'react-error-boundary';
|
||||
import { useIsDarkTheme } from '../theme-provider';
|
||||
|
||||
const rootId = 'root';
|
||||
|
||||
@ -322,7 +323,7 @@ const IndentedTree = ({ data, show, style = {} }: IProps) => {
|
||||
node.children.forEach((child, idx) => assignIds(child, node.id, idx));
|
||||
}
|
||||
}, []);
|
||||
|
||||
const isDark = useIsDarkTheme();
|
||||
const render = useCallback(
|
||||
async (data: TreeData) => {
|
||||
const graph: Graph = new Graph({
|
||||
@ -335,7 +336,8 @@ const IndentedTree = ({ data, show, style = {} }: IProps) => {
|
||||
labelBackground: (datum) => datum.id === rootId,
|
||||
labelBackgroundRadius: 0,
|
||||
labelBackgroundFill: '#576286',
|
||||
labelFill: (datum) => (datum.id === rootId ? '#fff' : '#666'),
|
||||
labelFill: isDark ? '#fff' : '#333',
|
||||
// labelFill: (datum) => (datum.id === rootId ? '#fff' : '#666'),
|
||||
labelText: (d) => d.style?.labelText || d.id,
|
||||
labelTextAlign: (datum) =>
|
||||
datum.id === rootId ? 'center' : 'left',
|
||||
|
||||
Reference in New Issue
Block a user