diff --git a/MythicReactUI/src/components/MythicComponents/MythicTableToolbar.js b/MythicReactUI/src/components/MythicComponents/MythicTableToolbar.js index d88fe0f0..faeef724 100644 --- a/MythicReactUI/src/components/MythicComponents/MythicTableToolbar.js +++ b/MythicReactUI/src/components/MythicComponents/MythicTableToolbar.js @@ -9,9 +9,9 @@ import Tooltip from '@mui/material/Tooltip'; import SearchIcon from '@mui/icons-material/Search'; import MythicTextField from './MythicTextField'; -export const MythicTableToolbar = ({children, className = "", style = {}}) => { +export const MythicTableToolbar = ({children, className = "", style = {}, variant}) => { return ( - + {children} ); @@ -77,7 +77,7 @@ export const MythicSearchField = ({ onClick={onSearch} size="small" > - + diff --git a/MythicReactUI/src/components/pages/Search/CallbackSearchTable.js b/MythicReactUI/src/components/pages/Search/CallbackSearchTable.js index e9e89d8c..0537f243 100644 --- a/MythicReactUI/src/components/pages/Search/CallbackSearchTable.js +++ b/MythicReactUI/src/components/pages/Search/CallbackSearchTable.js @@ -93,8 +93,9 @@ function CallbackSearchTableRow(props){ return ( - {setOpenDeleteDialog(false);}} onSubmit={onAcceptDelete} open={openDeleteDialog} acceptText={props.active ? "Hide" : "Restore" }/> - + {openDeleteDialog && + {setOpenDeleteDialog(false);}} onSubmit={onAcceptDelete} open={openDeleteDialog} acceptText={props.active ? "Hide" : "Restore" }/> + } {!props.active ? ( {setOpenDeleteDialog(true);}}> diff --git a/MythicReactUI/src/components/pages/Search/CredentialTable.js b/MythicReactUI/src/components/pages/Search/CredentialTable.js index be21bbca..211f3011 100644 --- a/MythicReactUI/src/components/pages/Search/CredentialTable.js +++ b/MythicReactUI/src/components/pages/Search/CredentialTable.js @@ -313,7 +313,9 @@ function CredentialTableRow(props){ return ( - {setOpenDeleteDialog(false);}} onSubmit={onAcceptDelete} open={openDeleteDialog} acceptText={props.deleted ? "Restore" : "Remove" }/> + {openDeleteDialog && + {setOpenDeleteDialog(false);}} onSubmit={onAcceptDelete} open={openDeleteDialog} acceptText={props.deleted ? "Restore" : "Remove" }/> + } {editCommentDialogOpen && {setEditCommentDialogOpen(false);}} diff --git a/MythicReactUI/src/components/pages/Search/SearchTabCallbacks.js b/MythicReactUI/src/components/pages/Search/SearchTabCallbacks.js index b2d64f5f..da563a34 100644 --- a/MythicReactUI/src/components/pages/Search/SearchTabCallbacks.js +++ b/MythicReactUI/src/components/pages/Search/SearchTabCallbacks.js @@ -230,7 +230,7 @@ const SearchTabCallbacksSearchPanel = (props) => { } }, [props.value, props.index]) return ( - + diff --git a/MythicReactUI/src/components/pages/Search/SearchTabCredentials.js b/MythicReactUI/src/components/pages/Search/SearchTabCredentials.js index 9642bda0..a31e0f6a 100644 --- a/MythicReactUI/src/components/pages/Search/SearchTabCredentials.js +++ b/MythicReactUI/src/components/pages/Search/SearchTabCredentials.js @@ -216,7 +216,7 @@ const SearchTabCredentialsSearchPanel = (props) => { } }, [props.value, props.index]) return ( - + diff --git a/MythicReactUI/src/components/pages/Search/SearchTabFiles.js b/MythicReactUI/src/components/pages/Search/SearchTabFiles.js index 8cf29bd2..16130610 100644 --- a/MythicReactUI/src/components/pages/Search/SearchTabFiles.js +++ b/MythicReactUI/src/components/pages/Search/SearchTabFiles.js @@ -552,7 +552,7 @@ const SearchTabFilesSearchPanel = (props) => { } }, [props.value, props.index]); return ( - + diff --git a/MythicReactUI/src/components/pages/Search/SearchTabPayloads.js b/MythicReactUI/src/components/pages/Search/SearchTabPayloads.js index 2d1080c1..5d1c3910 100644 --- a/MythicReactUI/src/components/pages/Search/SearchTabPayloads.js +++ b/MythicReactUI/src/components/pages/Search/SearchTabPayloads.js @@ -138,11 +138,7 @@ const SearchTabPayloadsSearchPanel = (props) => { props.onChangeAutogeneratedField(!showAutogenerated); } const handleSearchValueChange = (name, value, error) => { - switch(name){ - case "Search...": - setSearch(value); - break; - } + setSearch(value); } const handleSearchFieldChange = (event) => { setSearchField(event.target.value); @@ -235,7 +231,7 @@ const SearchTabPayloadsSearchPanel = (props) => { fetchOptions(); }, []); return ( - + diff --git a/MythicReactUI/src/components/pages/Search/SearchTabTasks.js b/MythicReactUI/src/components/pages/Search/SearchTabTasks.js index 50476af6..c62c8f40 100644 --- a/MythicReactUI/src/components/pages/Search/SearchTabTasks.js +++ b/MythicReactUI/src/components/pages/Search/SearchTabTasks.js @@ -256,7 +256,7 @@ const SearchTabTasksSearchPanel = (props) => { } }, [props.value, props.index]); return ( - + diff --git a/MythicReactUI/src/components/pages/Search/TokenTable.js b/MythicReactUI/src/components/pages/Search/TokenTable.js index 1e223420..fbc5d3f8 100644 --- a/MythicReactUI/src/components/pages/Search/TokenTable.js +++ b/MythicReactUI/src/components/pages/Search/TokenTable.js @@ -136,7 +136,9 @@ function TokenTableRow(props){ return ( - {setOpenDeleteDialog(false);}} onSubmit={onAcceptDelete} open={openDeleteDialog} acceptText={props.deleted ? "Restore" : "Hide" }/> + {openDeleteDialog && + {setOpenDeleteDialog(false);}} onSubmit={onAcceptDelete} open={openDeleteDialog} acceptText={props.deleted ? "Restore" : "Hide" }/> + } {props.deleted ? ( diff --git a/MythicReactUI/src/themes/GlobalStyles.js b/MythicReactUI/src/themes/GlobalStyles.js index 10548a3e..9ba68db7 100644 --- a/MythicReactUI/src/themes/GlobalStyles.js +++ b/MythicReactUI/src/themes/GlobalStyles.js @@ -474,6 +474,12 @@ tspan { padding: 0.5rem; width: 100%; } +.mythic-table-toolbar-search { + align-items: stretch; + background-color: ${(props) => props.theme.palette.mode === "dark" ? "rgba(255,255,255,0.028)" : "rgba(0,0,0,0.012)"}; + gap: 0.45rem; + padding: 0.45rem; +} .mythic-table-toolbar-group { align-items: center; display: flex; @@ -483,6 +489,9 @@ tspan { max-width: 100%; min-width: min(100%, 9rem); } +.mythic-table-toolbar-search .mythic-table-toolbar-group { + gap: 0.35rem; +} .mythic-table-toolbar-group-grow { flex: 1 1 20rem; min-width: min(100%, 16rem); @@ -497,6 +506,10 @@ tspan { min-width: min(100%, 10rem); width: 100%; } +.mythic-table-toolbar-search .mythic-toolbar-select, +.mythic-table-toolbar-search .MythicTextField-root .MuiInputBase-root { + background-color: ${(props) => props.theme.palette.background.paper}; +} .mythic-toolbar-button { white-space: nowrap; } @@ -516,11 +529,34 @@ tspan { color: ${(props) => props.theme.palette.success.main} !important; } .mythic-toolbar-toggle { + background-color: ${(props) => props.theme.palette.mode === "dark" ? "rgba(255,255,255,0.035)" : "rgba(0,0,0,0.025)"} !important; + border: 1px solid ${(props) => props.theme.table?.borderSoft || props.theme.borderColor} !important; + border-radius: ${(props) => props.theme.shape.borderRadius}px !important; + color: ${(props) => props.theme.palette.text.secondary} !important; + gap: 0.35rem; + min-height: 32px; + text-transform: none; white-space: nowrap; } +.mythic-toolbar-toggle.Mui-selected { + background-color: ${(props) => props.theme.palette.primary.main + "18"} !important; + border-color: ${(props) => props.theme.palette.primary.main + "55"} !important; + color: ${(props) => props.theme.palette.primary.main} !important; +} +.mythic-toolbar-toggle:hover, +.mythic-toolbar-toggle.Mui-selected:hover { + background-color: ${(props) => props.theme.palette.primary.main + "22"} !important; + border-color: ${(props) => props.theme.palette.primary.main + "77"} !important; + color: ${(props) => props.theme.palette.primary.main} !important; +} .mythic-toolbar-icon-button { + color: ${(props) => props.theme.palette.text.secondary} !important; margin-right: 2px; } +.mythic-toolbar-icon-button:hover { + background-color: ${(props) => props.theme.palette.primary.main + "16"} !important; + color: ${(props) => props.theme.palette.primary.main} !important; +} .mythic-dialog-body { display: flex; flex-direction: column;