File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import AddIcon from '@mui/icons-material/Add';
3838import SearchIcon from '@mui/icons-material/Search' ;
3939import SwapHorizIcon from '@mui/icons-material/SwapHoriz' ;
4040import MoreIcon from '@mui/icons-material/MoreVert' ;
41+ import ClearIcon from '@mui/icons-material/Clear' ;
4142import ConnectionManager from './components/ConnectionManager' ;
4243const { ipcRenderer } = window . require ( 'electron' ) ;
4344
@@ -314,6 +315,44 @@ function App() {
314315 Showing { keys . length } of { totalKeys } keys
315316 </ Typography >
316317 </ Box >
318+
319+ < Box sx = { { mb : 2 } } >
320+ < TextField
321+ fullWidth
322+ label = "Search Keys"
323+ value = { searchPattern }
324+ onChange = { ( e ) => setSearchPattern ( e . target . value ) }
325+ onKeyPress = { ( e ) => e . key === 'Enter' && loadKeys ( true ) }
326+ placeholder = "Use * as wildcard (e.g., user:*, *name)"
327+ InputProps = { {
328+ endAdornment : (
329+ < InputAdornment position = "end" >
330+ < Tooltip title = "Search" >
331+ < IconButton
332+ onClick = { ( ) => loadKeys ( true ) }
333+ disabled = { loading }
334+ >
335+ < SearchIcon />
336+ </ IconButton >
337+ </ Tooltip >
338+ { searchPattern && (
339+ < Tooltip title = "Clear search" >
340+ < IconButton
341+ onClick = { ( ) => {
342+ setSearchPattern ( '' ) ;
343+ loadKeys ( true ) ;
344+ } }
345+ disabled = { loading }
346+ >
347+ < ClearIcon />
348+ </ IconButton >
349+ </ Tooltip >
350+ ) }
351+ </ InputAdornment >
352+ ) ,
353+ } }
354+ />
355+ </ Box >
317356
318357 < List >
319358 { keys . map ( ( k ) => (
You can’t perform that action at this time.
0 commit comments