Add translations for graph settings depth and degree labels

This commit is contained in:
yangdx
2025-03-12 14:36:58 +08:00
parent fb0f8e11fd
commit f43478505b
3 changed files with 8 additions and 2 deletions

View File

@@ -1,17 +1,19 @@
import { useSettingsStore } from '@/stores/settings'
import { useTranslation } from 'react-i18next'
/**
* Component that displays current values of important graph settings
* Positioned to the right of the toolbar at the bottom-left corner
*/
const SettingsDisplay = () => {
const { t } = useTranslation()
const graphQueryMaxDepth = useSettingsStore.use.graphQueryMaxDepth()
const graphMinDegree = useSettingsStore.use.graphMinDegree()
return (
<div className="absolute bottom-2 left-[calc(2rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400">
<div>Depth: {graphQueryMaxDepth}</div>
<div>Degree: {graphMinDegree}</div>
<div>{t('graphPanel.sideBar.settings.depth')}: {graphQueryMaxDepth}</div>
<div>{t('graphPanel.sideBar.settings.degree')}: {graphMinDegree}</div>
</div>
)
}