Add SettingsDisplay component to show graph settings

- Create SettingsDisplay component
- Display graphQueryMaxDepth and graphMinDegree
- Position display at bottom-left corner
This commit is contained in:
yangdx
2025-03-12 06:10:48 +08:00
parent 0e234beaf5
commit c910ba1d28
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { useSettingsStore } from '@/stores/settings'
/**
* Component that displays current values of important graph settings
* Positioned to the right of the toolbar at the bottom-left corner
*/
const SettingsDisplay = () => {
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>
)
}
export default SettingsDisplay