diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 546a1b3..8cc8401 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -1014,6 +1014,28 @@ function App(): JSX.Element { - + - + - + {activeTab === 'tuning' && } {activeTab === 'db_manager' && } {activeTab === 'event_monitor' && } diff --git a/src/renderer/src/components/UserGuide.tsx b/src/renderer/src/components/UserGuide.tsx index 75564ad..e94d4a5 100644 --- a/src/renderer/src/components/UserGuide.tsx +++ b/src/renderer/src/components/UserGuide.tsx @@ -12,7 +12,9 @@ import { Grid, Breadcrumbs, Link, - CircularProgress + CircularProgress, + TextField, + InputAdornment } from '@mui/material' import { MenuBook as GuideIcon, @@ -20,7 +22,8 @@ import { Info as InfoIcon, Lightbulb as TipIcon, ReportProblem as WarningIcon, - PriorityHigh as CautionIcon + PriorityHigh as CautionIcon, + Search as SearchIcon } from '@mui/icons-material' import { useTranslation } from 'react-i18next' import Prism from 'prismjs' @@ -33,6 +36,7 @@ interface Topic { const UserGuide = () => { const { t, i18n } = useTranslation() const [topics, setTopics] = useState([]) + const [searchQuery, setSearchQuery] = useState('') const [selectedTopic, setSelectedTopic] = useState('index.md') const [content, setContent] = useState('') const [loading, setLoading] = useState(false) @@ -266,10 +270,15 @@ const UserGuide = () => { return elements } + const filteredTopics = topics.filter(t => + t.title.toLowerCase().includes(searchQuery.toLowerCase()) || + t.file.toLowerCase().includes(searchQuery.toLowerCase()) + ) + return ( - + {/* Breadcrumbs */} - + } aria-label="breadcrumb"> @@ -290,14 +299,40 @@ const UserGuide = () => { bgcolor: 'rgba(255,255,255,0.02)', borderColor: 'rgba(255,255,255,0.05)', borderRadius: 3, - overflow: 'hidden' + overflow: 'hidden', + height: '100%', + display: 'flex', + flexDirection: 'column' }} > - + + setSearchQuery(e.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + sx={{ + '& .MuiOutlinedInput-root': { + bgcolor: 'rgba(0,0,0,0.2)', + borderRadius: 2, + '& fieldset': { borderColor: 'rgba(255,255,255,0.05)' }, + } + }} + /> + + {t('common.topics', 'KONULAR')} - - {topics.map((topic) => ( + + {filteredTopics.map((topic) => (